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 ToolStripViewGui() { this.Settings = Options.Instance.ViewOptions; this.mButtonShowLastPackets = new ToolStripButton() { Text = "Last packets", Checked = this.Settings.ShowLastPackets }; this.mButtonShowLastPackets.Click += new EventHandler(mButtonShowLastPackets_Click); this.mButtonShowStaticPackets = new ToolStripButton() { Text = "Static packets", Checked = this.Settings.ShowStaticPackets }; this.mButtonShowStaticPackets.Click += new EventHandler(mButtonShowStaticPackets_Click); this.mButtonAbout = new ToolStripButton() { Text = "About" }; this.mButtonAbout.Click += new EventHandler(mButtonAbout_Click); this.Items.AddRange(new ToolStripItem[] { this.mButtonShowLastPackets, this.mButtonShowStaticPackets, this.mButtonAbout }); }
/// <summary> /// 复制菜单项目StripButton /// </summary> /// <param name="orgMenuItem">原始的菜单</param> /// <returns>克隆的菜单StripButton</returns> public static ToolStripButton CloneFromMenuItem(this ToolStripMenuItem orgMenuItem) { var cloneButton = new ToolStripButton(); //!!!typeof的参数必须是ToolStripMenuItem的基类!!!如果使用Control则不能取到值!!! //感谢CSDN网友beargo在帖子【如何获取事件已定制方法名?】里面的提示,网上的例子没有说明这个问题 //坑爹啊。。。。。。。。 var list = GetObjectEventList(orgMenuItem, "EventClick", typeof (ToolStripItem)); // if (!SystemConfig.MonoMode) // { //悲催MONO不支持 if (list != null && list[0] != null) { try { cloneButton.Click += (x, y) => list[0].DynamicInvoke(x, y); } catch (Exception) { //Utility.ExceptionDeal(ex); } } // } cloneButton.Image = orgMenuItem.Image; cloneButton.Enabled = orgMenuItem.Enabled; cloneButton.Text = orgMenuItem.Text; if (GuiConfig.IsMono) { cloneButton.Font = GuiConfig.GetMonoFont(cloneButton.Font); } cloneButton.Checked = orgMenuItem.Checked; cloneButton.DisplayStyle = ToolStripItemDisplayStyle.Image; return cloneButton; }
/// <summary>Initializes a new instance of the <see cref="StashToolbar"/> class.</summary> /// <param name="stashView">Stash view.</param> public StashToolbar(StashView stashView) { Verify.Argument.IsNotNull(stashView, "stashView"); _stashView = stashView; Items.Add( new ToolStripButton( Resources.StrRefresh, CachedResources.Bitmaps["ImgRefresh"], OnRefreshButtonClick) { DisplayStyle = ToolStripItemDisplayStyle.Image, }); Items.Add(new ToolStripSeparator()); Items.Add(_saveButton = new ToolStripButton( Resources.StrSave, CachedResources.Bitmaps["ImgStashSave"], OnStashSaveButtonClick) { ToolTipText = Resources.TipStashSave, }); }
public FftToolStrip(GraphControl gc, GraphFFT gf) { graphControl = gc; oldGraph = gf; this.fft = new System.Windows.Forms.ToolStripButton(); this.toolStrip.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fft}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip2"; this.toolStrip.Size = new System.Drawing.Size(497, 25); this.toolStrip.TabIndex = 1; this.toolStrip.Text = "toolStrip2"; // // fft // this.fft.CheckOnClick = true; this.fft.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.fft.Image = null;// ((System.Drawing.Image)(resources.GetObject("fft.Image"))); this.fft.ImageTransparentColor = System.Drawing.Color.Magenta; this.fft.Name = "fft"; this.fft.Size = new System.Drawing.Size(30, 22); this.fft.Text = "FFT"; this.fft.CheckStateChanged += new System.EventHandler(this.fft_CheckStateChanged); }
public TweakExecuteControl(Tweakable tweakable, string currentState) : base() { this.tweakable = tweakable; this.state = currentState; this.Padding = new Padding(0, 0, 7, 0); Text = "execute"; menu = new ContextMenuStrip(); menu.ShowCheckMargin = false; menu.ShowImageMargin = false; menu.ShowItemToolTips = false; foreach (string setting in tweakable.GetAvailableSettings()) { ToolStripItem item = new ToolStripButton(setting); if (setting == currentState) { item.Enabled = false; } item.Click += Item_Click; menu.Items.Add(item); } }
public ReferencesToolbar(ReferencesView referencesView) { Verify.Argument.IsNotNull(referencesView, "referencesView"); _referencesView = referencesView; Items.Add(_btnRefresh = new ToolStripButton( Resources.StrRefresh, CachedResources.Bitmaps["ImgRefresh"], OnRefreshButtonClick) { DisplayStyle = ToolStripItemDisplayStyle.Image, }); Items.Add(new ToolStripSeparator()); Items.Add(_btnCreateBranch = new ToolStripButton( Resources.StrCreateBranch, CachedResources.Bitmaps["ImgBranchAdd"], OnCreateBranchButtonClick)); Items.Add(_btnCreateTag = new ToolStripButton( Resources.StrCreateTag, CachedResources.Bitmaps["ImgTagAdd"], OnCreateTagButtonClick)); }
/// <summary> /// Constructor for the Print Preview dialog /// </summary> public EnterPrintPreviewDialog() { Type t = typeof(PrintPreviewDialog); FieldInfo fieldInfo = t.GetField("toolStrip1", BindingFlags.Instance | BindingFlags.NonPublic); FieldInfo fieldInfo2 = t.GetField("printToolStripButton", BindingFlags.Instance | BindingFlags.NonPublic); ToolStrip toolStrip1 = (ToolStrip)fieldInfo.GetValue(this); ToolStripButton printButton = (ToolStripButton)fieldInfo2.GetValue(this); printButton.Visible = false; enterPrintButton = new ToolStripButton(); enterPrintButton.ToolTipText = printButton.ToolTipText; enterPrintButton.ImageIndex = 0; ToolStripItem[] oldButtons = new ToolStripItem[toolStrip1.Items.Count]; for (int i = 0; i < oldButtons.Length; i++) { oldButtons[i] = toolStrip1.Items[i]; } toolStrip1.Items.Clear(); toolStrip1.Items.Add(enterPrintButton); for (int i = 0; i < oldButtons.Length; i++) { toolStrip1.Items.Add(oldButtons[i]); } toolStrip1.ItemClicked += new ToolStripItemClickedEventHandler(toolStrip1_ItemClicked); }
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 PicoTextEditorForm() { InitializeComponent(); AllowBreakpoints = true; // Initialize info editor. InfoEditor.Visible = Settings.Default.Pico_AutoAssemble; InfoEditor.Document.HighlightingStrategy = ICSharpCode.TextEditor.Document.HighlightingStrategyFactory.CreateHighlightingStrategy("Info"); // Create and initialize Auto-assemble button. var b = new ToolStripButton("Auto-assemble"); b.Checked = Settings.Default.Pico_AutoAssemble; b.Click += (sender, e) => { InfoEditor.Visible = !InfoEditor.Visible; b.Checked = InfoEditor.Visible; infoTimer.Enabled = InfoEditor.Visible; if (!InfoEditor.Visible) errorPanel.Visible = false; }; statusStrip.Items.Insert(0, b); Editor.Document.DocumentChanged += new ICSharpCode.TextEditor.Document.DocumentEventHandler(Document_DocumentChanged); }
public SleekTab(ToolStripButton button, Control control, string name, string label) { this.button = button; this.control = control; this.name = name; this.label = label; }
public void SetTools(ToolInfo[] toolInfos) { if (this.toolStripEx != null) { this.toolStripEx.Items.Clear(); } this.imageList = new ImageList(); this.imageList.ColorDepth = ColorDepth.Depth32Bit; this.imageList.TransparentColor = Utility.TransparentKey; this.toolStripEx.ImageList = this.imageList; ToolStripItem[] buttons = new ToolStripItem[toolInfos.Length]; string toolTipFormat = PdnResources.GetString("ToolsControl.ToolToolTip.Format"); for (int i = 0; i < toolInfos.Length; ++i) { ToolInfo toolInfo = toolInfos[i]; ToolStripButton button = new ToolStripButton(); int imageIndex = imageList.Images.Add( toolInfo.Image.Reference, imageList.TransparentColor); button.ImageIndex = imageIndex; button.Tag = toolInfo.ToolType; button.ToolTipText = string.Format(toolTipFormat, toolInfo.Name, char.ToUpperInvariant(toolInfo.HotKey).ToString()); buttons[i] = button; } this.toolStripEx.Items.AddRange(buttons); }
public ToolStripButtonBlink(ref ContainerControl ParentControl, ref ToolStripButton TSButton, Image[] ImList) : this(ref ParentControl, ref TSButton, ImList, new[] {TSButton.ForeColor}) { }
private static ToolStripButton CreateToolStripButton(string text, EventHandler onClick = null) { ToolStripButton button = new ToolStripButton(); button.Text = text; button.Click += onClick; return button; }
protected override void initializeToolStripButtons() { _tsBtnEditPackage = createToolStripButton("Updatepaket bearbeiten"); _tsBtnRemovePackage = createToolStripButton("Entfernen", "Entfernt des Updatepaket aus dem Projekt."); _tsBtnEditPackage.Click += _tsBtnEditPackage_Click; _tsBtnRemovePackage.Click += _tsBtnRemovePackage_Click; }
protected override void StartCalc() { if (!tool_bar_inited){ tool_bar_inited = true; ChartToolBar.AccessToolBar(tb=> { var _tsi3 = new ToolStripButton {Text = "plot color"}; set_color_tsi(_tsi3, m_plot_color); _tsi3.Click += button1_Click; AddItem2ToolStrip(tb, _tsi3); var _track = new TrackBar { Dock = DockStyle.Fill, Maximum = 1000, Minimum = 10, SmallChange = 10, Value = Length, Text = "Average Length" }; _track.ValueChanged += _new_track; AddItem2ToolStrip(tb, new ToolStripControlHost(_track)); AddItem2ToolStrip(tb, new ToolStripSeparator()); }); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:KeyTermsControl"/> class. /// </summary> /// <param name="sCaption">The caption to use when this control is displayed as a /// floating window</param> /// <param name="sProject">The name of the current project</param> /// ------------------------------------------------------------------------------------ internal KeyTermsControl(string sCaption, string sProject) : base(sCaption, sProject) { InitializeComponent(); m_sepShowOnlyAtTop = new ToolStripSeparator(); m_ToolStrip.Items.Insert(0, m_sepShowOnlyAtTop); AddToolStripButton(0, TeResourceHelper.KeyTermFilterImage, TeResourceHelper.GetTmResourceString("kstidApplyFilterToKeyTermsToolTip")); m_tbbApplyFilter = m_ToolStrip.Items[0] as ToolStripButton; m_ToolStrip.Items.Insert(0, new ToolStripSeparator()); AddToolStripButton(0, TeResourceHelper.KeyTermNotRenderedImage, TeResourceHelper.GetTmResourceString("kstidVernEqNotAssignedToolTip")); m_tbbNotRendered = m_ToolStrip.Items[0] as ToolStripButton; AddToolStripButton(0, TeResourceHelper.KeyTermIgnoreRenderingImage, TeResourceHelper.GetTmResourceString("kstidNotRenderedToolTip")); m_tbbVernNotAssigned = m_ToolStrip.Items[0] as ToolStripButton; AddToolStripButton(0, TeResourceHelper.KeyTermRenderedImage, TeResourceHelper.GetTmResourceString("kstidUseAsVernEqToolTip")); m_tbbUseAsVern = m_ToolStrip.Items[0] as ToolStripButton; m_ToolStrip.Items.Insert(0, new ToolStripSeparator()); AddToolStripButton(0, TeResourceHelper.UpdateKeyTermEquivalentsImage, TeResourceHelper.GetTmResourceString("kstidUpdateKeyTermEquivalentsToolTip")); m_tbbUpdateKeyTermEquivalents = m_ToolStrip.Items[0] as ToolStripButton; m_ToolStrip.ItemClicked += new ToolStripItemClickedEventHandler(OnItemClicked); }
public void addToolButton(FormMain formMain) { this.formMain = formMain; var rm = new ResourceManager("PluginExportScreens.Icon", this.GetType().Assembly); var iconImport = (System.Drawing.Bitmap)rm.GetObject("icon_import"); var item = new ToolStripButton("Import", iconImport, btImport_Click); item.DisplayStyle = ToolStripItemDisplayStyle.Image; formMain.addToolButton(item); var iconExportPic = (System.Drawing.Bitmap)rm.GetObject("icon_export"); item = new ToolStripButton("Export pic", iconExportPic, bttExportPic_Click); item.DisplayStyle = ToolStripItemDisplayStyle.Image; formMain.addToolButton(item); var iconExportJson = (System.Drawing.Bitmap)rm.GetObject("icon_export"); item = new ToolStripButton("Export json", iconExportJson, bttExportJson_Click); item.DisplayStyle = ToolStripItemDisplayStyle.Image; formMain.addToolButton(item); var iconExport = (System.Drawing.Bitmap)rm.GetObject("icon_export"); item = new ToolStripButton("Export", iconExport, btExport_Click); item.DisplayStyle = ToolStripItemDisplayStyle.Image; formMain.addToolButton(item); }
/// <summary>Initializes a new instance of the <see cref="SubmodulesToolbar"/> class.</summary> /// <param name="submodulesView">Host view.</param> public SubmodulesToolbar(SubmodulesView submodulesView) { Verify.Argument.IsNotNull(submodulesView, "submodulesView"); _submodulesView = submodulesView; Items.Add(new ToolStripButton(Resources.StrRefresh, CachedResources.Bitmaps["ImgRefresh"], (sender, e) => { _submodulesView.RefreshContent(); }) { DisplayStyle = ToolStripItemDisplayStyle.Image, }); Items.Add(new ToolStripSeparator()); Items.Add(_btnAddSubmodule = new ToolStripButton(Resources.StrAddSubmodule, CachedResources.Bitmaps["ImgSubmoduleAdd"], (sender, e) => { using(var dlg = new AddSubmoduleDialog(_submodulesView.Repository)) { dlg.Run(_submodulesView); } }) { DisplayStyle = ToolStripItemDisplayStyle.ImageAndText, }); }
/// <summary> /// Creates the tool strip button for plugin. /// </summary> /// <param name="plugin">The plugin.</param> /// <returns></returns> public static ToolStripButton CreateToolStripButtonForPlugin( IPlugin plugin ) { Image img = plugin.Image == null ? DroidExplorer.Resources.Images.android : plugin.Image; ToolStripButton tsb = new ToolStripButton ( plugin.Text, plugin.Image, delegate ( object sender, EventArgs e ) { try { plugin.Execute ( plugin.PluginHost, plugin.PluginHost.CurrentDirectory ); } catch ( Exception ex ) { //throw; sender.LogError ( ex.Message, ex ); } }, plugin.Name ); tsb.DisplayStyle = plugin.DisplayStyle; // check for min tools version (there has to be a better way to check this) var minPT = plugin.MinimumSDKPlatformToolsVersion; var minT = plugin.MinimumSDKToolsVersion; var sdkv = 0; var sval = CommandRunner.Instance.GetProperty ( "ro.build.version.sdk" ); int.TryParse ( sval, out sdkv ); tsb.Enabled = sdkv >= minT; return tsb; }
/// <summary>The set commands.</summary> /// <param name="commands">The commands.</param> public void SetCommands(List<IToolbarCommand> commands) { this.ToolBarButtonsCollection.Items.Clear(); foreach (var command in commands) { var button = new ToolStripButton { Text = command.ToolTip, Image = command.Icon, Enabled = command.CanExecute, ImageScaling = ToolStripItemImageScaling.None, DisplayStyle = ToolStripItemDisplayStyle.ImageAndText, TextImageRelation = TextImageRelation.ImageAboveText, Margin = new Padding(2) }; var c = command; // Create a closure around the command command.PropertyChanged += (s, e) => { button.Text = c.ToolTip; button.Image = c.Icon; button.Enabled = c.CanExecute; }; button.Click += (s, e) => c.Execute(); this.ToolBarButtonsCollection.Items.Add(button); } }
private void AddNodeButton(MyNodeConfig nodeInfo, bool isTransform) { ToolStripItem newButton = isTransform ? new ToolStripMenuItem() : newButton = new ToolStripButton(); ToolStripItemCollection items; newButton.Image = nodeInfo.SmallImage; newButton.Name = nodeInfo.NodeType.Name; newButton.ToolTipText = nodeInfo.NodeType.Name.Substring(2); newButton.MouseDown += addNodeButton_MouseDown; newButton.Tag = nodeInfo.NodeType; newButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; newButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; newButton.ImageTransparentColor = System.Drawing.Color.Magenta; if (isTransform) { newButton.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; newButton.Text = newButton.ToolTipText; items = transformMenu.DropDownItems; } else { items = toolStrip1.Items; newButton.MouseUp += newButton_MouseUp; } if (items.Count > 0 && (items[items.Count - 1].Tag as Type).Namespace != nodeInfo.NodeType.Namespace) { items.Add(new ToolStripSeparator()); } items.Add(newButton); }
/// <summary> /// 复制菜单项目StripButton /// </summary> /// <param name="orgMenuItem">原始的菜单</param> /// <returns>克隆的菜单StripButton</returns> public static ToolStripButton CloneFromMenuItem(this ToolStripMenuItem orgMenuItem) { ToolStripButton cloneButton = new ToolStripButton(); //!!!typeof的参数必须是ToolStripMenuItem的基类!!!如果使用Control则不能取到值!!! ///感谢CSDN网友beargo在帖子【如何获取事件已定制方法名?】里面的提示,网上的例子没有说明这个问题 ///坑爹啊。。。。。。。。 Delegate[] _List = GetObjectEventList(orgMenuItem, "EventClick", typeof(ToolStripItem)); if (!SystemManager.MONO_MODE) { //悲催MONO不支持 if (_List != null && _List[0] != null) { try { cloneButton.Click += new EventHandler( (x, y) => { _List[0].DynamicInvoke(x, y); } ); } catch (Exception ex) { SystemManager.ExceptionDeal(ex); } } } cloneButton.Image = orgMenuItem.Image; cloneButton.Enabled = orgMenuItem.Enabled; cloneButton.Text = orgMenuItem.Text; cloneButton.Checked = orgMenuItem.Checked; cloneButton.DisplayStyle = ToolStripItemDisplayStyle.Image; return cloneButton; }
public void AddGlobalItem(IEditorComponent component, MenuCommand command) { ToolStripButton button = new ToolStripButton(string.Empty, Factory.GUIController.ImageList.Images[command.IconKey], new EventHandler(ToolbarEventHandler), command.ID); button.Tag = component; button.ToolTipText = command.Name; _toolBar.Items.Add(button); }
private void addtoolstripitem(string name, object classobject) { if (name == "Seperator") Items.Add(new ToolStripSeparator()); else { bool merge = typeof (MainForm) != classobject.GetType(); var toolstripbutton = new ToolStripButton(name) {Name = name}; EventInfo eventinfo = toolstripbutton.GetType().GetEvent("Click"); // Zoek de string.Format("{0}_Click", name.Replace(" ", "")) methode van classobject MethodInfo methodinfo = classobject.GetType().GetMethod(string.Format("{0}_Click", name.Replace(" ", ""))); if (methodinfo == null) // Als die niet bestaat. toolstripbutton.Enabled = false; else // Anders, voeg een EventHandler toe van het Click event naar die methode. eventinfo.AddEventHandler(toolstripbutton, Delegate.CreateDelegate(eventinfo.EventHandlerType, classobject, methodinfo)); if (merge) toolstripbutton.MergeAction = MergeAction.Replace; Items.Add(toolstripbutton); itemdictionary.Add(name, toolstripbutton); } }
public ZoomAdaptor(PicView picView, ToolStripButton plusBtn, ToolStripButton minusBtn, ToolStripComboBox combox) { this.picView = picView; //this.form = form; this.plusBtn = plusBtn; this.minusBtn = minusBtn; this.combox = combox; picView.ZoomChanged += new EventHandler(zoomChanged); plusBtn.Click += new EventHandler(btnClick); minusBtn.Click += new EventHandler(btnClick); combox.DropDownStyle = ComboBoxStyle.DropDown; combox.DropDownHeight = 200; for(int i=20; i<=100; i+=20){ combox.Items.Add(i.ToString() + "%"); } combox.SelectedIndexChanged += new EventHandler(comboxTextUpdate); combox.Leave += new EventHandler(comboxTextUpdate); combox.KeyDown += new KeyEventHandler(comboxKeyDown); renew(); }
public PHPToolBar() { App = (FireEditApplication)FireEditApplication.Istance; btnCheckSyntax = new ToolStripButton(Properties.Resources.document_check); btnCheckSyntax.Click += new EventHandler(_CheckSyntax_Click); btnCheckSyntax.Size = new System.Drawing.Size(22, 22); btnCheckSyntax.ToolTipText = "Check Syntax Only"; this.Items.Add(btnCheckSyntax); this.Items.Add("-"); btnRunScript = new ToolStripButton(Properties.Resources.RunScript); btnRunScript.ToolTipText = "Run Script"; this.Items.Add(btnRunScript); btnRunScript.Click += new EventHandler(btnRunScript_Click); this.ImageScalingSize = App.MainForm.MainToolStrip.ImageScalingSize; this.Size = new Size(10, 25); this.AutoSize = true; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Encapsulates a color picker drop-down almost just like Word 2003's. /// </summary> /// <param name="fShowUnspecified">if set to <c>true</c> control will include a button /// for the "automatic" choice (i.e., not explicitly specified).</param> /// <param name="selectedColor">Initial color to select.</param> /// ------------------------------------------------------------------------------------ public ColorPickerDropDown(bool fShowUnspecified, Color selectedColor) { LayoutStyle = ToolStripLayoutStyle.VerticalStackWithOverflow; if (fShowUnspecified) { // Add the "Automatic" button. m_autoItem = new ToolStripButton(ColorPickerStrings.kstidUnspecifiedText); m_autoItem.TextAlign = ContentAlignment.MiddleCenter; m_autoItem.Click += new EventHandler(m_autoItem_Click); m_autoItem.Margin = new Padding(1, m_autoItem.Margin.Top, m_autoItem.Margin.Right, m_autoItem.Margin.Bottom); Items.Add(m_autoItem); } // Add all the colored squares. m_colorMatrix = new ColorPickerMatrix(); m_colorMatrix.ColorPicked += new EventHandler(m_colorMatrix_ColorPicked); ToolStripControlHost host = new ToolStripControlHost(m_colorMatrix); host.AutoSize = false; host.Size = new Size(m_colorMatrix.Width + 6, m_colorMatrix.Height + 6); host.Padding = new Padding(3); Items.Add(host); // Add the "More Colors..." button. m_moreItem = new ToolStripMenuItem(ColorPickerStrings.kstidMoreColors); m_moreItem.TextAlign = ContentAlignment.MiddleCenter; m_moreItem.Click += new EventHandler(m_moreItem_Click); Items.Add(m_moreItem); CurrentColor = selectedColor; }
///<summary> /// Registers new Tool Box button in main tool-set ///</summary> ///<param name="ownControl">Control owns button will be created</param> ///<param name="item">Instance of <see cref="ToolStripMenuItem"/> which provides information to create button</param> ///<param name="action">Action should be call when created button clicked</param> ///<returns>Action delegate to notify main form when created button should be enabled/disabled</returns> ///<exception cref="FireFlyException"></exception> public Action<bool> RegisterToolBoxButton([NotNull]Control ownControl, [NotNull]ToolStripMenuItem item, [CanBeNull]EventHandler action) { var nb = new ToolStripButton(item.Text, item.Image) { Name = item.Name, ToolTipText = item.ToolTipText, Tag = ownControl, Visible = false}; if (item.ShortcutKeys != Keys.None) { #if CHECKERS if (nb.ToolTipText.IsNull()) { throw new FireFlyException("{0} has empty ToolTipText property", nb.Name); } #endif nb.ToolTipText += " (" + new KeysConverter().ConvertToString(item.ShortcutKeys) + ")"; } nb.DisplayStyle = item.Image != null ? ToolStripItemDisplayStyle.Image : ToolStripItemDisplayStyle.Text; nb.Click += action ?? ((s, e) => item.PerformClick()); nb.Enabled = item.Visible && item.Enabled; tsMain.Items.Add(nb); ownControl.GotFocus += (s, e) => nb.Visible = true; ownControl.LostFocus += (s, e) => { nb.Visible = false; }; ownControl.Disposed += (s, e) => nb.Dispose(); return isActive => { nb.Enabled = isActive; item.Visible = isActive; }; }
private void DisplayView(Type type, ToolStripButton sender) { bool viewChanged = false; foreach (ToolStripItem item in tspMain.Items) { ToolStripButton button = item as ToolStripButton; if (button != null) { if (button == sender) { viewChanged = (!button.Checked); } button.Checked = (button == sender); } } if (viewChanged) { // dispose of old control if (_control != null) { pnlMain.Controls.Remove(_control); } // create new control _control = Activator.CreateInstance(type) as UserControl; pnlMain.Controls.Add(_control); _control.Dock = DockStyle.Fill; } }
void cms_Opening(object sender, System.ComponentModel.CancelEventArgs e) { _notifyIcon.ContextMenuStrip.Items.Clear(); Forms.ToolStripItem open = new Forms.ToolStripButton("Open"); open.Click += Open; _notifyIcon.ContextMenuStrip.Items.Add(open); Forms.ToolStripItem close = new Forms.ToolStripButton("Close"); close.Click += ShutDown; _notifyIcon.ContextMenuStrip.Items.Add(close); string _path = Directory.GetCurrentDirectory() + "\\usersettings.json"; string jsonFromFile = File.ReadAllText(_path); dynamic jsonObj = JsonConvert.DeserializeObject(jsonFromFile); if (jsonObj["mute"] == null) { Forms.ToolStripItem fifteen = new Forms.ToolStripButton("For 15 Minutes"); fifteen.Click += Fifteen_Click; Forms.ToolStripItem hour = new Forms.ToolStripButton("For 1 Hour"); hour.Click += Hour_Click; Forms.ToolStripItem eightHours = new Forms.ToolStripButton("For 8 Hours"); eightHours.Click += EightHours_Click; Forms.ToolStripItem day = new Forms.ToolStripButton("For 15 Hours"); day.Click += Day_Click; //Forms.ToolStripItem day = new Forms.ToolStripButton("For 15 Hours"); //day.Click += Day_Click; Forms.ToolStripItem dropDown = new Forms.ToolStripDropDownButton("Mute", null, fifteen, hour, eightHours, day ); _notifyIcon.ContextMenuStrip.Items.Add( dropDown ); } else { Forms.ToolStripItem unMute = new Forms.ToolStripButton("Unmute"); _notifyIcon.ContextMenuStrip.Items.Add( unMute ); unMute.Click += UnMute_Click; _notifyIcon.ContextMenuStrip.Items.Add( unMute ); } _notifyIcon.ContextMenuStrip.ItemClicked += new Forms.ToolStripItemClickedEventHandler(contexMenu_ItemClicked); }
public static bool?IsChecked(this SWF.ToolStripButton control) { if (control.CheckState == SWF.CheckState.Checked) { return(true); } if (control.CheckState == SWF.CheckState.Unchecked) { return(false); } return(null); }
private void InitializeMenuButton() { tsControl.Items[tsbNew.Name].Text = "Work Result"; ToolStripButton tsbNewMultiWorkResult = new System.Windows.Forms.ToolStripButton(); tsbNewMultiWorkResult.Text = "Work Result (Multi)"; tsbNewMultiWorkResult.Image = global::Rubik.Forms.Properties.Resources.ADD_TO_LIST; tsControl.Items.Insert(tsControl.Items.IndexOf(tsControl.Items[tsbNew.Name]) + 1, tsbNewMultiWorkResult); tsbNewMultiWorkResult.Click += new EventHandler(tsbNewMultiWorkResult_Click); }
//构造函数 public NodeDescribePacket() { onFlag = 0x0000; // angle = 0; nodeBtn = new ToolStripButton(); checkBox = new CheckBox(); nodeBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText; nodeBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; port = new string[10]; portChecked = new byte[10]; dataLabel = new Label(); linkLabel = new LinkLabel(); dataLabel.AutoSize = true; linkLabel.Size = new System.Drawing.Size(77, 22); dataLabel.Size = new System.Drawing.Size(50, 22); linkLabel.Text = "数据"; //nodeBtn.ImageTransparentColor = System.Drawing.Color.Magenta; //初始化循环队列 head = tail = 0; //初始化节点图标 pictureBox = new System.Windows.Forms.PictureBox(); #if false clustAndCidList = new ClustAndCid(); #endif point = new myPoint(); virtualPoint = new myPoint(); used = new bool[8]; //每个节点周围位置可用的标志 virtualUsed = new bool[8]; indexNo = new int[8]; config = new double[5]; flag = false; data = new double[27]; sum = 0; avg = 0; dataSaveCount = 1; status = 0x00; packetCount = 0; // writeFaile = false; //初始化都不能使用 for (int i = 0; i < 10; ++i) { portChecked[i] = 0x02; } for (int i = 0; i < 8; i++) { used[i] = false; virtualUsed[i] = false; indexNo[i] = 0; } // isSave = false; }
private System.Windows.Forms.ToolStripItem addItem(string name, string command, string imageName, KeePassLib.PwIcon icon) { System.Windows.Forms.ToolStripButton item = new System.Windows.Forms.ToolStripButton(); item.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; item.Image = (System.Drawing.Image)m_host.Resources.GetObject(imageName); item.ImageTransparentColor = System.Drawing.Color.Magenta; item.Name = name; item.Tag = icon; item.Size = new System.Drawing.Size(23, 22); item.ToolTipText = command; item.Click += new System.EventHandler(this.StatusButtonHandler); return(item); }
public static System.Windows.Forms.ToolStripButton Create(string image, object tag, EventHandler handler) { System.Windows.Forms.ToolStripButton toolButton = new System.Windows.Forms.ToolStripButton(); if (image != null) { toolButton.Image = Resources.Images.Get(image); toolButton.ImageScaling = ToolStripItemImageScaling.None; } toolButton.Overflow = ToolStripItemOverflow.Never; toolButton.Margin = new Padding(1); toolButton.Padding = new Padding(1); toolButton.Tag = tag; toolButton.Click += new EventHandler(handler); return(toolButton); }
private void FixCheckedState(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.Overflow != System.Windows.Forms.ToolStripItemOverflow.Always) { tsb.Checked = false; } } }
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; } } }
public void InitializeComponent() { this.SuspendLayout(); _clear = new System.Windows.Forms.ToolStripButton(); _clear.Name = "_clear"; _clear.Image = Properties.Resources.layer_delete; _clear.Click += OnRemoveFeatures; _clear.ToolTipText += "Removes all geometries from the geometry layer"; _sep1 = new System.Windows.Forms.ToolStripSeparator(); _sep1.Size = new System.Drawing.Size(6, 6); _addPoint = new System.Windows.Forms.ToolStripButton(); _addPoint.Name = "_addPoint"; _addPoint.Image = Properties.Resources.point_create; _addPoint.CheckOnClick = true; _addPoint.CheckedChanged += OnCheckedChanged; _addPoint.MouseDown += new MouseEventHandler(OnMouseDown); _addPoint.ToolTipText += "Adds a point to the geometry layer"; _addLineString = new System.Windows.Forms.ToolStripButton(); _addLineString.Name = "_addLineString"; _addLineString.Image = Properties.Resources.line_create; _addLineString.MouseDown += OnMouseDown; _addLineString.CheckOnClick = true; _addLineString.CheckedChanged += OnCheckedChanged; _addLineString.ToolTipText += "Adds a linestring to the geometry layer"; _addPolygon = new System.Windows.Forms.ToolStripButton(); _addPolygon.Name = "_addPolygon"; _addPolygon.Image = Properties.Resources.polygon_create; _addPolygon.CheckOnClick = true; _addPolygon.MouseDown += OnMouseDown; _addPolygon.CheckedChanged += OnCheckedChanged; _addPolygon.ToolTipText += "Adds a linestring to the geometry layer"; this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { _clear, _sep1, _addPoint, _addLineString, _addPolygon, /* _addPolygonRing, _sep2, _moveFeature, _moveVertex */ }); this.ResumeLayout(); this.PerformLayout(); this.Visible = true; this.GeometryDefinedHandler = DefaultGeometryDefinedMethod; }
private void UpdateUItoolStripButton(System.Windows.Forms.ToolStripButton ctl, string value, Color cc, System.Drawing.Bitmap bb) { if (this.InvokeRequired) { UpdateUItoolStripButtonCallBack uu = new UpdateUItoolStripButtonCallBack(UpdateUItoolStripButton); this.Invoke(uu, ctl, value, cc, bb); } else { ctl.Text = value; ctl.BackColor = cc; ctl.ImageTransparentColor = cc; ctl.BackgroundImage = bb; ctl.Image = bb; } }
protected override void OnTermination() { if (toolStrip != null) { if (toolStripButton != null) { toolStrip.Items.RemoveByKey("EnableRRButton"); } if (toolStripSeparator != null) { toolStrip.Items.RemoveByKey("separator"); } } toolStrip = null; toolStripButton = null; toolStripSeparator = null; }
private void InitializeComponent() { this.Size = new Size(500, 500); this.components = new System.ComponentModel.Container(); this.bindingSource = new BindingSource(this.components); this.bindingNavigator = new BindingNavigator(this.components); this.dataGridView = new DataGridView(); this.toolStripButton = new ToolStripButton(); ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.SuspendLayout(); dataGridView.AllowUserToAddRows = false; bindingNavigator.Dock = DockStyle.Top; bindingNavigator.Size = new Size(400, 25); bindingNavigator.Location = new Point(0, 0); bindingNavigator.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right; bindingNavigator.Items.AddRange(new ToolStripItem[] { this.toolStripButton }); this.toolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Text; this.toolStripButton.Size = new Size(25, 100); this.toolStripButton.Text = "Texto de Prueba"; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.Dock = DockStyle.Fill; dataGridView.Size = new Size(300, 300); dataGridView.Location = new Point(0, 50); dataGridView.BackgroundColor = Color.Yellow; this.Controls.Add(bindingNavigator); this.Controls.Add(dataGridView); ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public void InstallStripItem(string pluginName, string text, System.Drawing.Bitmap image, bool check) { if (image == null) { return; } ToolStripButton btn = new System.Windows.Forms.ToolStripButton(); btn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btn.Image = image; btn.Checked = check; btn.ImageTransparentColor = System.Drawing.Color.Magenta; btn.Name = pluginName; btn.Size = new System.Drawing.Size(28, 28); btn.Text = text; host.Strip.Items.Add(btn); btn.Click += new EventHandler(btn_Click); }
public static void IsChecked(this SWF.ToolStripButton control, bool?value) { if (value.HasValue) { if (value.Value) { control.CheckState = SWF.CheckState.Checked; } else { control.CheckState = SWF.CheckState.Unchecked; } } else { control.CheckState = SWF.CheckState.Indeterminate; } }
private void valPnlNavButtons(object sender, System.EventArgs e) { System.Windows.Forms.ToolStripButton sentObj = (System.Windows.Forms.ToolStripButton)sender; this.totalRecLabel.Text = ""; if (sentObj.Name.ToLower().Contains("first")) { this.cur_vals_idx = 0; } else if (sentObj.Name.ToLower().Contains("previous")) { this.cur_vals_idx -= 1; } else if (sentObj.Name.ToLower().Contains("next")) { this.cur_vals_idx += 1; } else if (sentObj.Name.ToLower().Contains("last")) { if (this.attchCtgry == 3) { this.totl_vals = Global.get_Total_Pybls_Attachments( this.searchForTextBox.Text, this.searchInComboBox.Text, this.prmKeyID); } else if (this.isPrchSng == false) { this.totl_vals = Global.get_Total_Attachments( this.searchForTextBox.Text, this.searchInComboBox.Text, this.prmKeyID); } else { this.totl_vals = Global.get_Total_P_Attachments( this.searchForTextBox.Text, this.searchInComboBox.Text, this.prmKeyID); } this.is_last_val = true; this.updtValTotals(); this.cur_vals_idx = this.myNav.totalGroups - 1; } this.getValPnlData(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.tbExport.Visible = false;//不显示导出按忸 #region {1D527E81-93EB-4efb-B0EA-C9D6710886EC} tbRefresh = new System.Windows.Forms.ToolStripButton(); tbRefresh.TextImageRelation = TextImageRelation.ImageAboveText; tbRefresh.ToolTipText = "刷新患者"; tbRefresh.Text = "刷新患者"; tbRefresh.Image = Neusoft.FrameWork.WinForms.Classes.Function.GetImage(Neusoft.FrameWork.WinForms.Classes.EnumImageList.S刷新); toolBar1.ItemClicked += new ToolStripItemClickedEventHandler(toolBar1_ItemClicked); toolBar1.Items.Add(this.tbRefresh); this.tbRefresh.Visible = true;//先把它隐藏,需要时打开 #region {C9B369B5-37FA-44f9-924A-63B6ABDBCBDB} Lis接口按钮 tbLis = new System.Windows.Forms.ToolStripButton(); tbLis.TextImageRelation = TextImageRelation.ImageAboveText; tbLis.ToolTipText = "Lis接口"; tbLis.Text = "Lis接口"; tbLis.Image = Neusoft.FrameWork.WinForms.Classes.Function.GetImage(Neusoft.FrameWork.WinForms.Classes.EnumImageList.M模版); toolBar1.Items.Add(this.tbLis); #endregion ToolStripItem tempItem = null; foreach (ToolStripItem item in toolBar1.Items) { if (item.Text == "退出") { tempItem = item; toolBar1.Items.Remove(item); break; } } if (tempItem != null) { toolBar1.Items.Add(tempItem); } #endregion }
protected override void OnStartUp() { // 28Mar12 CKKOH if (Instrument.MasterInstrument.InstrumentType == InstrumentType.Currency) { switch (fxLotsType) { case FXLotsType.Mini: sharesMultiplier = 10; break; case FXLotsType.Micro: sharesMultiplier = 100; break; default: break; } } if (ChartControl != null) { toolStrip = (ToolStrip)ChartControl.Controls["tsrTool"]; // Add a separator toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); toolStripSeparator.Name = "separator"; toolStrip.Items.Add(toolStripSeparator); // Add a toggle button toolStripButton = new System.Windows.Forms.ToolStripButton("EnableRR"); toolStripButton.Name = "EnableRRButton"; toolStripButton.Text = "$$"; toolStripButton.Click += rewardRiskButtonClick; toolStripButton.Enabled = true; toolStripButton.CheckState = CheckState.Unchecked; toolStripButton.CheckOnClick = true; toolStripButton.ForeColor = Color.Black; toolStrip.Items.Add(toolStripButton); btnBoldFont = new Font(toolStripButton.Font, toolStripButton.Font.Style | FontStyle.Bold); btnDefFont = new Font(toolStripButton.Font, toolStripButton.Font.Style); } }
public static void StateButton(bool sStateButton, System.Windows.Forms.ToolStripButton sAddNew, System.Windows.Forms.ToolStripButton sEdit, System.Windows.Forms.ToolStripButton sSave, System.Windows.Forms.ToolStripButton sCancel, System.Windows.Forms.ToolStripButton sDelete) { if (sStateButton == true) { sAddNew.Visible = false; sEdit.Visible = false; sSave.Visible = true; sCancel.Visible = true; sDelete.Visible = false; } else { sAddNew.Visible = true; sEdit.Visible = true; sSave.Visible = false; sCancel.Visible = false; sDelete.Visible = true; } }
override protected void InitialiseToolbar() { base.InitialiseToolbar(); // Add background colour buttons to toolbar int index = ToolBar.Items.IndexOfKey("toolstripTextColor"); this.toolStripSeparator99 = new System.Windows.Forms.ToolStripSeparator(); ToolBar.Items.Insert((index + 1), this.toolStripSeparator99); this.toolstripBackColor = new System.Windows.Forms.ToolStripButton(); this.toolstripBackColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolstripBackColor.Name = "toolstripBackColor"; this.toolstripBackColor.Tag = "BackColor"; this.toolstripBackColor.ToolTipText = "Set Background Colour"; this.toolstripBackColor.Click += new System.EventHandler(OnBackColorClick); var assembly = Assembly.GetExecutingAssembly(); var image = new Bitmap(assembly.GetManifestResourceStream("HTMLReportExporter.Resources.ToolbarBackColor.bmp")); image.MakeTransparent(Color.Magenta); this.toolstripBackColor.Image = image; this.toolstripBackColor.Size = this.ToolBar.Items[index].Size; ToolBar.Items.Insert((index + 2), this.toolstripBackColor); this.toolstripClearBackColor = new System.Windows.Forms.ToolStripButton(); this.toolstripClearBackColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolstripClearBackColor.Name = "toolstripClearBackColor"; this.toolstripClearBackColor.Tag = "ClearBackColor"; this.toolstripClearBackColor.ToolTipText = "Clear Background Colour"; this.toolstripClearBackColor.Click += new System.EventHandler(OnClearBackColorClick); var image2 = new Bitmap(assembly.GetManifestResourceStream("HTMLReportExporter.Resources.ToolbarBackColorClear.bmp")); image2.MakeTransparent(Color.Magenta); this.toolstripClearBackColor.Image = image2; this.toolstripClearBackColor.Size = this.toolstripBackColor.Size; ToolBar.Items.Insert((index + 3), this.toolstripClearBackColor); }
private void reloadKeyButton() { while (this.toolStrip1.Items.Count > 5) { this.toolStrip1.Items.RemoveAt(this.toolStrip1.Items.Count - 1); } m_keyButtonIndex++; foreach (QuickData quickData in m_quickDatas) { ToolStripButton tempButton = new System.Windows.Forms.ToolStripButton(); tempButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; tempButton.Size = new System.Drawing.Size(37, 22); tempButton.Name = "toolStripButton" + (m_keyButtonIndex++); tempButton.Text = quickData.name; tempButton.Click += new EventHandler(tempButton_Click); tempButton.MouseMove += new MouseEventHandler(tempButton_MouseMove); this.toolStrip1.Items.Add(tempButton); } }
public HtmlReportHeaderFooterControl() { // Add background colour button to toolbar this.toolstripBackColor = new System.Windows.Forms.ToolStripButton(); this.toolstripBackColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolstripBackColor.Name = "toolstripBackColor"; this.toolstripBackColor.Tag = "BackColor"; this.toolstripBackColor.Click += new System.EventHandler(OnBackColorClick); var assembly = Assembly.GetExecutingAssembly(); var image = new Bitmap(assembly.GetManifestResourceStream("HTMLReportExporter.ToolBackColor.bmp")); image.MakeTransparent(Color.Magenta); this.toolstripBackColor.Image = image; int index = ToolBar.Items.IndexOfKey("toolstripTextColor"); this.toolstripBackColor.Size = this.ToolBar.Items[index].Size; ToolBar.Items.Insert((index + 1), this.toolstripBackColor); }
private void LoadNotificationIcon() { this._notifyIcon = new wf.NotifyIcon(); using (var stream = AssemblyHelper.GetEmbeddedResource(typeof(MainWindow).Assembly, "mug.ico")) { this._notifyIcon.Icon = new Icon(stream); } var settingsStripItem = new wf.ToolStripButton("Settings", null, NotifyIcon_ExitMenuItemClick); var exitStripItem = new wf.ToolStripButton("Exit Wooster", null, NotifyIcon_ExitMenuItemClick); var contextMenuStrip = new wf.ContextMenuStrip(); contextMenuStrip.ShowImageMargin = false; contextMenuStrip.Items.Add(settingsStripItem); contextMenuStrip.Items.Add(exitStripItem); this._notifyIcon.ContextMenuStrip = contextMenuStrip; this._notifyIcon.Visible = true; this._notifyIcon.MouseClick += NotifyIcon_MouseClick; }
private void PasswordFrm_Load(object sender, EventArgs e) { #if SINGLE this.toolbar.Items.Add(new ToolStripSeparator()); ToolStripButton tsbDonate = new System.Windows.Forms.ToolStripButton(); tsbDonate.Image = global::xcat.Properties.Resources.donate; tsbDonate.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; tsbDonate.ImageTransparentColor = System.Drawing.Color.Magenta; tsbDonate.Name = "tsbEdit"; tsbDonate.Size = new System.Drawing.Size(43, 56); tsbDonate.Text = "捐赠"; tsbDonate.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; tsbDonate.Click += (s, ee) => { DonateFrm frm = new DonateFrm(); frm.ShowDialog(); }; this.toolbar.Items.Add(tsbDonate); #endif foreach (var item in this.PasswordRecord.Records) { var pi = item.Value; ListViewItem lvi = new ListViewItem(pi.Name); lvi.Tag = pi.Password; lvi.SubItems.Add(pi.Link); lvi.SubItems.Add(pi.User); lvi.SubItems.Add("******"); lvi.SubItems.Add(pi.Memo); this.lv.Items.Add(lvi); } }
public zUIToolStripNew(IContainer container) { container.Add(this); InitializeComponent(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripButton1, this.toolStripButton2, this.toolStripButton3 }); // // toolStripButton1 // this.toolStripButton1.Image = global::wardensky.zUI.Properties.Resources.增加; this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Size = new System.Drawing.Size(52, 22); this.toolStripButton1.Text = "增加"; // // toolStripButton2 // this.toolStripButton2.Image = global::wardensky.zUI.Properties.Resources.修改; this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Size = new System.Drawing.Size(52, 22); this.toolStripButton2.Text = "修改"; // // toolStripButton3 // this.toolStripButton3.Image = global::wardensky.zUI.Properties.Resources.除; this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton3.Name = "toolStripButton3"; this.toolStripButton3.Size = new System.Drawing.Size(52, 22); this.toolStripButton3.Text = "删除"; }
private void ReplacePrintButton() { var toolStrip = Control.Controls.OfType <swf.ToolStrip>().FirstOrDefault(); if (toolStrip == null) { return; } var oldPrintButton = toolStrip.Items.OfType <swf.ToolStripButton>().FirstOrDefault(r => r.Name == "printToolStripButton"); if (oldPrintButton == null) { return; } var printButton = new swf.ToolStripButton(); printButton.Image = toolStrip.ImageList.Images[oldPrintButton.ImageIndex]; printButton.DisplayStyle = swf.ToolStripItemDisplayStyle.Image; printButton.Click += printButton_Click; toolStrip.Items.RemoveAt(0); toolStrip.Items.Insert(0, printButton); }
public static void ConfirmSatus(System.Windows.Forms.ToolStripButton objButton, DevExpress.XtraEditors.LookUpEdit objState) { string ls_confirm_c = "", ls_unconfirm_c = ""; const string ls_confirm_e = "Confirm", ls_unconfirm_e = "UnConfirm"; if (DBUtility._language != "2") { ls_confirm_c = DBUtility._language == "1" ? "批准" : "批準"; ls_unconfirm_c = DBUtility._language == "1" ? "反批准" : "反批準"; } if (objState.EditValue.ToString() == "0") { //反批準成功后按鈕的顯示 objButton.Image = objButton.Image = Properties.Resources.p_ok; objButton.Text = DBUtility._language == "2" ? ls_confirm_e : ls_confirm_c;//批準成功后按鈕顯示“反批準”字樣 } else { //批準成功后按鈕的顯示 objButton.Image = objButton.Image = Properties.Resources.p_unok; objButton.Text = DBUtility._language == "2" ? ls_unconfirm_e : ls_unconfirm_c; } }
private void InitializeComponent() { this.kryptonPanel1 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.kbtnAccept = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.kbtnCancel = new ComponentFactory.Krypton.Toolkit.KryptonButton(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.tslStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.kryptonPanel2 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.tsMenu = new System.Windows.Forms.ToolStrip(); this.tsbImport = new System.Windows.Forms.ToolStripButton(); this.tsbExport = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.tsbBold = new System.Windows.Forms.ToolStripButton(); this.tsbItalic = new System.Windows.Forms.ToolStripButton(); this.tsbUnderline = new System.Windows.Forms.ToolStripButton(); this.tsbStrikethrough = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.tscmbTextSize = new System.Windows.Forms.ToolStripComboBox(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.tsbProperties = new System.Windows.Forms.ToolStripButton(); this.kryptonPanel3 = new ComponentFactory.Krypton.Toolkit.KryptonPanel(); this.kptxtTypefaceFilter = new ExtendedControls.ExtendedToolkit.Controls.KryptonPromptTextBox(); this.ktxtSampleText = new ComponentFactory.Krypton.Toolkit.KryptonTextBox(); this.klstTypefaces = new ComponentFactory.Krypton.Toolkit.KryptonListBox(); this.panel1 = new System.Windows.Forms.Panel(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit(); this.kryptonPanel1.SuspendLayout(); this.statusStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).BeginInit(); this.kryptonPanel2.SuspendLayout(); this.tsMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).BeginInit(); this.kryptonPanel3.SuspendLayout(); this.SuspendLayout(); // // kryptonPanel1 // this.kryptonPanel1.Controls.Add(this.kbtnAccept); this.kryptonPanel1.Controls.Add(this.kbtnCancel); this.kryptonPanel1.Controls.Add(this.statusStrip1); this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.kryptonPanel1.Location = new System.Drawing.Point(0, 742); this.kryptonPanel1.Name = "kryptonPanel1"; this.kryptonPanel1.Size = new System.Drawing.Size(1115, 77); this.kryptonPanel1.TabIndex = 0; // // kbtnAccept // this.kbtnAccept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.kbtnAccept.DialogResult = System.Windows.Forms.DialogResult.OK; this.kbtnAccept.Location = new System.Drawing.Point(863, 16); this.kbtnAccept.Name = "kbtnAccept"; this.kbtnAccept.Size = new System.Drawing.Size(144, 26); this.kbtnAccept.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kbtnAccept.TabIndex = 6; this.kbtnAccept.Values.Text = "&Use Typeface"; // // kbtnCancel // this.kbtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.kbtnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.kbtnCancel.Location = new System.Drawing.Point(1013, 16); this.kbtnCancel.Name = "kbtnCancel"; this.kbtnCancel.Size = new System.Drawing.Size(90, 26); this.kbtnCancel.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kbtnCancel.TabIndex = 5; this.kbtnCancel.Values.Text = "C&ancel"; // // statusStrip1 // this.statusStrip1.Font = new System.Drawing.Font("Segoe UI", 9F); this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tslStatus }); this.statusStrip1.Location = new System.Drawing.Point(0, 55); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode; this.statusStrip1.Size = new System.Drawing.Size(1115, 22); this.statusStrip1.TabIndex = 0; this.statusStrip1.Text = "statusStrip1"; // // tslStatus // this.tslStatus.Name = "tslStatus"; this.tslStatus.Size = new System.Drawing.Size(1100, 17); this.tslStatus.Spring = true; this.tslStatus.Text = "Ready"; this.tslStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // kryptonPanel2 // this.kryptonPanel2.Controls.Add(this.tsMenu); this.kryptonPanel2.Dock = System.Windows.Forms.DockStyle.Top; this.kryptonPanel2.Location = new System.Drawing.Point(0, 0); this.kryptonPanel2.Name = "kryptonPanel2"; this.kryptonPanel2.Size = new System.Drawing.Size(1115, 25); this.kryptonPanel2.TabIndex = 1; // // tsMenu // this.tsMenu.Dock = System.Windows.Forms.DockStyle.None; this.tsMenu.Font = new System.Drawing.Font("Segoe UI", 9F); this.tsMenu.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.tsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbImport, this.tsbExport, this.toolStripSeparator1, this.tsbBold, this.tsbItalic, this.tsbUnderline, this.tsbStrikethrough, this.toolStripSeparator2, this.tscmbTextSize, this.toolStripSeparator3, this.tsbProperties }); this.tsMenu.Location = new System.Drawing.Point(0, 0); this.tsMenu.Name = "tsMenu"; this.tsMenu.Size = new System.Drawing.Size(265, 25); this.tsMenu.TabIndex = 0; this.tsMenu.Text = "toolStrip1"; this.tsMenu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tsMenu_KeyDown); // // tsbImport // this.tsbImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbImport.Image = global::ExtendedControls.Properties.Resources.Open_File_16_x_16; this.tsbImport.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbImport.Name = "tsbImport"; this.tsbImport.Size = new System.Drawing.Size(23, 22); this.tsbImport.Text = "toolStripButton1"; this.tsbImport.Click += new System.EventHandler(this.tsbImport_Click); // // tsbExport // this.tsbExport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbExport.Image = global::ExtendedControls.Properties.Resources.Export_To_Document; this.tsbExport.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbExport.Name = "tsbExport"; this.tsbExport.Size = new System.Drawing.Size(23, 22); this.tsbExport.Text = "toolStripButton2"; this.tsbExport.Click += new System.EventHandler(this.tsbExport_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // tsbBold // this.tsbBold.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbBold.Image = global::ExtendedControls.Properties.Resources.text_bold; this.tsbBold.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbBold.Name = "tsbBold"; this.tsbBold.Size = new System.Drawing.Size(23, 22); this.tsbBold.Text = "toolStripButton3"; this.tsbBold.CheckedChanged += new System.EventHandler(this.tsbBold_CheckedChanged); // // tsbItalic // this.tsbItalic.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbItalic.Image = global::ExtendedControls.Properties.Resources.text_italic; this.tsbItalic.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbItalic.Name = "tsbItalic"; this.tsbItalic.Size = new System.Drawing.Size(23, 22); this.tsbItalic.Text = "toolStripButton4"; this.tsbItalic.CheckedChanged += new System.EventHandler(this.tsbItalic_CheckedChanged); // // tsbUnderline // this.tsbUnderline.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbUnderline.Image = global::ExtendedControls.Properties.Resources.text_underline; this.tsbUnderline.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbUnderline.Name = "tsbUnderline"; this.tsbUnderline.Size = new System.Drawing.Size(23, 22); this.tsbUnderline.Text = "toolStripButton5"; this.tsbUnderline.CheckedChanged += new System.EventHandler(this.tsbUnderline_CheckedChanged); // // tsbStrikethrough // this.tsbStrikethrough.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbStrikethrough.Image = global::ExtendedControls.Properties.Resources.text_strikethrough; this.tsbStrikethrough.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbStrikethrough.Name = "tsbStrikethrough"; this.tsbStrikethrough.Size = new System.Drawing.Size(23, 22); this.tsbStrikethrough.Text = "toolStripButton6"; this.tsbStrikethrough.CheckedChanged += new System.EventHandler(this.tsbStrikethrough_CheckedChanged); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); // // tscmbTextSize // this.tscmbTextSize.AutoSize = false; this.tscmbTextSize.Name = "tscmbTextSize"; this.tscmbTextSize.Size = new System.Drawing.Size(50, 23); this.tscmbTextSize.SelectedIndexChanged += new System.EventHandler(this.tscmbTextSize_SelectedIndexChanged); this.tscmbTextSize.TextChanged += new System.EventHandler(this.tscmbTextSize_TextChanged); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); // // tsbProperties // this.tsbProperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbProperties.Image = global::ExtendedControls.Properties.Resources.text_lowercase; this.tsbProperties.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbProperties.Name = "tsbProperties"; this.tsbProperties.Size = new System.Drawing.Size(23, 22); this.tsbProperties.Text = "toolStripButton7"; this.tsbProperties.Click += new System.EventHandler(this.tsbProperties_Click); // // kryptonPanel3 // this.kryptonPanel3.Controls.Add(this.kptxtTypefaceFilter); this.kryptonPanel3.Controls.Add(this.ktxtSampleText); this.kryptonPanel3.Controls.Add(this.klstTypefaces); this.kryptonPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel3.Location = new System.Drawing.Point(0, 25); this.kryptonPanel3.Name = "kryptonPanel3"; this.kryptonPanel3.Size = new System.Drawing.Size(1115, 717); this.kryptonPanel3.TabIndex = 0; // // kptxtTypefaceFilter // this.kptxtTypefaceFilter.DrawPrompt = true; this.kptxtTypefaceFilter.FocusSelect = true; this.kptxtTypefaceFilter.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kptxtTypefaceFilter.Location = new System.Drawing.Point(12, 6); this.kptxtTypefaceFilter.Name = "kptxtTypefaceFilter"; this.kptxtTypefaceFilter.PromptForeColour = System.Drawing.SystemColors.GrayText; this.kptxtTypefaceFilter.PromptText = "Filter typefaces"; this.kptxtTypefaceFilter.PromptTypeface = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.kptxtTypefaceFilter.Size = new System.Drawing.Size(333, 29); this.kptxtTypefaceFilter.TabIndex = 2; this.kptxtTypefaceFilter.Click += new System.EventHandler(this.kptxtTypefaceFilter_Click); this.kptxtTypefaceFilter.TextChanged += new System.EventHandler(this.kptxtTypefaceFilter_TextChanged); this.kptxtTypefaceFilter.Enter += new System.EventHandler(this.kptxtTypefaceFilter_Enter); this.kptxtTypefaceFilter.KeyDown += new System.Windows.Forms.KeyEventHandler(this.kptxtTypefaceFilter_KeyDown); // // ktxtSampleText // this.ktxtSampleText.Location = new System.Drawing.Point(351, 6); this.ktxtSampleText.Multiline = true; this.ktxtSampleText.Name = "ktxtSampleText"; this.ktxtSampleText.ReadOnly = true; this.ktxtSampleText.Size = new System.Drawing.Size(752, 702); this.ktxtSampleText.TabIndex = 1; this.ktxtSampleText.Text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\nabcdefghijklmnopqrstuvwxyz\r\n1234567890\r\n\r\n/\\|!?%$&()[" + "]{}<>+-~=*@;:,._\r\n\r\nLorem ipsum dolor sit amet"; this.ktxtSampleText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ktxtSampleText_KeyDown); this.ktxtSampleText.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ktxtSampleText_KeyPress); // // klstTypefaces // this.klstTypefaces.Location = new System.Drawing.Point(12, 41); this.klstTypefaces.Name = "klstTypefaces"; this.klstTypefaces.Size = new System.Drawing.Size(333, 667); this.klstTypefaces.TabIndex = 0; this.klstTypefaces.SelectedIndexChanged += new System.EventHandler(this.klstTypefaces_SelectedIndexChanged); this.klstTypefaces.KeyDown += new System.Windows.Forms.KeyEventHandler(this.klstTypefaces_KeyDown); this.klstTypefaces.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.klstTypefaces_KeyPress); // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.ControlDarkDark; this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Location = new System.Drawing.Point(0, 739); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(1115, 3); this.panel1.TabIndex = 2; // // TypefaceSelector // this.AcceptButton = this.kbtnAccept; this.ClientSize = new System.Drawing.Size(1115, 819); this.Controls.Add(this.panel1); this.Controls.Add(this.kryptonPanel3); this.Controls.Add(this.kryptonPanel2); this.Controls.Add(this.kryptonPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TypefaceSelector"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Select Typeface"; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TypefaceSelector_KeyDown); this.Resize += new System.EventHandler(this.TypefaceSelector_Resize); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit(); this.kryptonPanel1.ResumeLayout(false); this.kryptonPanel1.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel2)).EndInit(); this.kryptonPanel2.ResumeLayout(false); this.kryptonPanel2.PerformLayout(); this.tsMenu.ResumeLayout(false); this.tsMenu.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel3)).EndInit(); this.kryptonPanel3.ResumeLayout(false); this.kryptonPanel3.PerformLayout(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Browser)); this.toolStrip = new System.Windows.Forms.ToolStrip(); this.backButton = new System.Windows.Forms.ToolStripButton(); this.forwardButton = new System.Windows.Forms.ToolStripButton(); this.refreshButton = new System.Windows.Forms.ToolStripButton(); this.addressComboBox = new System.Windows.Forms.ToolStripSpringComboBox(); this.goButton = new System.Windows.Forms.ToolStripButton(); this.webBrowser = new FlashDevelop.Controls.WebBrowserEx(); this.toolStrip.SuspendLayout(); this.SuspendLayout(); // // toolStrip // this.toolStrip.CanOverflow = false; this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.backButton, this.forwardButton, this.refreshButton, this.addressComboBox, this.goButton }); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; this.toolStrip.Padding = new System.Windows.Forms.Padding(2, 1, 2, 2); this.toolStrip.Size = new System.Drawing.Size(620, 26); this.toolStrip.TabIndex = 3; // // backButton // this.backButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.backButton.Enabled = false; this.backButton.Image = ((System.Drawing.Image)(resources.GetObject("backButton.Image"))); this.backButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.backButton.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1); this.backButton.Name = "backButton"; this.backButton.Size = new System.Drawing.Size(23, 21); this.backButton.Text = "Back"; this.backButton.Click += new System.EventHandler(this.BackButtonClick); // // forwardButton // this.forwardButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.forwardButton.Enabled = false; this.forwardButton.Image = ((System.Drawing.Image)(resources.GetObject("forwardButton.Image"))); this.forwardButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.forwardButton.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1); this.forwardButton.Name = "forwardButton"; this.forwardButton.Size = new System.Drawing.Size(23, 21); this.forwardButton.Text = "Forward"; this.forwardButton.Click += new System.EventHandler(this.ForwardButtonClick); // // refreshButton // this.refreshButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.refreshButton.Image = ((System.Drawing.Image)(resources.GetObject("refreshButton.Image"))); this.refreshButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.refreshButton.Margin = new System.Windows.Forms.Padding(0, 1, 1, 1); this.refreshButton.Name = "refreshButton"; this.refreshButton.Size = new System.Drawing.Size(23, 21); this.refreshButton.Text = "Refresh"; this.refreshButton.Click += new System.EventHandler(this.RefreshButtonClick); // // addressComboBox // this.addressComboBox.Name = "addressComboBox"; this.addressComboBox.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); this.addressComboBox.Size = new System.Drawing.Size(490, 23); this.addressComboBox.DropDown += new System.EventHandler(this.addressComboBox_DropDown); this.addressComboBox.SelectedIndexChanged += new System.EventHandler(this.AddressComboBoxSelectedIndexChanged); this.addressComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.AddressComboBoxKeyPress); // // goButton // this.goButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.goButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.goButton.Image = ((System.Drawing.Image)(resources.GetObject("goButton.Image"))); this.goButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.goButton.Margin = new System.Windows.Forms.Padding(0, 1, 0, 1); this.goButton.Name = "goButton"; this.goButton.Size = new System.Drawing.Size(23, 21); this.goButton.Text = "Go"; this.goButton.Click += new System.EventHandler(this.BrowseButtonClick); // // webBrowser // this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser.Location = new System.Drawing.Point(0, 26); this.webBrowser.Name = "webBrowser"; this.webBrowser.ScriptErrorsSuppressed = true; this.webBrowser.Size = new System.Drawing.Size(620, 374); this.webBrowser.TabIndex = 2; this.webBrowser.WebBrowserShortcutsEnabled = false; this.webBrowser.CanGoBackChanged += new System.EventHandler(this.WebBrowserPropertyUpdated); this.webBrowser.CanGoForwardChanged += new System.EventHandler(this.WebBrowserPropertyUpdated); this.webBrowser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser_DocumentCompleted); this.webBrowser.DocumentTitleChanged += new System.EventHandler(this.WebBrowserDocumentTitleChanged); this.webBrowser.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.WebBrowserNavigated); this.webBrowser.NewWindow += new System.ComponentModel.CancelEventHandler(this.WebBrowserNewWindow); // // Browser // this.Controls.Add(this.webBrowser); this.Controls.Add(this.toolStrip); this.Name = "Browser"; this.Size = new System.Drawing.Size(620, 400); this.toolStrip.ResumeLayout(false); this.toolStrip.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
//private ImageList imageList1; private void InitializeComponent() { // panelTabPage = new System.Windows.Forms.Panel(); panelPageNavigation = new System.Windows.Forms.Panel(); toolStripPageNavigation = new System.Windows.Forms.ToolStrip(); toolStripButtonAdd = new System.Windows.Forms.ToolStripButton(); toolStripButtonDelete = new System.Windows.Forms.ToolStripButton(); toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); toolStripButtonFirst = new System.Windows.Forms.ToolStripButton(); toolStripButtonPrevious = new System.Windows.Forms.ToolStripButton(); toolStripLabelPageNumber = new System.Windows.Forms.ToolStripLabel(); toolStripButtonNext = new System.Windows.Forms.ToolStripButton(); toolStripButtonLast = new System.Windows.Forms.ToolStripButton(); // drawarea = new DrawArea(this); // panelTabPage.SuspendLayout(); panelPageNavigation.SuspendLayout(); toolStripPageNavigation.SuspendLayout(); SuspendLayout(); // // panelTabPage // //this.panelTabPage.AutoScroll = true; ////panelTabPage.Controls.Add(drawarea); //this.panelTabPage.Dock = System.Windows.Forms.DockStyle.Fill; //this.panelTabPage.Location = new System.Drawing.Point(0, 0); //this.panelTabPage.Name = "panelTabPage"; //this.panelTabPage.Size = new System.Drawing.Size(550, 167); //this.panelTabPage.TabIndex = 0; // // panelPageNavigation // this.panelPageNavigation.BackColor = System.Drawing.Color.Gainsboro; this.panelPageNavigation.Controls.Add(this.toolStripPageNavigation); this.panelPageNavigation.Dock = System.Windows.Forms.DockStyle.Bottom; this.panelPageNavigation.Location = new System.Drawing.Point(0, 167); this.panelPageNavigation.Name = "panelPageNavigation"; this.panelPageNavigation.Size = new System.Drawing.Size(550, 20); this.panelPageNavigation.TabIndex = 0; // // toolStripPageNavigation // this.toolStripPageNavigation.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripButtonAdd, this.toolStripButtonDelete, this.toolStripSeparator1, this.toolStripButtonFirst, this.toolStripButtonPrevious, this.toolStripLabelPageNumber, this.toolStripButtonNext, this.toolStripButtonLast }); this.toolStripPageNavigation.Location = new System.Drawing.Point(0, 0); this.toolStripPageNavigation.Name = "toolStripPageNavigation"; this.toolStripPageNavigation.Size = new System.Drawing.Size(550, 25); this.toolStripPageNavigation.TabIndex = 2; this.toolStripPageNavigation.Text = "toolStripPageNavigation"; this.toolStripPageNavigation.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.toolStripPageNavigation_ItemClicked); // // toolStripButtonAdd // this.toolStripButtonAdd.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonAdd.Image = DCS.Properties.Resources._03; this.toolStripButtonAdd.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonAdd.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonAdd.Name = "toolStripButtonAdd"; this.toolStripButtonAdd.Size = new System.Drawing.Size(23, 25); this.toolStripButtonAdd.Text = "Add"; // // toolStripButtonNew // this.toolStripButtonDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonDelete.Image = DCS.Properties.Resources._01; this.toolStripButtonDelete.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonDelete.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonDelete.Name = "toolStripButtonDelete"; this.toolStripButtonDelete.Size = new System.Drawing.Size(23, 25); this.toolStripButtonDelete.Text = "Delete"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); // // toolStripButtonFirst // this.toolStripButtonFirst.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonFirst.Image = DCS.Properties.Resources._38; this.toolStripButtonFirst.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonFirst.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonFirst.Name = "toolStripButtonFirst"; this.toolStripButtonFirst.Size = new System.Drawing.Size(23, 25); this.toolStripButtonFirst.Text = "First"; // // toolStripButtonPrevious // this.toolStripButtonPrevious.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonPrevious.Image = DCS.Properties.Resources._44; this.toolStripButtonPrevious.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonPrevious.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonPrevious.Name = "toolStripButtonPrevious"; this.toolStripButtonPrevious.Size = new System.Drawing.Size(23, 25); this.toolStripButtonPrevious.Text = "Previous"; // // toolStripLabelPageNumber // this.toolStripLabelPageNumber.Margin = new System.Windows.Forms.Padding(0); this.toolStripLabelPageNumber.Name = "toolStripLabelPageNumber"; this.toolStripLabelPageNumber.Size = new System.Drawing.Size(13, 40); this.toolStripLabelPageNumber.Text = "1"; // // toolStripButtonNext // this.toolStripButtonNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonNext.Image = DCS.Properties.Resources._43; this.toolStripButtonNext.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonNext.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonNext.Name = "toolStripButtonNext"; this.toolStripButtonNext.Size = new System.Drawing.Size(23, 25); this.toolStripButtonNext.Text = "Next"; // // toolStripButtonLast // this.toolStripButtonLast.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.toolStripButtonLast.Image = DCS.Properties.Resources._37; this.toolStripButtonLast.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonLast.Margin = new System.Windows.Forms.Padding(0); this.toolStripButtonLast.Name = "toolStripButtonLast"; this.toolStripButtonLast.Size = new System.Drawing.Size(23, 25); this.toolStripButtonLast.Text = "Last"; // // TabFBDPageControl // // this.Controls.Add(this.panelTabPage); this.Controls.Add(this.panelPageNavigation); // this.ImageIndex = 0; this.Location = new System.Drawing.Point(4, 23); this.Size = new System.Drawing.Size(550, 187); this.Text = "tabPage"; //this.panelTabPage.ResumeLayout(false); //this.panelTabPage.PerformLayout(); this.panelPageNavigation.ResumeLayout(false); this.panelPageNavigation.PerformLayout(); this.toolStripPageNavigation.ResumeLayout(false); this.toolStripPageNavigation.PerformLayout(); this.ResumeLayout(false); }
protected void CreateSimpleMainMenuAndToolAndStatusBar() { this.toolBar = new System.Windows.Forms.ToolStrip(); this.mainMenu = new System.Windows.Forms.MenuStrip(); this.menuItemFile = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemDict = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemView = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemTools = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemWindow = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemHelp = new System.Windows.Forms.ToolStripMenuItem(); this.menuItemLayouts = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.saveDatabaseButton = new System.Windows.Forms.ToolStripButton(); this.statusBar = new System.Windows.Forms.StatusStrip(); this.mainMenu.SuspendLayout(); this.SuspendLayout(); // // notificationTimer // this.notificationTimer.Enabled = true; // // dockPanel // this.dockPanel.Size = new System.Drawing.Size(771, 398); // // toolBar // this.toolBar.ImageScalingSize = new System.Drawing.Size(20, 20); this.toolBar.Location = new System.Drawing.Point(0, 28); this.toolBar.Name = "toolBar"; this.toolBar.Size = new System.Drawing.Size(771, 25); this.toolBar.TabIndex = 21; this.toolBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.saveDatabaseButton }); // // mainMenu // this.mainMenu.ImageScalingSize = new System.Drawing.Size(20, 20); this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuItemFile, this.menuItemLayouts, this.menuItemDict, this.menuItemView, this.menuItemTools, this.menuItemWindow, this.menuItemHelp }); this.mainMenu.Location = new System.Drawing.Point(0, 0); this.mainMenu.MdiWindowListItem = this.menuItemWindow; this.mainMenu.Name = "mainMenu"; this.mainMenu.Size = new System.Drawing.Size(771, 28); this.mainMenu.TabIndex = 20; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(63, 6); // // menuItemFile // this.menuItemFile.Name = "menuItemFile"; this.menuItemFile.Size = new System.Drawing.Size(44, 24); this.menuItemFile.Text = FrwCRUDRes.File; // // menuItemDict // this.menuItemDict.Name = "menuItemDict"; this.menuItemDict.Size = new System.Drawing.Size(100, 24); this.menuItemDict.Text = FrwCRUDRes.Dictionaries; // // menuItemView // this.menuItemView.MergeIndex = 1; this.menuItemView.Name = "menuItemView"; this.menuItemView.Size = new System.Drawing.Size(53, 24); this.menuItemView.Text = FrwCRUDRes.Menu_View; // // menuItemTools // this.menuItemTools.MergeIndex = 2; this.menuItemTools.Name = "menuItemTools"; this.menuItemTools.Size = new System.Drawing.Size(56, 24); this.menuItemTools.Text = FrwCRUDRes.Tools; // // menuItemWindow // this.menuItemWindow.MergeIndex = 2; this.menuItemWindow.Name = "menuItemWindow"; this.menuItemWindow.Size = new System.Drawing.Size(76, 24); this.menuItemWindow.Text = FrwCRUDRes.Window; // // menuItemHelp // this.menuItemHelp.MergeIndex = 3; this.menuItemHelp.Name = "menuItemHelp"; this.menuItemHelp.Size = new System.Drawing.Size(53, 24); this.menuItemHelp.Text = FrwCRUDRes.Help; // // menuItemLayouts // this.menuItemLayouts.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripSeparator1 }); this.menuItemLayouts.Name = "menuItemLayouts"; this.menuItemLayouts.Size = new System.Drawing.Size(124, 24); this.menuItemLayouts.Text = FrwCRUDRes.Layout; this.menuItemLayouts.Click += new System.EventHandler(this.menuItemLayouts_Click); // // saveDatabaseButton // this.saveDatabaseButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.saveDatabaseButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.saveDatabaseButton.Name = "saveDatabaseButton"; this.saveDatabaseButton.Image = Properties.Resources.save; this.saveDatabaseButton.Size = new System.Drawing.Size(23, 24); this.saveDatabaseButton.Text = FrwCRUDRes.Save_all_entities_data; this.saveDatabaseButton.Click += new System.EventHandler(this.saveDatabaseButton_Click); // // statusBar // this.statusBar.ImageScalingSize = new System.Drawing.Size(20, 20); this.statusBar.Location = new System.Drawing.Point(0, 376); this.statusBar.Name = "statusBar"; this.statusBar.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.statusBar.ShowItemToolTips = true; this.statusBar.Size = new System.Drawing.Size(771, 22); this.statusBar.TabIndex = 22; // // WebAccountMainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(771, 398); this.Controls.Add(this.toolBar); this.Controls.Add(this.mainMenu); this.Controls.Add(this.statusBar); this.DocPanelBounds = new System.Drawing.Rectangle(19, 19, 789, 445); this.Name = "MainForm"; this.Text = "MainForm"; this.Controls.SetChildIndex(this.dockPanel, 0); this.Controls.SetChildIndex(this.statusBar, 0); this.Controls.SetChildIndex(this.mainMenu, 0); this.Controls.SetChildIndex(this.toolBar, 0); this.mainMenu.ResumeLayout(false); this.mainMenu.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }