public Tileset(Battlefield battlefield, PaletteSet palettes, Tile[] tileset_tiles) { this.Battlefield = battlefield; this.Palettes = palettes; this.Tileset_bytes = new byte[0x2000]; this.Tileset_tiles = tileset_tiles; Graphics = new byte[0x6000]; if (battlefield.GraphicSetA < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetA + 0x48], 0, Graphics, 0, 0x2000); } if (battlefield.GraphicSetB < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetB + 0x48], 0, Graphics, 0x2000, 0x1000); } if (battlefield.GraphicSetC < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetC + 0x48], 0, Graphics, 0x3000, 0x1000); } if (battlefield.GraphicSetD < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetD + 0x48], 0, Graphics, 0x4000, 0x1000); } if (battlefield.GraphicSetE < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetE + 0x48], 0, Graphics, 0x5000, 0x1000); } ParseTileset(tileset_tiles, Tileset_bytes); }
private static void ShowMenuByID(string productID) { if (menuPalette.Visible) { menuPalette.Close(); menuPalette.Dispose(); } Product product = ProductManager.GetProductRecordByID(productID); string title = ProductManager.GetProductTitle(); menuWindow.Close(); menuWindow = product.GetProductMenuWindow(); Application.MainWindow.Text = title; menuPalette = new PaletteSet(title); System.Windows.Controls.ScrollViewer root = menuWindow.Content as System.Windows.Controls.ScrollViewer; root.Width = 240; root.Height = 2000; root.Margin = new System.Windows.Thickness(0); menuPalette.AddVisual("菜单", root); menuPalette.Size = new System.Drawing.Size(200, 640); menuPalette.MinimumSize = new System.Drawing.Size(200, 640); menuPalette.SizeChanged += (sender, e) => root.Width = menuPalette.Size.Width; menuPalette.Visible = true; menuPalette.Dock = DockSides.Right; menuPalette.DockEnabled = DockSides.Right; }
public static void ShowTOC() { if (TOCPalette._ps == null) { TOCPalette._ps = new PaletteSet(AfaStrings.GISContents, new Guid("C7FE86F9-5BCC-4764-AE32-E54587302339")); TOCPalette._ps.Size = (new Size(300, 400)); TOCPalette._ps.Text = (AfaStrings.GISContents); TOCPalette._ps.DockEnabled = (DockSides)(20480); TOCPalette._toc = new TOCControl(); ElementHost elementHost = new ElementHost(); elementHost.AutoSize = true; elementHost.Dock = DockStyle.Fill; elementHost.Child = TOCPalette._toc; TOCPalette._ps.Add(AfaStrings.GISContents, elementHost); Application.DocumentManager.DocumentCreated += (new DocumentCollectionEventHandler(TOCPalette.DocumentManager_DocumentCreated)); Application.DocumentManager.DocumentDestroyed += (new DocumentDestroyedEventHandler(TOCPalette.DocumentManager_DocumentDestroyed)); Application.DocumentManager.DocumentActivated += (new DocumentCollectionEventHandler(TOCPalette.DocumentManager_DocumentActivated)); TOCPalette._ps.StateChanged += (new PaletteSetStateEventHandler(TOCPalette._ps_StateChanged)); TOCPalette._ps.PaletteActivated += (new PaletteActivatedEventHandler(TOCPalette._ps_PaletteActivated)); TOCPalette._ps.PaletteSetDestroy += (new PaletteSetDestroyEventHandler(TOCPalette._ps_PaletteSetDestroy)); } TOCPalette._ps.KeepFocus = (true); TOCPalette._ps.Visible = (true); TOCPalette._showTOC = true; }
public static void AddLayerPanel() { try { if (layerManage != null && layerPs != null) { layerPs.Visible = true; layerManage.InitiationLayer(); } else { layerManage = new LayerManage(); layerPs = new PaletteSet("图层管理") { { "用户控件", layerManage } }; layerPs.Visible = true; layerPs.Size = new Size(220, 140); layerPs.Dock = DockSides.Right; layerPs.StateChanged += layerPs_StateChanged; DCadApi.isShowLayerManage = true; } } catch (Autodesk.AutoCAD.Runtime.Exception) { PublicMethod.Instance.ShowMessage("图层管理面板加载失败!"); } }
/// <summary> /// 连接关系BySel面板 /// </summary> public static void AddConnectBySelPanel() { try { if (null != ConnectCtl && null != ConnetPs) { if (ConnetPs.Visible) { ConnetPs.Visible = false; } } if (null == ConnectSelCtr && null == ConnectSelPs) { ConnectSelCtr = new ConnectBySel(); ConnectSelPs = new PaletteSet("连接关系") { { "用户控件", ConnectSelCtr } }; ConnectSelPs.Size = new Size(256, 140); ConnectSelPs.MinimumSize = new Size(246, 140); ConnectSelPs.Dock = DockSides.Left; ConnectSelPs.StateChanged += ConnectSelPs_StateChanged; } ConnectSelPs.Visible = true; } catch (Autodesk.AutoCAD.Runtime.Exception) { PublicMethod.Instance.Editor.WriteMessage("连接关系BySel面板加载失败!"); } }
public static void AddSymbolPanel() { try { if (palette != null) { palette.Visible = true; } else { psSymbolPanel = new PanelControl(); palette = new PaletteSet("符号库") { { "用户控件", psSymbolPanel } }; palette.Visible = true; palette.Size = new Size(305, 140); palette.MinimumSize = new Size(295, 140); palette.Dock = DockSides.Right; palette.KeepFocus = true; } } catch (Autodesk.AutoCAD.Runtime.Exception) { PublicMethod.Instance.ShowMessage("属性面板加载失败!"); } }
public static void Query() { try { if (_paletteSet == null) { var psConfig = new Cad.PaletteSetConfig(); psConfig.Name = "sh编辑器"; psConfig.Width = 320; psConfig.Height = 640; psConfig.IsDock = true; psConfig.PaletteConfigs = new Dictionary <string, FrameworkElement> { { "选择集", new Views.Main() }, //{"资源盒子", new Views.shResourceBox() }, }; var ps = new sh.Cad.PaletteSetManager(); _paletteSet = ps.ShowPaletteSet(psConfig); } else if (!_paletteSet.Visible) { _paletteSet.Visible = true; } } catch (System.Exception ex) { Autodesk.AutoCAD.ApplicationServices.Core.Application.ShowAlertDialog(ex.Message); } }
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); }
public static void AddMenuPanel() { try { if (psMenu != null) { psMenu.Visible = true; } else { psMenu = new PaletteSet("") { { "", new MenuControl() } }; psMenu.Style = PaletteSetStyles.ShowPropertiesMenu; psMenu.Visible = true; psMenu.Size = new Size(124, 30); psMenu.MinimumSize = new Size(124, 30); psMenu.Dock = DockSides.Top; } } catch (Autodesk.AutoCAD.Runtime.Exception) { PublicMethod.Instance.ShowMessage("菜单面板加载失败!"); } }
// Constructors public Tileset(Battlefield battlefield, PaletteSet palettes) { this.Battlefield = battlefield; this.Palettes = palettes; // compile graphics Graphics = new byte[0x6000]; if (battlefield.GraphicSetA < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetA + 0x48], 0, Graphics, 0, 0x2000); } if (battlefield.GraphicSetB < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetB + 0x48], 0, Graphics, 0x2000, 0x1000); } if (battlefield.GraphicSetC < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetC + 0x48], 0, Graphics, 0x3000, 0x1000); } if (battlefield.GraphicSetD < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetD + 0x48], 0, Graphics, 0x4000, 0x1000); } if (battlefield.GraphicSetE < 0xC8) { Buffer.BlockCopy(Areas.Model.GraphicSets[battlefield.GraphicSetE + 0x48], 0, Graphics, 0x5000, 0x1000); } // create tileset Tileset_bytes = Model.Tilesets[battlefield.Tileset]; Tileset_tiles = new Tile[32 * 32]; for (int i = 0; i < Tileset_tiles.Length; i++) { Tileset_tiles[i] = new Tile(i); } ParseTileset(Tileset_bytes, Tileset_tiles); }
/// <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; }
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); } }
runEW() { if (_ps == null) { _ps = new PaletteSet( "EW", new Guid("{8E2AE1E0-D31D-4A8E-B7AD-E91D92CEF06F}")); } _ps.Size = new Size(280, 480); _ps.DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right); _winEW = new Forms.winEW(); _ps.AddVisual("EARTHWORK", _winEW); //PaletteSetStylesCollection styles = new PaletteSetStyles(); _ps.SizeChanged += delegate(object sender, PaletteSetSizeEventArgs e){ _winEW.Width = e.Width; _winEW.Height = e.Height; }; _ps.KeepFocus = true; _ps.Visible = true; }
static public void RefMgrPallet() // This method can have any name { // check to see if this command has not been run before if (_PalletRefMgr == null) { // if not, then create our windows - first the paletteset container window // we won't generate a Guid for the paletteset as that would then require // demand loading _PalletRefMgr = new PaletteSet("Reference Manager"); // next the WPF UserControl _formRefMgr = new ArCaPaletteMain(); // now add the user control to the paletteset _PalletRefMgr.AddVisual("Reference Manager Palette", _formRefMgr); _PalletRefMgr.Size = new System.Drawing.Size(345, 300); _PalletRefMgr.SizeChanged += new PaletteSetSizeEventHandler(ps_SizeChanged); _PalletRefMgr.KeepFocus = false; ArCaRefMgrController.Initialize(); _formRefMgr.GridMain.DataContext = ArCaRefMgrController.ObjMain; } // finally, we need to show the paletteset // this also serves as a way to redisplay the paletteset if closed // by the user _PalletRefMgr.Visible = true; }
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 GeologyHatch3dViewModel(Document doc, PaletteSet ps) { this.doc = doc; this.ps = ps; using (Transaction tr = doc.Database.TransactionManager.StartTransaction()) { standardTxtStyle = Utils.GetStandardTextStyle(doc.Database, tr); tr.Commit(); } //временная графика - http://adn-cis.org/forum/index.php?topic=4279.msg15946#msg15946, http://adn-cis.org/forum/index.php?topic=8909.0 ps.StateChanged += PaletteSet_StateChanged; specifyAlignmentPolyCommand = new RelayCommand(new Action <object>(SpecifyAlignmentPoly)); specifySoilHatchCommand = new RelayCommand(new Action <object>(SpecifySoilHatch)); specifyElevBasePointCommand = new RelayCommand(new Action <object>(SpecifyElevBasePoint)); create3dProfileCommand = new RelayCommand(new Action <object>(Create3dProfile)); horScalingVM = new NumericUpDownViewModel(1, 0.1, 0); vertScalingVM = new NumericUpDownViewModel(1, 0.1, 0); baseElevationVM = new NumericUpDownViewModel(0, 0.1, formatting: "f3"); baseElevationVM.ValueChanged += BaseElevationChanged; }
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; }
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; }
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; }
//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); }
public static void HidePalletteAndRunCommand(this PaletteSet paletteSet, Action action) { if (Active.Document == null) { MessageBox.Show("No Active Document"); return; } paletteSet.Visible = false; try { action(); } catch (Exception e) { Console.WriteLine(e); MessageBox.Show("Oops!" + Environment.NewLine + "Something went wrong." + Environment.NewLine + "Error details:" + Environment.NewLine + e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { paletteSet.Visible = true; } }
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; }
public void InitUI() { LoadUI(); PaletteSet ps = new PaletteSet("Bottom Toolbar", new Guid("87374E16-C0DB-4F3F-9271-7A71ED921566")) { Style = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton | PaletteSetStyles.Snappable, Visible = true, Dock = DockSides.Bottom, KeepFocus = true, MinimumSize = new System.Drawing.Size((int)this.ActualWidth, (int)this.ActualHeight), Size = new System.Drawing.Size((int)this.ActualWidth, (int)this.ActualHeight), }; //System.Drawing.Point startPos = new System.Drawing.Point(50, 50); //ps.SetLocation(startPos); ps.TitleBarLocation = PaletteSetTitleBarLocation.Left; ps.AddVisual("Ribbon", this); var PSSize = new System.Drawing.Size(1024, 40); ps.Size = new System.Drawing.Size(PSSize.Width, PSSize.Height); ps.Size = PSSize; }
private void AddPalettes() { try { AppServices.Log.Add("AddPalettes()..."); if (ToolsPalettes == null) { // use constructor with Guid so that we can save/load user data ToolsPalettes = new PaletteSet(AppName); ToolsPalettes.MinimumSize = new System.Drawing.Size(300, 300); //ToolsPalettes.Size = new System.Drawing.Size(300, 500); //ToolsPalettes.Style = PaletteSetStyles.ShowTabForSingle | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton; ToolsPalettes.Visible = true; //ToolsPalettes.KeepFocus = true; //ToolsPalettes.Add("Tools", new ToolsPallete()); //AddPalette(new ToolPalettes.BlocksPalette()); //AddPalette(new ToolPalettes.PolygonsPalette()); //AddPalette(new ToolPalettes.InfoPalette()); // Tą zawsze wczytaj, żeby można było wczytać licencje } AppServices.Log.Add("AddPalettes():Done."); } catch (System.Exception ex) { Ac.WriteLn("Geo7: Error showing Tools Palette"); Ac.WriteError(ex, this.GetType().Name + ".AddPalettes()", null); } }
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); } }
public static void CreatePalette(bool reload) { try { if (MpPaletteSet == null) { MpPaletteSet = new PaletteSet(Language.GetItem(LangItem, "h48"), "mpPalette", new Guid("A9C907EF-6281-4FA2-9B6C-E0401E41BB76")); MpPaletteSet.Load += _mpPaletteSet_Load; MpPaletteSet.Save += _mpPaletteSet_Save; AddRemovePalettes(); MpPaletteSet.Icon = GetEmbeddedIcon("ModPlus.Resources.mpIcon.ico"); MpPaletteSet.Style = PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton; MpPaletteSet.MinimumSize = new Size(100, 300); MpPaletteSet.DockEnabled = DockSides.Left | DockSides.Right; MpPaletteSet.RecalculateDockSiteLayout(); MpPaletteSet.Visible = true; } else { if (reload) { AddRemovePalettes(); } MpPaletteSet.Visible = true; } } catch (System.Exception exception) { ExceptionBox.Show(exception); } }
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; } }
//[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); }
public static void RemoveFromMpPalette(bool fromSettings) { PaletteSet mpPaletteSet = MpPalette.MpPaletteSet; if (mpPaletteSet != null) { int num = 0; while (num < mpPaletteSet.Count) { if (!mpPaletteSet[num].Name.Equals(Language.GetItem(LangItem, "h8"))) { num++; } else { mpPaletteSet.Remove(num); break; } } } if (_paletteSet != null) { _paletteSet.Visible = true; } else if (fromSettings) { if (AcApp.DocumentManager.MdiActiveDocument != null) { AcApp.DocumentManager.MdiActiveDocument.SendStringToExecute("_MPLAYOUTMANAGER ", true, false, false); } } }
public static void test_() { PaletteSet ps = new PaletteSet("Ribbon Custom") { //ps.Add("Ribbon", ribbon_Custom); // set some style parameters Style = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton | PaletteSetStyles.Snappable, Visible = true, Dock = DockSides.None }; System.Drawing.Point startPos = new System.Drawing.Point(50, 50); ps.SetLocation(startPos); ps.SetSize(new System.Drawing.Size(700, 145)); ps.TitleBarLocation = PaletteSetTitleBarLocation.Left; Ribbon_ViewModel viewModel = new Ribbon_ViewModel(); ps.AddVisual("Ribbon", viewModel.InitRibbonView()); }
public static PaletteSet CreatePaletteSet() { var myPaletteSet = new PaletteSet("OneNote", new Guid(paletteGuid)); myPaletteSet.Size = new System.Drawing.Size(600, 900); myPaletteSet.Dock = DockSides.Right; return myPaletteSet; }
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 void FiguresEditor() { _ps = null; _ps = new PaletteSet("Figures Editor"); _ps.Size = new Size(400, 600); _ps.DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right); PluginWindow window = new PluginWindow(); _ps.AddVisual("TestPlugin", window); _ps.KeepFocus = true; _ps.Visible = true; }
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; }
public void LoadGUI() { if (blockTab == null) { this.mipaleta = new PaletteSet("TraSiSoft"); this.ctrl_blockTab = new BlockTab(); this.blockTab = this.mipaleta.Add("TraSiSoft Tab", this.ctrl_blockTab); this.mipaleta.Visible = true; } else this.mipaleta.Visible = !this.mipaleta.Visible; }
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; }