/// <summary> /// Recursive method called from <see cref="_bookmarksButton_Click"/> to create the menu items for the bookmarks folder structure. /// </summary> /// <param name="currentFolder">Folder that we're currently processing.</param> /// <param name="menuItems">Menu item that we're supposed to add the immediate children of <paramref name="currentFolder"/> to.</param> /// <param name="root">Flag indicating whether or not this is the root.</param> /// <returns>The newly-created menu item for <paramref name="currentFolder"/>.</returns> private ToolStripItem PopulateBookmarks(BookmarksFolder currentFolder, ToolStripItemCollection menuItems, bool root) { ToolStripItemCollection addLocation = menuItems; ToolStripMenuItem folderMenuItem = null; if (!root) { folderMenuItem = new ToolStripMenuItem(currentFolder.Name, Resources.Folder) { DropDownDirection = ToolStripDropDownDirection.Left }; addLocation = folderMenuItem.DropDownItems; } // Get and populate the list of child folders recursively List <ToolStripItem> addItems = currentFolder.ChildFolders.OrderBy(f => f.Name).Select(childFolder => PopulateBookmarks(childFolder, addLocation, false)).ToList(); // Add each child bookmark after the child folders foreach (IConnection bookmark in currentFolder.Bookmarks.OrderBy(b => b.DisplayName)) { ToolStripMenuItem bookmarkMenuItem = new ToolStripMenuItem( bookmark.DisplayName, new Icon(ConnectionFactory.GetProtocol(bookmark).ProtocolIcon, 16, 16).ToBitmap(), bookmarkMenuItem_Click); _menuItemConnections[bookmarkMenuItem] = bookmark; addItems.Add(bookmarkMenuItem); } addLocation.AddRange(addItems.ToArray()); return(folderMenuItem); }
private void SetUpItemCollection(Dictionary <string, List <IActionHandler> > register, string key, ToolStripItemCollection collection, ToolbarType type) { List <IActionHandler> actions; if (register.TryGetValue(key, out actions)) { List <ToolStripItem> dropDownItems = new List <ToolStripItem>(actions.Count); foreach (IActionHandler ah in actions) { // TODO ND: Changed ToolStripItem item = CreateItem(ah, type); dropDownItems.Add(item); // TODO ND: Changed if (item is ToolStripDropDownItem) { SetUpItemCollection(register, ah.Id, ((ToolStripDropDownItem)item).DropDownItems, type); } } //sort by OrderIndex and add to the collection dropDownItems.Sort(CompareToolStripItemsBySortOrder); collection.AddRange(dropDownItems.ToArray()); register.Remove(key); } else { register.Remove(key); } }
/// <summary> /// Add the array of menu items to the system tray /// </summary> /// <param name="cms">The menu</param> /// <param name="parent">The root of the systray menu</param> public override void getSessionMenuItems(ContextMenuStrip cms, ToolStripItemCollection parent) { // Suspend the layout before modification cms.SuspendLayout(); parent.Clear(); // Setup the System tray array of menu items ToolStripMenuItem[] tsmiArray = new ToolStripMenuItem[getSessionController().getSessionList().Count]; int i = 0; foreach (Session s in getSessionController().getSessionList()) { tsmiArray[i] = new ToolStripMenuItem(s.SessionDisplayText, null, listBox1_DoubleClick); // Make sure the menu item is tagged with the session tsmiArray[i].Tag = s; i++; } if (tsmiArray != null) { parent.AddRange(tsmiArray); } // Now resume the layout cms.ResumeLayout(); }
private void AssignPayPalMenuItems(ToolStripItemCollection dropDownItems) { dropDownItems.AddRange(new ToolStripItem[] { tsmiDonateUsdXrmToolBox, tsmiDonateEurXrmToolBox, tsmiDonateGbpXrmToolBox }); }
private void AssignPayPalMenuItems(ToolStripItemCollection dropDownItems) { dropDownItems.AddRange(new ToolStripItem[] { donateInUSDollarsToolStripMenuItem, donateInEuroToolStripMenuItem, donateInGBPToolStripMenuItem }); }
public static void SortContextMenuStrip(ToolStripItemCollection itemCollection) { List <ToolStripItem> itemList = new List <ToolStripItem>(); foreach (ToolStripItem item in itemCollection) { itemList.Add(item); } itemList = itemList.OrderBy(x => x.Text).ToList(); itemCollection.Clear(); itemCollection.AddRange(itemList.ToArray()); }
private static void Clear() { int n = g_lTopLevelItems.Count; if (n == 0) { return; } BlockLayout(true); ToolStripItemCollection tsic = g_tsiHost.DropDownItems; // The following is very slow // int iKnown = n - 1; // for(int iMenu = tsic.Count - 1; iMenu >= 0; --iMenu) // { // if(tsic[iMenu] == g_lTopLevelItems[iKnown]) // { // tsic.RemoveAt(iMenu); // if(--iKnown < 0) break; // } // } // Debug.Assert(iKnown == -1); List <ToolStripItem> lOthers = new List <ToolStripItem>(); int iKnown = 0; for (int iMenu = 0; iMenu < tsic.Count; ++iMenu) { ToolStripItem tsi = tsic[iMenu]; if ((iKnown < n) && (tsi == g_lTopLevelItems[iKnown])) { ++iKnown; } else { lOthers.Add(tsi); } } Debug.Assert((iKnown == n) && ((lOthers.Count + n) == tsic.Count)); tsic.Clear(); tsic.AddRange(lOthers.ToArray()); // Restore others g_lTopLevelItems.Clear(); BlockLayout(false); }
public static void AddRangeAbove(this ToolStripItemCollection @self, ToolStripItem[] toolStripItems) { ContextMenuStrip baseMenu = new ContextMenuStrip(); while (@self.Count > 0) { baseMenu.Items.Add(@self[0]); } @self.Clear(); @self.AddRange(toolStripItems); while (baseMenu.Items.Count > 0) { @self.Add(baseMenu.Items[0]); } }
public UITrayIcon(Form aForm, AboutBox aAboutBox, NotifyIcon aNotifyIcon, ContextMenuStrip aContextMenuStrip) { this.myForm = aForm; this.myAboutBox = aAboutBox; this.myNotifyIcon = aNotifyIcon; this.myContextMenuStrip = aContextMenuStrip; this.myForm.Resize += new EventHandler(this.Form_Resize); ToolStripMenuItem toolStripMenuItem = new ToolStripMenuItem(); ToolStripMenuItem size = new ToolStripMenuItem(); ToolStripMenuItem toolStripMenuItem1 = new ToolStripMenuItem(); ToolStripMenuItem size1 = new ToolStripMenuItem(); ToolStripSeparator toolStripSeparator = new ToolStripSeparator(); ToolStripSeparator toolStripSeparator1 = new ToolStripSeparator(); this.myNotifyIcon.ContextMenuStrip = this.myContextMenuStrip; this.myNotifyIcon.Visible = true; this.myNotifyIcon.MouseDoubleClick += new MouseEventHandler(this.notifyIcon_tray_MouseDoubleClick); ToolStripItemCollection items = this.myContextMenuStrip.Items; ToolStripItem[] toolStripItemArray = new ToolStripItem[] { size, toolStripSeparator, toolStripMenuItem1, size1, toolStripSeparator1, toolStripMenuItem }; items.AddRange(toolStripItemArray); this.myContextMenuStrip.Name = "contextMenuStrip_tray"; this.myContextMenuStrip.Size = new Size(104, 104); size.Name = "toolStripMenuItem_Show"; size.Size = new Size(103, 22); size.Text = "Open THUNDER"; size.Click += new EventHandler(this.toolStripMenuItem_Show_Click); toolStripSeparator.Name = "toolStripSeparator2"; toolStripSeparator.Size = new Size(100, 6); toolStripMenuItem1.Name = "toolStripMenuItem_Help"; toolStripMenuItem1.Size = new Size(103, 22); toolStripMenuItem1.Text = "Help"; toolStripMenuItem1.Click += new EventHandler(this.toolStripMenuItem_Help_Click); size1.Name = "toolStripMenuItem_About"; size1.Size = new Size(103, 22); size1.Text = "About"; size1.Click += new EventHandler(this.toolStripMenuItem_About_Click); toolStripSeparator1.Name = "toolStripSeparator1"; toolStripSeparator1.Size = new Size(100, 6); toolStripMenuItem.Name = "toolStripMenuItem_Close"; toolStripMenuItem.Size = new Size(103, 22); toolStripMenuItem.Text = "Exit"; toolStripMenuItem.Click += new EventHandler(this.toolStripMenuItem_Close_Click); }
public void SortItems(ToolStripItemCollection items) { if (items == null) { throw new ArgumentNullException("items"); } ArrayList list = new ArrayList(); foreach (object o in items) { list.Add(o); } list.Sort(new ToolStripCustomIComparer()); items.Clear(); items.AddRange((ToolStripItem[])list.ToArray(typeof(ToolStripItem))); }
static void AddItemsToMenu(ToolStripItemCollection collection, IEnumerable <MenuItemDescriptor> descriptors) { foreach (MenuItemDescriptor descriptor in descriptors) { object item = CreateMenuItemFromDescriptor(descriptor); if (item is ToolStripItem) { collection.Add((ToolStripItem)item); if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateStatus(); } } else { IMenuItemBuilder submenuBuilder = (IMenuItemBuilder)item; collection.AddRange(submenuBuilder.BuildItems(descriptor.Codon, descriptor.Parameter).Cast <ToolStripItem>().ToArray()); } } }
static void AddItemsToMenu(ToolStripItemCollection collection, List <MenuItemDescriptor> descriptors) { foreach (MenuItemDescriptor descriptor in descriptors) { object item = CreateMenuItemFromDescriptor(descriptor); if (item is ToolStripItem) { collection.Add((ToolStripItem)item); if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateStatus(); } } else { ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item; collection.AddRange(submenuBuilder.BuildSubmenu(null, descriptor.Caller)); } } }
public static int CreateEncodingsMenuItems(ToolStripItemCollection root, Func <string> getText, Action <string> setText, List <EncodingItemData> encodingsList) { GetText = getText; SetText = setText; //m_RichTextBoxSrc = richSrc; //m_RichTextBoxDst = richDst; ArrayList vEncodingMenus = new ArrayList(); for (int i = 0; i < encodingsList.Count; i++) { EncodingItemData itm = encodingsList[i]; if (!itm.ShowInMenu) { continue; } ToolStripItem x = new ToolStripMenuItem(itm.EncodingName); x.Tag = itm; x.Click += MenuItem_Encoding_Click; vEncodingMenus.Add(x); } //end for //leave first 2 items while (root.Count > 2) { root.RemoveAt(root.Count - 1); } if (vEncodingMenus.Count == 0) { return(0); } root.AddRange((ToolStripItem[])vEncodingMenus.ToArray(typeof(ToolStripItem))); return(root.Count); } //end CreateEncodingsMenuItems
public static void AddItemsToMenu(ToolStripItemCollection collection, object owner, string addInTreePath) { ArrayList buildItems = AddInTree.GetTreeNode(addInTreePath).BuildChildItems(owner); foreach (object item in buildItems) { if (item is ToolStripItem) { collection.Add((ToolStripItem)item); if (item is IStatusUpdate) { ((IStatusUpdate)item).UpdateStatus(); } } else { ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item; collection.AddRange(submenuBuilder.BuildSubmenu(null, owner)); } } }
/// <summary> /// Sorts the ToolStripItemCollection using the specified comparer. /// </summary> /// <param name="collection">The collection of ToolStripItems.</param> /// <param name="comparer">The comparer to use for sorting the ToolStripItems.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="collection"/> is null. /// or /// <paramref name="comparer"/> is null. /// </exception> public static void Sort(this ToolStripItemCollection collection, IComparer <ToolStripItem> comparer) { if (collection == null) { throw new ArgumentNullException(nameof(collection)); } if (comparer == null) { throw new ArgumentNullException(nameof(comparer)); } // If a ToolStripItemCollection only contains one item it does not need to be sorted. if (collection.Count > 1) { ToolStripItem[] items = new ToolStripItem[collection.Count]; collection.CopyTo(items, 0); Array.Sort(items, comparer); collection.Clear(); collection.AddRange(items); } }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(TreasureListForm)); this.CancelBtn = new Button(); this.Splitter = new SplitContainer(); this.PlotTree = new TreeView(); this.InfoLbl = new Label(); this.ItemList = new ListView(); this.ItemHdr = new ColumnHeader(); this.PagesLbl = new Label(); this.Toolbar = new ToolStrip(); this.SelectAll = new ToolStripButton(); this.SelectNone = new ToolStripButton(); this.ExportBtn = new Button(); this.Splitter.Panel1.SuspendLayout(); this.Splitter.Panel2.SuspendLayout(); this.Splitter.SuspendLayout(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.CancelBtn.Location = new Point(422, 396); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 2; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.Splitter.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Splitter.Location = new Point(12, 12); this.Splitter.Name = "Splitter"; this.Splitter.Panel1.Controls.Add(this.PlotTree); this.Splitter.Panel1.Controls.Add(this.InfoLbl); this.Splitter.Panel2.Controls.Add(this.ItemList); this.Splitter.Panel2.Controls.Add(this.PagesLbl); this.Splitter.Panel2.Controls.Add(this.Toolbar); this.Splitter.Size = new System.Drawing.Size(485, 378); this.Splitter.SplitterDistance = 231; this.Splitter.TabIndex = 0; this.PlotTree.Dock = DockStyle.Fill; this.PlotTree.HideSelection = false; this.PlotTree.Location = new Point(0, 38); this.PlotTree.Name = "PlotTree"; this.PlotTree.Size = new System.Drawing.Size(231, 340); this.PlotTree.TabIndex = 0; this.PlotTree.AfterSelect += new TreeViewEventHandler(this.PlotTree_AfterSelect); this.InfoLbl.Dock = DockStyle.Top; this.InfoLbl.Location = new Point(0, 0); this.InfoLbl.Name = "InfoLbl"; this.InfoLbl.Size = new System.Drawing.Size(231, 38); this.InfoLbl.TabIndex = 1; this.InfoLbl.Text = "Select a plot point here to see treasure parcels from that subplot"; this.InfoLbl.TextAlign = ContentAlignment.MiddleLeft; this.ItemList.CheckBoxes = true; this.ItemList.Columns.AddRange(new ColumnHeader[] { this.ItemHdr }); this.ItemList.Dock = DockStyle.Fill; this.ItemList.FullRowSelect = true; this.ItemList.Location = new Point(0, 25); this.ItemList.Name = "ItemList"; this.ItemList.Size = new System.Drawing.Size(250, 337); this.ItemList.TabIndex = 0; this.ItemList.UseCompatibleStateImageBehavior = false; this.ItemList.View = View.Details; this.ItemList.DoubleClick += new EventHandler(this.ItemList_DoubleClick); this.ItemHdr.Text = "Parcels"; this.ItemHdr.Width = 220; this.PagesLbl.Dock = DockStyle.Bottom; this.PagesLbl.Location = new Point(0, 362); this.PagesLbl.Name = "PagesLbl"; this.PagesLbl.Size = new System.Drawing.Size(250, 16); this.PagesLbl.TabIndex = 2; this.PagesLbl.Text = "Note that this will require multiple pages"; this.PagesLbl.TextAlign = ContentAlignment.MiddleLeft; ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] selectAll = new ToolStripItem[] { this.SelectAll, this.SelectNone }; items.AddRange(selectAll); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(250, 25); this.Toolbar.TabIndex = 1; this.Toolbar.Text = "toolStrip1"; this.SelectAll.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SelectAll.Image = (Image)componentResourceManager.GetObject("SelectAll.Image"); this.SelectAll.ImageTransparentColor = Color.Magenta; this.SelectAll.Name = "SelectAll"; this.SelectAll.Size = new System.Drawing.Size(59, 22); this.SelectAll.Text = "Select All"; this.SelectAll.Click += new EventHandler(this.SelectAll_Click); this.SelectNone.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SelectNone.Image = (Image)componentResourceManager.GetObject("SelectNone.Image"); this.SelectNone.ImageTransparentColor = Color.Magenta; this.SelectNone.Name = "SelectNone"; this.SelectNone.Size = new System.Drawing.Size(74, 22); this.SelectNone.Text = "Select None"; this.SelectNone.Click += new EventHandler(this.SelectNone_Click); this.ExportBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.ExportBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.ExportBtn.Location = new Point(341, 396); this.ExportBtn.Name = "ExportBtn"; this.ExportBtn.Size = new System.Drawing.Size(75, 23); this.ExportBtn.TabIndex = 1; this.ExportBtn.Text = "Export"; this.ExportBtn.UseVisualStyleBackColor = true; this.ExportBtn.Click += new EventHandler(this.ExportBtn_Click); base.AcceptButton = this.ExportBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(509, 431); base.Controls.Add(this.ExportBtn); base.Controls.Add(this.Splitter); base.Controls.Add(this.CancelBtn); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "TreasureListForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Treasure List"; this.Splitter.Panel1.ResumeLayout(false); this.Splitter.Panel2.ResumeLayout(false); this.Splitter.Panel2.PerformLayout(); this.Splitter.ResumeLayout(false); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); }
private void AssignCodePlexMenuItems(ToolStripItemCollection dropDownItems) { dropDownItems.AddRange(new ToolStripItem[] { startADiscussionToolStripMenuItem }); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { ListViewGroup listViewGroup = new ListViewGroup("Info", HorizontalAlignment.Left); ListViewGroup listViewGroup1 = new ListViewGroup("Skills", HorizontalAlignment.Left); ListViewGroup listViewGroup2 = new ListViewGroup("Countermeasures", HorizontalAlignment.Left); this.Toolbar = new ToolStrip(); this.toolStripSeparator1 = new ToolStripSeparator(); this.toolStripSeparator2 = new ToolStripSeparator(); this.TrapList = new ListView(); this.InfoHdr = new ColumnHeader(); this.EditBtn = new ToolStripButton(); this.LocationBtn = new ToolStripButton(); this.ChooseBtn = new ToolStripButton(); this.AddLibraryBtn = new ToolStripButton(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] editBtn = new ToolStripItem[] { this.EditBtn, this.LocationBtn, this.toolStripSeparator1, this.ChooseBtn, this.toolStripSeparator2, this.AddLibraryBtn }; items.AddRange(editBtn); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(561, 25); this.Toolbar.TabIndex = 0; this.Toolbar.Text = "toolStrip1"; this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.TrapList.Columns.AddRange(new ColumnHeader[] { this.InfoHdr }); this.TrapList.Dock = DockStyle.Fill; this.TrapList.FullRowSelect = true; listViewGroup.Header = "Info"; listViewGroup.Name = "listViewGroup3"; listViewGroup1.Header = "Skills"; listViewGroup1.Name = "listViewGroup1"; listViewGroup2.Header = "Countermeasures"; listViewGroup2.Name = "listViewGroup2"; this.TrapList.Groups.AddRange(new ListViewGroup[] { listViewGroup, listViewGroup1, listViewGroup2 }); this.TrapList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.TrapList.HideSelection = false; this.TrapList.Location = new Point(0, 25); this.TrapList.MultiSelect = false; this.TrapList.Name = "TrapList"; this.TrapList.Size = new System.Drawing.Size(561, 145); this.TrapList.TabIndex = 1; this.TrapList.UseCompatibleStateImageBehavior = false; this.TrapList.View = View.Details; this.TrapList.DoubleClick += new EventHandler(this.TrapList_DoubleClick); this.InfoHdr.Text = "Info"; this.InfoHdr.Width = 448; this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(106, 22); this.EditBtn.Text = "Edit Trap / Hazard"; this.EditBtn.Click += new EventHandler(this.EditBtn_Click); this.LocationBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.LocationBtn.ImageTransparentColor = Color.Magenta; this.LocationBtn.Name = "LocationBtn"; this.LocationBtn.Size = new System.Drawing.Size(103, 22); this.LocationBtn.Text = "Set Map Location"; this.LocationBtn.Click += new EventHandler(this.LocationBtn_Click); this.ChooseBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.ChooseBtn.ImageTransparentColor = Color.Magenta; this.ChooseBtn.Name = "ChooseBtn"; this.ChooseBtn.Size = new System.Drawing.Size(155, 22); this.ChooseBtn.Text = "Use Standard Trap / Hazard"; this.ChooseBtn.Click += new EventHandler(this.ChooseBtn_Click); this.AddLibraryBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.AddLibraryBtn.ImageTransparentColor = Color.Magenta; this.AddLibraryBtn.Name = "AddLibraryBtn"; this.AddLibraryBtn.Size = new System.Drawing.Size(86, 22); this.AddLibraryBtn.Text = "Add to Library"; this.AddLibraryBtn.Click += new EventHandler(this.AddLibraryBtn_Click); base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.TrapList); base.Controls.Add(this.Toolbar); base.Name = "TrapElementPanel"; base.Size = new System.Drawing.Size(561, 170); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(OptionPowerForm)); this.NameLbl = new Label(); this.NameBox = new TextBox(); this.Pages = new TabControl(); this.HeaderPage = new TabPage(); this.RangeBox = new ComboBox(); this.RangeLbl = new Label(); this.ActionBox = new ComboBox(); this.TypeLbl = new Label(); this.TypeBox = new ComboBox(); this.ActionLbl = new Label(); this.KeywordBox = new TextBox(); this.KeywordLbl = new Label(); this.ReadAloudPage = new TabPage(); this.ReadAloudBox = new TextBox(); this.SectionPage = new TabPage(); this.SectionList = new ListView(); this.SectionHdr = new ColumnHeader(); this.SectionToolbar = new ToolStrip(); this.SectionAddBtn = new ToolStripButton(); this.SectionRemoveBtn = new ToolStripButton(); this.SectionEditBtn = new ToolStripButton(); this.toolStripSeparator1 = new ToolStripSeparator(); this.SectionUpBtn = new ToolStripButton(); this.SectionDownBtn = new ToolStripButton(); this.toolStripSeparator2 = new ToolStripSeparator(); this.SectionLeftBtn = new ToolStripButton(); this.SectionRightBtn = new ToolStripButton(); this.OKBtn = new Button(); this.CancelBtn = new Button(); this.Pages.SuspendLayout(); this.HeaderPage.SuspendLayout(); this.ReadAloudPage.SuspendLayout(); this.SectionPage.SuspendLayout(); this.SectionToolbar.SuspendLayout(); base.SuspendLayout(); this.NameLbl.AutoSize = true; this.NameLbl.Location = new Point(6, 9); this.NameLbl.Name = "NameLbl"; this.NameLbl.Size = new System.Drawing.Size(38, 13); this.NameLbl.TabIndex = 0; this.NameLbl.Text = "Name:"; this.NameBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.NameBox.Location = new Point(68, 6); this.NameBox.Name = "NameBox"; this.NameBox.Size = new System.Drawing.Size(259, 20); this.NameBox.TabIndex = 1; this.Pages.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Pages.Controls.Add(this.HeaderPage); this.Pages.Controls.Add(this.ReadAloudPage); this.Pages.Controls.Add(this.SectionPage); this.Pages.Location = new Point(12, 12); this.Pages.Name = "Pages"; this.Pages.SelectedIndex = 0; this.Pages.Size = new System.Drawing.Size(341, 216); this.Pages.TabIndex = 10; this.HeaderPage.Controls.Add(this.RangeBox); this.HeaderPage.Controls.Add(this.NameBox); this.HeaderPage.Controls.Add(this.RangeLbl); this.HeaderPage.Controls.Add(this.NameLbl); this.HeaderPage.Controls.Add(this.ActionBox); this.HeaderPage.Controls.Add(this.TypeLbl); this.HeaderPage.Controls.Add(this.TypeBox); this.HeaderPage.Controls.Add(this.ActionLbl); this.HeaderPage.Controls.Add(this.KeywordBox); this.HeaderPage.Controls.Add(this.KeywordLbl); this.HeaderPage.Location = new Point(4, 22); this.HeaderPage.Name = "HeaderPage"; this.HeaderPage.Padding = new System.Windows.Forms.Padding(3); this.HeaderPage.Size = new System.Drawing.Size(333, 190); this.HeaderPage.TabIndex = 2; this.HeaderPage.Text = "Information"; this.HeaderPage.UseVisualStyleBackColor = true; this.RangeBox.FormattingEnabled = true; this.RangeBox.Location = new Point(68, 113); this.RangeBox.Name = "RangeBox"; this.RangeBox.Size = new System.Drawing.Size(259, 21); this.RangeBox.Sorted = true; this.RangeBox.TabIndex = 9; this.RangeLbl.AutoSize = true; this.RangeLbl.Location = new Point(6, 116); this.RangeLbl.Name = "RangeLbl"; this.RangeLbl.Size = new System.Drawing.Size(42, 13); this.RangeLbl.TabIndex = 8; this.RangeLbl.Text = "Range:"; this.ActionBox.DropDownStyle = ComboBoxStyle.DropDownList; this.ActionBox.FormattingEnabled = true; this.ActionBox.Location = new Point(68, 86); this.ActionBox.Name = "ActionBox"; this.ActionBox.Size = new System.Drawing.Size(259, 21); this.ActionBox.TabIndex = 7; this.TypeLbl.AutoSize = true; this.TypeLbl.Location = new Point(6, 35); this.TypeLbl.Name = "TypeLbl"; this.TypeLbl.Size = new System.Drawing.Size(34, 13); this.TypeLbl.TabIndex = 2; this.TypeLbl.Text = "Type:"; this.TypeBox.DropDownStyle = ComboBoxStyle.DropDownList; this.TypeBox.FormattingEnabled = true; this.TypeBox.Location = new Point(68, 32); this.TypeBox.Name = "TypeBox"; this.TypeBox.Size = new System.Drawing.Size(259, 21); this.TypeBox.TabIndex = 3; this.ActionLbl.AutoSize = true; this.ActionLbl.Location = new Point(6, 89); this.ActionLbl.Name = "ActionLbl"; this.ActionLbl.Size = new System.Drawing.Size(40, 13); this.ActionLbl.TabIndex = 6; this.ActionLbl.Text = "Action:"; this.KeywordBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.KeywordBox.Location = new Point(68, 59); this.KeywordBox.Name = "KeywordBox"; this.KeywordBox.Size = new System.Drawing.Size(259, 20); this.KeywordBox.TabIndex = 5; this.KeywordLbl.AutoSize = true; this.KeywordLbl.Location = new Point(6, 62); this.KeywordLbl.Name = "KeywordLbl"; this.KeywordLbl.Size = new System.Drawing.Size(56, 13); this.KeywordLbl.TabIndex = 4; this.KeywordLbl.Text = "Keywords:"; this.ReadAloudPage.Controls.Add(this.ReadAloudBox); this.ReadAloudPage.Location = new Point(4, 22); this.ReadAloudPage.Name = "ReadAloudPage"; this.ReadAloudPage.Padding = new System.Windows.Forms.Padding(3); this.ReadAloudPage.Size = new System.Drawing.Size(333, 190); this.ReadAloudPage.TabIndex = 0; this.ReadAloudPage.Text = "Read-Aloud Text"; this.ReadAloudPage.UseVisualStyleBackColor = true; this.ReadAloudBox.AcceptsReturn = true; this.ReadAloudBox.AcceptsTab = true; this.ReadAloudBox.Dock = DockStyle.Fill; this.ReadAloudBox.Location = new Point(3, 3); this.ReadAloudBox.Multiline = true; this.ReadAloudBox.Name = "ReadAloudBox"; this.ReadAloudBox.ScrollBars = ScrollBars.Vertical; this.ReadAloudBox.Size = new System.Drawing.Size(327, 184); this.ReadAloudBox.TabIndex = 0; this.SectionPage.Controls.Add(this.SectionList); this.SectionPage.Controls.Add(this.SectionToolbar); this.SectionPage.Location = new Point(4, 22); this.SectionPage.Name = "SectionPage"; this.SectionPage.Padding = new System.Windows.Forms.Padding(3); this.SectionPage.Size = new System.Drawing.Size(333, 190); this.SectionPage.TabIndex = 1; this.SectionPage.Text = "Sections"; this.SectionPage.UseVisualStyleBackColor = true; this.SectionList.Columns.AddRange(new ColumnHeader[] { this.SectionHdr }); this.SectionList.Dock = DockStyle.Fill; this.SectionList.FullRowSelect = true; this.SectionList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.SectionList.HideSelection = false; this.SectionList.Location = new Point(3, 28); this.SectionList.MultiSelect = false; this.SectionList.Name = "SectionList"; this.SectionList.Size = new System.Drawing.Size(327, 159); this.SectionList.TabIndex = 1; this.SectionList.UseCompatibleStateImageBehavior = false; this.SectionList.View = View.Details; this.SectionHdr.Text = "Section"; this.SectionHdr.Width = 300; ToolStripItemCollection items = this.SectionToolbar.Items; ToolStripItem[] sectionAddBtn = new ToolStripItem[] { this.SectionAddBtn, this.SectionRemoveBtn, this.SectionEditBtn, this.toolStripSeparator1, this.SectionUpBtn, this.SectionDownBtn, this.toolStripSeparator2, this.SectionLeftBtn, this.SectionRightBtn }; items.AddRange(sectionAddBtn); this.SectionToolbar.Location = new Point(3, 3); this.SectionToolbar.Name = "SectionToolbar"; this.SectionToolbar.Size = new System.Drawing.Size(327, 25); this.SectionToolbar.TabIndex = 0; this.SectionToolbar.Text = "toolStrip1"; this.SectionAddBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionAddBtn.Image = (Image)componentResourceManager.GetObject("SectionAddBtn.Image"); this.SectionAddBtn.ImageTransparentColor = Color.Magenta; this.SectionAddBtn.Name = "SectionAddBtn"; this.SectionAddBtn.Size = new System.Drawing.Size(33, 22); this.SectionAddBtn.Text = "Add"; this.SectionAddBtn.Click += new EventHandler(this.SectionAddBtn_Click); this.SectionRemoveBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionRemoveBtn.Image = (Image)componentResourceManager.GetObject("SectionRemoveBtn.Image"); this.SectionRemoveBtn.ImageTransparentColor = Color.Magenta; this.SectionRemoveBtn.Name = "SectionRemoveBtn"; this.SectionRemoveBtn.Size = new System.Drawing.Size(54, 22); this.SectionRemoveBtn.Text = "Remove"; this.SectionRemoveBtn.Click += new EventHandler(this.SectionRemoveBtn_Click); this.SectionEditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionEditBtn.Image = (Image)componentResourceManager.GetObject("SectionEditBtn.Image"); this.SectionEditBtn.ImageTransparentColor = Color.Magenta; this.SectionEditBtn.Name = "SectionEditBtn"; this.SectionEditBtn.Size = new System.Drawing.Size(31, 22); this.SectionEditBtn.Text = "Edit"; this.SectionEditBtn.Click += new EventHandler(this.SectionEditBtn_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); this.SectionUpBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionUpBtn.Image = (Image)componentResourceManager.GetObject("SectionUpBtn.Image"); this.SectionUpBtn.ImageTransparentColor = Color.Magenta; this.SectionUpBtn.Name = "SectionUpBtn"; this.SectionUpBtn.Size = new System.Drawing.Size(26, 22); this.SectionUpBtn.Text = "Up"; this.SectionUpBtn.Click += new EventHandler(this.SectionUpBtn_Click); this.SectionDownBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionDownBtn.Image = (Image)componentResourceManager.GetObject("SectionDownBtn.Image"); this.SectionDownBtn.ImageTransparentColor = Color.Magenta; this.SectionDownBtn.Name = "SectionDownBtn"; this.SectionDownBtn.Size = new System.Drawing.Size(42, 22); this.SectionDownBtn.Text = "Down"; this.SectionDownBtn.Click += new EventHandler(this.SectionDownBtn_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.SectionLeftBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionLeftBtn.Image = (Image)componentResourceManager.GetObject("SectionLeftBtn.Image"); this.SectionLeftBtn.ImageTransparentColor = Color.Magenta; this.SectionLeftBtn.Name = "SectionLeftBtn"; this.SectionLeftBtn.Size = new System.Drawing.Size(31, 22); this.SectionLeftBtn.Text = "Left"; this.SectionLeftBtn.Click += new EventHandler(this.SectionLeftBtn_Click); this.SectionRightBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SectionRightBtn.Image = (Image)componentResourceManager.GetObject("SectionRightBtn.Image"); this.SectionRightBtn.ImageTransparentColor = Color.Magenta; this.SectionRightBtn.Name = "SectionRightBtn"; this.SectionRightBtn.Size = new System.Drawing.Size(39, 22); this.SectionRightBtn.Text = "Right"; this.SectionRightBtn.Click += new EventHandler(this.SectionRightBtn_Click); this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(197, 234); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 11; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(278, 234); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 12; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(365, 269); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.Controls.Add(this.Pages); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "OptionPowerForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Power"; this.Pages.ResumeLayout(false); this.HeaderPage.ResumeLayout(false); this.HeaderPage.PerformLayout(); this.ReadAloudPage.ResumeLayout(false); this.ReadAloudPage.PerformLayout(); this.SectionPage.ResumeLayout(false); this.SectionPage.PerformLayout(); this.SectionToolbar.ResumeLayout(false); this.SectionToolbar.PerformLayout(); base.ResumeLayout(false); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.popMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.关闭ToolStripMenuItem = new ToolStripMenuItem(); this.制CToolStripMenuItem = new ToolStripMenuItem(); this.制全部AToolStripMenuItem = new ToolStripMenuItem(); this.属性ToolStripMenuItem = new ToolStripMenuItem(); this.除ToolStripMenuItem = new ToolStripMenuItem(); this.toolStripMenuItem1 = new ToolStripMenuItem(); this.muCopy = new System.Windows.Forms.ContextMenuStrip(this.components); this.清空CToolStripMenuItem = new ToolStripMenuItem(); this.toolStripMenuItem2 = new ToolStripMenuItem(); this.粘贴VToolStripMenuItem = new ToolStripMenuItem(); this.ttInfo = new ToolTip(this.components); this.popMenu.SuspendLayout(); this.muCopy.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.popMenu.Items; ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.除ToolStripMenuItem }; items.AddRange(toolStripItemArray); this.popMenu.Name = "popMenu"; this.popMenu.Size = new System.Drawing.Size(141, 136); this.关闭ToolStripMenuItem.Name = "关闭ToolStripMenuItem"; this.关闭ToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.关闭ToolStripMenuItem.Click += new EventHandler(this.关闭ToolStripMenuItem_Click); this.制CToolStripMenuItem.Name = "复制CToolStripMenuItem"; this.制CToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.制CToolStripMenuItem.Text = "Copy"; this.制CToolStripMenuItem.Click += new EventHandler(this.制CToolStripMenuItem_Click); this.制全部AToolStripMenuItem.Name = "复制全部AToolStripMenuItem"; this.制全部AToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.制全部AToolStripMenuItem.Text = "Copy All"; this.制全部AToolStripMenuItem.Click += new EventHandler(this.制全部AToolStripMenuItem_Click); this.属性ToolStripMenuItem.Name = "属性ToolStripMenuItem"; this.属性ToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.属性ToolStripMenuItem.Text = "Modify"; this.属性ToolStripMenuItem.Click += new EventHandler(this.属性ToolStripMenuItem_Click); this.除ToolStripMenuItem.Name = "删除ToolStripMenuItem"; this.除ToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.除ToolStripMenuItem.Text = "Delete Item"; this.除ToolStripMenuItem.Click += new EventHandler(this.除ToolStripMenuItem_Click); this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(140, 22); this.toolStripMenuItem1.Text = "Clear"; this.toolStripMenuItem1.Click += new EventHandler(this.清空CToolStripMenuItem_Click); this.muCopy.Name = "muCopy"; this.muCopy.Size = new System.Drawing.Size(141, 70); this.muCopy.Opening += new CancelEventHandler(this.muCopy_Opening); this.清空CToolStripMenuItem.Name = "清空CToolStripMenuItem"; this.清空CToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.清空CToolStripMenuItem.Text = "Clear"; this.清空CToolStripMenuItem.Click += new EventHandler(this.清空CToolStripMenuItem_Click); this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Size = new System.Drawing.Size(140, 22); this.toolStripMenuItem2.Text = "Copy All"; this.toolStripMenuItem2.Click += new EventHandler(this.制全部AToolStripMenuItem_Click); this.粘贴VToolStripMenuItem.Name = "粘贴VToolStripMenuItem"; this.粘贴VToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.粘贴VToolStripMenuItem.Text = "Stick"; this.粘贴VToolStripMenuItem.Click += new EventHandler(this.粘贴VToolStripMenuItem_Click); this.ttInfo.ToolTipIcon = ToolTipIcon.Info; this.ttInfo.ToolTipTitle = "Item Information"; base.AutoScaleDimensions = new SizeF(6f, 12f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackgroundImage = Resources.skillbook; this.BackgroundImageLayout = ImageLayout.None; this.Cursor = Cursors.Default; this.DoubleBuffered = true; base.Margin = new System.Windows.Forms.Padding(0); base.Name = "SkillBookPanel"; base.Size = new System.Drawing.Size(58, 58); base.Paint += new PaintEventHandler(this.SkillPanel_Paint); base.MouseClick += new MouseEventHandler(this.SkillPanel_MouseClick); base.MouseDoubleClick += new MouseEventHandler(this.SkillPanel_MouseDoubleClick); base.MouseEnter += new EventHandler(this.SkillPanel_MouseEnter); base.MouseLeave += new EventHandler(this.SkillPanel_MouseLeave); base.MouseMove += new MouseEventHandler(this.SkillPanel_MouseMove); this.popMenu.ResumeLayout(false); this.muCopy.ResumeLayout(false); base.ResumeLayout(false); }
/* private static void CheckCompatibilityRefl(string strFile) * { * ResolveEventHandler eh = delegate(object sender, ResolveEventArgs e) * { * string strName = e.Name; * if(strName.Equals("KeePass", StrUtil.CaseIgnoreCmp) || * strName.StartsWith("KeePass,", StrUtil.CaseIgnoreCmp)) * return Assembly.ReflectionOnlyLoadFrom(WinUtil.GetExecutable()); * * return Assembly.ReflectionOnlyLoad(strName); * }; * * AppDomain d = AppDomain.CurrentDomain; * d.ReflectionOnlyAssemblyResolve += eh; * try * { * Assembly asm = Assembly.ReflectionOnlyLoadFrom(strFile); * asm.GetTypes(); * } * finally { d.ReflectionOnlyAssemblyResolve -= eh; } * } */ internal void AddMenuItems(PluginMenuType t, ToolStripItemCollection c, ToolStripItem tsiPrev) { if (c == null) { Debug.Assert(false); return; } List <ToolStripItem> l = new List <ToolStripItem>(); foreach (PluginInfo pi in m_vPlugins) { if (pi == null) { Debug.Assert(false); continue; } Plugin p = pi.Interface; if (p == null) { Debug.Assert(false); continue; } ToolStripMenuItem tsmi = p.GetMenuItem(t); if (tsmi != null) { // string strTip = tsmi.ToolTipText; // if((strTip == null) || (strTip == tsmi.Text)) // strTip = string.Empty; // if(strTip.Length != 0) strTip += MessageService.NewParagraph; // strTip += KPRes.Plugin + ": " + pi.Name; // tsmi.ToolTipText = strTip; l.Add(tsmi); } } if (l.Count == 0) { return; } int iPrev = ((tsiPrev != null) ? c.IndexOf(tsiPrev) : -1); if (iPrev < 0) { Debug.Assert(false); iPrev = c.Count - 1; } int iIns = iPrev + 1; l.Sort(PluginManager.CompareToolStripItems); if ((iPrev >= 0) && (iPrev < c.Count) && !(c[iPrev] is ToolStripSeparator)) { l.Insert(0, new ToolStripSeparator()); } if ((iIns < c.Count) && !(c[iIns] is ToolStripSeparator)) { l.Add(new ToolStripSeparator()); } if (iIns == c.Count) { c.AddRange(l.ToArray()); } else { for (int i = 0; i < l.Count; ++i) { c.Insert(iIns + i, l[i]); } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { //components = new System.ComponentModel.Container(); //this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Toolbar = new ToolStrip(); this.EditBtn = new ToolStripButton(); this.RunBtn = new ToolStripButton(); this.toolStripSeparator2 = new ToolStripSeparator(); this.XPLbl = new ToolStripLabel(); this.DiffLbl = new ToolStripLabel(); this.ItemList = new ListView(); this.CreatureHdr = new ColumnHeader(); this.CountHdr = new ColumnHeader(); this.RoleHdr = new ColumnHeader(); this.XPHdr = new ColumnHeader(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] editBtn = new ToolStripItem[] { this.EditBtn, this.RunBtn, this.toolStripSeparator2, this.XPLbl, this.DiffLbl }; items.AddRange(editBtn); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(435, 25); this.Toolbar.TabIndex = 0; this.Toolbar.Text = "toolStrip1"; this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(105, 22); this.EditBtn.Text = "Encounter Builder"; this.EditBtn.Click += new EventHandler(this.EditBtn_Click); this.RunBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.RunBtn.ImageTransparentColor = Color.Magenta; this.RunBtn.Name = "RunBtn"; this.RunBtn.Size = new System.Drawing.Size(89, 22); this.RunBtn.Text = "Run Encounter"; this.RunBtn.Click += new EventHandler(this.RunBtn_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.XPLbl.Name = "XPLbl"; this.XPLbl.Size = new System.Drawing.Size(78, 22); this.XPLbl.Text = "[N XP (CL N)]"; this.DiffLbl.Name = "DiffLbl"; this.DiffLbl.Size = new System.Drawing.Size(62, 22); this.DiffLbl.Text = "[difficulty]"; ListView.ColumnHeaderCollection columns = this.ItemList.Columns; ColumnHeader[] creatureHdr = new ColumnHeader[] { this.CreatureHdr, this.RoleHdr, this.CountHdr, this.XPHdr }; columns.AddRange(creatureHdr); this.ItemList.Dock = DockStyle.Fill; this.ItemList.FullRowSelect = true; this.ItemList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.ItemList.HideSelection = false; this.ItemList.Location = new Point(0, 25); this.ItemList.MultiSelect = false; this.ItemList.Name = "ItemList"; this.ItemList.Size = new System.Drawing.Size(435, 181); this.ItemList.TabIndex = 1; this.ItemList.UseCompatibleStateImageBehavior = false; this.ItemList.View = View.Details; this.ItemList.DoubleClick += new EventHandler(this.CreatureList_DoubleClick); this.CreatureHdr.Text = "Creature"; this.CreatureHdr.Width = 150; this.CountHdr.Text = "Count"; this.CountHdr.TextAlign = HorizontalAlignment.Right; this.RoleHdr.Text = "Role"; this.RoleHdr.Width = 150; this.XPHdr.Text = "XP"; this.XPHdr.TextAlign = HorizontalAlignment.Right; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.ItemList); base.Controls.Add(this.Toolbar); base.Name = "EncounterPanel"; base.Size = new System.Drawing.Size(435, 206); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(EncounterReportForm)); this.Browser = new WebBrowser(); this.Toolbar = new ToolStrip(); this.ReportBtn = new ToolStripDropDownButton(); this.ReportTime = new ToolStripMenuItem(); this.ReportDamageEnemies = new ToolStripMenuItem(); this.ReportDamageAllies = new ToolStripMenuItem(); this.ReportMovement = new ToolStripMenuItem(); this.BreakdownBtn = new ToolStripDropDownButton(); this.BreakdownIndividually = new ToolStripMenuItem(); this.BreakdownByController = new ToolStripMenuItem(); this.BreakdownByFaction = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.PlayerViewBtn = new ToolStripButton(); this.ExportBtn = new ToolStripButton(); this.Splitter = new SplitContainer(); this.Graph = new DemographicsPanel(); this.toolStripSeparator2 = new ToolStripSeparator(); this.MVPLbl = new ToolStripLabel(); this.Toolbar.SuspendLayout(); this.Splitter.Panel1.SuspendLayout(); this.Splitter.Panel2.SuspendLayout(); this.Splitter.SuspendLayout(); base.SuspendLayout(); this.Browser.Dock = DockStyle.Fill; this.Browser.IsWebBrowserContextMenuEnabled = false; this.Browser.Location = new Point(0, 0); this.Browser.Name = "Browser"; this.Browser.ScriptErrorsSuppressed = true; this.Browser.Size = new System.Drawing.Size(404, 266); this.Browser.TabIndex = 2; this.Browser.WebBrowserShortcutsEnabled = false; ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] reportBtn = new ToolStripItem[] { this.ReportBtn, this.BreakdownBtn, this.toolStripSeparator1, this.PlayerViewBtn, this.ExportBtn, this.toolStripSeparator2, this.MVPLbl }; items.AddRange(reportBtn); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(811, 25); this.Toolbar.TabIndex = 3; this.Toolbar.Text = "toolStrip1"; this.ReportBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; ToolStripItemCollection dropDownItems = this.ReportBtn.DropDownItems; ToolStripItem[] reportTime = new ToolStripItem[] { this.ReportTime, this.ReportDamageEnemies, this.ReportDamageAllies, this.ReportMovement }; dropDownItems.AddRange(reportTime); this.ReportBtn.Image = (Image)componentResourceManager.GetObject("ReportBtn.Image"); this.ReportBtn.ImageTransparentColor = Color.Magenta; this.ReportBtn.Name = "ReportBtn"; this.ReportBtn.Size = new System.Drawing.Size(84, 22); this.ReportBtn.Text = "Report Type"; this.ReportTime.Name = "ReportTime"; this.ReportTime.Size = new System.Drawing.Size(218, 22); this.ReportTime.Text = "Time Taken"; this.ReportTime.Click += new EventHandler(this.ReportTime_Click); this.ReportDamageEnemies.Name = "ReportDamageEnemies"; this.ReportDamageEnemies.Size = new System.Drawing.Size(218, 22); this.ReportDamageEnemies.Text = "Damage Done (to enemies)"; this.ReportDamageEnemies.Click += new EventHandler(this.ReportDamageEnemies_Click); this.ReportDamageAllies.Name = "ReportDamageAllies"; this.ReportDamageAllies.Size = new System.Drawing.Size(218, 22); this.ReportDamageAllies.Text = "Damage Done (to allies)"; this.ReportDamageAllies.Click += new EventHandler(this.ReportDamageAllies_Click); this.ReportMovement.Name = "ReportMovement"; this.ReportMovement.Size = new System.Drawing.Size(218, 22); this.ReportMovement.Text = "Movement"; this.ReportMovement.Click += new EventHandler(this.ReportMovement_Click); this.BreakdownBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; ToolStripItemCollection toolStripItemCollections = this.BreakdownBtn.DropDownItems; ToolStripItem[] breakdownIndividually = new ToolStripItem[] { this.BreakdownIndividually, this.BreakdownByController, this.BreakdownByFaction }; toolStripItemCollections.AddRange(breakdownIndividually); this.BreakdownBtn.Image = (Image)componentResourceManager.GetObject("BreakdownBtn.Image"); this.BreakdownBtn.ImageTransparentColor = Color.Magenta; this.BreakdownBtn.Name = "BreakdownBtn"; this.BreakdownBtn.Size = new System.Drawing.Size(70, 22); this.BreakdownBtn.Text = "Grouping"; this.BreakdownIndividually.Name = "BreakdownIndividually"; this.BreakdownIndividually.Size = new System.Drawing.Size(183, 22); this.BreakdownIndividually.Text = "Individually (default)"; this.BreakdownIndividually.Click += new EventHandler(this.BreakdownIndividually_Click); this.BreakdownByController.Name = "BreakdownByController"; this.BreakdownByController.Size = new System.Drawing.Size(183, 22); this.BreakdownByController.Text = "By Controller"; this.BreakdownByController.Click += new EventHandler(this.BreakdownByController_Click); this.BreakdownByFaction.Name = "BreakdownByFaction"; this.BreakdownByFaction.Size = new System.Drawing.Size(183, 22); this.BreakdownByFaction.Text = "By Faction"; this.BreakdownByFaction.Click += new EventHandler(this.BreakdownByFaction_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); this.PlayerViewBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.PlayerViewBtn.Image = (Image)componentResourceManager.GetObject("PlayerViewBtn.Image"); this.PlayerViewBtn.ImageTransparentColor = Color.Magenta; this.PlayerViewBtn.Name = "PlayerViewBtn"; this.PlayerViewBtn.Size = new System.Drawing.Size(114, 22); this.PlayerViewBtn.Text = "Send to Player View"; this.PlayerViewBtn.Click += new EventHandler(this.PlayerViewBtn_Click); this.ExportBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.ExportBtn.Image = (Image)componentResourceManager.GetObject("ExportBtn.Image"); this.ExportBtn.ImageTransparentColor = Color.Magenta; this.ExportBtn.Name = "ExportBtn"; this.ExportBtn.Size = new System.Drawing.Size(44, 22); this.ExportBtn.Text = "Export"; this.ExportBtn.Click += new EventHandler(this.ExportBtn_Click); this.Splitter.Dock = DockStyle.Fill; this.Splitter.Location = new Point(0, 25); this.Splitter.Name = "Splitter"; this.Splitter.Panel1.Controls.Add(this.Browser); this.Splitter.Panel2.Controls.Add(this.Graph); this.Splitter.Size = new System.Drawing.Size(811, 266); this.Splitter.SplitterDistance = 404; this.Splitter.TabIndex = 4; this.Graph.Dock = DockStyle.Fill; this.Graph.Library = null; this.Graph.Location = new Point(0, 0); this.Graph.Mode = DemographicsMode.Level; this.Graph.Name = "Graph"; this.Graph.Size = new System.Drawing.Size(403, 266); this.Graph.Source = DemographicsSource.Creatures; this.Graph.TabIndex = 0; this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); this.MVPLbl.Name = "MVPLbl"; this.MVPLbl.Size = new System.Drawing.Size(39, 22); this.MVPLbl.Text = "[mvp]"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(811, 291); base.Controls.Add(this.Splitter); base.Controls.Add(this.Toolbar); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "EncounterReportForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Encounter Report"; this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); this.Splitter.Panel1.ResumeLayout(false); this.Splitter.Panel2.ResumeLayout(false); this.Splitter.ResumeLayout(false); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(EffectListForm)); this.Toolbar = new ToolStrip(); this.RemoveBtn = new ToolStripButton(); this.EditBtn = new ToolStripButton(); this.EffectList = new ListView(); this.EffectHdr = new ColumnHeader(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] removeBtn = new ToolStripItem[] { this.RemoveBtn, this.EditBtn }; items.AddRange(removeBtn); this.Toolbar.Location = new Point(0, 0); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(398, 25); this.Toolbar.TabIndex = 0; this.Toolbar.Text = "toolStrip1"; this.RemoveBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.RemoveBtn.Image = (Image)componentResourceManager.GetObject("RemoveBtn.Image"); this.RemoveBtn.ImageTransparentColor = Color.Magenta; this.RemoveBtn.Name = "RemoveBtn"; this.RemoveBtn.Size = new System.Drawing.Size(54, 22); this.RemoveBtn.Text = "Remove"; this.RemoveBtn.Click += new EventHandler(this.RemoveBtn_Click); this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.Image = (Image)componentResourceManager.GetObject("EditBtn.Image"); this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(31, 22); this.EditBtn.Text = "Edit"; this.EditBtn.Click += new EventHandler(this.EditBtn_Click); this.EffectList.Columns.AddRange(new ColumnHeader[] { this.EffectHdr }); this.EffectList.Dock = DockStyle.Fill; this.EffectList.FullRowSelect = true; this.EffectList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.EffectList.HideSelection = false; this.EffectList.Location = new Point(0, 25); this.EffectList.MultiSelect = false; this.EffectList.Name = "EffectList"; this.EffectList.Size = new System.Drawing.Size(398, 289); this.EffectList.TabIndex = 1; this.EffectList.UseCompatibleStateImageBehavior = false; this.EffectList.View = View.Details; this.EffectList.DoubleClick += new EventHandler(this.EditBtn_Click); this.EffectHdr.Text = "Effect"; this.EffectHdr.Width = 363; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(398, 314); base.Controls.Add(this.EffectList); base.Controls.Add(this.Toolbar); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "EffectListForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Ongoing Effects"; this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(EncyclopediaEntryForm)); this.OKBtn = new Button(); this.CancelBtn = new Button(); this.TitleLbl = new Label(); this.TitleBox = new TextBox(); this.DetailsBox = new DefaultTextBox(); this.Pages = new TabControl(); this.DetailsPage = new TabPage(); this.PlayerStatusbar = new StatusStrip(); this.toolStripStatusLabel1 = new ToolStripStatusLabel(); this.DMPage = new TabPage(); this.DMBox = new DefaultTextBox(); this.DMStatusBar = new StatusStrip(); this.toolStripStatusLabel2 = new ToolStripStatusLabel(); this.LinksPage = new TabPage(); this.EntryList = new ListView(); this.EntryHdr = new ColumnHeader(); this.ImagesTab = new TabPage(); this.PictureList = new ListView(); this.PictureToolbar = new ToolStrip(); this.AddBtn = new ToolStripButton(); this.RemoveBtn = new ToolStripButton(); this.EditBtn = new ToolStripButton(); this.CatLbl = new Label(); this.CatBox = new ComboBox(); this.Pages.SuspendLayout(); this.DetailsPage.SuspendLayout(); this.PlayerStatusbar.SuspendLayout(); this.DMPage.SuspendLayout(); this.DMStatusBar.SuspendLayout(); this.LinksPage.SuspendLayout(); this.ImagesTab.SuspendLayout(); this.PictureToolbar.SuspendLayout(); base.SuspendLayout(); this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(438, 359); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 5; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(519, 359); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 6; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.TitleLbl.AutoSize = true; this.TitleLbl.Location = new Point(12, 15); this.TitleLbl.Name = "TitleLbl"; this.TitleLbl.Size = new System.Drawing.Size(30, 13); this.TitleLbl.TabIndex = 0; this.TitleLbl.Text = "Title:"; this.TitleBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.TitleBox.Location = new Point(70, 12); this.TitleBox.Name = "TitleBox"; this.TitleBox.Size = new System.Drawing.Size(524, 20); this.TitleBox.TabIndex = 1; this.DetailsBox.AcceptsReturn = true; this.DetailsBox.AcceptsTab = true; this.DetailsBox.DefaultText = "(enter details here)"; this.DetailsBox.Dock = DockStyle.Fill; this.DetailsBox.Location = new Point(3, 25); this.DetailsBox.Multiline = true; this.DetailsBox.Name = "DetailsBox"; this.DetailsBox.ScrollBars = ScrollBars.Vertical; this.DetailsBox.Size = new System.Drawing.Size(568, 234); this.DetailsBox.TabIndex = 1; this.DetailsBox.Text = "(enter details here)"; this.Pages.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Pages.Controls.Add(this.DetailsPage); this.Pages.Controls.Add(this.DMPage); this.Pages.Controls.Add(this.LinksPage); this.Pages.Controls.Add(this.ImagesTab); this.Pages.Location = new Point(12, 65); this.Pages.Name = "Pages"; this.Pages.SelectedIndex = 0; this.Pages.Size = new System.Drawing.Size(582, 288); this.Pages.TabIndex = 4; this.DetailsPage.Controls.Add(this.DetailsBox); this.DetailsPage.Controls.Add(this.PlayerStatusbar); this.DetailsPage.Location = new Point(4, 22); this.DetailsPage.Name = "DetailsPage"; this.DetailsPage.Padding = new System.Windows.Forms.Padding(3); this.DetailsPage.Size = new System.Drawing.Size(574, 262); this.DetailsPage.TabIndex = 0; this.DetailsPage.Text = "Public Information"; this.DetailsPage.UseVisualStyleBackColor = true; this.PlayerStatusbar.Dock = DockStyle.Top; this.PlayerStatusbar.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabel1 }); this.PlayerStatusbar.Location = new Point(3, 3); this.PlayerStatusbar.Name = "PlayerStatusbar"; this.PlayerStatusbar.Size = new System.Drawing.Size(568, 22); this.PlayerStatusbar.SizingGrip = false; this.PlayerStatusbar.TabIndex = 0; this.PlayerStatusbar.Text = "statusStrip1"; this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new System.Drawing.Size(202, 17); this.toolStripStatusLabel1.Text = "Note: HTML tags are supported here."; this.DMPage.Controls.Add(this.DMBox); this.DMPage.Controls.Add(this.DMStatusBar); this.DMPage.Location = new Point(4, 22); this.DMPage.Name = "DMPage"; this.DMPage.Padding = new System.Windows.Forms.Padding(3); this.DMPage.Size = new System.Drawing.Size(503, 211); this.DMPage.TabIndex = 2; this.DMPage.Text = "DM Information"; this.DMPage.UseVisualStyleBackColor = true; this.DMBox.AcceptsReturn = true; this.DMBox.AcceptsTab = true; this.DMBox.DefaultText = "(enter details here)"; this.DMBox.Dock = DockStyle.Fill; this.DMBox.Location = new Point(3, 25); this.DMBox.Multiline = true; this.DMBox.Name = "DMBox"; this.DMBox.ScrollBars = ScrollBars.Vertical; this.DMBox.Size = new System.Drawing.Size(497, 183); this.DMBox.TabIndex = 3; this.DMBox.Text = "(enter details here)"; this.DMStatusBar.Dock = DockStyle.Top; this.DMStatusBar.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabel2 }); this.DMStatusBar.Location = new Point(3, 3); this.DMStatusBar.Name = "DMStatusBar"; this.DMStatusBar.Size = new System.Drawing.Size(497, 22); this.DMStatusBar.SizingGrip = false; this.DMStatusBar.TabIndex = 2; this.DMStatusBar.Text = "statusStrip1"; this.toolStripStatusLabel2.Name = "toolStripStatusLabel2"; this.toolStripStatusLabel2.Size = new System.Drawing.Size(202, 17); this.toolStripStatusLabel2.Text = "Note: HTML tags are supported here."; this.LinksPage.Controls.Add(this.EntryList); this.LinksPage.Location = new Point(4, 22); this.LinksPage.Name = "LinksPage"; this.LinksPage.Padding = new System.Windows.Forms.Padding(3); this.LinksPage.Size = new System.Drawing.Size(503, 211); this.LinksPage.TabIndex = 1; this.LinksPage.Text = "See Also"; this.LinksPage.UseVisualStyleBackColor = true; this.EntryList.CheckBoxes = true; this.EntryList.Columns.AddRange(new ColumnHeader[] { this.EntryHdr }); this.EntryList.Dock = DockStyle.Fill; this.EntryList.FullRowSelect = true; this.EntryList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.EntryList.HideSelection = false; this.EntryList.Location = new Point(3, 3); this.EntryList.MultiSelect = false; this.EntryList.Name = "EntryList"; this.EntryList.Size = new System.Drawing.Size(497, 205); this.EntryList.Sorting = SortOrder.Ascending; this.EntryList.TabIndex = 0; this.EntryList.UseCompatibleStateImageBehavior = false; this.EntryList.View = View.Details; this.EntryHdr.Text = "Entry"; this.EntryHdr.Width = 300; this.ImagesTab.Controls.Add(this.PictureList); this.ImagesTab.Controls.Add(this.PictureToolbar); this.ImagesTab.Location = new Point(4, 22); this.ImagesTab.Name = "ImagesTab"; this.ImagesTab.Padding = new System.Windows.Forms.Padding(3); this.ImagesTab.Size = new System.Drawing.Size(503, 211); this.ImagesTab.TabIndex = 3; this.ImagesTab.Text = "Pictures"; this.ImagesTab.UseVisualStyleBackColor = true; this.PictureList.Dock = DockStyle.Fill; this.PictureList.Location = new Point(3, 28); this.PictureList.Name = "PictureList"; this.PictureList.Size = new System.Drawing.Size(497, 180); this.PictureList.TabIndex = 1; this.PictureList.UseCompatibleStateImageBehavior = false; this.PictureList.DoubleClick += new EventHandler(this.EditBtn_Click); ToolStripItemCollection items = this.PictureToolbar.Items; ToolStripItem[] addBtn = new ToolStripItem[] { this.AddBtn, this.RemoveBtn, this.EditBtn }; items.AddRange(addBtn); this.PictureToolbar.Location = new Point(3, 3); this.PictureToolbar.Name = "PictureToolbar"; this.PictureToolbar.Size = new System.Drawing.Size(497, 25); this.PictureToolbar.TabIndex = 0; this.PictureToolbar.Text = "toolStrip1"; this.AddBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.AddBtn.Image = (Image)componentResourceManager.GetObject("AddBtn.Image"); this.AddBtn.ImageTransparentColor = Color.Magenta; this.AddBtn.Name = "AddBtn"; this.AddBtn.Size = new System.Drawing.Size(33, 22); this.AddBtn.Text = "Add"; this.AddBtn.Click += new EventHandler(this.AddBtn_Click); this.RemoveBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.RemoveBtn.Image = (Image)componentResourceManager.GetObject("RemoveBtn.Image"); this.RemoveBtn.ImageTransparentColor = Color.Magenta; this.RemoveBtn.Name = "RemoveBtn"; this.RemoveBtn.Size = new System.Drawing.Size(54, 22); this.RemoveBtn.Text = "Remove"; this.RemoveBtn.Click += new EventHandler(this.RemoveBtn_Click); this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.Image = (Image)componentResourceManager.GetObject("EditBtn.Image"); this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(31, 22); this.EditBtn.Text = "Edit"; this.EditBtn.Click += new EventHandler(this.EditBtn_Click); this.CatLbl.AutoSize = true; this.CatLbl.Location = new Point(12, 41); this.CatLbl.Name = "CatLbl"; this.CatLbl.Size = new System.Drawing.Size(52, 13); this.CatLbl.TabIndex = 2; this.CatLbl.Text = "Category:"; this.CatBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.CatBox.AutoCompleteMode = AutoCompleteMode.Append; this.CatBox.AutoCompleteSource = AutoCompleteSource.ListItems; this.CatBox.FormattingEnabled = true; this.CatBox.Location = new Point(70, 38); this.CatBox.Name = "CatBox"; this.CatBox.Size = new System.Drawing.Size(524, 21); this.CatBox.TabIndex = 3; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(606, 394); base.Controls.Add(this.CatBox); base.Controls.Add(this.CatLbl); base.Controls.Add(this.Pages); base.Controls.Add(this.TitleBox); base.Controls.Add(this.TitleLbl); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.MinimizeBox = false; base.Name = "EncyclopediaEntryForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Encyclopedia Entry"; this.Pages.ResumeLayout(false); this.DetailsPage.ResumeLayout(false); this.DetailsPage.PerformLayout(); this.PlayerStatusbar.ResumeLayout(false); this.PlayerStatusbar.PerformLayout(); this.DMPage.ResumeLayout(false); this.DMPage.PerformLayout(); this.DMStatusBar.ResumeLayout(false); this.DMStatusBar.PerformLayout(); this.LinksPage.ResumeLayout(false); this.ImagesTab.ResumeLayout(false); this.ImagesTab.PerformLayout(); this.PictureToolbar.ResumeLayout(false); this.PictureToolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(DownloaderForm)); this.listContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.tsmiRemoveFromQueue = new ToolStripMenuItem(); this.tsmiSelectAll = new ToolStripMenuItem(); this.btnDownload = new Button(); this.listBox = new ListBox(); this.cbxAddToQueue = new ComboBox(); this.btnAddToQueue = new Button(); this.packsDownloader = new PacksDownloader(); this.totalProgressBar = new ProgressBar(); this.lblMessage = new Label(); this.lblStatus = new Label(); this.groupBox = new GroupBox(); this.currentProgressBar = new ProgressBar(); this.listContextMenu.SuspendLayout(); this.groupBox.SuspendLayout(); base.SuspendLayout(); ToolStripItemCollection items = this.listContextMenu.Items; ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.tsmiRemoveFromQueue, this.tsmiSelectAll }; items.AddRange(toolStripItemArray); this.listContextMenu.Name = "listContextMenu"; componentResourceManager.ApplyResources(this.listContextMenu, "listContextMenu"); this.tsmiRemoveFromQueue.Image = Images16px.Cross; this.tsmiRemoveFromQueue.Name = "tsmiRemoveFromQueue"; componentResourceManager.ApplyResources(this.tsmiRemoveFromQueue, "tsmiRemoveFromQueue"); this.tsmiRemoveFromQueue.Click += new EventHandler(this.tsmi_RemoveFromQueue_Click); this.tsmiSelectAll.Image = Images16px.SelectAll; this.tsmiSelectAll.Name = "tsmiSelectAll"; componentResourceManager.ApplyResources(this.tsmiSelectAll, "tsmiSelectAll"); this.tsmiSelectAll.Click += new EventHandler(this.tsmi_SelectAll_Click); componentResourceManager.ApplyResources(this.btnDownload, "btnDownload"); this.btnDownload.Image = Images32px.Download; this.btnDownload.Name = "btnDownload"; this.btnDownload.UseVisualStyleBackColor = true; this.btnDownload.Click += new EventHandler(this.btn_Download_Click); this.listBox.ContextMenuStrip = this.listContextMenu; this.listBox.FormattingEnabled = true; componentResourceManager.ApplyResources(this.listBox, "listBox"); this.listBox.Name = "listBox"; this.listBox.SelectionMode = SelectionMode.MultiExtended; this.listBox.KeyDown += new KeyEventHandler(this.listBox_KeyDown); this.cbxAddToQueue.DropDownStyle = ComboBoxStyle.DropDownList; this.cbxAddToQueue.FormattingEnabled = true; componentResourceManager.ApplyResources(this.cbxAddToQueue, "cbxAddToQueue"); this.cbxAddToQueue.Name = "cbxAddToQueue"; this.btnAddToQueue.Image = Images16px.Add; componentResourceManager.ApplyResources(this.btnAddToQueue, "btnAddToQueue"); this.btnAddToQueue.Name = "btnAddToQueue"; this.btnAddToQueue.Tag = ""; this.btnAddToQueue.UseVisualStyleBackColor = true; this.btnAddToQueue.Click += new EventHandler(this.btn_AddToQueue_Click); this.packsDownloader.ProgressChanged += new DownloadProgressChangedEventHandler(this.packsDownloader_ProgressChanged); this.packsDownloader.DownloadCompleted += new DownloadCompletedEventHandler(this.packsDownloader_DownloadCompleted); this.packsDownloader.DownloadStarted += new DownloadStartedEventHandler(this.packsDownloader_DownloadStarted); componentResourceManager.ApplyResources(this.totalProgressBar, "totalProgressBar"); this.totalProgressBar.Name = "totalProgressBar"; componentResourceManager.ApplyResources(this.lblMessage, "lblMessage"); this.lblMessage.Name = "lblMessage"; componentResourceManager.ApplyResources(this.lblStatus, "lblStatus"); this.lblStatus.Name = "lblStatus"; this.groupBox.BackColor = Color.Transparent; this.groupBox.Controls.Add(this.currentProgressBar); this.groupBox.Controls.Add(this.lblStatus); this.groupBox.Controls.Add(this.lblMessage); this.groupBox.Controls.Add(this.totalProgressBar); componentResourceManager.ApplyResources(this.groupBox, "groupBox"); this.groupBox.Name = "groupBox"; this.groupBox.TabStop = false; componentResourceManager.ApplyResources(this.currentProgressBar, "currentProgressBar"); this.currentProgressBar.Name = "currentProgressBar"; base.AutoBackgroundImage = BackgroundImages.Chung; componentResourceManager.ApplyResources(this, "$this"); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.btnDownload); base.Controls.Add(this.listBox); base.Controls.Add(this.groupBox); base.Controls.Add(this.cbxAddToQueue); base.Controls.Add(this.btnAddToQueue); this.DoubleBuffered = true; base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; base.MaximizeBox = false; base.Name = "DownloaderForm"; base.ShouldDispose = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.FormClosing += new FormClosingEventHandler(this.DownloadForm_FormClosing); base.Load += new EventHandler(this.DownloadForm_Load); this.listContextMenu.ResumeLayout(false); this.groupBox.ResumeLayout(false); base.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.InfoLbl = new Label(); this.LibraryList = new ListView(); this.LibHdr = new ColumnHeader(); this.Toolbar = new ToolStrip(); this.SelectAllBtn = new ToolStripButton(); this.DeselectAllBtn = new ToolStripButton(); this.InfoLinkLbl = new LinkLabel(); this.Toolbar.SuspendLayout(); base.SuspendLayout(); this.InfoLbl.Dock = DockStyle.Top; this.InfoLbl.Location = new Point(0, 0); this.InfoLbl.Name = "InfoLbl"; this.InfoLbl.Size = new System.Drawing.Size(372, 40); this.InfoLbl.TabIndex = 1; this.InfoLbl.Text = "Select the libraries you want to use to create the map."; this.LibraryList.CheckBoxes = true; this.LibraryList.Columns.AddRange(new ColumnHeader[] { this.LibHdr }); this.LibraryList.Dock = DockStyle.Fill; this.LibraryList.FullRowSelect = true; this.LibraryList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.LibraryList.HideSelection = false; this.LibraryList.Location = new Point(0, 65); this.LibraryList.MultiSelect = false; this.LibraryList.Name = "LibraryList"; this.LibraryList.Size = new System.Drawing.Size(372, 158); this.LibraryList.TabIndex = 2; this.LibraryList.UseCompatibleStateImageBehavior = false; this.LibraryList.View = View.Details; this.LibHdr.Text = "Library"; this.LibHdr.Width = 300; ToolStripItemCollection items = this.Toolbar.Items; ToolStripItem[] selectAllBtn = new ToolStripItem[] { this.SelectAllBtn, this.DeselectAllBtn }; items.AddRange(selectAllBtn); this.Toolbar.Location = new Point(0, 40); this.Toolbar.Name = "Toolbar"; this.Toolbar.Size = new System.Drawing.Size(372, 25); this.Toolbar.TabIndex = 3; this.Toolbar.Text = "toolStrip1"; this.SelectAllBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.SelectAllBtn.ImageTransparentColor = Color.Magenta; this.SelectAllBtn.Name = "SelectAllBtn"; this.SelectAllBtn.Size = new System.Drawing.Size(59, 22); this.SelectAllBtn.Text = "Select All"; this.SelectAllBtn.Click += new EventHandler(this.SelectAllBtn_Click); this.DeselectAllBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.DeselectAllBtn.ImageTransparentColor = Color.Magenta; this.DeselectAllBtn.Name = "DeselectAllBtn"; this.DeselectAllBtn.Size = new System.Drawing.Size(72, 22); this.DeselectAllBtn.Text = "Deselect All"; this.DeselectAllBtn.Click += new EventHandler(this.DeselectAllBtn_Click); this.InfoLinkLbl.Dock = DockStyle.Bottom; this.InfoLinkLbl.Location = new Point(0, 223); this.InfoLinkLbl.Name = "InfoLinkLbl"; this.InfoLinkLbl.Size = new System.Drawing.Size(372, 23); this.InfoLinkLbl.TabIndex = 4; this.InfoLinkLbl.TabStop = true; this.InfoLinkLbl.Text = "Why are my libraries not shown?"; this.InfoLinkLbl.TextAlign = ContentAlignment.MiddleLeft; this.InfoLinkLbl.LinkClicked += new LinkLabelLinkClickedEventHandler(this.InfoLinkLbl_LinkClicked); base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.Controls.Add(this.LibraryList); base.Controls.Add(this.Toolbar); base.Controls.Add(this.InfoLinkLbl); base.Controls.Add(this.InfoLbl); base.Name = "MapLibrariesPage"; base.Size = new System.Drawing.Size(372, 246); this.Toolbar.ResumeLayout(false); this.Toolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(OptionCreatureLoreForm)); this.NameLbl = new Label(); this.NameBox = new TextBox(); this.Pages = new TabControl(); this.InfoPage = new TabPage(); this.InfoList = new ListView(); this.InfoHdr = new ColumnHeader(); this.LevelToolbar = new ToolStrip(); this.AddBtn = new ToolStripButton(); this.RemoveBtn = new ToolStripButton(); this.EditBtn = new ToolStripButton(); this.OKBtn = new Button(); this.CancelBtn = new Button(); this.SkillLbl = new Label(); this.SkillBox = new ComboBox(); this.Pages.SuspendLayout(); this.InfoPage.SuspendLayout(); this.LevelToolbar.SuspendLayout(); base.SuspendLayout(); this.NameLbl.AutoSize = true; this.NameLbl.Location = new Point(12, 15); this.NameLbl.Name = "NameLbl"; this.NameLbl.Size = new System.Drawing.Size(81, 13); this.NameLbl.TabIndex = 0; this.NameLbl.Text = "Creature Name:"; this.NameBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.NameBox.Location = new Point(99, 12); this.NameBox.Name = "NameBox"; this.NameBox.Size = new System.Drawing.Size(230, 20); this.NameBox.TabIndex = 1; this.Pages.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Pages.Controls.Add(this.InfoPage); this.Pages.Location = new Point(12, 65); this.Pages.Name = "Pages"; this.Pages.SelectedIndex = 0; this.Pages.Size = new System.Drawing.Size(317, 203); this.Pages.TabIndex = 4; this.InfoPage.Controls.Add(this.InfoList); this.InfoPage.Controls.Add(this.LevelToolbar); this.InfoPage.Location = new Point(4, 22); this.InfoPage.Name = "InfoPage"; this.InfoPage.Padding = new System.Windows.Forms.Padding(3); this.InfoPage.Size = new System.Drawing.Size(309, 177); this.InfoPage.TabIndex = 2; this.InfoPage.Text = "Information"; this.InfoPage.UseVisualStyleBackColor = true; this.InfoList.Columns.AddRange(new ColumnHeader[] { this.InfoHdr }); this.InfoList.Dock = DockStyle.Fill; this.InfoList.FullRowSelect = true; this.InfoList.HeaderStyle = ColumnHeaderStyle.Nonclickable; this.InfoList.HideSelection = false; this.InfoList.Location = new Point(3, 28); this.InfoList.MultiSelect = false; this.InfoList.Name = "InfoList"; this.InfoList.Size = new System.Drawing.Size(303, 146); this.InfoList.TabIndex = 1; this.InfoList.UseCompatibleStateImageBehavior = false; this.InfoList.View = View.Details; this.InfoList.DoubleClick += new EventHandler(this.FeatureEditBtn_Click); this.InfoHdr.Text = "Information"; this.InfoHdr.Width = 273; ToolStripItemCollection items = this.LevelToolbar.Items; ToolStripItem[] addBtn = new ToolStripItem[] { this.AddBtn, this.RemoveBtn, this.EditBtn }; items.AddRange(addBtn); this.LevelToolbar.Location = new Point(3, 3); this.LevelToolbar.Name = "LevelToolbar"; this.LevelToolbar.Size = new System.Drawing.Size(303, 25); this.LevelToolbar.TabIndex = 0; this.LevelToolbar.Text = "toolStrip1"; this.AddBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.AddBtn.Image = (Image)componentResourceManager.GetObject("AddBtn.Image"); this.AddBtn.ImageTransparentColor = Color.Magenta; this.AddBtn.Name = "AddBtn"; this.AddBtn.Size = new System.Drawing.Size(33, 22); this.AddBtn.Text = "Add"; this.AddBtn.Click += new EventHandler(this.AddBtn_Click); this.RemoveBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.RemoveBtn.Image = (Image)componentResourceManager.GetObject("RemoveBtn.Image"); this.RemoveBtn.ImageTransparentColor = Color.Magenta; this.RemoveBtn.Name = "RemoveBtn"; this.RemoveBtn.Size = new System.Drawing.Size(54, 22); this.RemoveBtn.Text = "Remove"; this.RemoveBtn.Click += new EventHandler(this.RemoveBtn_Click); this.EditBtn.DisplayStyle = ToolStripItemDisplayStyle.Text; this.EditBtn.Image = (Image)componentResourceManager.GetObject("EditBtn.Image"); this.EditBtn.ImageTransparentColor = Color.Magenta; this.EditBtn.Name = "EditBtn"; this.EditBtn.Size = new System.Drawing.Size(31, 22); this.EditBtn.Text = "Edit"; this.EditBtn.Click += new EventHandler(this.FeatureEditBtn_Click); this.OKBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.OKBtn.DialogResult = System.Windows.Forms.DialogResult.OK; this.OKBtn.Location = new Point(173, 274); this.OKBtn.Name = "OKBtn"; this.OKBtn.Size = new System.Drawing.Size(75, 23); this.OKBtn.TabIndex = 5; this.OKBtn.Text = "OK"; this.OKBtn.UseVisualStyleBackColor = true; this.OKBtn.Click += new EventHandler(this.OKBtn_Click); this.CancelBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelBtn.Location = new Point(254, 274); this.CancelBtn.Name = "CancelBtn"; this.CancelBtn.Size = new System.Drawing.Size(75, 23); this.CancelBtn.TabIndex = 6; this.CancelBtn.Text = "Cancel"; this.CancelBtn.UseVisualStyleBackColor = true; this.SkillLbl.AutoSize = true; this.SkillLbl.Location = new Point(12, 41); this.SkillLbl.Name = "SkillLbl"; this.SkillLbl.Size = new System.Drawing.Size(60, 13); this.SkillLbl.TabIndex = 2; this.SkillLbl.Text = "Skill Name:"; this.SkillBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; this.SkillBox.AutoCompleteMode = AutoCompleteMode.Append; this.SkillBox.AutoCompleteSource = AutoCompleteSource.ListItems; this.SkillBox.FormattingEnabled = true; this.SkillBox.Location = new Point(99, 38); this.SkillBox.Name = "SkillBox"; this.SkillBox.Size = new System.Drawing.Size(230, 21); this.SkillBox.TabIndex = 3; base.AcceptButton = this.OKBtn; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.CancelButton = this.CancelBtn; base.ClientSize = new System.Drawing.Size(341, 309); base.Controls.Add(this.CancelBtn); base.Controls.Add(this.OKBtn); base.Controls.Add(this.Pages); base.Controls.Add(this.SkillBox); base.Controls.Add(this.SkillLbl); base.Controls.Add(this.NameBox); base.Controls.Add(this.NameLbl); base.MaximizeBox = false; base.MinimizeBox = false; base.Name = "OptionCreatureLoreForm"; base.ShowIcon = false; base.ShowInTaskbar = false; base.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; base.StartPosition = FormStartPosition.CenterParent; this.Text = "Creature Lore"; this.Pages.ResumeLayout(false); this.InfoPage.ResumeLayout(false); this.InfoPage.PerformLayout(); this.LevelToolbar.ResumeLayout(false); this.LevelToolbar.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void AssignHelpMenuItems(ToolStripItemCollection dropDownItems) { dropDownItems.AddRange(new ToolStripItem[] { displayXrmToolBoxHelpToolStripMenuItem }); }
public static void add( this ToolStripItemCollection toolStripItemCollection, params ToolStripItem[] items ) { toolStripItemCollection.AddRange( items ); }