本文整理汇总了C#中UIDClass类的典型用法代码示例。如果您正苦于以下问题:C# UIDClass类的具体用法?C# UIDClass怎么用?C# UIDClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIDClass类属于命名空间,在下文中一共展示了UIDClass类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EditorEventsDialogCommand
public EditorEventsDialogCommand()
{
// SetupDockableWindow();
UID windowID = new UIDClass();
windowID.Value = @"ESRI_Employee_Events_EditorEventsDialog";
m_dockableWindow = ArcMap.DockableWindowManager.GetDockableWindow(windowID);
}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:7,代码来源:EditorEventsDialogCommand.cs
示例2: OnClick
protected override void OnClick()
{
UID theUid = new UIDClass();
theUid.Value = ThisAddIn.IDs.Gbdx_Answer_Factory_AnswerFactoryDockableWindow;
var window = ArcMap.DockableWindowManager.GetDockableWindow(theUid);
window.Show(!window.IsVisible());
}
开发者ID:DigitalGlobe,项目名称:DGConnect-ESRI,代码行数:7,代码来源:AnswerFactoryButton.cs
示例3: EditorEventsDialog
public EditorEventsDialog(object hook)
{
InitializeComponent();
this.Hook = hook;
e_dockWinForm = this;
//get a reference to the editor
UID uid = new UIDClass();
uid.Value = "esriEditor.Editor";
m_editor = ArcMap.Application.FindExtensionByCLSID(uid) as ESRI.ArcGIS.Editor.IEditor;
m_TabControl = e_dockWinForm.tabControl1;
System.Collections.IEnumerator e = m_TabControl.TabPages.GetEnumerator();
e.MoveNext();
m_listenTab = e.Current as TabPage;
e.MoveNext();
m_selectTab = e.Current as TabPage;
CheckedListBox editEventList = m_selectTab.GetNextControl(m_selectTab, true) as CheckedListBox;
editEventList.ItemCheck += new ItemCheckEventHandler(editEventList_ItemCheck);
ListBox listEvent = m_listenTab.GetNextControl(m_listenTab, true) as ListBox;
listEvent.MouseDown += new MouseEventHandler(listEvent_MouseDown);
eventListener = new EventListener(m_editor);
eventListener.Changed += new ChangedEventHandler(eventListener_Changed);
//populate the editor events
editEventList.Items.AddRange(Enum.GetNames(typeof(EventListener.EditorEvent)));
}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:30,代码来源:EditorEventsDialog.cs
示例4: ApplyOSMClassExtension
/// <summary>Apply the OSM Class Extension to the given table</summary>
/// <remarks>Obtains an exclusive schema lock if possible otherwise throws an exception</remarks>
public static void ApplyOSMClassExtension(this ITable table)
{
if ((table == null) || (table.Extension is IOSMClassExtension))
return;
IClassSchemaEdit3 schemaEdit = table as IClassSchemaEdit3;
if (schemaEdit == null)
return;
int osmIDIndex = table.Fields.FindField("OSMID");
using (SchemaLockManager lockMgr = new SchemaLockManager(table))
{
UID osmClassExtensionUID = new UIDClass() { Value = _OSM_CLASS_EXT_GUID };
IPropertySet extensionPropertSet = null;
if (osmIDIndex > -1)
{
// at release 2.1 we changed the OSMID field type to string, hence only when we find the string we are assuming version 2
if (table.Fields.get_Field(osmIDIndex).Type == esriFieldType.esriFieldTypeString)
{
extensionPropertSet = new PropertySetClass();
extensionPropertSet.SetProperty("VERSION", _OSM_EXTENSION_VERSION);
}
}
schemaEdit.AlterClassExtensionCLSID(osmClassExtensionUID, extensionPropertSet);
schemaEdit.AlterClassExtensionProperties(extensionPropertSet);
}
}
开发者ID:weepingdog,项目名称:arcgis-osm-editor,代码行数:32,代码来源:OSMClassExtensionManager.cs
示例5: GetDockableWindow
public IDockableWindow GetDockableWindow(IApplication app, string winName)
{
IDockableWindowManager dWinManager = app as IDockableWindowManager;
UID winID = new UIDClass();
winID.Value = winName;
return dWinManager.GetDockableWindow(winID);
}
开发者ID:usgin,项目名称:arcmap-cswclient,代码行数:7,代码来源:ButtonCSW.cs
示例6: OnActivate
protected override void OnActivate()
{
base.OnActivate();
try
{
if (Painter.ActiveLayer == null)
{
return;
}
UID dockWinID = new UIDClass();
dockWinID.Value = ThisAddIn.IDs.ValueSymbolForm;
IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);
if (!dockWindow.IsVisible())
{
dockWindow.Show(true);
}
IRasterLayer rasterLayer = (IRasterLayer)Painter.ActiveLayer;
IRasterProps rasterProp = (IRasterProps)rasterLayer.Raster;
layerExetent = new Envelope(0, rasterProp.Height - 1, 0, rasterProp.Width - 1);
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Unfortunately, the application meets an error.\n\nSource: {0}\nSite: {1}\nMessage: {2}", ex.Source, ex.TargetSite, ex.Message), "Error");
}
}
开发者ID:nazzal88,项目名称:ares,代码行数:28,代码来源:FreeDrawTool.cs
示例7: HasEdits
public static bool HasEdits(IApplication app, TransactionManager tm)
{
try
{
IWorkspaceEdit workspace = (IWorkspaceEdit)tm.Current().PGDBConnection;
bool processQA = false;
bool hasEdits = false;
workspace.HasEdits(ref hasEdits);
UID pUID = new UIDClass();
pUID.Value = "esriEditor.Editor";
IEditor editor = (IEditor)app.FindExtensionByCLSID(pUID);
IEditTask task = editor.CurrentTask;
IEditTask resetTask = editor.get_Task(0);
editor.CurrentTask = resetTask;
editor.CurrentTask = task;
IEditor2 editor2 = (IEditor2)app.FindExtensionByCLSID(pUID);
bool hasCachedEdits = editor2.HasEdits();
return hasCachedEdits || hasEdits;
}
catch (Exception e)
{
Logger.Write("Error testing if transaction has edits: " + e.Message + " : " + e.StackTrace, Logger.LogLevel.Debug);
throw new Exception("Error", e);
}
}
开发者ID:EAWCS1,项目名称:SUITT,代码行数:29,代码来源:Utils.cs
示例8: setupTrackingEnv
//Initialize the Tracking Environment, you only need to do this once
private void setupTrackingEnv()
{
if (!m_bInitialized && ArcMap.Application != null)
{
IExtensionManager extentionManager = new ExtensionManagerClass();
UID uid = new UIDClass();
uid.Value = "esriTrackingAnalyst.TrackingEngineUtil";
object mapRef = ArcMap.Application;
((IExtensionManagerAdmin)extentionManager).AddExtension(uid, ref mapRef);
ITrackingEnvironment3 trackingEnv = new TrackingEnvironmentClass();
try
{
trackingEnv.Initialize(ref mapRef);
}
catch (Exception ex)
{
}
trackingEnv.EnableTemporalDisplayManagement = true;
m_bInitialized = true;
}
}
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:26,代码来源:AddTemporalLayerButton.cs
示例9: CreateTable
private static ITable CreateTable(IWorkspace2 workspace, string tableName, IFields fields)
{
UID uid = new UIDClass {Value = "esriGeoDatabase.Object"};
if (workspace == null) return null;
IFeatureWorkspace featWorkspace = (IFeatureWorkspace) workspace;
if (workspace.NameExists[esriDatasetType.esriDTTable, tableName])
{
using (ComReleaser releaser = new ComReleaser())
{
ITable table = featWorkspace.OpenTable(tableName);
releaser.ManageLifetime(table);
((IDataset) table).Delete();
}
}
IFieldChecker fieldChecker = new FieldCheckerClass();
IEnumFieldError enumFieldError = null;
IFields validatedFields = null;
fieldChecker.ValidateWorkspace = workspace as IWorkspace;
fieldChecker.Validate(fields, out enumFieldError, out validatedFields);
return featWorkspace.CreateTable(tableName, validatedFields, uid, null, string.Empty);
}
开发者ID:ApexGIS,项目名称:developer-support,代码行数:27,代码来源:ExecuteInsertCursor.cs
示例10: SaveEdits
public static bool SaveEdits(IApplication app, TransactionManager tm)
{
bool result = false;
try
{
if (HasEdits(app, tm))
{
UID pUID = new UIDClass();
pUID.Value = "esriEditor.Editor";
IWorkspaceEdit workspace = (IWorkspaceEdit)tm.Current().PGDBConnection;
IEditor2 editor2 = (IEditor2)app.FindExtensionByCLSID(pUID);
editor2.StopEditing(true);
editor2.StartEditing((IWorkspace)workspace);
workspace.StopEditing(true);
workspace.StartEditing(false);
}
result = true;
}
catch (Exception e)
{
Logger.Write("Error saving edits to PGDB", Logger.LogLevel.Debug);
MessageBox.Show("An error occured while attempting to save current edits.");
result = false;
}
return result;
}
开发者ID:EAWCS1,项目名称:SUITT,代码行数:28,代码来源:Utils.cs
示例11: OnActivate
protected override void OnActivate()
{
try
{
UID dockWinID = new UIDClass();
dockWinID.Value = ThisAddIn.IDs.EditForm;
IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);
if (!dockWindow.IsVisible())
{
dockWindow.Show(true);
}
if (Editor.ActiveLayer == null)
{
return;
}
IRasterLayer rasterLayer = (IRasterLayer)Editor.ActiveLayer;
IRasterProps rasterProp = (IRasterProps)rasterLayer.Raster;
maxIndex = new Position(rasterProp.Width - 1, rasterProp.Height - 1);
EditForm editForm = AddIn.FromID<EditForm.AddinImpl>(ThisAddIn.IDs.EditForm).UI;
editForm.SetLayer(Editor.ActiveLayer.Name);
System.Array noDataValue = (System.Array)rasterProp.NoDataValue;
editForm.RasterGridView.NoDataValue = Convert.ToDouble(noDataValue.GetValue(0));
editForm.SetNoDataValue(editForm.RasterGridView.NoDataValue);
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Unfortunately, the application meets an error.\n\nSource: {0}\nSite: {1}\nMessage: {2}", ex.Source, ex.TargetSite, ex.Message), "Error");
}
base.OnActivate();
}
开发者ID:nazzal88,项目名称:ares,代码行数:34,代码来源:EditTool.cs
示例12: AddLegend
/// <summary>
/// 图例
/// </summary>
/// <returns></returns>
public bool AddLegend()
{
IGraphicsContainer pGraphicsContainer;
pGraphicsContainer = mainPage.PageLayout as IGraphicsContainer;
IMapFrame pFocusMapFrame;
pFocusMapFrame = pGraphicsContainer.FindFrame(mainPage.ActiveView.FocusMap) as IMapFrame;
UID u = new UIDClass();
u.Value = "esriCarto.Legend";
IMapSurroundFrame pLegendFrame;
pLegendFrame = pFocusMapFrame.CreateSurroundFrame(u, null);
IEnvelope pEnvelope;
pEnvelope = new EnvelopeClass();
pEnvelope.PutCoords(3, 3, 6, 8);
IElement pElement;
pElement = pLegendFrame as IElement;
pElement.Geometry = pEnvelope;
ILegendWizard pLegendWizard;
pLegendWizard = new LegendWizard();
pLegendWizard.PageLayout = mainPage.PageLayout;
pLegendWizard.InitialLegendFrame = pLegendFrame;
bool bOk = pLegendWizard.DoModal(mainPage.hWnd);
if (bOk == true)
{
IElement ele = pLegendWizard.LegendFrame as IElement;
pGraphicsContainer.AddElement(ele, 0);
mainPage.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
}
return true;
}
开发者ID:xfgxfg,项目名称:CropWatchField,代码行数:33,代码来源:AddMapSouround-old.cs
示例13: frmBuffer
public frmBuffer(IMap _pMap)
{
InitializeComponent();
//load all the feature layers in the map to the layers combo
UID uid = new UIDClass();
uid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}";
pMap = _pMap;
layers = pMap.get_Layers(uid, true);
layers.Reset();
ILayer layer = null;
while ((layer = layers.Next()) != null)
{
cboLayers.Items.Add(layer.Name);
}
//select the first layer
if (cboLayers.Items.Count > 0)
cboLayers.SelectedIndex = 0;
string tempDir = System.IO.Path.GetTempPath();
txtOutputPath.Text = System.IO.Path.Combine(tempDir, ((string)cboLayers.SelectedItem + "_buffer.shp"));
//set the default units of the buffer
int units = Convert.ToInt32(pMap.MapUnits);
cboUnits.SelectedIndex = units;
}
开发者ID:lovelll,项目名称:DQHP,代码行数:25,代码来源:frmBuffer.cs
示例14: OnClick
/// <summary>
/// The on click.
/// </summary>
protected override void OnClick()
{
// if (ArcMap.Application.CurrentTool.Name != ThisAddIn.IDs.Gbdx_Aggregations_AggregationSelector)
// {
// UID theUid = new UIDClass();
// theUid.Value = ThisAddIn.IDs.Gbdx_Aggregations_AggregationWindow;
// var window = ArcMap.DockableWindowManager.GetDockableWindow(theUid);
// window.Show(!window.IsVisible());
// }
try
{
if (ArcMap.Application.CurrentTool.Name != ThisAddIn.IDs.Gbdx_Aggregations_AggregationSelector)
{
UID theUid = new UIDClass();
theUid.Value = ThisAddIn.IDs.Gbdx_Aggregations_Aggregations;
var window = ArcMap.DockableWindowManager.GetDockableWindow(theUid);
window.Show(!window.IsVisible());
}
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
开发者ID:DigitalGlobe,项目名称:DGConnect-ESRI,代码行数:28,代码来源:AggregationButton.cs
示例15: Invoke
internal static void Invoke(string tool)
{
UID uniqueId = new UIDClass();
uniqueId.Value = "esriGeoprocessingUI.ArcToolboxExtension";
var arcToolboxExtension = ArcMap.Application.FindExtensionByCLSID(uniqueId) as IArcToolboxExtension;
if (arcToolboxExtension == null)
return;
IGPTool gpTool = null;
try
{
gpTool = arcToolboxExtension.ArcToolbox.GetToolbyNameString(tool);
}
catch (COMException)
{
MessageBox.Show(@"Unable to find tool: " + tool + Environment.NewLine + @"in the system toolbox.",
@"Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
if (gpTool == null)
return;
IGPToolCommandHelper gpCommandHelper = new GPToolCommandHelper();
gpCommandHelper.SetTool(gpTool);
gpCommandHelper.Invoke(null);
}
开发者ID:regan-sarwas,项目名称:AlaskaPak,代码行数:26,代码来源:ArcToolBox.cs
示例16: OnClick
/// <summary>
/// The on click method for the button are the arcmap toolbar.
/// </summary>
protected override void OnClick()
{
UID theUid = new UIDClass();
theUid.Value = ThisAddIn.IDs.Gbdx_Vector_Index_Forms_VectorIndexDockable;
IDockableWindow vectorIndexDockableWindow = ArcMap.DockableWindowManager.GetDockableWindow(theUid);
vectorIndexDockableWindow.Show(!vectorIndexDockableWindow.IsVisible());
}
开发者ID:DigitalGlobe,项目名称:DGConnect-ESRI,代码行数:11,代码来源:VectorIndexButton.cs
示例17: CurveByInferenceExtension
public CurveByInferenceExtension()
{
//update the dockable window so that it has the correct version
UID dockWinID = new UIDClass();
dockWinID.Value = ThisAddIn.IDs.CurveByInferenceWindow;
s_CurveByInfrenceWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);
s_CurveByInfrenceWindow.Caption = String.Format("{0} ({1})", s_CurveByInfrenceWindow.Caption, ThisAddIn.Version);
}
开发者ID:travisval,项目名称:ParcelFabricCurveByInference,代码行数:8,代码来源:CurveByInferenceExtension.cs
示例18: OnClick
protected override void OnClick()
{
this.Enabled = true;
UID dockWinID = new UIDClass();
dockWinID.Value = @"DataManager_addin_frm_DataManager";
ESRI.ArcGIS.Framework.IDockableWindow s_dockWindow = ArcCatalog.DockableWindowManager.GetDockableWindow(dockWinID);
s_dockWindow.Show(!s_dockWindow.IsVisible());
}
开发者ID:hsarslan,项目名称:DataManager_addin,代码行数:8,代码来源:cmd_DataManager.cs
示例19: OnClick
protected override void OnClick()
{
UID theUid = new UIDClass();
theUid.Value = ThisAddIn.IDs.dwnMapUnitLegendEditor;
IDockableWindow mapUnitForm = ArcMap.DockableWindowManager.GetDockableWindow(theUid);
if (mapUnitForm.IsVisible() == false) { mapUnitForm.Show(true); }
}
开发者ID:genhan2011,项目名称:ncgmp-toolbar,代码行数:8,代码来源:btnShowMapUnitLegendEditor.cs
示例20: GetLayers
private IEnumLayer GetLayers()
{
UID uid = new UIDClass();
uid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}";
IEnumLayer layers = _hookHelper.FocusMap.get_Layers(uid, true);
return layers;
}
开发者ID:weigiser,项目名称:AOProjects,代码行数:8,代码来源:FormAggregation.cs
注:本文中的UIDClass类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论