protected override void OnBarUpdate() { if (ChartControl == null || _x ) return; if (!ChartControl.Controls.ContainsKey("TSEco_News")) { _myitem0 = new ToolStripSeparator(); _myitem0.Name = "TradingStudiesEcoSeparator"; _myitem1 = new ToolStripButton("Hide News"); _myitem1.Text = "Hide News"; _myitem1.Name = "TradingStudiesEcoNews"; _myitem1.Click += ToolClick1; _myitem1.Enabled = true; _myitem1.ForeColor = Color.Black; _mystrip = (ToolStrip) ChartControl.Controls["tsrTool"]; _mystrip.Items.Add(_myitem0); _mystrip.Items.Add(_myitem1); _sp = new Splitter(); _sp.Name = "TSEco_Splitter"; _sp.Dock = _dp == DockingPlace.Below ? DockStyle.Bottom : DockStyle.Top; ChartControl.Controls.Add(_sp); _so = new EcoNewsControl.EcoNewsControl(Cbi.Core.InstallDir + @"\Sounds", Cbi.Core.UserDataDir + @"bin\Custom\"); _so.Dock = _dp == DockingPlace.Below ? DockStyle.Bottom : DockStyle.Top; _so.Name = "TSEco_News"; ChartControl.Controls.Add(_so); } else _so = ChartControl.Controls["TSEco_News"] as EcoNewsControl.EcoNewsControl; _x = true; }
public FormBrowseMenus(ToolStrip menuStrip) { _menuStrip = menuStrip; CreateAdditionalMainMenuItems(); Translate(); }
public static void UpdateControlTheme(ToolStrip menu) { if (ThemeMessageFilter.Instance == null) { ThemeMessageFilter filter = new ThemeMessageFilter(); ThemeMessageFilter.Instance.ThemeChanged += OnThemeChanged; } if (Environment.OSVersion.Version.Major >= 6) { UXThemeMenuRenderer renderer = new UXThemeMenuRenderer(); if (menu.Renderer is ToolStripProfessionalRenderer) { menu.Disposed += OnThemedMenuDisposed; ThemedMenus.Add(menu, renderer); if (NativeMethods.ThemesActive) menu.Renderer = renderer; } } foreach (ToolStripItem item in menu.Items) { ToolStripMenuItem toolStripItem = item as ToolStripMenuItem; if (toolStripItem != null) UpdateControlTheme(toolStripItem); } }
public ToolStripItem AddToolStripButton(System.Windows.Forms.ToolStrip owner, int index, FreeCL.UI.Actions.Action action, Type buttonType) { if (owner == null) { throw new ArgumentNullException("owner"); } ToolStripItem netsb = (ToolStripItem)Activator.CreateInstance(buttonType); if (action != null) { action.Parent.SetAction(netsb, action); } netsb.DisplayStyle = ToolStripItemDisplayStyle.Image; netsb.MergeIndex = index; netsb.MergeAction = MergeAction.Insert; if (index < owner.Items.Count) { owner.Items.Insert(index, netsb); } else { owner.Items.Add(netsb); } SortItems(owner.Items); return(netsb); }
public ClassBrowserPad() { instance = this; classBrowserTreeView.Dock = DockStyle.Fill; classBrowserTreeView.ImageList = ClassBrowserIconService.ImageList; classBrowserTreeView.AfterSelect += new TreeViewEventHandler(ClassBrowserTreeViewAfterSelect); contentPanel.Controls.Add(classBrowserTreeView); searchStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Searchbar"); searchStrip.Stretch = true; searchStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(searchStrip); toolStrip = ToolbarService.CreateToolStrip(this, "/SharpDevelop/Pads/ClassBrowser/Toolbar"); toolStrip.Stretch = true; toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; contentPanel.Controls.Add(toolStrip); ProjectService.SolutionLoaded += ProjectServiceSolutionChanged; ProjectService.ProjectItemAdded += ProjectServiceSolutionChanged; ProjectService.ProjectItemRemoved += ProjectServiceSolutionChanged; ProjectService.ProjectAdded += ProjectServiceSolutionChanged; // rebuild view when project is added to solution ProjectService.SolutionFolderRemoved += ProjectServiceSolutionChanged; // rebuild view when project is removed from solution ProjectService.SolutionClosed += ProjectServiceSolutionClosed; ParserService.ParseInformationUpdated += new ParseInformationEventHandler(ParserServiceParseInformationUpdated); AmbienceService.AmbienceChanged += new EventHandler(AmbienceServiceAmbienceChanged); if (ProjectService.OpenSolution != null) { ProjectServiceSolutionChanged(null, null); } UpdateToolbars(); }
protected override void Initialize(ToolStrip toolStrip) { base.Initialize(toolStrip); toolStrip.BackColor = Colors.GreyBackground; toolStrip.ForeColor = Colors.LightText; }
public StatusViewer(System.Windows.Forms.ToolStripLabel toolsStripLabel, System.Windows.Forms.Timer formStatusTime, System.Windows.Forms.ToolStrip formsToolStrip) { stripLabel = toolsStripLabel; statusTime = formStatusTime; toolStrip = formsToolStrip; }
public void AddToolStrip(string toolStripName, System.Windows.Forms.ToolStrip toolStrip, ToolStripDockState option) { if (toolStrips.ContainsKey(toolStripName)) { MessageBox.Show("The tool strip name has existed!"); } else { toolStrips[toolStripName] = toolStrip; toolStrip.Visible = false; switch (option) { case ToolStripDockState.Left: if (application.LeftToolPanel != null) { application.LeftToolPanel.Controls.Add(toolStrip); } break; case ToolStripDockState.Right: if (application.RightToolPanel != null) { application.RightToolPanel.Controls.Add(toolStrip); } break; case ToolStripDockState.Bottom: if (application.BottomToolPanel != null) { application.BottomToolPanel.Controls.Add(toolStrip); } break; } } }
private void CreatePanStatus_v2() { ToolStrip toolStrip1 = new ToolStrip(); //ToolStripTextBox toolStripTextBox1 = new ToolStripTextBox(); //ToolStripButton button = new ToolStripButton(); //button.Text = "result 1"; //button.Click += ToolStripButton1_Click; //toolStrip1.Items.Add(button); //ToolStripButton toolStripButton2 = new ToolStripButton(); //toolStripButton2.Text = "result 2"; //toolStripButton2.Click += ToolStripButton2_Click; //toolStrip1.Items.Add(toolStripButton2); toolStrip1.Items.Add(CreateToolStripButton("result 1", (sender, eventArgs) => ActivePanResult(1))); toolStrip1.Items.Add(CreateToolStripButton("result 2", (sender, eventArgs) => ActivePanResult(2))); toolStrip1.Items.Add(CreateToolStripButton("result 3", (sender, eventArgs) => ActivePanResult(3))); toolStrip1.Items.Add(CreateToolStripButton("result 4", (sender, eventArgs) => ActivePanResult(4))); toolStrip1.Items.Add(CreateToolStripButton("messages", (sender, eventArgs) => ActivePanResult(5))); pan_status_v2 = new Panel(); pan_status_v2.Size = new Size(0, 20); pan_status_v2.BackColor = Color.DarkGreen; pan_status_v2.Dock = DockStyle.Bottom; pan_status_v2.Controls.Add(toolStrip1); }
public oTabIntroPage(oTabManager parent, ToolStrip toolStrip, Panel panelMain, ToolStrip mainToolStrip, string tabTitle) : base(parent, toolStrip, panelMain, mainToolStrip, tabTitle) { About about = new About {Dock = DockStyle.Fill}; workingPage.Controls.Add(about); }
public ToolBarHelper(ToolStrip parent) { Host = parent; //this.AllowsUserCustomization = true; //this.DisplayMode = NSToolbarDisplayMode.IconAndLabel; }
public usbDevice(string letter,List<Drive> drives,string serial) { InitializeComponent(); this.serial = serial; this.drives = drives; this.letter = letter; syncdetails = new List<string[]>(); // this.usbserial = usbserial; this.Load += (s, a) => { this.ContextMenuStrip = contextMenuStrip1; frm = this.FindForm(); lb = (ListView) frm.Controls.Find("listView1", true)[0]; ts = (ToolStrip)frm.Controls.Find("toolStrip1", true)[0]; lblSyncType = (ToolStripLabel)ts.Items.Find("lblSyncType", true)[0]; panel1=(Panel)frm.Controls.Find("panel1",true)[0]; label3 = (Label)frm.Controls.Find("label3", true)[0]; label2 = (Label)frm.Controls.Find("label2", true)[0]; // regBtn = (Button)frm.Controls.Find("btnRegister", true)[0]; treeview = (TreeView)frm.Controls.Find("treeView1", true)[0]; string lt = letter.Substring(0, 1); serial = DriveInformation.getSerial(lt + ":\\"); //USB.FindDriveLetter(lt + ":").SerialNumber; //Thread secondaryThread=new Thread(new ThreadStart(getDeviceData)); //secondaryThread.Start(); LoadDevice(); }; }
/// <include file='doc\ToolStripRenderEventArgs.uex' path='docs/doc[@for="ToolStripRenderEventArgs.ToolStripRenderEventArgs"]/*' /> /// <devdoc> /// This class represents all the information to render the toolStrip /// </devdoc> public ToolStripRenderEventArgs(Graphics g, ToolStrip toolStrip) { this.toolStrip = toolStrip; this.graphics = g; this.affectedBounds = new Rectangle(Point.Empty, toolStrip.Size); }
public SetupMaster() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; var toolStrip = new ToolStrip(); toolStrip.Dock = DockStyle.Fill; tableLayoutPanel1.Controls.Add(toolStrip); tableLayoutPanel1.SetCellPosition(toolStrip, new TableLayoutPanelCellPosition(0, 0)); tableLayoutPanel1.SetColumnSpan(toolStrip, 3); //---Add list Menu //---Setting listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SetupEmployee }); listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SetupRole }); listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.AssignEmployeeRole }); listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Setting, MenuName = ProgramName.SystemConfiguration }); //---SO listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Sold, MenuName = ProgramName.MappingMenu }); //---IN listMenuDTO.Add(new ListMenuDTO() { Module = ModuleName.Inventory, MenuName = ProgramName.SetupBillOfMaterial }); btnManage_Click(btnSetting, null); btnSetting.Focus(); }
public ToolStripRenderEventArgs (Graphics g, ToolStrip toolStrip, Rectangle affectedBounds, Color backColor) { this.graphics = g; this.tool_strip = toolStrip; this.affected_bounds = affectedBounds; this.back_color = backColor; }
public MainForm() { InitializeComponent(); _treeViewHandler = new TreeViewHandler(treeView1, treeMenu); TabControl = tabControl1; ListAnalysis = listAnalysis; ListAnalysis.Columns[0].Width = -1; LblAnalysis = lblAnalysis; DgBody = dgBody; DgVariables = dgVariables; RtbILSpy = rtbILSpy; TreeView = treeView1; ToolStrip = toolStrip1; InstructionMenuStrip = instructionMenu; VariableMenu = variableMenu; ExceptionHandlerMenu = exceptionHandlerMenu; TreeMenuStrip = treeMenu; txtMagicRegex.Text = Settings.Default.MagicRegex; InitializeBody(); cbSearchType.SelectedIndex = 0; }
public StringEditor() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StringEditor)); txtText = new TextBox(); txtText.Top = 5; txtText.Left = 50; txtText.Width = 140; txtText.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top|AnchorStyles.Right; txtText.TextChanged += TxtText_TextChanged; Controls.Add(txtText); ToolStrip tlsInsert = new ToolStrip(); insertButton = new ToolStripButton(); insertButton.Click += InsertButton_Click; insertButton.DisplayStyle = ToolStripItemDisplayStyle.Image; insertButton.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image"))); insertButton.ImageTransparentColor = System.Drawing.Color.Magenta; insertButton.Size = new System.Drawing.Size(32, 22); tlsInsert.Dock = DockStyle.None; tlsInsert.Items.Add(insertButton); tlsInsert.Location = new System.Drawing.Point(0, 2); Controls.Add(tlsInsert); }
public MenuSample(System.Windows.Forms.ToolStrip m, Action <Main> more) : this( delegate(Main main) { foreach (var ii in m.Items) { var i = ii as ToolStripMenuItem; if (i != null) { Action z = null; if (i.DropDownItems.Count == 0) { z = () => CallClickEvent(i); } menuName = i.Text.Replace("&", "").Replace("...", ""); if (_menuesToAvoid.Contains(menuName) || !i.Available) { continue; } main.AddMenu(menuName, z, y => { SendChildren(i, y); }); } } more(main); }) { }
public MainForm() { InitializeComponent(); // Create toolbar ToolStripButton toolStripMap = new ToolStripButton(); toolStripMap.Text = "Map"; toolStripMap.Click += new System.EventHandler(this.toolStripMap_Click); ToolStripButton toolStripExit = new ToolStripButton(); toolStripExit.Text = "Exit"; toolStripExit.Click += new System.EventHandler(this.toolStripExit_Click); ToolStrip toolStrip = new System.Windows.Forms.ToolStrip(); toolStrip.Items.Add(toolStripMap); toolStrip.Items.Add(toolStripExit); ToolStripContainer toolStripContainer = new System.Windows.Forms.ToolStripContainer(); toolStripContainer.TopToolStripPanel.Controls.Add(toolStrip); Controls.Add(toolStripContainer); }
private void PropagateStateRecursive(ToolStrip strip) { if (strip == null) return; var anyEnabled = ActualItems(strip.Items).Any(SelfEnabled); strip.Enabled = anyEnabled; }
public ToolStripGripRenderEventArgs (Graphics g, ToolStrip toolStrip) : base (g, toolStrip) { this.grip_bounds = new Rectangle (2, 0, 3, 25); this.grip_display_style = ToolStripGripDisplayStyle.Vertical; this.grip_style = ToolStripGripStyle.Visible; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.toolStripTop = new System.Windows.Forms.ToolStrip(); this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); this.mixToolStripButton = new System.Windows.Forms.ToolStripButton(); this.instanceToolStripButton = new System.Windows.Forms.ToolStripButton(); this.panelDisplayCulture = new System.Windows.Forms.Panel(); this.toolStripTop.SuspendLayout(); this.SuspendLayout(); // // toolStripTop // this.toolStripTop.Cursor = System.Windows.Forms.Cursors.Default; this.toolStripTop.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStripTop.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripButton, this.mixToolStripButton, this.instanceToolStripButton }); this.toolStripTop.Location = new System.Drawing.Point(0, 0); this.toolStripTop.Name = "toolStripTop"; this.toolStripTop.Size = new System.Drawing.Size(377, 25); this.toolStripTop.TabIndex = 15; this.toolStripTop.Visible = true; // // newToolStripButton // this.newToolStripButton.Name = "newToolStripButton"; this.newToolStripButton.Text = "New culture"; this.newToolStripButton.Click += new System.EventHandler(this.newToolStripButton_Click); // // mixToolStripButton // this.mixToolStripButton.Name = "mixToolStripButton"; this.mixToolStripButton.Text = "Mix cultures"; this.mixToolStripButton.Click += new System.EventHandler(this.mixToolStripButton_Click); // // instanceToolStripButton // this.instanceToolStripButton.Name = "instanceToolStripButton"; this.instanceToolStripButton.Text = "New instance"; this.instanceToolStripButton.Click += new System.EventHandler(this.instanceToolStripButton_Click); // // panelDisplayCulture // this.panelDisplayCulture.Location = new System.Drawing.Point(4, 26); this.panelDisplayCulture.Name = "panelDisplayCulture"; this.panelDisplayCulture.Size = new System.Drawing.Size(369, 374); this.panelDisplayCulture.TabIndex = 16; // // CultureBuilder // this.ClientSize = new System.Drawing.Size(377, 403); this.Controls.Add(this.panelDisplayCulture); this.Controls.Add(this.toolStripTop); this.Name = "CultureBuilder"; this.Text = "Culture Builder"; this.toolStripTop.ResumeLayout(false); this.toolStripTop.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
public SingleFileWatcher(ToolStrip ui, string path, SingleFileWathcerChangedHandler callback) { singleFileWathcerChangedHandler = callback; delex = new DelayExecuter(1000, delegate() { singleFileWathcerChangedHandler(); }); watcher = new System.IO.FileSystemWatcher(); //監視するディレクトリを指定 watcher.Path = Path.GetDirectoryName(path); //監視するファイルを指定 watcher.Filter = Path.GetFileName(path); //最終更新日時、ファイルサイズの変更を監視する watcher.NotifyFilter = (System.IO.NotifyFilters.Size |System.IO.NotifyFilters.LastWrite); //UIのスレッドにマーシャリングする watcher.SynchronizingObject = ui; //イベントハンドラの追加 watcher.Changed += new System.IO.FileSystemEventHandler(watcherChanged); watcher.Created += new System.IO.FileSystemEventHandler(watcherChanged); //監視を開始する watcher.EnableRaisingEvents = true; }
public ToolStripOptionsToolbarSection(ListControl listControl) : base(listControl) { _listControl = listControl; _toolStrip = new ToolStrip(); _toolStrip.AutoSize = true; _toolStrip.Visible = false; _toolStrip.Anchor = AnchorStyles.None; _toolStrip.Dock = DockStyle.None; _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.TabIndex = 0; _toolStrip.Text = "List options"; _toolStrip.CanOverflow = true; _toolStrip.Renderer = new MyRenderer(); _toolStrip.BackColor = Color.Transparent; _toolStrip.Layout += _toolStrip_Layout; AddDefaultToolStripButtons(); _toolStrip.CreateControl(); listControl.Controls.Add(_toolStrip); listControl.Columns.GroupedItems.DataChanged += GroupedItems_DataChanged; HandleEnablingGroupButtons(); }
public VisualEnvironmentCompiler(InvokeDegegate beginInvoke, SetFlagDelegate setCompilingButtonsEnabled, SetFlagDelegate setCompilingDebugEnabled, SetTextDelegate setStateText, SetTextDelegate addTextToCompilerMessages, ToolStripMenuItem pluginsMenuItem, ToolStrip pluginsToolStrip, ExecuteSourceLocationActionDelegate ExecuteSLAction, ExecuteVisualEnvironmentCompilerActionDelegate ExecuteVECAction, PascalABCCompiler.Errors.ErrorsStrategyManager ErrorsManager, RunManager RunnerManager, DebugHelper DebugHelper,UserOptions UserOptions,System.Collections.Hashtable StandartDirectories, Dictionary<string, CodeFileDocumentControl> OpenDocuments, IWorkbench workbench) { this.StandartDirectories = StandartDirectories; this.ErrorsManager = ErrorsManager; this.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(onChangeVisualEnvironmentState); SetCompilingButtonsEnabled = setCompilingButtonsEnabled; SetDebugButtonsEnabled = setCompilingDebugEnabled; SetStateText = setStateText; AddTextToCompilerMessages = addTextToCompilerMessages; this.beginInvoke = beginInvoke; this.ExecuteSLAction=ExecuteSLAction; this.ExecuteVECAction = ExecuteVECAction; PluginsMenuItem = pluginsMenuItem; PluginsToolStrip = pluginsToolStrip; PluginsController = new VisualPascalABCPlugins.PluginsController(this, PluginsMenuItem, PluginsToolStrip, workbench); this.RunnerManager = RunnerManager; this.DebugHelper = DebugHelper; DebugHelper.Starting += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Starting); DebugHelper.Exited += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Exited); RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Starting); RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited); this.CodeCompletionParserController = WorkbenchServiceFactory.CodeCompletionParserController; this.CodeCompletionParserController.visualEnvironmentCompiler = this; this.UserOptions = UserOptions; this.OpenDocuments = OpenDocuments; }
/// <summary> /// The default constructor sets the base controls. /// </summary> protected Workspace() { // Graphical measures Graphics g = CreateGraphics(); SizeF sizeString = g.MeasureString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890", Font); Data.HorizontalDLU = (sizeString.Width/62)/4; Data.VerticalDLU = sizeString.Height/8; g.Dispose(); TsTradeControl = new ToolStrip(); MainMenuStrip = new MenuStrip(); PnlWorkspace = new Panel(); StatusStrip = new StatusStrip(); // Panel Workspace PnlWorkspace.Parent = this; PnlWorkspace.Dock = DockStyle.Fill; PnlWorkspace.Padding = new Padding(2); PnlWorkspace.AllowDrop = true; PnlWorkspace.DragEnter += Workspace_DragEnter; PnlWorkspace.DragDrop += WorkspaceDragDrop; // Tool Strip Trade control TsTradeControl.Parent = this; TsTradeControl.Dock = DockStyle.Top; // Main menu MainMenuStrip.Parent = this; MainMenuStrip.Dock = DockStyle.Top; // Status bar StatusStrip.Parent = this; StatusStrip.Dock = DockStyle.Bottom; }
public ClasspathWatcher(ToolStrip ui, IProject project, ClasspathWathcerChangedHandler callback) { classpathWathcerChangedHandler = callback; delex = new DelayExecuter(1000, delegate() { classpathWathcerChangedHandler(); }); int g = 0; foreach (PathModel path in ASContext.Context.Classpath) { if (path.Path.ToString().Length > 2 && !path.Path.ToString().Contains(".swc")) { g++; } } String[] _ary = new String[g]; int n = 0; foreach (PathModel path in ASContext.Context.Classpath) { if (path.Path.ToString().Length > 2 && !path.Path.ToString().Contains(".swc")) { _ary[n] = path.Path.ToString(); //Console.WriteLine(_ary[n]); n++; } } //TraceManager.Add(n.ToString()); watchers = new FileSystemWatcher[_ary.Length]; for (int i = 0, ix = _ary.Length; i < ix; i++) { watchers[i] = new System.IO.FileSystemWatcher(); //監視するディレクトリを指定 watchers[i].Path = _ary[i]; //最終アクセス日時、最終更新日時、ファイル、フォルダ名の変更を監視する watchers[i].NotifyFilter = (System.IO.NotifyFilters.LastWrite | System.IO.NotifyFilters.FileName | System.IO.NotifyFilters.DirectoryName); //拡張子 watchers[i].Filter = ""; watchers[i].IncludeSubdirectories = true; //UIのスレッドにマーシャリングする watchers[i].SynchronizingObject = ui; //イベントハンドラの追加 watchers[i].Changed += new System.IO.FileSystemEventHandler(watcher_Changed); watchers[i].Created += new System.IO.FileSystemEventHandler(watcher_Changed); watchers[i].Deleted += new System.IO.FileSystemEventHandler(watcher_Changed); watchers[i].Renamed += new System.IO.RenamedEventHandler(watcher_Renamed); //監視を開始する watchers[i].EnableRaisingEvents = true; } }
private ToolStrip GetChildToolMenu(IPopup childMenuSettings, MergeAction mergeAction) { ToolStrip toolStrip1 = new System.Windows.Forms.ToolStrip(); toolStrip1.RenderMode = ToolStripRenderMode.Professional; toolStrip1.CanOverflow = false; toolStrip1.Font = new System.Drawing.Font("Tahoma", 8, FontStyle.Regular); toolStrip1.GripStyle = ToolStripGripStyle.Visible; // перемещение toolStrip1.LayoutStyle = ToolStripLayoutStyle.HorizontalStackWithOverflow; toolStrip1.ImageScalingSize = new System.Drawing.Size(32, 32); toolStrip1.BackColor = System.Drawing.SystemColors.ActiveBorder; toolStrip1.Name = childMenuSettings.tittle; toolStrip1.AllowMerge = true; for (int i = 0; i < childMenuSettings.items.Count; i++) { ToolStripButton toolStripButton = new ToolStripButton(); toolStripButton.ImageScaling = ToolStripItemImageScaling.SizeToFit; toolStripButton.Image = childMenuSettings.items[i].image; toolStripButton.AutoSize = true; toolStripButton.ToolTipText = childMenuSettings.items[i].tittle; toolStripButton.Margin = new Padding(1, 1, 1, 3); toolStripButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); toolStripButton.MergeAction = mergeAction; toolStripButton.Tag = childMenuSettings.items[i]; toolStripButton.Click += (t, e) => { IItem button = ((t as ToolStripButton).Tag) as IItem; button.sendClickItem(); }; toolStripButton.Name = childMenuSettings.tittle + i.ToString(); toolStrip1.Items.Add(toolStripButton); } return toolStrip1; }
protected override void OnTermination() { if (annotPanel != null) { ChartControl.Controls.Remove(annotPanel); annotPanel.Dispose(); } if (theSplitter != null) { ChartControl.Controls.Remove(theSplitter); theSplitter.Dispose(); } if (strip != null) { strip.Items.Remove(hideBtn); hideBtn.Dispose(); } dgv = null; theSplitter = null; strip = null; hideBtn = null; newBtn = null; reorgBtn = null; didWell = null; needsImprovement = null; base.OnTermination(); }
protected override void Initialize(ToolStrip toolStrip) { toolStrip.Padding = new Padding(0, 0, 0, 5); toolStrip.Width = Width; toolStrip.Height = toolStrip.Items.Count * HEIGHT + 5; toolStrip.AutoSize = false; }
private void ApplyToolStripSettings(ToolStrip toolStrip, SettingsStub settings, Dictionary<string, ToolStrip> itemLocationHash) { if (toolStrip != null) { toolStrip.Visible = settings.Visible; toolStrip.Size = settings.Size; string itemOrder = settings.ItemOrder; if (!string.IsNullOrEmpty(itemOrder)) { string[] strArray = itemOrder.Split(new char[] { ',' }); Regex regex = new Regex(@"(\S+)"); for (int i = 0; (i < toolStrip.Items.Count) && (i < strArray.Length); i++) { Match match = regex.Match(strArray[i]); if ((match != null) && match.Success) { string str2 = match.Value; if (!string.IsNullOrEmpty(str2) && itemLocationHash.ContainsKey(str2)) { toolStrip.Items.Insert(i, itemLocationHash[str2].Items[str2]); } } } } } }
private void InsertToolBar(BarControl commandBar, ToolStrip toolStrip) { var toolStripPanel = _toolStripContainer.TopToolStripPanel; var toolStrips = toolStripPanel.Controls .Cast <ToolStrip>() .OrderBy(p => p.Top) .ThenBy(p => p.Left) .ToList(); if (toolStrips.Count > 0) { int rows = toolStripPanel.Rows.Length; toolStripPanel.Join( toolStrip, new Point( Math.Min(toolStrips[toolStrips.Count - 1].Right, toolStripPanel.Width), toolStrips[toolStrips.Count - 1].Top ) ); if (rows != toolStripPanel.Rows.Length) { toolStripPanel.Controls.Remove(toolStrip); toolStripPanel.Join(toolStrip, rows); } } else { toolStripPanel.Join(toolStrip); } }
// There seems to be no public way to set these properties :/ internal ToolStripGripRenderEventArgs (Graphics g, ToolStrip toolStrip, Rectangle gripBounds, ToolStripGripDisplayStyle displayStyle, ToolStripGripStyle gripStyle) : base (g, toolStrip) { this.grip_bounds = gripBounds; this.grip_display_style = displayStyle; this.grip_style = gripStyle; }
protected override void Initialize(ToolStrip toolStrip) { this.toolStrip = toolStrip; this.toolStrip.ImageScalingSize = ScaleHelper.Scale(new Size(16, 16)); this.toolStrip.Paint += this.OnToolStripPaint; base.Initialize(toolStrip); }
public ToolStripContainer AddExitButton(ToolStripContainer toolbarContainer,ExitButtonDelegate myDelegate) { if (myDelegate != null) { imgExitToolStrip = new ToolStrip(); // imgExitToolStrip.ImageScalingSize = new Size(18, 18); imgExitToolStrip.ImageList = new ImageList(); imgExitToolStrip.ItemClicked += new ToolStripItemClickedEventHandler(this.toolBar_Click); imgExitToolStrip.ImageList.Images.Add("Exit", Image.FromHbitmap(ImageEdit.EXIT.GetHbitmap())); ToolStripItem button; button = new ToolStripButton(); button.Text = ""; button.ImageKey = "Exit"; button.Name = "Exit"; button.ToolTipText = "Exit"; imgExitToolStrip.Items.Add(button); toolbarContainer.TopToolStripPanel.Controls.Add(imgExitToolStrip); this.exitDelegate = myDelegate; } else { if (imgExitToolStrip != null) { toolbarContainer.TopToolStripPanel.Controls.Remove(imgExitToolStrip); } imgExitToolStrip = null; } return toolbarContainer; }
public oTabAssemblyViewer(oTabManager parent, ToolStrip toolStrip, Panel panelMain, ToolStrip mainToolStrip, string tabTitle) : base(parent, toolStrip, panelMain, mainToolStrip, tabTitle) { InitializeComponents(); panelMain.Controls.Add(this.assemblyViewControl); assemblyViewControl.Visible = false; }
private static bool ChangeSelection(ToolStrip start, ToolStrip toolStrip) { if ((toolStrip == null) || (start == null)) { return false; } if (start == toolStrip) { return false; } if (ModalMenuFilter.InMenuMode) { if (ModalMenuFilter.GetActiveToolStrip() == start) { ModalMenuFilter.RemoveActiveToolStrip(start); start.NotifySelectionChange(null); } ModalMenuFilter.SetActiveToolStrip(toolStrip); } else { toolStrip.FocusInternal(); } start.SnapFocusChange(toolStrip); toolStrip.SelectNextToolStripItem(null, toolStrip.RightToLeft != RightToLeft.Yes); return true; }
public bool GetEnableVS2012Style(ToolStrip strip) { if (strips.ContainsKey(strip)) return strips[strip].EnableVS2012Style; return false; }
public StatisticControl() { InitializeComponent(); _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/PlotToolStrip"); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.Dock = DockStyle.Right; Controls.Add(_toolStrip); }
public ControlBase() { ToolStrip_Main = new ToolStrip(); MenuStrip_Main = new MenuStrip(); ContextMenuStrip_Main = new ContextMenuStrip(); InitializeComponent(); }
private ToolStrip CreateTabTools() { ToolStrip TabToolStrip = new System.Windows.Forms.ToolStrip(); ToolStripButton CloseTabButton = new ToolStripButton(); ToolStripButton BookmarkTabButton = new ToolStripButton(); TabToolStrip.RenderMode = ToolStripRenderMode.System; TabToolStrip.GripMargin = new Padding(0); TabToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; TabToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { CloseTabButton, BookmarkTabButton }); TabToolStrip.Location = new System.Drawing.Point(3, 3); TabToolStrip.Name = "TabToolStrip"; TabToolStrip.Padding = new Padding(5, 0, 5, 0); TabToolStrip.RightToLeft = System.Windows.Forms.RightToLeft.Yes; TabToolStrip.Size = new Size(395, 40); TabToolStrip.MaximumSize = new Size(0, 30); TabToolStrip.Stretch = true; TabToolStrip.TabIndex = 0; TabToolStrip.BackColor = SystemColors.Window; TabToolStrip.Text = ""; TabToolStrip.Cursor = Cursors.Default; TabToolStrip.Margin = new Padding(0); TabToolStrip.Dock = DockStyle.Top; CloseTabButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; CloseTabButton.Name = "CloseTabButton"; CloseTabButton.Padding = new Padding(5); CloseTabButton.Margin = new Padding(0); CloseTabButton.Size = new Size(30, 40); CloseTabButton.Text = "Close"; CloseTabButton.ForeColor = Color.Black; CloseTabButton.BackColor = Color.DarkSlateGray; CloseTabButton.ToolTipText = "Close this tab"; CloseTabButton.Font = new Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular); CloseTabButton.BackColor = Color.LightGray; CloseTabButton.MouseEnter += new EventHandler(TabToolsButton_Enter); CloseTabButton.MouseLeave += new EventHandler(TabToolsButton_Leave); CloseTabButton.Click += new EventHandler(CloseTabButton_Click); BookmarkTabButton.DisplayStyle = ToolStripItemDisplayStyle.Text; BookmarkTabButton.Name = "BookmarkTabButton"; BookmarkTabButton.Padding = new Padding(5); BookmarkTabButton.Margin = new Padding(0, 0, 5, 0); BookmarkTabButton.Size = new Size(30, 40); BookmarkTabButton.Text = "Bookmark this page"; BookmarkTabButton.ForeColor = Color.Black; BookmarkTabButton.BackColor = Color.DarkSlateGray; BookmarkTabButton.ToolTipText = "Bookmark this page"; BookmarkTabButton.Font = new Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular); BookmarkTabButton.BackColor = Color.LightGray; BookmarkTabButton.MouseEnter += new EventHandler(TabToolsButton_Enter); BookmarkTabButton.MouseLeave += new EventHandler(TabToolsButton_Leave); BookmarkTabButton.Click += new EventHandler(BookmarkTabButton_Click); return(TabToolStrip); }
protected override void Initialize(System.Windows.Forms.ToolStrip toolStrip) { base.Initialize(toolStrip); _toolStrip = toolStrip; _toolStrip.Padding = new Padding(8, 3, 8, 3); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; }
/// <summary> /// 设置工具栏显示格式 /// </summary> /// <param name="ms">工具栏</param> /// <param name="style"></param> public static void setToolStripItemDisplayStyle (System.Windows.Forms.ToolStrip ms, System.Windows.Forms.ToolStripItemDisplayStyle style) { for (int i = 0; i < ms.Items.Count; i++) { ms.Items[i].DisplayStyle = style; } }
protected override void Initialize(System.Windows.Forms.ToolStrip toolStrip) { base.Initialize(toolStrip); this.rendererFor = toolStrip; toolStrip.FindForm().Activated += this.Form_Activated; toolStrip.FindForm().Deactivate += this.Form_Deactivated; }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UltraVNCSC)); this.tsMain = new System.Windows.Forms.ToolStrip(); this.Load += new System.EventHandler(this.UltraVNCSC_Load); this.btnDisconnect = new System.Windows.Forms.ToolStripButton(); this.btnDisconnect.Click += new System.EventHandler(this.btnDisconnect_Click); this.pnlContainer = new System.Windows.Forms.Panel(); this.tsMain.SuspendLayout(); this.SuspendLayout(); // //tsMain // this.tsMain.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.btnDisconnect }); this.tsMain.Location = new System.Drawing.Point(0, 0); this.tsMain.Name = "tsMain"; this.tsMain.Size = new System.Drawing.Size(446, 25); this.tsMain.TabIndex = 0; this.tsMain.Text = "ToolStrip1"; // //btnDisconnect // this.btnDisconnect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.btnDisconnect.Image = (System.Drawing.Image)(resources.GetObject("btnDisconnect.Image")); this.btnDisconnect.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnDisconnect.Name = "btnDisconnect"; this.btnDisconnect.Size = new System.Drawing.Size(63, 22); this.btnDisconnect.Text = "Disconnect"; // //pnlContainer // this.pnlContainer.Anchor = (System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right); this.pnlContainer.Location = new System.Drawing.Point(0, 27); this.pnlContainer.Name = "pnlContainer"; this.pnlContainer.Size = new System.Drawing.Size(446, 335); this.pnlContainer.TabIndex = 1; // //UltraVNCSC // this.ClientSize = new System.Drawing.Size(446, 362); this.Controls.Add(this.pnlContainer); this.Controls.Add(this.tsMain); this.Icon = global::My.Resources.Resources.UVNC_SC_Icon; this.Name = "UltraVNCSC"; this.TabText = "UltraVNC SC"; this.Text = "UltraVNC SC"; this.tsMain.ResumeLayout(false); this.tsMain.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
private void PerformButtonClick() { SWF.ToolStrip toolstrip = button.Owner; if (toolstrip.InvokeRequired) { toolstrip.BeginInvoke(new SWF.MethodInvoker(PerformButtonClick)); return; } button.PerformButtonClick(); }
protected virtual void InitializeKomponentMenu(SAPreference pref) { System.Windows.Forms.MenuStrip ms = this.MainMenu; if (ms != null && KomponentCollection.Instance.Count > 0) { System.Windows.Forms.ToolStripMenuItem sa = new ToolStripMenuItem(); sa.Text = "Safe.Anywhere"; sa.Name = "KomponentMenuItem"; int n = 0; foreach (IKomponent k in KomponentCollection.Instance) { System.Windows.Forms.ToolStripMenuItem mi = new ToolStripMenuItem(); mi.Name = string.Format("KomponentMenuItem{0}", n); mi.Text = k.FullName; mi.Tag = k; mi.Image = k.Image16; mi.Click += new System.EventHandler(this.KomponentMenuItem_Click); n++; sa.DropDownItems.Add(mi); } ms.Items.Add(sa); } System.Windows.Forms.ToolStrip ts = this.MainTool; if (ts != null && KomponentCollection.Instance.Count > 0) { System.Windows.Forms.ToolStripSeparator sp = new System.Windows.Forms.ToolStripSeparator(); ts.Items.Add(sp); int n = 0; foreach (IKomponent k in KomponentCollection.Instance) { System.Windows.Forms.ToolStripButton ti = new System.Windows.Forms.ToolStripButton(); ti.Name = string.Format("KomponentToolItem{0}", n); ti.Text = k.FullName; ti.ToolTipText = k.FullName; ti.Tag = k; ti.Image = k.Image24; ti.DisplayStyle = ToolStripItemDisplayStyle.Image; ti.ImageScaling = ToolStripItemImageScaling.None; ti.Click += new System.EventHandler(this.KomponentMenuItem_Click); n++; ts.Items.Add(ti); } } if (ts != null) { ZForge.Controls.RSS.ToolStripRSSLabel rl = new ZForge.Controls.RSS.ToolStripRSSLabel(pref.Company, pref.URL); rl.Alignment = ToolStripItemAlignment.Right; rl.URLs.AddRange(pref.RSSFeeds); ts.Items.Add(rl); rl.Run(); } }
private void TranslateMe(System.Windows.Forms.ToolStrip tstrip) { try { //tstrip.Text = TranslateMe(tstrip.Text); foreach (ToolStripItem c in tstrip.Items) { TranslateMe(c); } } catch (Exception ex) { My.Box.Errore(ex.Message); } }
private void PerformToggle(SWF.ToolStripButton button, SWF.CheckState state) { SWF.ToolStrip toolstrip = ((SWF.ToolStripButton)Provider.Component).Owner; if (toolstrip.InvokeRequired) { toolstrip.BeginInvoke(new PerformToggleDelegate(PerformToggle), new object [] { button, state }); return; } button.CheckState = state; }
protected override void OnParentChanged(System.Windows.Forms.ToolStrip oldParent, System.Windows.Forms.ToolStrip newParent) { base.OnParentChanged(oldParent, newParent); if (oldParent != null) { oldParent.Paint -= new System.Windows.Forms.PaintEventHandler(newParent_Paint); } if (newParent != null) { newParent.Paint += new System.Windows.Forms.PaintEventHandler(newParent_Paint); } }
public static void Update(System.Windows.Forms.ToolStrip toolStrip, ToolStripItemCodonCollection codonCollection) { if (codonCollection == null || toolStrip == null) { Debug.Assert(false, "ToolStrip 或 CodonCollection为null"); return; } toolStrip.Items.Clear(); foreach (IToolStripItemCodon codon in codonCollection) { toolStrip.Items.Add((ToolStripItem)codon.View); } }
private void menupercentone_Click(object sender, EventArgs e) { if (sender is System.Windows.Forms.ToolStripMenuItem) { System.Windows.Forms.ToolStripMenuItem item = (System.Windows.Forms.ToolStripMenuItem)sender; System.Windows.Forms.ToolStrip parent = item.GetCurrentParent(); int i = parent.Items.IndexOf(item); int multi = i + 1; DrawRegion.Width = drawregOrigSize.Width * multi; DrawRegion.Height = drawregOrigSize.Height * multi; EnlargeAndShortenCanvas(multi); } }
public void AddToMenu(PPL_Lib.PPLMain pPPLMain, System.Windows.Forms.ToolStrip pToolStrip) { //save the reference to the O-Calc Pro main cPPLMain = pPPLMain; //create the toolstrip buttons saveFilesBtn = new ToolStripMenuItem("BCF Save Files"); saveFilesBtn.AutoToolTip = true; saveFilesBtn.ToolTipText = Description; saveFilesBtn.Click += SaveFilesBtn_Click; valBtn = new ToolStripMenuItem("BCF Validation"); valBtn.AutoToolTip = true; valBtn.ToolTipText = Description; valBtn.Click += ValBtn_Click; treeBtn = new ToolStripMenuItem("BCF Tree Attachment Pole Builder"); treeBtn.AutoToolTip = true; treeBtn.ToolTipText = Description; treeBtn.Click += TreeBtn_Click; coordBtn = new ToolStripMenuItem("BCF Update Coordinates Single"); coordBtn.AutoToolTip = true; coordBtn.ToolTipText = "Updates the FAA coordinates for the current pole. You must have the planning data spreadsheet saved to the desktop of your PGE computer"; coordBtn.Click += CoordBtn_Click; pgeDebugBtn = new ToolStripMenuItem("PGE Debug"); pgeDebugBtn.AutoToolTip = true; pgeDebugBtn.ToolTipText = "Debug"; pgeDebugBtn.Click += PgeDebugBtn_Click; //create the dropdown button bcfButton = new ToolStripDropDownButton(); bcfButton.Text = "BCF Plugins"; bcfButton.DropDownDirection = ToolStripDropDownDirection.Default; bcfButton.DropDownOpened += BcfButton_DropDownOpened; bcfButton.Click += BcfButton_Click; //add toolstrip buttons to dropdown bcfButton.DropDownItems.Add(saveFilesBtn); bcfButton.DropDownItems.Add(valBtn); bcfButton.DropDownItems.Add(treeBtn); bcfButton.DropDownItems.Add(coordBtn); bcfButton.DropDownItems.Add(pgeDebugBtn); pToolStrip.Items.Add(bcfButton); }
public MapStatistics() { InitializeComponent(); _XAxis.AxislineStyle = OxyPlot.LineStyle.Solid; _YAxis.AxislineStyle = OxyPlot.LineStyle.Solid; _CAxis.AxislineStyle = OxyPlot.LineStyle.Solid; //为界面右侧增加一个工具条控件 _toolStrip = ToolbarService.CreateToolStrip(this, "/FrameWork/ToolStrips/StatisticPlot"); _toolStrip.GripStyle = ToolStripGripStyle.Hidden; _toolStrip.Dock = DockStyle.Right; Controls.Add(_toolStrip); //plotView1.Model = _pm; }
/// <summary> /// Recupera una lista de todos los controles del tipo especiicado que se encuentran dentro del ToolStrip /// </summary> /// <typeparam name="T">Tipo del control a recuperar</typeparam> /// <param name="container">ToolStrip donde se encuentran los controles</param> /// <returns>Lista de controles</returns> public static List <T> getToolStripButtons <T>(this System.Windows.Forms.ToolStrip container) where T : System.Windows.Forms.ToolStripButton { List <T> controls = new List <T>(); foreach (System.Windows.Forms.ToolStripItem c in container.Items) { if (c is T) { controls.Add((T)c); } } return(controls); }
public override void Setup() { System.Windows.Forms.MenuStrip menu = new System.Windows.Forms.MenuStrip(); System.Windows.Forms.ToolStrip toolbar = new System.Windows.Forms.ToolStrip(); Env.Initialize(null, new Commands(menu, toolbar), FreeSCADA.Interfaces.EnvironmentMode.Designer); plugin = (Plugin)Env.Current.CommunicationPlugins["opc_connection_plug"]; projectFile = System.IO.Path.GetTempFileName(); if (System.IO.File.Exists(projectFile)) { System.IO.File.Delete(projectFile); } }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CodeParseTreeContent)); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.treeView1 = new System.Windows.Forms.TreeView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.SuspendLayout(); // // toolStrip1 // this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Size = new System.Drawing.Size(282, 25); this.toolStrip1.TabIndex = 1; this.toolStrip1.Text = "toolStrip1"; // // treeView1 // this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; this.treeView1.ImageIndex = 0; this.treeView1.ImageList = this.imageList1; this.treeView1.Location = new System.Drawing.Point(0, 25); this.treeView1.Name = "treeView1"; this.treeView1.SelectedImageIndex = 0; this.treeView1.Size = new System.Drawing.Size(282, 228); this.treeView1.TabIndex = 2; // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, "CS.png"); this.imageList1.Images.SetKeyName(1, "Class.png"); this.imageList1.Images.SetKeyName(2, "Interface.png"); this.imageList1.Images.SetKeyName(3, "Structure.png"); // // CodeParseTreeContent // this.ClientSize = new System.Drawing.Size(282, 253); this.Controls.Add(this.treeView1); this.Controls.Add(this.toolStrip1); this.Name = "CodeParseTreeContent"; this.Text = "Code Parse Tree"; this.ResumeLayout(false); this.PerformLayout(); }
private void tbStockItem_ButtonClick(System.Object eventSender, System.EventArgs eventArgs) { System.Windows.Forms.ToolStrip Button = (System.Windows.Forms.ToolStrip)eventSender; short x = 0; for (x = 0; x <= tbStockItem.Items.Count; x++) { ((ToolStripButton)tbStockItem.Items[x]).Checked = false; } tbStockItem.Tag = Button.Items.IndexOf(Button.Tag) - 1; // buildDepartment //Button.Checked = True doLoad(); }
private void InitializeMovingToolStrip() { movingToolStrip = new ToolStrip(); changeDirectionButton = new ToolStripButton(); movingToolStrip.AutoSize = true; movingToolStrip.RenderMode = ToolStripRenderMode.System; changeDirectionButton.TextDirection = ToolStripTextDirection.Vertical270; changeDirectionButton.Overflow = ToolStripItemOverflow.Never; changeDirectionButton.Text = "Change Alignment"; movingToolStrip.Items.Add(changeDirectionButton); }
private void FixVisibleState(System.Windows.Forms.ToolStrip ts) { foreach (System.Windows.Forms.ToolStripItem tsi in ts.Items) { System.Windows.Forms.ToolStripButton tsb = tsi as System.Windows.Forms.ToolStripButton; if (tsb == null) { continue; } if (tsb.Image != null && tsb != biUpdate) { tsb.Visible = true; } } }