public void ShowPalette()
        {
            //如果面板还没有被创建
            if (ps == null)
            {
                //新建一个面板对象,标题为"工具面板"
                ps = new PaletteSet("工具面板");
                //设置面板的最小尺寸为控件的尺寸
                ps.MinimumSize = new System.Drawing.Size(150, 240);
                //添加命令工具面板项
                ps.Add("命令工具", new CommandTools());
                //添加修改工具面板项
                ps.Add("修改工具", new ModifyTools());
            }
            //获取命令行编辑器对象,主要是为了坐标转换用
            Editor ed = AcadApp.DocumentManager.MdiActiveDocument.Editor;

            //在设置停靠属性之前,必须让面板可见,否则总是停靠在窗口的左侧
            ps.Visible = true;
            //设置面板不停靠在窗口的任一边
            ps.Dock = DockSides.None;
            //设置面板开始的位置
            Point3d pt = new Point3d(400, 800, 0);

            //将Point3d的值转换为System.Point的值,即将AutoCAD的点坐标转换为屏幕坐标,再将该屏幕坐标值设置为面板的初始位置
            ps.Location = ed.PointToScreen(pt, 0);
            //设置面板为半透明状
            ps.Opacity = 50;
        }
        //public AcadProcessesView()
        //{
        //    PaletteSet = new PaletteSet("Технология");
        //}
        public void Initialize()
        {
            PaletteSet = new PaletteSet("Технология")
            {
                Style       = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton,
                MinimumSize = new Size(300, 200),
                KeepFocus   = true,
                Visible     = true
            };
            //_paletteSet.Add(name, control);
            //PaletteSet = new PaletteSet("Технология", new Guid("63B8DB5B-10E4-4924-B8A2-A9CF9158E4F6"));
            //PaletteSet.Style = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu |
            //    PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton;
            //PaletteSet.MinimumSize = new System.Drawing.Size(300, 200);

            ObjectForm = new ObjectForm(this, ObjectList);
            PaletteSet.Add("Объекты", ObjectForm);

            SettingForm = new SettingForm(ProcessOptions, this);  // TODO - загрузка ProcessOptions
            PaletteSet.Add("Настройка", SettingForm);

            ProgramForm = new ProgramForm(ProgramList, ProcessOptions);
            PaletteSet.Add("Программа", ProgramForm);

            PaletteSet.PaletteActivated += new PaletteActivatedEventHandler(PaletteSet_PaletteActivated);
            Application.DocumentManager.MdiActiveDocument.Editor.SelectionAdded += new SelectionAddedEventHandler(CallbackSelectionAdded);
        }
Exemple #3
0
 public void TestUI()
 {
     //inicializa la interfaz
     compuertasSet       = new PaletteSet("Compuertas");
     myControlCompuertas = new CompuertasUI();
     myControlFuentes    = new FuentesUI();
     compuertasSet.Add("Galería", myControlCompuertas);
     compuertasSet.Dock = DockSides.Left;
     compuertasSet.Add("Entradas", myControlFuentes);
     compuertasSet.Visible = true;
 }
Exemple #4
0
        public static void ShowPallet()
        {
            if (_mainPallet != null)
            {
                return;
            }
            _mainPallet = InitializeMainPallet();
            _mainPallet.StateChanged += _mainPallet_StateChanged;
            _algorythimRepository     = new AlgorythimRepository();
            _partRepository           = new PartRepository();

            var especificationsView = new Views.EspecificationsControl(_partRepository);
            var algorythimView      = new Views.AlgorythimControl(_partRepository, _algorythimRepository);
            var partsView           = new Views.PartsListControl(_partRepository);
            var helper = new BuildingProcessHelper();
            var prop   = new SlabProperties {
                Algorythim = algorythimView.ViewModel, Parts = especificationsView.ViewModel
            };

            especificationsView.ViewModel.WhenAnyValue(x => x.SelectedModulation).Subscribe(m => algorythimView.ViewModel.SelectedModulation = m);
            especificationsView.ViewModel.DrawSlab.Subscribe(async _ =>
            {
                try
                {
                    prop.MaxPoint   = helper.GetMaxPoint(especificationsView.ViewModel.SelectedOutline);
                    prop.StartPoint = helper.GetStartPoint(especificationsView.ViewModel.SelectedOutline, especificationsView.ViewModel.SpecifyStartPoint);

                    using (var builder = new SlabBuilder(_partRepository, prop))
                        await builder.Start();
                }
                catch (OperationCanceledException) { }
                catch (Autodesk.AutoCAD.Runtime.Exception e)
                {
                    MessageBox.Show($"{e.Message}\n\n{e.StackTrace}");
                }
            });

            especificationsView.ViewModel.SelectOutline.Subscribe(_ =>
            {
                try
                {
                    especificationsView.ViewModel.SelectedOutline = helper.SelectOutline();
                } catch (ArgumentException) { MessageBox.Show("Selecione um contorno válido. (Polilinha fechada)"); }
            });

            _mainPallet.Add("Especificações", GetElementHost(especificationsView));
            _mainPallet.Add("Algoritmo", GetElementHost(algorythimView));
            _mainPallet.Add("Peças", GetElementHost(partsView));
        }
Exemple #5
0
 public void AddPalette()
 {
     if (psFlag == false)
     {
         psFlag = true;
         UserControl1 myControl = new UserControl1();
         //myControl.Width = 10;
         //myControl.Height = 20;
         if (ps == null)
         {
             ps             = new PaletteSet("PaletteSet");
             ps.Style       = PaletteSetStyles.ShowAutoHideButton;
             ps.MinimumSize = new System.Drawing.Size(155, 50);
             ps.Size        = new System.Drawing.Size(155, 50);
             ps.Add("PalettSet", myControl);
             ps.Style = PaletteSetStyles.ShowCloseButton;
         }
         ps.Visible = true;
     }
     else
     {
         ps.Visible = false;
         psFlag     = false;
     }
 }
Exemple #6
0
        public void AddPalette()
        {
            Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;

            try
            {
                if (palSet == null)
                {
                    palSet = new Autodesk.AutoCAD.Windows.PaletteSet("我的面板集");

                    palSet.Style       = PaletteSetStyles.ShowTabForSingle;
                    palSet.Style       = PaletteSetStyles.NameEditable;
                    palSet.Style       = PaletteSetStyles.ShowPropertiesMenu;
                    palSet.Style       = PaletteSetStyles.ShowAutoHideButton;
                    palSet.Style       = PaletteSetStyles.ShowCloseButton;
                    palSet.Opacity     = 90;
                    palSet.MinimumSize = new System.Drawing.Size(300, 300);
                    System.Windows.Forms.UserControl myPageCtrl = new ModelessForm();//注意这里是加载自己写的用户控件
                    //myPageCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
                    palSet.Add("我的页面", myPageCtrl);
                    palSet.Visible = true;
                }
            }

            catch
            {
                ed.WriteMessage("创建面板集错误");
            }
        }
        public bool Show()
        {
            if (ps == null)
            {
                ps       = new PaletteSet("Fensteroptionen");
                ps.Style =
                    PaletteSetStyles.NameEditable |
                    PaletteSetStyles.ShowPropertiesMenu |
                    PaletteSetStyles.ShowAutoHideButton |
                    PaletteSetStyles.ShowCloseButton;
                ps.MinimumSize =
                    new System.Drawing.Size(170, 164);
                ps.SetSize(new System.Drawing.Size(170, 164));

                ps.Add("FensterOptions", userControl);
                //ps.Add("Type Viewer 1", tvc);

                if (!ps.Visible)
                {
                    ps.Visible = true;
                }

                return(false);
            }
            else
            {
                if (!ps.Visible)
                {
                    ps.Visible = true;
                    return(false);
                }
                return(true);
            }
        }
Exemple #8
0
        /// <summary>
        ///     TODO
        /// </summary>
        private void CreatePal()
        {
            if (_rcPal == null)
            {
                _rcPal = new PaletteSet(PalName, new Guid("9468AF5F-77F3-4540-A448-70D34247EAC4"))
                {
                    Style = PaletteSetStyles.ShowPropertiesMenu
                            | PaletteSetStyles.ShowAutoHideButton
                            | PaletteSetStyles.ShowCloseButton
                };

                _palPanel = new UserControl();

                PopulatePal();
                //_palPanel.UpdateTheme();
                _rcPal.Add(PalName, _palPanel);

                // The following events are not visible in the designer, so
                // you must associate them with their event-handlers in code.
                _wBrowser.CanGoBackChanged +=
                    webBrowser1_CanGoBackChanged;
                _wBrowser.CanGoForwardChanged +=
                    webBrowser1_CanGoForwardChanged;

                // Load the user's home page.
                _wBrowser.GoHome();
            }

            _rcPal.Visible = true;
        }
Exemple #9
0
        public void MakePalette()
        {
            if (_PS == null)
            {
                clsReg clsReg  = new clsReg();
                String strGuid = clsReg.getMyGuid();
                _PS = new PaletteSet("LoadCalc", new Guid(strGuid))
                {
                    Style = Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowPropertiesMenu
                            | Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowAutoHideButton
                            | Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton
                            | Autodesk.AutoCAD.Windows.PaletteSetStyles.Snappable,

                    MinimumSize = new System.Drawing.Size(320, 370),
                    DockEnabled = DockSides.Left | DockSides.Right | DockSides.Bottom
                };
                //_PS = new PaletteSet("LoadCalc", new Guid(strGuid));

                //    _PS.Style = Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowPropertiesMenu
                //        | Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowAutoHideButton
                //        | Autodesk.AutoCAD.Windows.PaletteSetStyles.ShowCloseButton
                //        | Autodesk.AutoCAD.Windows.PaletteSetStyles.Snappable;


                //    _PS.MinimumSize = new System.Drawing.Size(320, 370);
                //    _PS.DockEnabled = DockSides.Left | DockSides.Right | DockSides.Bottom;


                UcMain ucMain = new UcMain();
                _PS.Add("LoadCalc", ucMain);
            }
            _PS.Visible = true;
            _PS[0].PaletteSet.Activate(0);
        }
        private static async Task Initialize()
        {
            // Create paletteSet
            myPaletteSet = PaletteManager.CreatePaletteSet();

            // Create usercontrol
            userControl = new MyUserControl();

            // Wire up palette to user control
            myPaletteSet.Add("Palette1", userControl);

            // Wire up events
            userControl.WebBrowser.DocumentCompleted += WebBrowser_DocumentCompleted;
            AutoCADManager.WireUpDocumentReloadEvent();
            AutoCADManager.DocumentChanged += AutoCADManager_DocumentChanged;

            // login and store code and token
            var loginUrl = await AuthManager.GetLoginUrl();

            // Ask user to login, and eventually accept permissions
            userControl.SetLoginUrl(loginUrl);

            // Show the palette
            myPaletteSet.Visible = true;
            myPaletteSet.Dock    = DockSides.Right; // This needs to be set here due to a bug in AutoCad 2016 that Dock should be set after visible.

            // Set initialized
            initialized = true;
        }
Exemple #11
0
        public void palette()
        {
            // 6. Add an "if" statement and check to see if the
            // PaletteSet declared in step 3 is equal to null. It will be
            // null the first time the command is run.
            // Note: Put the closing curly brace after step 9
            if (myPaletteSet == null)
            {
                // 7. The PaletteSet is nothing here so we create a a new PaletteSet
                // with a unique GUID. Use the new keyword. Make the Name Parameter
                // "My Palette". For the ToolID parameter generate a new GUID.
                // On the Tools menu select "Create Guid". On the Create GUID
                // Dialog select "Registry Format" Select New GUID and the copy.
                // Paste the GUID to use as the new System.Guid. Replace the curley
                // braces with double quotes. (The parameter for New Guid is a string)
                myPaletteSet = new PaletteSet("My Palette", new System.Guid("D61D0875-A507-4b73-8B5F-9266BEACD596"));

                // 8. Instantiate the UserControl1 variable created in
                // step 4. Use the new keyword. (New UserControl1 - need to
                // use the namespace too)
                // This control houses the tree control.
                myPalette = new Lab04_PaletteSet.UserControl();

                // 9. Add the UserControl to the PaletteSet. Use the Add method
                // of the PaletteSet instantiated in step 7. Use "Palette1" for the
                // name parameter and the control instantiated in step 8 for the
                // second parameter.
                myPaletteSet.Add("Palette1", myPalette);
            }

            // 10. Display the paletteset by making the Visible property of the
            // PaletteSet equal to true. The second time the command is run
            // this is the only code in this procedure that will be processed.
            myPaletteSet.Visible = true;
        }
Exemple #12
0
        public bool Show()
        {
            if (ps == null)
            {
                ps       = new PaletteSet("Auto-Id-Vergabe");
                ps.Style =
                    PaletteSetStyles.NameEditable |
                    PaletteSetStyles.ShowPropertiesMenu |
                    PaletteSetStyles.ShowAutoHideButton |
                    PaletteSetStyles.ShowCloseButton;
                ps.MinimumSize =
                    new System.Drawing.Size(170, 164);
#if ACAD2013_OR_NEWER
                ps.SetSize(new System.Drawing.Size(210, 164));
#endif

                ps.Add("AutoIdVergabe", userControl);

                if (!ps.Visible)
                {
                    ps.Visible = true;
                }

                return(false);
            }
            else
            {
                if (!ps.Visible)
                {
                    ps.Visible = true;
                    return(false);
                }
                return(true);
            }
        }
Exemple #13
0
        //[CommandMethod("AddPalette")]
        //[CommandMethod("architecturePlugin")]
        public void AddPalette()
        {
            if (ps != null)
            {
                if (!ps.Visible)
                {
                    ps.Visible = true;
                }
                return;
            }

            MyControl contr = new MyControl();

            ps = new PaletteSet("插件操作面板");


            ps.Visible     = true;
            ps.Style       = PaletteSetStyles.ShowTabForSingle;
            ps.Style       = PaletteSetStyles.NameEditable;
            ps.Style       = PaletteSetStyles.ShowPropertiesMenu;
            ps.Style       = PaletteSetStyles.ShowAutoHideButton;
            ps.Style       = PaletteSetStyles.ShowCloseButton;
            ps.Opacity     = 90;
            ps.Dock        = DockSides.Left;
            ps.MinimumSize = new System.Drawing.Size(200, 100);
            ps.Add("PaletteSet", contr);
        }
Exemple #14
0
        private void ShowPalette()
        {
            if (PaletteSet == null)
            {
                PaletteSet = new PaletteSet("Notches")
                {
                    DockEnabled = DockSides.None,

                    Size        = new Size(270, 400),
                    MinimumSize = new Size(270, 300)
                };

                var plugin     = new NotchesPlugin();
                var paramsView = new UI.ParamsView {
                    DataContext = plugin.Params
                };

                var host = new System.Windows.Forms.Integration.ElementHost();
                host.AutoSize = true;
                host.Dock     = System.Windows.Forms.DockStyle.Fill;
                host.Child    = paramsView;

                PaletteSet.Add("ParamsView ElementHost", host);

                plugin.Init();
            }

            PaletteSet.KeepFocus = true;
            PaletteSet.Visible   = true;
        }
Exemple #15
0
        public static void EditFoundation()
        {
            Document acDoc   = Application.DocumentManager.MdiActiveDocument;
            Database acCurDb = acDoc.Database;

            PromptSelectionOptions pso = new PromptSelectionOptions();

            pso.SingleOnly = true;
            PromptSelectionResult psr = acDoc.Editor.GetSelection(pso);

            if (psr.Status == PromptStatus.OK)
            {
                using (Transaction tr = acCurDb.TransactionManager.StartTransaction())
                {
                    foreach (SelectedObject so in psr.Value)
                    {
                        DBObject obj = tr.GetObject(so.ObjectId, OpenMode.ForRead);

                        ObjectId extId = obj.ExtensionDictionary;

                        if (extId != ObjectId.Null)
                        {
                            //now we will have extId...
                            DBDictionary dbExt = (DBDictionary)tr.GetObject(extId, OpenMode.ForWrite);

                            if (dbExt.Contains("JPP_Plot"))
                            {
                                Xrecord xRec   = tr.GetObject(dbExt.GetAt("JPP_Plot"), OpenMode.ForRead) as Xrecord;
                                string  plot   = xRec.Data.AsArray()[0].Value.ToString();
                                var     target = from p in acDoc.GetDocumentStore <CivilDocumentStore>().Plots where p.PlotName == plot select p; //DocumentStore.Current.Plots[plot];
                                foreach (Plot p in target)
                                {
                                    PaletteSet _ps = new PaletteSet("WPF Palette");
                                    _ps.Size        = new Size(400, 600);
                                    _ps.DockEnabled =
                                        (DockSides)((int)DockSides.Left + (int)DockSides.Right);

                                    uc2             = new FoundationControl();
                                    uc2.DataContext = p;
                                    ElementHost host = new ElementHost();
                                    host.AutoSize = true;
                                    host.Dock     = DockStyle.Fill;
                                    host.Child    = uc2;
                                    _ps.Add("Add ElementHost", host);

                                    // Display our palette set

                                    _ps.KeepFocus     = true;
                                    _ps.Visible       = true;
                                    _ps.StateChanged += _ps_StateChanged;
                                }
                            }
                        }
                    }

                    tr.Commit();
                }
            }
        }
Exemple #16
0
        /// <summary>
        /// 面板
        /// </summary>
        /// <param name="name">面板名</param>
        /// <param name="title">面板标题</param>
        /// <param name="myCtrl">用户控件</param>
        static public PaletteSet CPalette(string name, string title, UserControl myCtrl)
        {
            PaletteSet ps = new PaletteSet(title);

            ps.Add(name, myCtrl);//myCtrl为自定义面板类
            ps.Visible = true;
            return(ps);
        }
Exemple #17
0
        private void InitPalette()
        {
            if (mainPalette is null)
            {
                mainPalette             = new PaletteSet("Менеджер печати ЦПП");
                mainPalette.DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right);
                mainPalette.SetSize(new Size(800, 600));

                foreach (var groupRule in grouping)
                {
                    groups.Add(groupRule.Item2, new SheetsGroupTree(groupRule.Item2, sheetNodeCache));
                    ElementHost group = CreateHost(new SheetsGroup(groups[groupRule.Item2].Groups, this));
                    mainPalette.Add(groupRule.Item1, group);
                }

                mainPalette.Add("Настройки по форматам", CreateHost(new FormatDestinationView(formats, this)));
            }
        }
Exemple #18
0
        public static void AddPalette(string name, UIElement view)
        {
            palette = GetPalette();
            var host = new ElementHost {
                Child = view
            };

            palette.Add(name, host);
        }
Exemple #19
0
        public void Initialize()
        {
            MainPaletteSet = new PaletteSet("Contour.AutoCAD.Plugin", Guid.Parse("{9D231C75-8EE5-488E-9EF5-9A3F35EC9ED9}"));
            MainPaletteSet.Add("ContourMainPaletteSet", MainPalette);

            var initializer = new Initializer();

            initializer.Initialize();
        }
Exemple #20
0
        public static void Main()
        {
            PaletteSet palette  = new PaletteSet("TQCad");
            uct_main   uct_Main = new uct_main();

            palette.Add("TQCad", uct_Main);
            palette.Visible = true;
            palette.Dock    = DockSides.Left;
        }
Exemple #21
0
        private void CreatePalette()
        {
            _ps             = new PaletteSet("Test Palette Set");
            _ps.MinimumSize = new System.Drawing.Size(300, 300);
            var ctrl = new EmployeeDetailCtrl();

            _ps.Add("test", ctrl);
            _ps.Visible = true;
            _ps.Dock    = DockSides.Left;
        }
Exemple #22
0
        public static void Start()
        {
            try
            {
                if (!MainSettings.Instance.AddToMpPalette)
                {
                    MainFunction.RemoveFromMpPalette(false);
                    if (PaletteSet != null)
                    {
                        PaletteSet.Visible = true;
                    }
                    else
                    {
                        PaletteSet = new PaletteSet(
                            Language.GetItem("h11"), // Свойства ЕСКД
                            "mpPropertiesPalette",
                            new Guid("1c0dc0f7-0d06-49df-a2d3-bcea4241e036"));
                        PaletteSet.Load   += PaletteSet_Load;
                        PaletteSet.Save   += PaletteSet_Save;
                        _propertiesPalette = new PropertiesPalette();
                        var elementHost = new ElementHost
                        {
                            AutoSize = true,
                            Dock     = DockStyle.Fill,
                            Child    = _propertiesPalette
                        };
                        PaletteSet.Add(
                            Language.GetItem("h11"), // Свойства ЕСКД
                            elementHost);
                        PaletteSet.Style = PaletteSetStyles.ShowCloseButton |
                                           PaletteSetStyles.ShowPropertiesMenu |
                                           PaletteSetStyles.ShowAutoHideButton;
                        PaletteSet.MinimumSize = new System.Drawing.Size(100, 300);
                        PaletteSet.DockEnabled = DockSides.Right | DockSides.Left;
                        PaletteSet.Visible     = true;
                    }
                }
                else
                {
                    if (PaletteSet != null)
                    {
                        PaletteSet.Visible = false;
                    }

                    MainFunction.AddToMpPalette();
                }
            }
            catch (System.Exception exception)
            {
                ExceptionBox.Show(exception);
            }
        }
Exemple #23
0
 /// <summary>
 /// Shows a property palette.
 /// </summary>
 /// <param name="obj">The property object.</param>
 public static void PropertyPalette(object obj) // newly 20140529
 {
     if (!propertyPalette.Visible)
     {
         if (propertyPalette.Count == 0)
         {
             propertyPalette.Add("Properties", propertyGrid);
             propertyPalette.Dock = DockSides.Left;
         }
         propertyPalette.Visible = true;
     }
     propertyGrid.SelectedObject = obj;
 }
Exemple #24
0
        public void preview()
        {
            //Create the palette if we havent already
            if (myPal == null)
            {
                myPal = new PaletteSet("My Palette", System.Guid.NewGuid());
                myPreviewBox = new PreviewBox();
                myPal.Add("Palette1", myPreviewBox);
            }

            //disply the palette
            myPal.Visible = true;
        }
        public static void InitFixtureUnitPalette()
        {
            string currentDwg = Application.DocumentManager.MdiActiveDocument.Name;

            _ps = new PaletteSet("Fixture Unit");
            NODEDWG         node = SetUpProject.SetUp(currentDwg);
            FixtureUnitForm form = new FixtureUnitForm(node);

            _ps.Add("Fixture Unit", form);
            _ps.DockEnabled = (DockSides)(DockSides.Left | DockSides.Right);

            _ps.Visible = true;
        }
Exemple #26
0
        public void palette()
        {
            if (mypaleteset == null)
            {
                mypaleteset = new PaletteSet("12dSynergy for Civil 3D", new Guid("801E3156-0779-4D98-A703-100521E57D1C"));

                mypalette = new UserControl1();
                //mypalette.ProgressBar1.PerformStep()
                mypaleteset.Add("Palette1", mypalette);
            }

            mypaleteset.Visible = true;
        }
 public void TestUI()
 {
     //Inicializan la interfaz
     compuertasSet          = new PaletteSet("Compuertas");
     myControlCompuertas    = new CompuertasUI();
     myControlCompuertasWPF = new CompuertasUIWPF();
     //Windows Forms
     compuertasSet.Add("Galería", myControlCompuertas);
     //WPF
     compuertasSet.AddVisual("GaleríaWPF", myControlCompuertasWPF);
     compuertasSet.Dock    = DockSides.Left;
     compuertasSet.Visible = true;
 }
Exemple #28
0
        public void preview()
        {
            //Create the palette if we havent already
            if (myPal == null)
            {
                myPal        = new PaletteSet("My Palette", System.Guid.NewGuid());
                myPreviewBox = new PreviewBox();
                myPal.Add("Palette1", myPreviewBox);
            }

            //disply the palette
            myPal.Visible = true;
        }
Exemple #29
0
        public static PaletteSet CreateStdSysPalette()
        {
            PaletteSet StdSysPalette;

            StdSysPalette      = new PaletteSet("中建深圳装饰-幕墙节点标准系统", new Guid("{5734E6AA-31A1-4E3C-874A-B65A76625851}"));
            StdSysPalette.Icon = Properties.Resources.logo;
            LibListDropDown LibDropList = new LibListDropDown(StdSyslibPath);

            LibDropList.Dock = DockStyle.Fill;
            StdSysPalette.Add("幕墙标准系统", LibDropList);
            StdSysPalette.Dock = DockSides.Left;
            return(StdSysPalette);
        }
Exemple #30
0
        public static PaletteSet CreateStdBlockPalette()
        {
            PaletteSet StdBlockPalette;

            StdBlockPalette      = new PaletteSet("中建深圳装饰-幕墙标准图块", new Guid("{CB033F76-F29F-4FF0-9C41-44FB41B326E4}"));
            StdBlockPalette.Icon = Properties.Resources.logo;
            LibListDropDown LibDropList = new LibListDropDown(StdBlockSysPath);

            LibDropList.Dock = DockStyle.Fill;
            StdBlockPalette.Add("幕墙标准图块", LibDropList);
            StdBlockPalette.Dock = DockSides.Left;
            return(StdBlockPalette);
        }
Exemple #31
0
        public CamPaletteSet()
        {
            PaletteSet paletteSet = new PaletteSet("Технология")
            {
                Style       = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton,
                MinimumSize = new Size(300, 200),
                KeepFocus   = true,
                Visible     = true,
                Dock        = DockSides.Left
            };

            paletteSet.Add("Объекты", _techProcessView);

            paletteSet.Add("Инструменты", new UtilsView());


            //var programmPalette = paletteSet.Add("Программа", _programView);
            //paletteSet.PaletteActivated += (sender, args) =>
            //{
            //    if (args.Activated.Name == "Программа")
            //        programView.SetProgram(manager.GetProgramm());
            //};
        }
        private ResourceExplorerPalette()
        {
            _paletteSet = new PaletteSet(PaletteName);

            //Set the properties of paletteSet
            _paletteSet.Style = PaletteSetStyles.NameEditable |
                PaletteSetStyles.ShowPropertiesMenu |
                PaletteSetStyles.ShowAutoHideButton |
                PaletteSetStyles.UsePaletteNameAsTitleForSingle |
                PaletteSetStyles.Snappable |
                PaletteSetStyles.ShowCloseButton;

            _panel = new Panel();
            _paletteSet.Add(PaletteName, _panel);
        }
 public void Show()
 {
   if (ps == null)
   {
     ps = new PaletteSet("Property");
     ps.Style = PaletteSetStyles.NameEditable |
                PaletteSetStyles.ShowPropertiesMenu |
                PaletteSetStyles.ShowAutoHideButton |
                PaletteSetStyles.ShowCloseButton;
     ps.Dock = DockSides.Top;
     //ps.MinimumSize = new System.Drawing.Size(150, 300);
     dgv = new PropertyDataGridView();
     ps.Add("Property", dgv);
   }
   else
     Update();
   ps.Visible = true;
 }
Exemple #34
0
 public void loadUI()
 {
     if (blockTab == null)
     {
         mipaleta = new PaletteSet("Evaluador de Semaforo");
         ctrl_blockTab = new BlockTab();
         blockTab = mipaleta.Add("Insertar", ctrl_blockTab);
         mipaleta.Visible = true;
     }
     else
         mipaleta.Visible = true;
 }