//protected override void Dispose(bool disposing) //{ // if (disposing && this.components != null) // { // this.components.Dispose(); // } // base.Dispose(disposing); //} private void InitializeComponent() { global::System.ComponentModel.ComponentResourceManager componentResourceManager = new global::System.ComponentModel.ComponentResourceManager(typeof(global::HeroesOpTool.UserMonitorForm2)); this.TSComboStyle = new global::System.Windows.Forms.ToolStripComboBox(); this.TSButtonCopy = new global::System.Windows.Forms.ToolStripButton(); this.panel = new global::System.Windows.Forms.Panel(); global::System.Windows.Forms.ToolStrip toolStrip = new global::System.Windows.Forms.ToolStrip(); toolStrip.SuspendLayout(); base.SuspendLayout(); toolStrip.Items.AddRange(new global::System.Windows.Forms.ToolStripItem[] { this.TSComboStyle, this.TSButtonCopy }); toolStrip.Location = new global::System.Drawing.Point(0, 0); toolStrip.Name = "toolStrip"; toolStrip.Size = new global::System.Drawing.Size(792, 25); toolStrip.TabIndex = 5; toolStrip.Text = "toolStrip"; this.TSComboStyle.DropDownStyle = global::System.Windows.Forms.ComboBoxStyle.DropDownList; this.TSComboStyle.Name = "TSComboStyle"; this.TSComboStyle.Size = new global::System.Drawing.Size(121, 25); this.TSComboStyle.SelectedIndexChanged += new global::System.EventHandler(this.TSComboStyle_SelectedIndexChanged); this.TSButtonCopy.DisplayStyle = global::System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.TSButtonCopy.Image = (global::System.Drawing.Image)componentResourceManager.GetObject("TSButtonCopy.Image"); this.TSButtonCopy.ImageTransparentColor = global::System.Drawing.Color.Magenta; this.TSButtonCopy.Name = "TSButtonCopy"; this.TSButtonCopy.Size = new global::System.Drawing.Size(99, 22); this.TSButtonCopy.Text = global::HeroesOpTool.LocalizeText.Get(538); this.TSButtonCopy.Click += new global::System.EventHandler(this.TSButtonCopy_Click); this.panel.Anchor = (global::System.Windows.Forms.AnchorStyles.Top | global::System.Windows.Forms.AnchorStyles.Bottom | global::System.Windows.Forms.AnchorStyles.Left | global::System.Windows.Forms.AnchorStyles.Right); this.panel.AutoScroll = true; this.panel.BackColor = global::System.Drawing.SystemColors.AppWorkspace; this.panel.BorderStyle = global::System.Windows.Forms.BorderStyle.Fixed3D; this.panel.Location = new global::System.Drawing.Point(0, 28); this.panel.Name = "panel"; this.panel.Size = new global::System.Drawing.Size(792, 545); this.panel.TabIndex = 4; this.AutoScaleBaseSize = new global::System.Drawing.Size(6, 14); this.BackColor = global::System.Drawing.SystemColors.Control; base.ClientSize = new global::System.Drawing.Size(792, 573); base.Controls.Add(toolStrip); base.Controls.Add(this.panel); base.Name = "UserMonitorForm2"; this.Text = global::HeroesOpTool.LocalizeText.Get(397); base.FormClosing += new global::System.Windows.Forms.FormClosingEventHandler(this.UserMonitorForm2_FormClosing); toolStrip.ResumeLayout(false); toolStrip.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
public MainWindow() { try { InitializeComponent(); _application = new ExplorerApplication(this); _application.DockWindowAdded += new DockWindowAddedEvent(_application_DockWindowAdded); _application.OnShowDockableWindow += new OnShowDockableWindowEvent(_application_OnShowDockableWindow); #region Windows Forms Control Disign _toolStripAddress = new System.Windows.Forms.ToolStrip(); _toolStripAddress.Stretch = true; _toolStripAddress.GripMargin = new System.Windows.Forms.Padding(1); _toolStripAddress.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; _toolStripAddress.BackColor = System.Drawing.Color.White; winFormsHostStripAddress.Child = _toolStripAddress; #endregion _tree = new gView.Framework.UI.Dialogs.FormCatalogTree(_application, false); _tree.NodeSelected += new gView.Framework.UI.Dialogs.FormCatalogTree.NodeClickedEvent(tree_NodeSelected); _tree.NodeRenamed += new gView.Framework.UI.Dialogs.FormCatalogTree.NodeRenamedEvent(tree_NodeRenamed); _tree.NodeDeleted += new gView.Framework.UI.Dialogs.FormCatalogTree.NodeDeletedEvent(tree_NodeDeleted); //winFormsHostExplorerTree.Child = _tree; PlugInManager compMan = new PlugInManager(); foreach (var tabType in compMan.GetPlugins(gView.Framework.system.Plugins.Type.IExplorerTabPage)) { IExplorerTabPage page = compMan.CreateInstance <IExplorerTabPage>(tabType); if (page == null || page.Control == null) { continue; } page.OnCreate(_application); LayoutDocument layoutDoc = new LayoutDocument(); layoutDoc.Title = layoutDoc.ContentId = page.Title; layoutDoc.CanClose = false; layoutDoc.CanFloat = false; layoutDoc.Content = new WindowsFormsHost(); ((WindowsFormsHost)layoutDoc.Content).Child = page.Control; _tabPages.Add(new TabPage(page, layoutDoc)); if (page is gView.Framework.UI.Controls.ContentsList) { ((gView.Framework.UI.Controls.ContentsList)page).ItemSelected += new gView.Framework.UI.Controls.ContentsList.ItemClickedEvent(ContentsList_ItemSelected); _content = (gView.Framework.UI.Controls.ContentsList)page; } } explorerDocPane.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(explorerDocPane_PropertyChanged); anchorPaneRight.Children[0].Hide(); _application.AddDockableWindow(_tree, DockWindowState.left); try { XmlDocument doc = new XmlDocument(); doc.Load("menu.explorer.xml"); MakeMainMenuBar(doc.SelectSingleNode("//Menubar")); } catch { } MakeRibbon(); ValidateButtons(); } catch (Exception ex) { System.Windows.MessageBox.Show(ex.Message + "\n" + ex.StackTrace); } }