• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UID类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UID的典型用法代码示例。如果您正苦于以下问题:C# UID类的具体用法?C# UID怎么用?C# UID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UID类属于命名空间,在下文中一共展示了UID类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
        }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:28,代码来源:ClearView.cs


示例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      
    }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:8,代码来源:GraphicsLayersListCtrl.cs


示例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);
 }
开发者ID:NobodysNightmare,项目名称:TFStackEmulator,代码行数:9,代码来源:EnumeratableDevice.cs


示例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;
        }
开发者ID:NobodysNightmare,项目名称:TFStackEmulator,代码行数:9,代码来源:RandomAmbientLightBricklet.cs


示例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
 }
开发者ID:ApexGIS,项目名称:developer-support,代码行数:9,代码来源:TurnOnOff_DocWindow.cs


示例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}";
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:14,代码来源:DMCIIRasterType.cs


示例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;
        }
开发者ID:NobodysNightmare,项目名称:TFStackEmulator,代码行数:12,代码来源:RandomBarometerBricklet.cs


示例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}";
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:17,代码来源:ThumbnailBuilder.cs


示例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;
        }
开发者ID:bsnider,项目名称:developer-support,代码行数:49,代码来源:rotateFeatures.cs


示例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;
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:18,代码来源:NDVICustomFunctionUIClass.cs


示例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}";
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:16,代码来源:NDVICustomFunction.cs


示例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;
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:20,代码来源:WatermarkFunctionUIClass.cs


示例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;
     }
 }
开发者ID:chinasio,项目名称:BathymetryTools10,代码行数:17,代码来源:extBathymetryTools.cs


示例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;
        }
开发者ID:305120262,项目名称:SeanWatermarkRasterFunction,代码行数:24,代码来源:WatermarkFunctionUIClass.cs


示例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();
        }
开发者ID:chinasio,项目名称:BathymetryTools10,代码行数:23,代码来源:extBathymetryTools.cs


示例16: EnablePublisherExtension

        private bool EnablePublisherExtension()
        {

            bool checkedOutOK = false;

            try
            {
                IExtensionManager extMgr = new ExtensionManagerClass();

                IExtensionManagerAdmin extAdmin = (IExtensionManagerAdmin)extMgr;

                UID uid = new UID();
                uid.Value = "esriPublisherUI.Publisher";
                object obj = 0;
                extAdmin.AddExtension(uid, ref obj);

                IExtensionConfig extConfig = (IExtensionConfig)extMgr.FindExtension(uid);

                if ((!(extConfig.State == esriExtensionState.esriESUnavailable)))
                {
                    //This checks on the extension
                    extConfig.State = esriExtensionState.esriESEnabled;
                    checkedOutOK = true;
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Publisher extension has failed to check out.", "Error");
            }

            return checkedOutOK;
        } 
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:32,代码来源:PublishMap.cs


示例17: OnCreate

    public override void OnCreate(object hook)
    {
      if (hook == null)
        return;

      m_application = hook as IApplication;

      //get the editor
      UID editorUid = new UID();
      editorUid.Value = "esriEditor.Editor";
      m_editor = m_application.FindExtensionByCLSID(editorUid) as IEditor3;
    }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:12,代码来源:AngleAngleCmd.cs


示例18: OnCreate

        /// <summary>
        /// Occurs when this tool is created
        /// </summary>
        /// <param name="hook">Instance of the application</param>
        public override void OnCreate(object hook)
        {
            m_application = hook as IApplication;

            //get the editor
            UID editorUid = new UID();
            editorUid.Value = "esriEditor.Editor";
            m_editor = m_application.FindExtensionByCLSID(editorUid) as IEditor3;
            m_editEvents = m_editor as IEditEvents_Event;
            m_editEvents5 = m_editor as IEditEvents5_Event;
        }
开发者ID:609878415,项目名称:fff12138,代码行数:15,代码来源:AddVectorTool.cs


示例19: AddItem

 /// <summary>
 /// Add a command item to the command bar by an Unique Identifier Object (UID).
 /// </summary>
 private void AddItem(UID itemUID)
 {
     m_toolbarMenu.AddItem(itemUID.Value, itemUID.SubType, -1, m_beginGroupFlag, esriCommandStyles.esriCommandStyleIconAndText);
     m_beginGroupFlag = false; //Reset group flag
 }
开发者ID:weigiser,项目名称:AOProjects,代码行数:8,代码来源:ContextMenuClass.cs


示例20: CreateLateralFromMainPoint

        private static bool CreateLateralFromMainPoint(ref IApplication app, ref  IEditor editor, IFeature pointFeature,
                                                     IFeatureLayer mainLineFLayer, IFeatureLayer targetLineFLayer, IEditTemplate targetLineEditTemplate,
                                                     List<pointAlongSettings> pointAlongLayers, bool startAtMain, FromToField[] fromToPairs, LateralLine_AngleDetails latDet, bool SearchOnLayer, bool CheckSelection)
        {
            List<IFeature> pointsAlong = new List<IFeature>();

            //IGeometry pGeometry;
            IPolyline polyline;

            //IPoint pToPoint;
            //IPoint pFromPoint;
            //IConstructPoint pConstructPoint;

            UID pId = new UID();

            IFeature pFeat;
            // double pi;
            double dblDegrees;
            double dblAngleRad;
            double dblLateralLength;

            //Find LineAngle field in the layer
            //iLayerLineAngleFieldPos = pFC.FindField(c_sLineAngleFieldName)
            //If iLayerLineAngleFieldPos < 0 Then
            //  MsgBox c_sLineAngleFieldName & " was not found in the highlighted layer.", vbCritical, c_sTitle
            //  Exit Sub
            //End If

            if (targetLineFLayer.FeatureClass.ShapeType != esriGeometryType.esriGeometryPolyline)
            { //MsgBox "Edit target must be a polyline layer (i.e. laterals).", vbCritical, c_sTitle
                return false;
            }

            dblDegrees = 90;
            if (!Globals.IsNumeric(latDet.AngleField))
            {
                int fldIdx = Globals.GetFieldIndex(pointFeature.Class.Fields, latDet.AngleField);

                if (fldIdx > -1)
                {

                    string temp = pointFeature.get_Value(fldIdx).ToString();
                    if (Globals.IsNumeric(temp))
                    {
                        Double.TryParse(temp, out dblDegrees);
                    }
                }

            }
            else
            {
                Double.TryParse(latDet.AngleField, out dblDegrees);
            }

            dblLateralLength = 10;
            if (!Globals.IsNumeric(latDet.LengthField))
            {
                int fldIdx = Globals.GetFieldIndex(pointFeature.Class.Fields, latDet.LengthField);

                if (fldIdx > -1)
                {

                    string temp = pointFeature.get_Value(fldIdx).ToString();
                    if (Globals.IsNumeric(temp))
                    {
                        Double.TryParse(temp, out dblLateralLength);
                    }
                }

            }
            else
            {
                Double.TryParse(latDet.LengthField, out dblLateralLength);
            }

            if (latDet.AngleType.ToUpper() == "CLOCK")
            {
                dblAngleRad = Globals.ConvertDegToRads(Globals.ConvertClockPositionToDegrees(dblDegrees));
            }
            else if (latDet.AngleType.ToUpper() == "RADIANS")
                dblAngleRad = Globals.ConvertDegToRads(dblDegrees);
            else
                dblAngleRad = dblDegrees;

            string dirVal = latDet.DirectionField;
            if (dirVal != "")
            {
                int fldIdx = Globals.GetFieldIndex(pointFeature.Class.Fields, dirVal);

                if (fldIdx > -1)
                {

                    dirVal = pointFeature.get_Value(fldIdx).ToString();

                }

            }
            else
            {
                dirVal = "";
//.........这里部分代码省略.........
开发者ID:tuyndv,项目名称:local-government-desktop-addins,代码行数:101,代码来源:ConstructionTools.cs



注:本文中的UID类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UIDClass类代码示例发布时间:2022-05-24
下一篇:
C# UIControlledApplication类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap