public void showTool() { if (toolPaletteSet == null) { toolPaletteSet = new PaletteSet("工具栏", new System.Guid("D61D0875-A507-4b73-8B5F-9266BE399595")); tooPanel = new ToolPanel(); toolPaletteSet.AddVisual("ToolPanel", tooPanel); } toolPaletteSet.Visible = true; toolPaletteSet.SetSize(new System.Drawing.Size(185, 570)); }
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 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 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); } }
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))); } }
public void Initialize() { PaletteSet paletteSet = new PaletteSet("Test") { Style = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton | PaletteSetStyles.Snappable, Visible = true, Dock = DockSides.None }; System.Drawing.Point startPos = new System.Drawing.Point(0, 50); paletteSet.SetLocation(startPos); paletteSet.SetSize(new System.Drawing.Size(900, 900)); paletteSet.TitleBarLocation = PaletteSetTitleBarLocation.Left; UIViews uIViews = new UIViews(); paletteSet.AddVisual("Ribbon", uIViews); }
public void showAttrsEditor() { if (attrPaletteSet == null) { attrPaletteSet = new PaletteSet("属性面板", new System.Guid("D61D0875-A507-4b73-8B5F-9221FF392200")); baseAttrEditor = new BaseAttrEditor(); attrPaletteSet.AddVisual("基础属性", baseAttrEditor); buildingAttrEditor = new BuildingAttrEditor(); attrPaletteSet.AddVisual("楼房属性", buildingAttrEditor); heatProducerAttrEditor = new HeatProducerAttrEditor(); attrPaletteSet.AddVisual("热源属性", heatProducerAttrEditor); substationAttrEditor = new SubstationAttrEditor(); attrPaletteSet.AddVisual("热力站属性", substationAttrEditor); attrPaletteSet.SetSize(new System.Drawing.Size(120, 350)); solutionAttrPanel = new SolutionAttrPanel(); attrPaletteSet.AddVisual("方案属性", solutionAttrPanel); solutionAttrComparePanel = new SolutionAttrComparePanel(); attrPaletteSet.AddVisual("方案对比", solutionAttrComparePanel); } attrPaletteSet.Visible = true; attrPaletteSet.Activate(0); attrPaletteSet.PaletteActivated += new PaletteActivatedEventHandler(paletteActive); }
public void Initialize() { PaletteSet paletteSet = new PaletteSet("Ribbon Custom") { Style = PaletteSetStyles.NameEditable | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton | PaletteSetStyles.Snappable, Visible = true, Dock = DockSides.None }; System.Drawing.Point StartPos = new System.Drawing.Point(0, 100); paletteSet.SetLocation(StartPos); paletteSet.SetSize(new System.Drawing.Size((int)SystemParameters.PrimaryScreenWidth - 100, 400)); paletteSet.TitleBarLocation = PaletteSetTitleBarLocation.Left; Class1 class1 = new Class1((int)SystemParameters.PrimaryScreenWidth - 100, 400); paletteSet.AddVisual("Ribbon", class1); PaletteSet test = new PaletteSet("Test Palette"); }
public void CreateRibbon() { AcadWindows.RibbonControl ribbon = AcadWindows.ComponentManager.Ribbon; AcadWindows.RibbonTab tab = new AcadWindows.RibbonTab(); tab.Name = "MyTab"; tab.Title = "My Tab"; tab.Id = "MyTabId"; ribbon.Tabs.Add(tab); AcadWindows.RibbonPanelSource panelSrc = new AcadWindows.RibbonPanelSource(); panelSrc.Name = "MyPanel"; panelSrc.Title = "My Panel"; panelSrc.Id = "MyPanelId"; AcadWindows.RibbonCheckBox cb = new Autodesk.Windows.RibbonCheckBox(); cb.Text = "Testing"; cb.IsChecked = true; cb.Size = AcadWindows.RibbonItemSize.Large; AcadWindows.RibbonButton button1 = new AcadWindows.RibbonButton(); button1.Name = "MyButton"; button1.Text = "My Button"; button1.Id = "MyButtonId"; AcadWindows.RibbonButton button2 = new AcadWindows.RibbonButton(); button2.Name = "MyOtherButton"; button2.Text = "My Other Button"; button2.Id = "MyOtherButtonId"; button2.Size = AcadWindows.RibbonItemSize.Large; button2.ShowText = true; button2.LargeImage = GetBitmap(new Bitmap(@"C:\Users\nguye\OneDrive\Desktop\Untitled.png"), 64, 64); button2.CommandHandler = new MyButtonCmd(); AcadWindows.RibbonButton button3 = new AcadWindows.RibbonButton(); button3.Name = "MyOtherButton"; button3.Text = "My Other Button"; button3.Id = "MyOtherButtonId"; button3.Size = AcadWindows.RibbonItemSize.Large; button3.ShowText = true; button3.Orientation = System.Windows.Controls.Orientation.Vertical; button3.LargeImage = GetBitmap(new Bitmap(@"C:\Users\nguye\OneDrive\Desktop\Untitled.png"), 64, 64); button3.CommandHandler = new MyButtonCmd(); panelSrc.Items.Add(button1); panelSrc.Items.Add(button2); panelSrc.Items.Add(button3); panelSrc.Items.Add(cb); AcadWindows.RibbonPanel panel = new AcadWindows.RibbonPanel(); panel.Source = panelSrc; panel.ResizeStyle = AcadWindows.RibbonResizeStyles.NeverChangeImageSize; tab.Panels.Add(panel); if (ps == null) { ps = new PaletteSet("My Palette 1", new Guid("229E43DB-E76F-48F9-849A-CC8D726DF257")); ps.SetLocation(new System.Drawing.Point(312, 763)); ps.SetSize(new System.Drawing.Size(909, 40)); /*For the first time we 'll enable on Bottom*/ ps.DockEnabled = DockSides.Right; UserControl user_control = new UserControl(); Button btn = new Button(); btn.Width = 100; btn.Height = 100; btn.Text = "abc"; user_control.Controls.Add(btn); ps.Add("1", user_control); } ps.Visible = true; /*Add Handler*/ ps.PaletteSetMoved += ps_PaletteSetMoved; }