/// <summary> /// Initalize Gtk and DBus stuff /// </summary> private void GtkDBusInit() { /* setup StatusIcon */ statusIcon = new Gtk.StatusIcon(); statusIcon.IconName = "keepass2-locked"; #if DEBUG statusIcon.File = Path.GetFullPath("Resources/icons/hicolor/16x16/apps/keepass2-locked.png"); #endif statusIcon.Tooltip = PwDefs.ProductName; statusIconMenu = new Gtk.Menu(); var trayContextMenu = pluginHost.MainWindow.TrayContextMenu; // make copy of item list to prevent list changed exception when iterating var menuItems = new System.Windows.Forms.ToolStripItem[trayContextMenu.Items.Count]; trayContextMenu.Items.CopyTo(menuItems, 0); trayContextMenu.ItemAdded += (sender, e) => DBusBackgroundWorker.InvokeGtkThread (() => ConvertAndAddMenuItem(e.Item, statusIconMenu)); foreach (System.Windows.Forms.ToolStripItem item in menuItems) { ConvertAndAddMenuItem(item, statusIconMenu); } statusIcon.PopupMenu += OnPopupMenu; statusIcon.Activate += (sender, e) => { DBusBackgroundWorker.InvokeWinformsThread (() => pluginHost.MainWindow.EnsureVisibleForegroundWindow(true, true)); }; }
/// <summary> /// Initalize Gtk stuff /// </summary> private void GtkDBusInit() { launcher = LauncherEntry.GetForDesktopId("keepass2.desktop"); var rootMenuItem = new Dbusmenu.Menuitem(); var trayContextMenu = pluginHost.MainWindow.TrayContextMenu; // make copy of item list to prevent list changed exception when iterating var menuItems = new System.Windows.Forms.ToolStripItem[trayContextMenu.Items.Count]; trayContextMenu.Items.CopyTo(menuItems, 0); trayContextMenu.ItemAdded += (sender, e) => DBusBackgroundWorker.InvokeGtkThread(() => ConvertAndAddMenuItem(e.Item, rootMenuItem)); foreach (System.Windows.Forms.ToolStripItem item in menuItems) { if (item.Name == "m_ctxTrayTray" || item.Name == "m_ctxTrayFileExit") { continue; } ConvertAndAddMenuItem(item, rootMenuItem); } // the launcher may not be listening yet, so we delay setting the properties // to give it extra time finishInitDelaytimer.Tick += (sender, e) => { finishInitDelaytimer.Stop(); DBusBackgroundWorker.InvokeGtkThread(() => launcher.Quicklist = rootMenuItem); }; finishInitDelaytimer.Interval = 1000; finishInitDelaytimer.Start(); }
/// <summary> /// Vytvoří položku systémové nabídky <see cref="System.Windows.Forms.ToolStripItem"/> z this prvku. /// Do property <see cref="System.Windows.Forms.ToolStripItem.Tag"/> uloží referenci na this. /// Pokud je <see cref="TextText"/> prázdný, vrátí separátor. /// </summary> /// <returns></returns> public virtual System.Windows.Forms.ToolStripItem CreateWinFormItem() { System.Windows.Forms.ToolStripItem result = null; string text = this.TextText; Color? backColor = this.BackColor; if (String.IsNullOrEmpty(text)) { result = new System.Windows.Forms.ToolStripSeparator(); } else { // Systémová tvorba položky menu: System.Windows.Forms.ToolStripMenuItem item = Painter.CreateDropDownItem(text, image: this.Image, toolTip: this.ToolTipText, isEnabled: this.IsEnabled, isCheckable: this.IsCheckable, isChecked: this.IsChecked, backColor: this.BackColor, name: this.Name); // SubItems dáme rekurzivně: var subItems = CreateWinFormItems(this.SubItems); if (subItems != null) { if (backColor.HasValue) { item.DropDown.BackColor = backColor.Value; // Barva SubMenu = barva this položky } item.DropDownItems.AddRange(subItems); } result = item; } result.Tag = this; return(result); }
public StatusBarItem(System.Windows.Forms.ToolStripItem item) { if (item == null) { throw new ArgumentException("没有指向ToolStripItem的引用。"); } this.m_Item = item; }
void it_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { System.Windows.Forms.ToolStripItem it = sender as System.Windows.Forms.ToolStripItem; if (it == null) { return; } SetMaterial((eCombinationType)it.Tag); }
void it_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { System.Windows.Forms.ToolStripItem it = sender as System.Windows.Forms.ToolStripItem; if (it == null) { return; } SetColorMode((eColorMode)it.Tag); }
protected override void AppendAdditionalComponentMenuItems(System.Windows.Forms.ToolStripDropDown menu) { base.AppendAdditionalComponentMenuItems(menu); for (int i = 0; i < 5; ++i) { System.Windows.Forms.ToolStripItem it = menu.Items.Add(((eCombinationType)i).ToString()); it.MouseDown += new System.Windows.Forms.MouseEventHandler(it_MouseDown); it.Tag = (eCombinationType)i; } }
private void addChild(MenuItem associatedMenuItem) { Func <System.Windows.Forms.ToolStripItem, bool> lastBeforeLookupFunction = (toolStripItem) => { CustomToolStripMenuItem toolStripItemCasted = toolStripItem as CustomToolStripMenuItem; if (toolStripItemCasted == null) { return(false); } MenuItem menuItem = toolStripItemCasted.AssociatedMenuItem; return((menuItem.ParentGroup.Weight <= associatedMenuItem.ParentGroup.Weight) && (menuItem.Weight <= associatedMenuItem.Weight)); }; // Separator before System.Windows.Forms.ToolStripItem lastBefore = guiElement.DropDownItems.Cast <System.Windows.Forms.ToolStripItem>().Where(lastBeforeLookupFunction).LastOrDefault(); int position = guiElement.StartPosition; if (lastBefore != null) { position = guiElement.DropDownItems.IndexOf(lastBefore) + 1; if (!(lastBefore is System.Windows.Forms.ToolStripSeparator)) { CustomToolStripMenuItem lastBeforeCasted = lastBefore as CustomToolStripMenuItem; MenuItemGroup groupBefore = lastBeforeCasted?.AssociatedMenuItem.ParentGroup; if ((groupBefore != associatedMenuItem.ParentGroup) && (groupBefore != null)) { guiElement.DropDownItems.Insert(position++, new System.Windows.Forms.ToolStripSeparator()); } } } // Menu item System.Windows.Forms.ToolStripItem myChild = new CustomToolStripMenuItem(associatedMenuItem); guiElement.DropDownItems.Insert(position++, myChild); // Separator after if (guiElement.DropDownItems.Count > position) { System.Windows.Forms.ToolStripItem firstAfter = guiElement.DropDownItems[position]; if (firstAfter != null) { CustomToolStripMenuItem firstAfterCasted = firstAfter as CustomToolStripMenuItem; MenuItemGroup groupAfter = firstAfterCasted?.AssociatedMenuItem.ParentGroup; // Add if next is another group if (!(firstAfter is System.Windows.Forms.ToolStripSeparator) && (groupAfter != associatedMenuItem.ParentGroup) && (groupAfter != null)) { guiElement.DropDownItems.Insert(position++, new System.Windows.Forms.ToolStripSeparator()); } // Remove is next is same group if ((firstAfter is System.Windows.Forms.ToolStripSeparator) && (groupAfter == associatedMenuItem.ParentGroup) && (groupAfter != null)) { guiElement.DropDownItems.Remove(firstAfter); } } } }
private void DoControlItem(System.Windows.Forms.ToolStripItem mi, string formName) { //Notice no .tag support. That's because in WebbIE there are lots of bookmark menu items //that have url tags. Don't want to I18N them. So skip tags for menus for now. string key = null; bool doText = true; if (mi.Name.Length == 0) { //No name: like, a menu element that is a divider, or empty - like the favorites in //the WebbIE favorites menu. key = ""; doText = false; } else { key = formName + "." + mi.Name; } if (doText) { string textKey = key + ".Text"; string text = GetText(textKey); if (text != textKey) { mi.Text = text; } else { //Failed to find anything when using the tag or the full formName.controlName //Try falling back now to our Common file, which should save me having to //duplicate lots and lots of entries. textKey = mi.Name + ".Text"; text = GetText(textKey); if (text != textKey) { mi.Text = text; } } } //Now do drop-down items. if ((mi) is System.Windows.Forms.ToolStripMenuItem & !((mi) is System.Windows.Forms.ToolStripSeparator)) { foreach (object miChild in ((System.Windows.Forms.ToolStripMenuItem)mi).DropDownItems) { if ((miChild) is System.Windows.Forms.ToolStripSeparator) { } else { DoControlItem((System.Windows.Forms.ToolStripMenuItem)miChild, formName); } } } }
/// <summary> /// Called when the button is about to be shown. /// </summary> private void _onButtonPaint(object sender, System.Windows.Forms.PaintEventArgs args) { try { System.Windows.Forms.ToolStripItem item = sender as System.Windows.Forms.ToolStripItem; if (null != item) { item.Enabled = this._shouldBeEnabled(); } } catch (System.Exception e) { System.Console.WriteLine("Error 2046322558: {0}", e.Message); } }
private void ApplySettings(Workspace workspace) { workspace.Initialize(); this.timer.Interval = TimeSpan.FromSeconds(workspace.Business.TimerInterval); this.notifyIcon.Icon = workspace.Butler.Icon; this.Title = workspace.Butler.DisplayName; this.Icon = BitmapUtil.ToBitmapSource(workspace.Butler.Icon.ToBitmap()); System.Windows.Forms.ToolStripItem callTheButlerMenuItem = this.notifyIcon.ContextMenuStrip.Items[CallTheButlerMenuItem]; callTheButlerMenuItem.Text = string.Format(Properties.Resources.NotifyIcon_CallTheButler, workspace.Butler.Nickname); callTheButlerMenuItem.Visible = true; }
public ContextMenuStripView(ContextMenuStripCodon codon) { this.Renderer = UIHelper.ToolStripRenders.ControlToControlLight; Codon = codon; codon.View = this; if (codon != null && codon.Items != null) { foreach (IToolStripItemCodon toolStripItem in codon.Items) { System.Windows.Forms.ToolStripItem item = toolStripItem.View as System.Windows.Forms.ToolStripItem; Debug.Assert(item != null, "item 为 null"); if (item != null) { this.Items.Add(item); } } } }
public WinFormsMenuItem(Widget shellobject, string caption, Image image, MenuFlags flags) : base(shellobject) { if ((flags & MenuFlags.Separator) != 0) { item = new System.Windows.Forms.ToolStripSeparator(); item.Tag = shellobject; //map-back from native control to guppy object return; //no events for separator } else { System.Windows.Forms.ToolStripMenuItem mi = new System.Windows.Forms.ToolStripMenuItem(); mi.Tag = shellobject; //map-back from native control to guppy object item = mi; mi.Image = WinFormsDriver.ImageToWinFormsImage(image); mi.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; //parse shortkey text if (caption == null) { caption = ""; } string[] capts = caption.Split('\t'); if (capts.Length > 0) { mi.Text = capts[0]; } if (capts.Length > 1) { mi.ShortcutKeyDisplayString = capts[1]; } if ((flags & MenuFlags.Checkable) != 0) { mi.CheckOnClick = true; mi.CheckState = (((flags & MenuFlags.Checked) != 0) ? System.Windows.Forms.CheckState.Checked : System.Windows.Forms.CheckState.Unchecked); } } item.Click += delegate { ((MenuItem)ShellObject).OnClicked(); }; }
private void ConvertAndAddMenuItem(System.Windows.Forms.ToolStripItem item, Dbusmenu.Menuitem parent) { if (item is System.Windows.Forms.ToolStripMenuItem) { var winformMenuItem = item as System.Windows.Forms.ToolStripMenuItem; var dbusMenuItem = new Dbusmenu.Menuitem(); dbusMenuItem.PropertySet("label", winformMenuItem.Text.Replace("&", "")); // VisibleChanged does not seem to be firing, so make everything visible for now //dbusMenuItem.PropertySetBool("visible", winformMenuItem.Visible); dbusMenuItem.PropertySetBool("enabled", winformMenuItem.Enabled); dbusMenuItem.ItemActivated += (sender, e) => DBusBackgroundWorker.InvokeWinformsThread((Action)winformMenuItem.PerformClick); winformMenuItem.TextChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread(() => dbusMenuItem.PropertySet("label", winformMenuItem.Text.Replace("&", ""))); winformMenuItem.EnabledChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread(() => dbusMenuItem.PropertySetBool("enabled", winformMenuItem.Enabled)); winformMenuItem.VisibleChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread(() => dbusMenuItem.PropertySetBool("visible", winformMenuItem.Visible)); parent.ChildAppend(dbusMenuItem); } else if (item is System.Windows.Forms.ToolStripSeparator) { // Ignore separator for now because there are too many of them // var dbusMenuItem = new DbusmenuMenuitem(); // dbusMenuItem.PropertySet("type", "separator"); // parent.ChildAppend(dbusMenuItem); } else { Debug.Fail("Unexpected menu item"); } }
void contexMenuuu_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e) { System.Windows.Forms.ToolStripItem item = e.ClickedItem; if (item.Text == "העתק מתחרה") { System.Windows.Forms.ContextMenuStrip c = sender as System.Windows.Forms.ContextMenuStrip; if (e.ClickedItem.Name.IsNumeric() == true) { // save the contender id that will be pasted VisualLeagueEvent.ClipBoardValue = int.Parse(e.ClickedItem.Name); } } else if (item.Text == "צור בית חדש") { if (e.ClickedItem.Name.ToString().Trim().IsNumeric() == true) { // promt the user to permit using (var promt = new Martial_Arts_league_Management2.PromtForm("המתחרה יימחק מהבית הנוכחי ויפתח בית חדש שייצג את ציון החגורה הגיל והמשקל שלו" + Environment.NewLine + "אנא אשר על מנת להמשיך")) { var result = promt.ShowDialog(); if (result == System.Windows.Forms.DialogResult.No) { return; } } VisualLeagueEvent.CreateNewBracket(int.Parse(e.ClickedItem.Name.ToString().Trim())); } } else if (item.Text == "בדוק פקטור בבית") { if (e.ClickedItem.Name.ToString().Trim().IsNumeric() == true) { FactorCheck(int.Parse(e.ClickedItem.Name)); } } }
public static System.Windows.Forms.ToolStripItem[] GetCategoryImageList(int currentColour) { System.Windows.Forms.ToolStripItem[] CategoryColours = new System.Windows.Forms.ToolStripItem[12]; for (int i = 2; i < 14; i++) { System.Windows.Forms.ToolStripMenuItem item = new System.Windows.Forms.ToolStripMenuItem(); item.BackgroundImage = GetCategoryImage(i); item.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; item.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; item.Text = string.Empty; item.Tag = i; if (i == currentColour) { item.Checked = true; } CategoryColours[i - 2] = item; } return(CategoryColours); }
public override void InitializeBackend(object frontend, ApplicationContext context) { base.InitializeBackend(frontend, context); MenuItem = new System.Windows.Forms.ToolStripMenuItem(); }
/// <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 componentResourceManager = new System.ComponentModel.ComponentResourceManager(typeof(IntelliTrack.Client.Application.MapForm)); toolStrip1 = new System.Windows.Forms.ToolStrip(); ZoomWindow = new System.Windows.Forms.ToolStripButton(); ZoomIn = new System.Windows.Forms.ToolStripButton(); ZoomOut = new System.Windows.Forms.ToolStripButton(); toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); Pan = new System.Windows.Forms.ToolStripButton(); toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); btnLaunchInBrowser = new System.Windows.Forms.ToolStripButton(); Info = new System.Windows.Forms.ToolStripButton(); toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); RedrawProgressBar = new System.Windows.Forms.ToolStripProgressBar(); toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); btnInicio = new System.Windows.Forms.ToolStripButton(); btnEjecutar = new System.Windows.Forms.ToolStripButton(); btnPausa = new System.Windows.Forms.ToolStripButton(); btnDetener = new System.Windows.Forms.ToolStripButton(); btnConfiguracionConsultaHistorica = new System.Windows.Forms.ToolStripButton(); lblInformation = new System.Windows.Forms.Label(); panel1 = new System.Windows.Forms.Panel(); udRegistrosPorSegundo = new System.Windows.Forms.NumericUpDown(); lblPosicion = new System.Windows.Forms.Label(); trackPosicion = new System.Windows.Forms.TrackBar(); lblEstado = new System.Windows.Forms.Label(); toolStrip1.SuspendLayout(); panel1.SuspendLayout(); udRegistrosPorSegundo.BeginInit(); trackPosicion.BeginInit(); SuspendLayout(); System.Windows.Forms.ToolStripItem[] toolStripItemArr = new System.Windows.Forms.ToolStripItem[] { ZoomWindow, ZoomIn, ZoomOut, toolStripSeparator1, Pan, toolStripSeparator3, btnLaunchInBrowser, Info, toolStripSeparator2, RedrawProgressBar, toolStripSeparator4, btnInicio, btnEjecutar, btnPausa, btnDetener, btnConfiguracionConsultaHistorica }; toolStrip1.Items.AddRange(toolStripItemArr); toolStrip1.Location = new System.Drawing.Point(0, 0); toolStrip1.Name = "toolStrip1"; toolStrip1.Size = new System.Drawing.Size(542, 25); toolStrip1.TabIndex = 0; toolStrip1.Text = "toolStrip1"; ZoomWindow.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; ZoomWindow.Image = (System.Drawing.Image)componentResourceManager.GetObject("ZoomWindow.Image"); ZoomWindow.ImageTransparentColor = System.Drawing.Color.Magenta; ZoomWindow.Name = "ZoomWindow"; ZoomWindow.Size = new System.Drawing.Size(23, 22); ZoomWindow.Text = "toolStripButton1"; ZoomWindow.ToolTipText = "Zoom Window"; ZoomWindow.Click += new System.EventHandler(ZoomWindow_Click); ZoomIn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; ZoomIn.Image = (System.Drawing.Image)componentResourceManager.GetObject("ZoomIn.Image"); ZoomIn.ImageTransparentColor = System.Drawing.Color.Magenta; ZoomIn.Name = "ZoomIn"; ZoomIn.Size = new System.Drawing.Size(23, 22); ZoomIn.Text = "toolStripButton2"; ZoomIn.ToolTipText = "Zoom In"; ZoomIn.Click += new System.EventHandler(ZoomIn_Click); ZoomOut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; ZoomOut.Image = (System.Drawing.Image)componentResourceManager.GetObject("ZoomOut.Image"); ZoomOut.ImageTransparentColor = System.Drawing.Color.Magenta; ZoomOut.Name = "ZoomOut"; ZoomOut.Size = new System.Drawing.Size(23, 22); ZoomOut.Text = "toolStripButton3"; ZoomOut.ToolTipText = "Zoom out"; ZoomOut.Click += new System.EventHandler(ZoomOut_Click); toolStripSeparator1.Name = "toolStripSeparator1"; toolStripSeparator1.Size = new System.Drawing.Size(6, 25); Pan.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; Pan.Image = (System.Drawing.Image)componentResourceManager.GetObject("Pan.Image"); Pan.ImageTransparentColor = System.Drawing.Color.Magenta; Pan.Name = "Pan"; Pan.Size = new System.Drawing.Size(23, 22); Pan.Text = "toolStripButton1"; Pan.ToolTipText = "Pan"; Pan.Click += new System.EventHandler(Pan_Click); toolStripSeparator3.Name = "toolStripSeparator3"; toolStripSeparator3.Size = new System.Drawing.Size(6, 25); toolStripSeparator3.Visible = false; btnLaunchInBrowser.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnLaunchInBrowser.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnLaunchInBrowser.Image"); btnLaunchInBrowser.ImageTransparentColor = System.Drawing.Color.Magenta; btnLaunchInBrowser.Name = "btnLaunchInBrowser"; btnLaunchInBrowser.Size = new System.Drawing.Size(23, 22); btnLaunchInBrowser.Text = "btnLaunchInBrowser"; btnLaunchInBrowser.Click += new System.EventHandler(toolStripButton1_Click); Info.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; Info.Image = (System.Drawing.Image)componentResourceManager.GetObject("Info.Image"); Info.ImageTransparentColor = System.Drawing.Color.Magenta; Info.Name = "Info"; Info.Size = new System.Drawing.Size(23, 22); Info.Text = "toolStripButton1"; Info.Click += new System.EventHandler(Info_Click); toolStripSeparator2.Name = "toolStripSeparator2"; toolStripSeparator2.Size = new System.Drawing.Size(6, 25); RedrawProgressBar.Name = "RedrawProgressBar"; RedrawProgressBar.Size = new System.Drawing.Size(100, 22); RedrawProgressBar.Visible = false; toolStripSeparator4.Name = "toolStripSeparator4"; toolStripSeparator4.Size = new System.Drawing.Size(6, 25); btnInicio.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnInicio.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnInicio.Image"); btnInicio.ImageTransparentColor = System.Drawing.Color.Magenta; btnInicio.Name = "btnInicio"; btnInicio.Size = new System.Drawing.Size(23, 22); btnInicio.Text = "Inicio"; btnInicio.Click += new System.EventHandler(btnInicio_Click); btnEjecutar.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnEjecutar.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnEjecutar.Image"); btnEjecutar.ImageTransparentColor = System.Drawing.Color.Magenta; btnEjecutar.Name = "btnEjecutar"; btnEjecutar.Size = new System.Drawing.Size(23, 22); btnEjecutar.Text = "Ejecutar"; btnEjecutar.Click += new System.EventHandler(btnEjecutar_Click); btnPausa.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnPausa.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnPausa.Image"); btnPausa.ImageTransparentColor = System.Drawing.Color.Magenta; btnPausa.Name = "btnPausa"; btnPausa.Size = new System.Drawing.Size(23, 22); btnPausa.Text = "Pausa"; btnPausa.Click += new System.EventHandler(btnPausa_Click); btnDetener.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnDetener.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnDetener.Image"); btnDetener.ImageTransparentColor = System.Drawing.Color.Magenta; btnDetener.Name = "btnDetener"; btnDetener.Size = new System.Drawing.Size(23, 22); btnDetener.Text = "Detener"; btnDetener.Click += new System.EventHandler(btnDetener_Click); btnConfiguracionConsultaHistorica.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; btnConfiguracionConsultaHistorica.Image = (System.Drawing.Image)componentResourceManager.GetObject("btnConfiguracionConsultaHistorica.Image"); btnConfiguracionConsultaHistorica.ImageTransparentColor = System.Drawing.Color.Magenta; btnConfiguracionConsultaHistorica.Name = "btnConfiguracionConsultaHistorica"; btnConfiguracionConsultaHistorica.Size = new System.Drawing.Size(23, 22); btnConfiguracionConsultaHistorica.Text = "Configuraci\u00F3n"; btnConfiguracionConsultaHistorica.Click += new System.EventHandler(btnConfiguracionConsultaHistorica_Click); lblInformation.AutoSize = true; lblInformation.Location = new System.Drawing.Point(12, 45); lblInformation.Name = "lblInformation"; lblInformation.Size = new System.Drawing.Size(69, 13); lblInformation.TabIndex = 1; lblInformation.Text = "lblInformation"; panel1.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left; panel1.Controls.Add(udRegistrosPorSegundo); panel1.Controls.Add(lblPosicion); panel1.Controls.Add(trackPosicion); panel1.Controls.Add(lblEstado); panel1.Location = new System.Drawing.Point(0, 189); panel1.Name = "panel1"; panel1.Size = new System.Drawing.Size(142, 77); panel1.TabIndex = 2; udRegistrosPorSegundo.Dock = System.Windows.Forms.DockStyle.Top; udRegistrosPorSegundo.Location = new System.Drawing.Point(0, 54); int[] iArr1 = new int[4]; iArr1[0] = 50; udRegistrosPorSegundo.Maximum = new System.Decimal(iArr1); int[] iArr2 = new int[4]; iArr2[0] = 1; udRegistrosPorSegundo.Minimum = new System.Decimal(iArr2); udRegistrosPorSegundo.Name = "udRegistrosPorSegundo"; udRegistrosPorSegundo.Size = new System.Drawing.Size(142, 20); udRegistrosPorSegundo.TabIndex = 3; int[] iArr3 = new int[4]; iArr3[0] = 1; udRegistrosPorSegundo.Value = new System.Decimal(iArr3); udRegistrosPorSegundo.ValueChanged += new System.EventHandler(udRegistrosPorSegundo_ValueChanged); lblPosicion.Dock = System.Windows.Forms.DockStyle.Top; lblPosicion.Location = new System.Drawing.Point(0, 41); lblPosicion.Name = "lblPosicion"; lblPosicion.Size = new System.Drawing.Size(142, 13); lblPosicion.TabIndex = 2; trackPosicion.AutoSize = false; trackPosicion.Dock = System.Windows.Forms.DockStyle.Top; trackPosicion.Location = new System.Drawing.Point(0, 13); trackPosicion.Maximum = 1000000; trackPosicion.Name = "trackPosicion"; trackPosicion.Size = new System.Drawing.Size(142, 28); trackPosicion.TabIndex = 1; trackPosicion.TickFrequency = 0; trackPosicion.TickStyle = System.Windows.Forms.TickStyle.None; trackPosicion.Scroll += new System.EventHandler(trackPosicion_Scroll); lblEstado.Dock = System.Windows.Forms.DockStyle.Top; lblEstado.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0); lblEstado.ForeColor = System.Drawing.Color.Green; lblEstado.Location = new System.Drawing.Point(0, 0); lblEstado.Name = "lblEstado"; lblEstado.Size = new System.Drawing.Size(142, 13); lblEstado.TabIndex = 0; lblEstado.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoSize = true; BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; ClientSize = new System.Drawing.Size(542, 266); Controls.Add(panel1); Controls.Add(lblInformation); Controls.Add(toolStrip1); DoubleBuffered = true; Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0); Name = "MapForm"; Text = "Mapa"; MouseUp += new System.Windows.Forms.MouseEventHandler(MapForm_MouseUp); Scroll += new System.Windows.Forms.ScrollEventHandler(MapForm_Scroll); SizeChanged += new System.EventHandler(MapForm_SizeChanged); MouseDown += new System.Windows.Forms.MouseEventHandler(MapForm_MouseDown); FormClosing += new System.Windows.Forms.FormClosingEventHandler(MapForm_FormClosing); MouseMove += new System.Windows.Forms.MouseEventHandler(MapForm_MouseMove); toolStrip1.ResumeLayout(false); toolStrip1.PerformLayout(); panel1.ResumeLayout(false); udRegistrosPorSegundo.EndInit(); trackPosicion.EndInit(); ResumeLayout(false); PerformLayout(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin(); WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin(); WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin(); WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); System.ComponentModel.ComponentResourceManager componentResourceManager = new System.ComponentModel.ComponentResourceManager(typeof(IntelliTrack.Client.Application.Form1)); dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); menuStrip1 = new System.Windows.Forms.MenuStrip(); fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); printToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); printPreviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); customizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); indexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); menuStrip1.SuspendLayout(); SuspendLayout(); dockPanel.ActiveAutoHideContent = null; dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; dockPanel.DockBackColor = System.Drawing.SystemColors.Control; dockPanel.DockBottomPortion = 150.0; dockPanel.DockLeftPortion = 200.0; dockPanel.DockRightPortion = 200.0; dockPanel.DockTopPortion = 150.0; dockPanel.Font = new System.Drawing.Font("Tahoma", 11.0F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, 0); dockPanel.Location = new System.Drawing.Point(0, 24); dockPanel.Name = "dockPanel"; dockPanel.RightToLeftLayout = true; dockPanel.Size = new System.Drawing.Size(943, 652); dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight; dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight; autoHideStripSkin.DockStripGradient = dockPanelGradient1; tabGradient1.EndColor = System.Drawing.SystemColors.Control; tabGradient1.StartColor = System.Drawing.SystemColors.Control; tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark; autoHideStripSkin.TabGradient = tabGradient1; dockPanelSkin.AutoHideStripSkin = autoHideStripSkin; tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight; tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight; tabGradient2.TextColor = System.Drawing.SystemColors.ControlText; dockPaneStripGradient.ActiveTabGradient = tabGradient2; dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control; dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control; dockPaneStripGradient.DockStripGradient = dockPanelGradient2; tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight; tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight; tabGradient3.TextColor = System.Drawing.SystemColors.ControlText; dockPaneStripGradient.InactiveTabGradient = tabGradient3; dockPaneStripSkin.DocumentGradient = dockPaneStripGradient; tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption; tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption; tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText; dockPaneStripToolWindowGradient.ActiveCaptionGradient = tabGradient4; tabGradient5.EndColor = System.Drawing.SystemColors.Control; tabGradient5.StartColor = System.Drawing.SystemColors.Control; tabGradient5.TextColor = System.Drawing.SystemColors.ControlText; dockPaneStripToolWindowGradient.ActiveTabGradient = tabGradient5; dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight; dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight; dockPaneStripToolWindowGradient.DockStripGradient = dockPanelGradient3; tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption; tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption; tabGradient6.TextColor = System.Drawing.SystemColors.ControlText; dockPaneStripToolWindowGradient.InactiveCaptionGradient = tabGradient6; tabGradient7.EndColor = System.Drawing.Color.Transparent; tabGradient7.StartColor = System.Drawing.Color.Transparent; tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark; dockPaneStripToolWindowGradient.InactiveTabGradient = tabGradient7; dockPaneStripSkin.ToolWindowGradient = dockPaneStripToolWindowGradient; dockPanelSkin.DockPaneStripSkin = dockPaneStripSkin; dockPanel.Skin = dockPanelSkin; dockPanel.TabIndex = 0; System.Windows.Forms.ToolStripItem[] toolStripItemArr1 = new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem }; menuStrip1.Items.AddRange(toolStripItemArr1); menuStrip1.Location = new System.Drawing.Point(0, 0); menuStrip1.Name = "menuStrip1"; menuStrip1.Size = new System.Drawing.Size(943, 24); menuStrip1.TabIndex = 3; menuStrip1.Text = "menuStrip1"; System.Windows.Forms.ToolStripItem[] toolStripItemArr2 = new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, toolStripSeparator, saveToolStripMenuItem, saveAsToolStripMenuItem, toolStripSeparator1, printToolStripMenuItem, printPreviewToolStripMenuItem, toolStripSeparator2, exitToolStripMenuItem }; fileToolStripMenuItem.DropDownItems.AddRange(toolStripItemArr2); fileToolStripMenuItem.Name = "fileToolStripMenuItem"; fileToolStripMenuItem.Size = new System.Drawing.Size(55, 20); fileToolStripMenuItem.Text = "&Archivo"; newToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("newToolStripMenuItem.Image"); newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; newToolStripMenuItem.Name = "newToolStripMenuItem"; newToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.MButton | System.Windows.Forms.Keys.Back | System.Windows.Forms.Keys.Control; newToolStripMenuItem.Size = new System.Drawing.Size(151, 22); newToolStripMenuItem.Text = "&New"; newToolStripMenuItem.Visible = false; openToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("openToolStripMenuItem.Image"); openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; openToolStripMenuItem.Name = "openToolStripMenuItem"; openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.LButton | System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.MButton | System.Windows.Forms.Keys.Back | System.Windows.Forms.Keys.Control; openToolStripMenuItem.Size = new System.Drawing.Size(151, 22); openToolStripMenuItem.Text = "&Open"; openToolStripMenuItem.Visible = false; toolStripSeparator.Name = "toolStripSeparator"; toolStripSeparator.Size = new System.Drawing.Size(148, 6); toolStripSeparator.Visible = false; saveToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("saveToolStripMenuItem.Image"); saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; saveToolStripMenuItem.Name = "saveToolStripMenuItem"; saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.LButton | System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; saveToolStripMenuItem.Size = new System.Drawing.Size(151, 22); saveToolStripMenuItem.Text = "&Save"; saveToolStripMenuItem.Visible = false; saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; saveAsToolStripMenuItem.Size = new System.Drawing.Size(151, 22); saveAsToolStripMenuItem.Text = "Save &As"; saveAsToolStripMenuItem.Visible = false; toolStripSeparator1.Name = "toolStripSeparator1"; toolStripSeparator1.Size = new System.Drawing.Size(148, 6); toolStripSeparator1.Visible = false; printToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("printToolStripMenuItem.Image"); printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; printToolStripMenuItem.Name = "printToolStripMenuItem"; //printToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; printToolStripMenuItem.Size = new System.Drawing.Size(151, 22); printToolStripMenuItem.Text = "&Print"; printToolStripMenuItem.Visible = false; printPreviewToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("printPreviewToolStripMenuItem.Image"); printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem"; printPreviewToolStripMenuItem.Size = new System.Drawing.Size(151, 22); printPreviewToolStripMenuItem.Text = "Print Pre&view"; printPreviewToolStripMenuItem.Visible = false; toolStripSeparator2.Name = "toolStripSeparator2"; toolStripSeparator2.Size = new System.Drawing.Size(148, 6); toolStripSeparator2.Visible = false; exitToolStripMenuItem.Name = "exitToolStripMenuItem"; exitToolStripMenuItem.Size = new System.Drawing.Size(151, 22); exitToolStripMenuItem.Text = "&Salir"; exitToolStripMenuItem.Click += new System.EventHandler(exitToolStripMenuItem_Click); System.Windows.Forms.ToolStripItem[] toolStripItemArr3 = new System.Windows.Forms.ToolStripItem[] { undoToolStripMenuItem, redoToolStripMenuItem, toolStripSeparator3, cutToolStripMenuItem, copyToolStripMenuItem, pasteToolStripMenuItem, toolStripSeparator4, selectAllToolStripMenuItem }; editToolStripMenuItem.DropDownItems.AddRange(toolStripItemArr3); editToolStripMenuItem.Name = "editToolStripMenuItem"; editToolStripMenuItem.Size = new System.Drawing.Size(47, 20); editToolStripMenuItem.Text = "&Editar"; editToolStripMenuItem.Visible = false; undoToolStripMenuItem.Name = "undoToolStripMenuItem"; undoToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.Back | System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; undoToolStripMenuItem.Size = new System.Drawing.Size(150, 22); undoToolStripMenuItem.Text = "&Undo"; redoToolStripMenuItem.Name = "redoToolStripMenuItem"; redoToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.LButton | System.Windows.Forms.Keys.Back | System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; redoToolStripMenuItem.Size = new System.Drawing.Size(150, 22); redoToolStripMenuItem.Text = "&Redo"; toolStripSeparator3.Name = "toolStripSeparator3"; toolStripSeparator3.Size = new System.Drawing.Size(147, 6); cutToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("cutToolStripMenuItem.Image"); cutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; cutToolStripMenuItem.Name = "cutToolStripMenuItem"; cutToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Back | System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; cutToolStripMenuItem.Size = new System.Drawing.Size(150, 22); cutToolStripMenuItem.Text = "Cu&t"; copyToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("copyToolStripMenuItem.Image"); copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; copyToolStripMenuItem.Name = "copyToolStripMenuItem"; copyToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.LButton | System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.Control; copyToolStripMenuItem.Size = new System.Drawing.Size(150, 22); copyToolStripMenuItem.Text = "&Copy"; pasteToolStripMenuItem.Image = (System.Drawing.Image)componentResourceManager.GetObject("pasteToolStripMenuItem.Image"); pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; pasteToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.RButton | System.Windows.Forms.Keys.MButton | System.Windows.Forms.Keys.ShiftKey | System.Windows.Forms.Keys.Control; pasteToolStripMenuItem.Size = new System.Drawing.Size(150, 22); pasteToolStripMenuItem.Text = "&Paste"; toolStripSeparator4.Name = "toolStripSeparator4"; toolStripSeparator4.Size = new System.Drawing.Size(147, 6); selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem"; selectAllToolStripMenuItem.Size = new System.Drawing.Size(150, 22); selectAllToolStripMenuItem.Text = "Select &All"; System.Windows.Forms.ToolStripItem[] toolStripItemArr4 = new System.Windows.Forms.ToolStripItem[] { customizeToolStripMenuItem, optionsToolStripMenuItem }; toolsToolStripMenuItem.DropDownItems.AddRange(toolStripItemArr4); toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; toolsToolStripMenuItem.Size = new System.Drawing.Size(83, 20); toolsToolStripMenuItem.Text = "&Herramientas"; toolsToolStripMenuItem.Visible = false; customizeToolStripMenuItem.Name = "customizeToolStripMenuItem"; customizeToolStripMenuItem.Size = new System.Drawing.Size(155, 22); customizeToolStripMenuItem.Text = "Personali&zar..."; optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; optionsToolStripMenuItem.Size = new System.Drawing.Size(155, 22); optionsToolStripMenuItem.Text = "Opcion&es..."; System.Windows.Forms.ToolStripItem[] toolStripItemArr5 = new System.Windows.Forms.ToolStripItem[] { contentsToolStripMenuItem, indexToolStripMenuItem, searchToolStripMenuItem, toolStripSeparator5, aboutToolStripMenuItem }; helpToolStripMenuItem.DropDownItems.AddRange(toolStripItemArr5); helpToolStripMenuItem.Name = "helpToolStripMenuItem"; helpToolStripMenuItem.Size = new System.Drawing.Size(50, 20); helpToolStripMenuItem.Text = "Ay&uda"; helpToolStripMenuItem.Visible = false; contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; contentsToolStripMenuItem.Size = new System.Drawing.Size(129, 22); contentsToolStripMenuItem.Text = "&Contents"; indexToolStripMenuItem.Name = "indexToolStripMenuItem"; indexToolStripMenuItem.Size = new System.Drawing.Size(129, 22); indexToolStripMenuItem.Text = "&Index"; searchToolStripMenuItem.Name = "searchToolStripMenuItem"; searchToolStripMenuItem.Size = new System.Drawing.Size(129, 22); searchToolStripMenuItem.Text = "&Search"; toolStripSeparator5.Name = "toolStripSeparator5"; toolStripSeparator5.Size = new System.Drawing.Size(126, 6); aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22); aboutToolStripMenuItem.Text = "&About..."; AutoScaleDimensions = new System.Drawing.SizeF(6.0F, 13.0F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(943, 676); Controls.Add(dockPanel); Controls.Add(menuStrip1); DoubleBuffered = true; Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon"); IsMdiContainer = true; Name = "Form1"; StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; Text = "Intellitrack"; WindowState = System.Windows.Forms.FormWindowState.Maximized; Shown += new System.EventHandler(Form1_Shown); Layout += new System.Windows.Forms.LayoutEventHandler(Form1_Layout); menuStrip1.ResumeLayout(false); menuStrip1.PerformLayout(); ResumeLayout(false); PerformLayout(); }
public static void Invoke(System.Windows.Forms.ToolStripItem con, InvokeDelegate callback) { callback(); }
public void MakeRibbon() { PlugInManager pm = new PlugInManager(); foreach (IExplorerRibbonTab exRibbonTab in OrderedPluginList<IExplorerRibbonTab>.Sort(pm.GetPluginNodes(Plugins.Type.IExplorerRibbonTab))) { Fluent.RibbonTabItem tabItem = new Fluent.RibbonTabItem(); tabItem.Header = exRibbonTab.Header; ribbon.Tabs.Add(tabItem); tabItem.DataContext = exRibbonTab; foreach (RibbonGroupBox exGroupBox in exRibbonTab.Groups) { Fluent.RibbonGroupBox groupBox = new Fluent.RibbonGroupBox(); groupBox.Header = exGroupBox.Header; tabItem.Groups.Add(groupBox); foreach (RibbonItem cartoRibbonItem in exGroupBox.Items) { Guid toolGUID = cartoRibbonItem.Guid; if (toolGUID == new Guid("00000000-0000-0000-0000-000000000000")) { groupBox.Items.Add(new Separator()); continue; } object tool = pm.CreateInstance(toolGUID); if (tool == null) continue; #region IToolItem if (tool is IToolItem) { if (((IToolItem)tool).ToolItem != null) { if (((IToolItem)tool).ToolItem is System.Windows.Forms.ToolStripItem) { StackPanel panel = new StackPanel(); panel.Margin = new Thickness(0, 32, 0, 0); System.Windows.Forms.ToolStripItem stripItem = (System.Windows.Forms.ToolStripItem)((IToolItem)tool).ToolItem; System.Windows.Forms.MenuStrip bar = new System.Windows.Forms.MenuStrip(); bar.BackColor = System.Drawing.Color.Transparent; //.FromArgb(223, 234, 246); bar.Items.Add(stripItem); WindowsFormsHost host = new WindowsFormsHost(); host.Background = new SolidColorBrush(Color.FromRgb(223, 234, 246)); host.Child = bar; if (tool is IToolItemLabel) { IToolItemLabel label = (IToolItemLabel)tool; panel.Orientation = label.LabelPosition == ToolItemLabelPosition.top || label.LabelPosition == ToolItemLabelPosition.bottom ? Orientation.Vertical : Orientation.Horizontal; if (panel.Orientation == Orientation.Vertical) panel.Margin = new Thickness(0, 13, 0, 0); TextBlock text = new TextBlock(); text.Text = label.Label; text.Padding = new Thickness(3); if (label.LabelPosition == ToolItemLabelPosition.top || label.LabelPosition == ToolItemLabelPosition.left) panel.Children.Insert(0, text); else panel.Children.Add(text); } panel.Children.Add(host); groupBox.Items.Add(panel); } } } #endregion #region IToolMenu else if (tool is IExToolMenu) { DropDownToolButton button = new DropDownToolButton(tool as IExToolMenu); button.Click += new RoutedEventHandler(ToolButton_Click); groupBox.Items.Add(button); } #endregion #region ITool else if (tool is IExTool) { ((IExTool)tool).OnCreate(_application); ToolButton button = new ToolButton(tool as IExTool); button.SizeDefinition = cartoRibbonItem.SizeDefinition; groupBox.Items.Add(button); button.Click += new RoutedEventHandler(ToolButton_Click); } #endregion } } if (ribbon.Tabs.Count == 1) { #region Favorites Fluent.RibbonGroupBox favBox = new Fluent.RibbonGroupBox(); favBox.Header = String.Empty; _favDropDownButton = new Fluent.DropDownButton(); _favDropDownButton.Header = "Favorites"; _favDropDownButton.Icon = _favDropDownButton.LargeIcon = ImageFactory.FromBitmap(global::gView.Desktop.Wpf.DataExplorer.Properties.Resources.folder_heart); Fluent.MenuItem add2fav = new Fluent.MenuItem(); add2fav.Header = "Add to favorites..."; add2fav.Icon = ImageFactory.FromBitmap(global::gView.Desktop.Wpf.DataExplorer.Properties.Resources.folder_heart); add2fav.Click += new RoutedEventHandler(Add2Favorites_Click); _favDropDownButton.Items.Add(add2fav); bool first = true; foreach (MyFavorites.Favorite fav in (new MyFavorites().Favorites)) { if (fav == null) continue; WpfFavoriteMenuItem fItem = new WpfFavoriteMenuItem(fav); fItem.Click += new RoutedEventHandler(MenuItem_Favorite_Click); if (first) { first = false; _favDropDownButton.Items.Add(new Separator()); } _favDropDownButton.Items.Add(fItem); } favBox.Items.Add(_favDropDownButton); ribbon.Tabs[0].Groups.Add(favBox); #endregion _createNewRibbonGroupBox = new Fluent.RibbonGroupBox(); _createNewRibbonGroupBox.Header = "Create New"; _createNewRibbonGroupBox.Visibility = Visibility.Visible; _createNewRibbonGroupBox.Background = new SolidColorBrush(Colors.GreenYellow); ribbon.Tabs[0].Groups.Add(_createNewRibbonGroupBox); } } #region Options Fluent.RibbonTabItem optionsTab = new Fluent.RibbonTabItem() { Header = "Options" }; Fluent.RibbonGroupBox optionsBox = new Fluent.RibbonGroupBox() { Header = String.Empty }; optionsTab.Groups.Add(optionsBox); foreach (XmlNode pageNode in pm.GetPluginNodes(Plugins.Type.IExplorerOptionPage)) { IExplorerOptionPage page = pm.CreateInstance(pageNode) as IExplorerOptionPage; if (page == null) continue; OptionsButton button = new OptionsButton(page); button.Click += new RoutedEventHandler(OptoinButton_Click); optionsBox.Items.Add(button); } ribbon.Tabs.Add(optionsTab); #endregion }
private void ConvertAndAddMenuItem(System.Windows.Forms.ToolStripItem item, Gtk.MenuShell gtkMenuShell) { if (item is System.Windows.Forms.ToolStripMenuItem) { var winformMenuItem = item as System.Windows.Forms.ToolStripMenuItem; // windows forms use '&' for mneumonic, gtk uses '_' var gtkMenuItem = new Gtk.ImageMenuItem(winformMenuItem.Text.Replace("&", "_")); if (winformMenuItem.Image != null) { MemoryStream memStream; var image = winformMenuItem.Image; if (image.Width != 16 || image.Height != 16) { var newImage = ResizeImage(image, 16, 16); memStream = new MemoryStream(newImage); } else { memStream = new MemoryStream(); image.Save(memStream, ImageFormat.Png); memStream.Position = 0; } gtkMenuItem.Image = new Gtk.Image(memStream); } gtkMenuItem.TooltipText = winformMenuItem.ToolTipText; gtkMenuItem.Visible = winformMenuItem.Visible; gtkMenuItem.Sensitive = winformMenuItem.Enabled; gtkMenuItem.Activated += (sender, e) => DBusBackgroundWorker.InvokeWinformsThread((Action)winformMenuItem.PerformClick); winformMenuItem.TextChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread(() => { var label = gtkMenuItem.Child as Gtk.Label; if (label != null) { label.Text = winformMenuItem.Text; } } ); winformMenuItem.EnabledChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread (() => gtkMenuItem.Sensitive = winformMenuItem.Enabled); winformMenuItem.VisibleChanged += (sender, e) => DBusBackgroundWorker.InvokeGtkThread (() => gtkMenuItem.Visible = winformMenuItem.Visible); gtkMenuItem.Show(); gtkMenuShell.Insert(gtkMenuItem, winformMenuItem.Owner.Items.IndexOf(winformMenuItem)); if (winformMenuItem.HasDropDownItems) { var subMenu = new Gtk.Menu(); foreach (System.Windows.Forms.ToolStripItem dropDownItem in winformMenuItem.DropDownItems) { ConvertAndAddMenuItem(dropDownItem, subMenu); } gtkMenuItem.Submenu = subMenu; winformMenuItem.DropDown.ItemAdded += (sender, e) => DBusBackgroundWorker.InvokeGtkThread (() => ConvertAndAddMenuItem(e.Item, subMenu)); } } else if (item is System.Windows.Forms.ToolStripSeparator) { var gtkSeparator = new Gtk.SeparatorMenuItem(); gtkSeparator.Show(); gtkMenuShell.Insert(gtkSeparator, item.Owner.Items.IndexOf(item)); } else { Debug.Fail("Unexpected menu item"); } }
public static System.Windows.Forms.ToolStripItem Mnemonic(this System.Windows.Forms.ToolStripItem item, System.Windows.Forms.Keys value) { item.Text = GetMnemonicString(item.Text, value); return(item); }
public MyButton(System.Windows.Forms.ToolStripItem button) { this.button = button; }
void localizeControls(System.Windows.Forms.Control.ControlCollection controls) { foreach (System.Windows.Forms.Control control in controls) { ControlConfig config = null; // If the control is a MenuStrip we have to loop through its base controls (toolstripmenuitem) // then if applicable we must loop through its children if (control.GetType() == typeof(System.Windows.Forms.MenuStrip)) { System.Windows.Forms.MenuStrip ms = (System.Windows.Forms.MenuStrip)control; foreach (System.Windows.Forms.ToolStripMenuItem tsmi in ms.Items) { config = locale.Controls.Find(c => c.Name == tsmi.Name); if (config != null) { tsmi.Text = config.Text.Text; tsmi.TextAlign = config.Text.Alignment; tsmi.RightToLeft = config.Text.RightToLeft; if (!control.Size.IsEmpty) { tsmi.Size = config.Size; } } if (tsmi.HasDropDownItems) { foreach (System.Windows.Forms.ToolStripMenuItem subTSMI in tsmi.DropDownItems) { config = locale.Controls.Find(c => c.Name == subTSMI.Name); if (config != null) { subTSMI.Text = config.Text.Text; subTSMI.TextAlign = config.Text.Alignment; subTSMI.RightToLeft = config.Text.RightToLeft; if (!control.Size.IsEmpty) { subTSMI.Size = config.Size; } } } } } } else if (control.GetType() == typeof(System.Windows.Forms.GroupBox)) { // Define the base group_box and set his text System.Windows.Forms.GroupBox grpBx = (System.Windows.Forms.GroupBox)control; config = locale.Controls.Find(c => c.Name == grpBx.Name); if (config != null) { grpBx.Text = config.Text.Text; } // Define each child control inside of the group box // set their attributes accordingly for (int i = 0; i < grpBx.Controls.Count; i++) { System.Windows.Forms.Control ctrl = grpBx.Controls[i]; if (ctrl.GetType() == typeof(System.Windows.Forms.Button)) { System.Windows.Forms.Button btn = (System.Windows.Forms.Button)ctrl; config = locale.Controls.Find(c => c.Name == btn.Name); if (config != null) { btn.TextAlign = config.Text.Alignment; } } else if (ctrl.GetType() == typeof(System.Windows.Forms.RadioButton)) { System.Windows.Forms.RadioButton rBtn = (System.Windows.Forms.RadioButton)ctrl; config = locale.Controls.Find(c => c.Name == rBtn.Name); if (config != null) { rBtn.TextAlign = config.Text.Alignment; } } else if (ctrl.GetType() == typeof(System.Windows.Forms.Label)) { System.Windows.Forms.Label lbl = (System.Windows.Forms.Label)ctrl; config = locale.Controls.Find(c => c.Name == lbl.Name); if (config != null) { lbl.TextAlign = config.Text.Alignment; } } else if (ctrl.GetType() == typeof(System.Windows.Forms.CheckBox)) { System.Windows.Forms.CheckBox chkBx = (System.Windows.Forms.CheckBox)ctrl; config = locale.Controls.Find(c => c.Name == chkBx.Name); if (config != null) { chkBx.TextAlign = config.Text.Alignment; } } else if (ctrl.GetType() == typeof(System.Windows.Forms.TextBox)) /*Textbox shouldn't be touched*/ } { if (config != null) { ctrl.Font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); ctrl.RightToLeft = config.Text.RightToLeft; if (!config.Location.IsEmpty) { ctrl.Location = config.Location; } if (!config.Size.IsEmpty) { ctrl.Size = config.Size; } ctrl.Text = config.Text.Text; } config = null; } } else if (control.GetType() == typeof(System.Windows.Forms.ToolStrip)) { foreach (object tso in ((System.Windows.Forms.ToolStrip)control).Items) { if (tso.GetType() == typeof(System.Windows.Forms.ToolStripDropDownButton)) { System.Windows.Forms.ToolStripDropDownButton tsb = (System.Windows.Forms.ToolStripDropDownButton)tso; config = locale.Controls.Find(c => c.Name == tsb.Name); if (config != null) { tsb.Text = config.Text.Text; tsb.TextAlign = config.Text.Alignment; tsb.Font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); tsb.RightToLeft = config.Text.RightToLeft; } } else if (tso.GetType() == typeof(System.Windows.Forms.ToolStripButton)) { System.Windows.Forms.ToolStripButton tsb = (System.Windows.Forms.ToolStripButton)tso; config = locale.Controls.Find(c => c.Name == tsb.Name); if (config != null) { tsb.Text = config.Text.Text; tsb.TextAlign = config.Text.Alignment; tsb.Font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); tsb.RightToLeft = config.Text.RightToLeft; } } else if (tso.GetType() == typeof(System.Windows.Forms.ToolStripMenuItem)) { System.Windows.Forms.ToolStripMenuItem tsi = (System.Windows.Forms.ToolStripMenuItem)tso; config = locale.Controls.Find(c => c.Name == tsi.Name); if (config != null) { tsi.Text = config.Text.Text; tsi.TextAlign = config.Text.Alignment; tsi.Font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); tsi.RightToLeft = config.Text.RightToLeft; } } else if (tso.GetType() == typeof(System.Windows.Forms.ToolStripLabel)) { System.Windows.Forms.ToolStripLabel tsl = (System.Windows.Forms.ToolStripLabel)tso; config = locale.Controls.Find(c => c.Name == tsl.Name); if (config != null) { tsl.Text = config.Text.Text; tsl.TextAlign = config.Text.Alignment; tsl.Font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); tsl.RightToLeft = config.Text.RightToLeft; } } if (config != null) { if (!config.Location.IsEmpty) { control.Location = config.Location; } if (!config.Size.IsEmpty) { control.Size = config.Size; } control.Text = config.Text.Text; } config = null; } } else { config = locale.Controls.Find(c => c.Name == control.Name); if (config != null) { System.Drawing.Font font = new System.Drawing.Font(config.Font.Name, (float)config.Font.Size, config.Font.Style); control.Font = font; Type t = control.GetType(); if (t == typeof(System.Windows.Forms.CheckBox)) { System.Windows.Forms.CheckBox chkBx = (System.Windows.Forms.CheckBox)control; chkBx.TextAlign = config.Text.Alignment; } else if (t == typeof(System.Windows.Forms.Label)) { System.Windows.Forms.Label lbl = (System.Windows.Forms.Label)control; lbl.TextAlign = config.Text.Alignment; } else if (t == typeof(System.Windows.Forms.Button)) { System.Windows.Forms.Button lbl = (System.Windows.Forms.Button)control; lbl.TextAlign = config.Text.Alignment; } else if (t == typeof(System.Windows.Forms.ToolStripMenuItem)) { System.Windows.Forms.ToolStrip tsm = (System.Windows.Forms.ToolStrip)control; System.Windows.Forms.ToolStripItem tsi = tsm.Items[config.Name]; tsi.TextAlign = config.Text.Alignment; } else if (t == typeof(System.Windows.Forms.ToolStripDropDownButton)) { System.Windows.Forms.ToolStrip tsm = (System.Windows.Forms.ToolStrip)control; System.Windows.Forms.ToolStripItem tsi = tsm.Items[config.Name]; tsi.TextAlign = config.Text.Alignment; } else { /*Alignment doesn't exist bruh*/ } if (!config.Location.IsEmpty) { control.Location = config.Location; } if (!config.Size.IsEmpty) { control.Size = config.Size; } control.Text = config.Text.Text; } else { lManager.Enter(Sender.MANAGER, Level.DEBUG, "Control: {0} is not configured! It will default.", control.Name); } } } }
/// <summary> /// Initalize Gtk and DBus stuff /// </summary> private void GtkDBusInit() { /* setup ApplicationIndicator */ indicator = new ApplicationIndicator("keepass2-plugin-appindicator" + instanceCount++, "keepass2-locked", AppIndicator.Category.ApplicationStatus); #if DEBUG indicator.IconThemePath = Path.GetFullPath("Resources/icons"); #endif indicator.Title = PwDefs.ProductName; indicator.Status = AppIndicator.Status.Active; appIndicatorMenu = new Gtk.Menu(); var trayContextMenu = pluginHost.MainWindow.TrayContextMenu; // make copy of item list to prevent list changed exception when iterating var menuItems = new System.Windows.Forms.ToolStripItem[trayContextMenu.Items.Count]; trayContextMenu.Items.CopyTo(menuItems, 0); trayContextMenu.ItemAdded += (sender, e) => DBusBackgroundWorker.InvokeGtkThread (() => ConvertAndAddMenuItem(e.Item, appIndicatorMenu)); foreach (System.Windows.Forms.ToolStripItem item in menuItems) { ConvertAndAddMenuItem(item, appIndicatorMenu); } indicator.Menu = appIndicatorMenu; try { // This is a hack to get the about-to-show event from the dbusmenu // that is created by the appindicator. var getPropertyMethod = typeof(GLib.Object).GetMethod("GetProperty", BindingFlags.NonPublic | BindingFlags.Instance); var dbusMenuServer = (GLib.Value)getPropertyMethod.Invoke(indicator, new object[] { "dbus-menu-server" }); var rootNode = (GLib.Value)getPropertyMethod.Invoke(dbusMenuServer.Val, new object[] { "root-node" }); aboutToShowSignal = GLib.Signal.Lookup((GLib.Object)rootNode.Val, "about-to-show"); aboutToShowSignal.AddDelegate((EventHandler)OnAppIndicatorMenuShown); } catch (Exception ex) { Debug.Fail(ex.Message); // On desktops that don't support application indicators, libappinidicator // creates a fallback GtkStatusIcon. This event only fires in that case. appIndicatorMenu.Shown += OnAppIndicatorMenuShown; } // when mouse cursor is over application indicator, scroll up will untray // and scroll down will tray KeePass indicator.ScrollEvent += (o, args) => { /* Workaround for bug in mono/appindicator-sharp. * * args.Direction throws InvalidCastException * Can't cast args.Arg[1] to Gdk.ScrollDirection for some reason, so we * have to cast to uint first (that is the underlying data type) and * then cast to Gdk.ScrollDirection */ var scrollDirectionUint = (uint)args.Args[1]; var scrollDirection = (Gdk.ScrollDirection)scrollDirectionUint; var trayMenuItem = trayContextMenu.Items["m_ctxTrayTray"]; if (trayMenuItem.Enabled && (scrollDirection == Gdk.ScrollDirection.Up ^ pluginHost.MainWindow.Visible)) { DBusBackgroundWorker.InvokeWinformsThread (() => trayMenuItem.PerformClick()); } }; }
public static System.Windows.Forms.ToolStripItem[] GetCategoryImageList(int currentColour) { System.Windows.Forms.ToolStripItem[] CategoryColours = new System.Windows.Forms.ToolStripItem[12]; for (int i = 2; i < 14; i++) { System.Windows.Forms.ToolStripMenuItem item = new System.Windows.Forms.ToolStripMenuItem(); item.BackgroundImage = GetCategoryImage(i); item.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; item.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; item.Text = string.Empty; item.Tag = i; if (i == currentColour) { item.Checked = true; } CategoryColours[i - 2] = item; } return (CategoryColours); }
public virtual System.Windows.Forms.ToolStripItem GetNextItem(System.Windows.Forms.ToolStripItem start, System.Windows.Forms.ArrowDirection direction) { }
internal static void Invoke(System.Windows.Forms.ToolStripItem Control, InvokeDelegate Delegate) { Delegate(); }