示例#1
0
        public void ribCB_Basislayer_Initialized(object sender, EventArgs e)
        {
            RibbonCombo ribCombo = (RibbonCombo)sender;

            myRegistry.regIO objRegistry = new myRegistry.regIO();
            string           Basislayer  = (string)objRegistry.readValue("blocks", "Basislayer");

            //Basislayer
            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
            objLayer.checkLayer(Basislayer, true);

            foreach (LayerTableRecord ltr in objLayer.lsLayerTableRecord)
            {
                string layName = ltr.Name;
                if (layName.Length > 2)
                {
                    if (layName.Substring(layName.Length - 2, 2) == "-P")
                    {
                        RibbonLabel ribLabel = new RibbonLabel();
                        ribLabel.Text = layName;
                        ribCombo.Items.Add(ribLabel);

                        if (ribLabel.Text == Basislayer)
                        {
                            ribCombo.Current = ribLabel;
                        }
                    }
                }
            }
        }
示例#2
0
        //Zeichnung aktiviert
        public void docColDocAct(object senderObj, DocumentCollectionEventArgs docColDocAcrEvtArgs)
        {
            myRegistry.regIO objRegIO   = new myRegistry.regIO();
            string           Basislayer = (string)objRegIO.readValue("blocks", "Basislayer");

            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
        }
示例#3
0
        void ribCB_Basislayer_DropDownOpened(object sender, EventArgs e)
        {
            RibbonCombo ribCombo = (RibbonCombo)sender;

            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.refresh();
            List <string> lsPunktlayer = new List <string>();

            foreach (LayerTableRecord ltr in objLayer.lsLayerTableRecord)
            {
                string layName = ltr.Name;
                if (layName.Length > 2)
                {
                    if (layName.Substring(layName.Length - 2, 2) == "-P")
                    {
                        lsPunktlayer.Add(layName);
                    }
                }
            }
        }
示例#4
0
        //Events
        void Application_OnIdle(object sender, EventArgs e)
        {
            // Remove the event when it is fired
            Application.Idle -= new EventHandler(Application_OnIdle);

            // Add our Quick Access Toolbar item
            addRessourceTab();

            //prüfen, ob App registriert ist
            myRegistry.regIO objRegIO = new myRegistry.regIO();
            string           Basislayer;

            if ((Basislayer = (string)objRegIO.readValue("blocks", "Basislayer")) == null)
            {
                myRegistry.regApp.register();
            }

            //Basislayer prüfen bzw. erzeugen
            myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
            objLayer.checkLayer(Basislayer, true);
        }
示例#5
0
            public void Execute(object parameter)
            {
                if (parameter.ToString() == "Autodesk.Windows.RibbonButton")
                {
                    Autodesk.Windows.RibbonButton bt           = (Autodesk.Windows.RibbonButton)parameter;
                    myFunctions.AttSwitch         objAttSwitch = new myFunctions.AttSwitch();
                    myAutoCAD.Zeichnen            objZeichnen  = new myAutoCAD.Zeichnen();

                    switch (bt.Id)
                    {
                    case "PtImport":
                        myFunctions.PtImport objPtImport = new myFunctions.PtImport();
                        objPtImport.run();

                        break;

                    case "PtExport":
                        myFunctions.PtExport objPtExport = new myFunctions.PtExport();
                        objPtExport.run();
                        break;

                    case "PtIns":
                        objZeichnen.PTIns();

                        break;

                    case "BlockManipulator":
                        myFunctions.BlockManipulator objBlockManipulator = new myFunctions.BlockManipulator();
                        objBlockManipulator.ShowDialog();

                        break;

                    case "layExport":
                        myAutoCAD.myLayer objLayer = myAutoCAD.myLayer.Instance;
                        objLayer.export();

                        break;

                    case "Obj3d":
                        myFunctions.Obj3d obj3d = new myFunctions.Obj3d();
                        obj3d.run();

                        break;

                    case "AttPon":
                        objAttSwitch.run("AttPon");
                        break;

                    case "AttPoff":
                        objAttSwitch.run("AttPoff");
                        break;

                    case "AttHon":
                        objAttSwitch.run("AttHon");
                        break;

                    case "AttHoff":
                        objAttSwitch.run("AttHoff");
                        break;

                    case "Block3P":
                        objZeichnen.Block3P();
                        break;

                    case "Settings":
                        myFunctions.Settings objSettings = new myFunctions.Settings();
                        objSettings.ShowDialog();
                        break;

                    case "AboutBox":
                        myFunctions.AboutBox objAboutBox = new myFunctions.AboutBox();
                        objAboutBox.ShowDialog();
                        break;
                    }
                }
            }