本文整理汇总了C#中UID类的典型用法代码示例。如果您正苦于以下问题:C# UID类的具体用法?C# UID怎么用?C# UID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UID类属于命名空间,在下文中一共展示了UID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnClick
/// <summary>
/// ����¼�
/// </summary>
public override void OnClick()
{
DataEditCommon.g_pAxMapControl.CurrentTool = null;
IMap pMap = m_hookHelper.FocusMap;
UID puid = new UID();
puid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}";//IFeatureLayer
IEnumLayer enumLayer = pMap.get_Layers(puid, true);
enumLayer.Reset();
ILayer player;
player = enumLayer.Next();
IFeatureLayer featureLayer = null;
while (player != null)
{
featureLayer = player as IFeatureLayer;
IFeatureLayerDefinition featureLayerDef = featureLayer as IFeatureLayerDefinition;
string sWhereClause = "";//����ɸѡ����
featureLayerDef.DefinitionExpression = sWhereClause;
player = enumLayer.Next();
}
m_hookHelper.ActiveView.Extent = m_hookHelper.ActiveView.FullExtent;
m_hookHelper.ActiveView.Refresh();
}
示例2: GraphicsLayersListCtrl
public GraphicsLayersListCtrl()
{
InitializeComponent();
//initialize the UID that will be used later to get the graphics layers
m_uid = new UIDClass();
m_uid.Value = "{34B2EF81-F4AC-11D1-A245-080009B6F22B}"; //graphics layers category
}
示例3: EnumeratableDevice
protected EnumeratableDevice(UID uid, DeviceIdentifier deviceIdentifier)
{
UID = uid;
DeviceIdentifier = deviceIdentifier;
Position = 'a'; //TODO: better default depending on brick/bricklet?
ConnectedUID = new UID(0);
HardwareVersion = new Version(1, 0, 0);
FirmwareVersion = new Version(1, 0, 0);
}
示例4: RandomAmbientLightBricklet
public RandomAmbientLightBricklet(UID uid)
: base(uid, DeviceIdentifier.BrickletAmbientLight)
{
AnalogValue = new ValueDecorator<UInt16>(UID, 2, 5, 6, 14);
Illuminance = new ValueDecorator<UInt16>(UID, 1, 3, 4, 13, AnalogValue);
Decorators = Illuminance;
Illuminance.CurrentValue = 5000;
}
示例5: OnClick
protected override void OnClick()
{
UID uid = new UID();
uid.Value = ThisAddIn.IDs._DocWindowSami; // ThisAddin.IDs returns all the class IDs under this Add-in project
IDockableWindowManager dockWindowManager = ArcMap.Application as IDockableWindowManager;
IDockableWindow dockableWindow = dockWindowManager.GetDockableWindow(uid);
//IDockableWindow dockableWindow = GetDockableWindow(ArcMap.Application, "esriGeoprocessingUI.GPCommandWindow"); // Open a System dockable window
dockableWindow.Show(true); // use False to hide the dockable window
}
示例6: DMCIIRasterTypeFactory
UID myUID; // UID for the DMCII Raster Type.
#endregion
#region IRasterTypeFactory Members
public DMCIIRasterTypeFactory()
{
string rasterTypeName = "DMCII Raster Type";
myRasterTypeNames = new StrArrayClass();
myRasterTypeNames.Add(rasterTypeName);
myUID = new UIDClass();
myUID.Value = "{5DEF8E3C-51E9-49af-A3BE-EF8C68A4BBBE}";
}
示例7: RandomBarometerBricklet
public RandomBarometerBricklet(UID uid)
: base(uid, DeviceIdentifier.BrickletBarometer)
{
AirPressure = new ValueDecorator<Int32>(UID, 1, 3, 4, 15);
Altitude = new ValueDecorator<Int32>(UID, 2, 5, 6, 16, AirPressure);
Temperature = new ValueDecorator<Int16>(UID, 14, Altitude);
Decorators = Temperature;
AirPressure.CurrentValue = 200000;
CalculateAltitude();
Temperature.CurrentValue = 2300;
}
示例8: ThumbnailFactory
UID myUID; // UID for the Thumbnail Raster type.
#endregion
#region IRasterTypeFactory Members
public ThumbnailFactory()
{
// The Raster Type name should follow the pattern
// 'Thumbnail ' follwed by the name of the built-in
// Raster Type to attach the Thumbnail Builder to.
myRasterTypeNames = new StrArrayClass();
myRasterTypeNames.Add("Thumbnail Raster Dataset");
myRasterTypeNames.Add("Thumbnail QuickBird");
myUID = new UIDClass();
myUID.Value = "{C6629CC4-B301-451a-9481-4D7751E9701C}";
}
示例9: OnClick
protected override void OnClick()
{
//
// TODO: Sample code showing how to access button host
//
UID id = new UID();
id.Value = "esriEditor.Editor";
IApplication application = ArcMap.Application;
IEditor editor = application.FindExtensionByCLSID(id) as IEditor;
if (editor.EditState != esriEditState.esriStateEditing)
{
MessageBox.Show("MUST BE IN EDIT SESSION");
return;
}
editor.StartOperation();
for (int i = 0; i < ArcMap.Document.ActiveView.FocusMap.LayerCount; i++)
{
if (ArcMap.Document.ActiveView.FocusMap.Layer[i] is IFeatureLayer)
{
IFeatureLayer layer = (IFeatureLayer)ArcMap.Document.ActiveView.FocusMap.Layer[i];
IFeatureSelection featureSelection = layer as IFeatureSelection;
if (featureSelection.SelectionSet.Count > 0)
{
ISelectionSet selectionSet = featureSelection.SelectionSet as ISelectionSet2;
IFeature feature;
IEnumFeature features = editor.EditSelection;
while ((feature = features.Next()) != null)
{
IPoint point = new Point
{
X = (((feature.Shape.Envelope.XMax + feature.Shape.Envelope.XMin)/2.0)),
Y = (((feature.Shape.Envelope.YMax + feature.Shape.Envelope.YMin)/2.0)),
SpatialReference = feature.Shape.SpatialReference
};
Double radians = .5*Math.PI;
IGeometry geometry = feature.ShapeCopy;
((ITransform2D)geometry).Rotate(point ,radians);
feature.Shape = geometry;
feature.Store();
}
}
}
}
editor.StopOperation("DONE");
ArcMap.Document.ActiveView.Refresh();
ArcMap.Application.CurrentTool = null;
}
示例10: NDVICustomFunctionUIClass
IRasterFunctionVariable myBandIndicesVar; // Variable for the Band Indices property.
#endregion
public NDVICustomFunctionUIClass()
{
myForm = new NDVICustomFunctionUIForm();
myArgs = null;
myPriority = 100;
myPageSite = null;
myHelpFile = "";
mySupportedID = new UIDClass();
// The UID of the NDVICustomFunction object.
mySupportedID.Value = "{" + "652642F3-9106-4EB3-9262-A4C39E03BC56" + "}";
templateMode = false;
myRasterVar = null;
myBandIndicesVar = null;
}
示例11: NDVICustomFunction
public NDVICustomFunction()
{
myName = "NDVI Custom Function";
myPixeltype = rstPixelType.PT_FLOAT;
myDescription = "Custom NDVI Function which calculates the NDVI without any scaling.";
myValidFlag = true;
myFunctionHelper = new RasterFunctionHelper();
myInpPixeltype = myPixeltype;
myInpNumBands = 0;
myBandIndices = null;
myUID = new UID();
myUID.Value = "{652642F3-9106-4EB3-9262-A4C39E03BC56}";
}
示例12: WatermarkFunctionUIClass
IRasterFunctionVariable myWatermarkImagePathVar; // Variable for WatermarkImagePath property.
#endregion
public WatermarkFunctionUIClass()
{
myForm = new WatermarkFunctionUIForm();
myArgs = null;
myPriority = 100;
myPageSite = null;
myHelpFile = "";
mySupportedID = new UIDClass();
mySupportedID.Value = "{" + "168721E7-7010-4a36-B886-F644437B164D" + "}";
templateMode = false;
isFormReadOnly = false;
myRasterVar = null;
myBlendPercentageVar = null;
myWatermarkLocationVar = null;
myWatermarkImagePathVar = null;
}
示例13: GetMainBar
private ICommandBar GetMainBar()
{
try
{
IApplication papp = ArcMap.Application;
UID uid = new UID();
uid.Value = c_mainMenuID;
MxDocument mx = papp.Document as MxDocument;
ICommandBars cmdBars = mx.CommandBars;
ICommandItem cmd = cmdBars.Find(uid, false, false);
return cmd as ICommandBar;
}
catch (Exception ex)
{
return null;
}
}
示例14: WatermarkFunctionUIClass
bool templateMode; // Flag to specify template mode.
#endregion Fields
#region Constructors
public WatermarkFunctionUIClass()
{
myForm = new WatermarkFunctionUIForm();
myArgs = null;
myPriority = 100;
myPageSite = null;
myHelpFile = "";
mySupportedID = new UIDClass();
mySupportedID.Value = "{" + "25BE29A6-AAF9-496E-AE73-130D5947682D" + "}";
templateMode = false;
isFormReadOnly = false;
myRasterVar = null;
myBlendPercentageVar = null;
myWatermarkImagePathVar = null;
myXGapVar = null;
myYGapVar = null;
}
示例15: AddMenu
private void AddMenu()
{
ICommandBar mainMenuBar = GetMainBar();
if (mainMenuBar == null)
{
return;
}
string menuID = "BathymetryTools";
ICommandItem cmdItem = mainMenuBar.Find(menuID, false);
if (cmdItem != null)
{
return;
}
UID uid = new UID();
uid.Value = menuID;
Object index = mainMenuBar.Count - 1;
ICommandBar menuBathymetry = mainMenuBar.Add(uid, index) as ICommandBar;
ICommandItem main = mainMenuBar as ICommandItem;
main.Refresh();
}