private MenuButtonItem FindMenuButtonItem(string buttonName, MenuButtonItem item = null) { List <MenuButtonItem> itemList = item.GetChilds(); if (itemList != null) { for (int i = 0; i < itemList.Count; i++) { if (itemList[i].buttonName == buttonName) { return(itemList[i]); } } for (int i = 0; i < itemList.Count; i++) { if (itemList[i] != null) { MenuButtonItem data = FindMenuButtonItem(buttonName, itemList[i]); if (data != null) { return(data); } } } } return(null); }
/// <summary> /// Update MRU list when MRU menu item parent is opened /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnMRUParentPopup(object sender, MenuPopupEventArgs e) { // remove all childs if (menuItemMRU.HasChildren) { menuItemMRU.Items.Clear(); } // Disable menu item if MRU list is empty if (mruList.Count == 0) { menuItemMRU.Enabled = false; return; } // enable menu item and add child items menuItemMRU.Enabled = true; MenuButtonItem item; IEnumerator myEnumerator = mruList.GetEnumerator(); while (myEnumerator.MoveNext()) { item = new MenuButtonItem(GetDisplayName((string)myEnumerator.Current)); // subscribe to item's Click event item.Activate += new EventHandler(this.OnMRUClicked); menuItemMRU.Items.Add(item); } }
public void AddChild(MenuButtonItem item) { if (menuButtonList == null) { menuButtonList = new List <MenuButtonItem>(); } menuButtonList.Add(item); }
public void Unload(INWN2PluginHost cHost) { UI.MultiForm form = UI.MultiForm.makeMultiForm(); form.Dispose(); m_cMenuItem.Dispose(); m_cMenuItem = null; }
public override void DrawMenuItemHighlight(Graphics graphics, MenuButtonItem item, Rectangle bounds) { if (item.Enabled) { SolidBrush background = new SolidBrush(Color.FromArgb(80, HighlightColor)); graphics.FillRectangle(background, bounds); background.Dispose(); } }
public GameObject CreateComponent(MenuButtonItem data, Transform parent) { backGround.SetActive(true); GameObject viewObj = (GameObject)Instantiate(defaultButtonView); viewObj.transform.SetParent(parent); viewObj.SetActive(true); viewObj.GetComponent <MenuButtonComponent>().Init(data.GetChilds()); return(viewObj); }
public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Activate += new EventHandler(this.HandlePluginLaunch); buildToolbars(); // NWN2ToolsetMainForm.App.KeyPreview = true; // NWN2ToolsetMainForm.App.KeyDown += new System.Windows.Forms.KeyEventHandler(NWN2BrushSaver); }
public override void Initialize(IComponent component) { base.Initialize(component); // this.m_MenuButtonItem = base.Component as MenuButtonItem; if (this.m_MenuButtonItem == null) { GISShare.Controls.WinForm.WFNew.Forms.TBMessageBox.Show("MenuButtonItem == null"); return; } }
public static void Localize(MenuButtonItem item) { string text = Localizer.Localize(item.Text); if (text == null) { item.Visible = false; return; } item.Text = text; foreach (MenuButtonItem item2 in item.Items) { Localizer.Localize(item2); } }
public void Add(MenuButtonItem item, string parentName = null) { if (string.IsNullOrEmpty(item.rootButtonName)) { if (menuButtonList == null) { menuButtonList = new List <MenuButtonItem>(); } menuButtonList.ForEach(x => { if (x.buttonName == item.buttonName) { Debug.Log("菜单父类名称重复"); return; } }); GameObject buttonObj = (GameObject)Instantiate(rootButton); buttonObj.transform.SetParent(transform); buttonObj.GetComponentInChildren <Text>().text = item.buttonName; buttonObj.SetActive(true); buttonObj.name = item.buttonName; menuButtonList.Add(item); buttonObj.GetComponent <Button>().onClick.AddListener(() => { CloseWindow(); MenuButtonItem data = FindMenuButton(item.buttonName); if (data != null && data.GetChilds() != null && data.GetChilds().Count != 0) { GameObject viewObj = CreateComponent(data, buttonObj.transform); viewObj.GetComponent <MenuButtonComponent>().SetPostion(new Vector2(0, -buttonObj.GetComponent <RectTransform>().sizeDelta.y)); } }); } else { MenuButtonItem parentItem = FindMenuButtonItem(item.rootButtonName, parentName); if (parentItem != null) { parentItem.AddChild(item); } else { Debug.Log(parentName + "失踪"); } } }
private void tvMetaTree_AfterSelect(object sender, TreeViewEventArgs e) { //Set our priority Thread.CurrentThread.Priority = ThreadPriority.Highest; //Get our tag Index int tagIndex = GetSelectedTagIndex(); //If we have a selected and valid tag... if (tagIndex != -1) { //Load the editor using our tag Index LoadEditor(tagIndex); } //Get our checked menu item MenuButtonItem selectedLibrary = null; //Loop through all the libraries for (int i = 0; i < menuButtonItem3.Items.Count; i++) { //If the item is checked if (menuButtonItem3.Items[i].Checked) { //Set our selected library selectedLibrary = menuButtonItem3.Items[i]; //break out of the loop. break; } } //Reload our Libraries LoadLibraries(); //If we had a library selected before... if (selectedLibrary != null) { //Load our selected Library once more Library_Activate(selectedLibrary, new EventArgs()); } //Focus on our treeView tvMetaTree.Focus(); }
/// <summary> /// Initialization. Call this function in form Load handler. /// </summary> /// <param name="owner">Owner form</param> /// <param name="mruItem">Recent Files menu item</param> /// <param name="regPath">Registry Path to keep MRU list</param> public void Initialize(Form owner, MenuButtonItem mruItem, string regPath) { // keep reference to owner form ownerForm = owner; // check if owner form implements IMRUClient interface if (!(owner is IMRUClient)) { throw new Exception( "MRUManager: Owner form doesn't implement IMRUClient interface"); } // keep reference to MRU menu item menuItemMRU = mruItem; // keep reference to MRU menu item parent menuItemParent = (MenuBarItem)menuItemMRU.Parent; // keep Registry path adding MRU key to it registryPath = regPath; if (registryPath.EndsWith("\\")) { registryPath += "MRU"; } else { registryPath += "\\MRU"; } // keep current directory in the time of initialization currentDirectory = Directory.GetCurrentDirectory(); // subscribe to MRU parent Popup event menuItemParent.BeforePopup += new MenuItemBase.BeforePopupEventHandler(this.OnMRUParentPopup); // subscribe to owner form Closing event ownerForm.Closing += new System.ComponentModel.CancelEventHandler(OnOwnerClosing); // load MRU list from Registry LoadMRU(); }
/// <summary> /// MRU menu item is clicked - call owner's OpenMRUFile function /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnMRUClicked(object sender, EventArgs e) { string s; // cast sender object to MenuItem MenuButtonItem item = (MenuButtonItem)sender; if (item != null) { int index = item.Parent.Items.IndexOf(item); // Get file name from list using item index s = (string)mruList[index]; // call owner's OpenMRUFile function if (s.Length > 0) { ((IMRUClient)ownerForm).OpenMRUFile(s); } } }
public void CreateButton(MenuButtonItem item) { if (item == null) { return; } GameObject buttonObj = (GameObject)Instantiate(defaultButton); buttonObj.transform.SetParent(transform); buttonObj.SetActive(true); buttonObj.GetComponent <MenuButton>().onClick.AddListener(() => { item.GetClick(); menuButtonView.CloseWindow(); }); buttonObj.GetComponent <MenuButton>().action = () => { ClearChild(); if (item.GetChilds() != null && item.GetChilds().Count != 0) { GameObject viewObj = menuButtonView.CreateComponent(item, buttonObj.transform); childView = viewObj.GetComponent <MenuButtonComponent>(); viewObj.GetComponent <MenuButtonComponent>().SetPostion(new Vector2(buttonObj.GetComponent <RectTransform>().sizeDelta.x, 0)); } }; buttonObj.GetComponentInChildren <Text>().text = item.buttonName; buttonObj.name = item.buttonName; if (item.hasLine) { GameObject line = (GameObject)Instantiate(lineObj); line.transform.SetParent(transform); line.SetActive(true); } if (item.enableCheckEvent != null && !item.enableCheckEvent.Invoke()) { buttonObj.GetComponent <MenuButton>().interactable = false; } }
void Start() { if (menuButtonView == null) { menuButtonView = GameObject.FindObjectOfType <MenuButtonView>(); } if (menuButtonList != null) { menuButtonList.ForEach(x => { MenuButtonItem menuButton = new MenuButtonItem(x.buttonName); menuButtonView.Add(menuButton); if (x.menuButtonitemList != null) { x.menuButtonitemList.ForEach(y => { MenuButtonItem menuButtonItem = new MenuButtonItem(y.buttonName, x.buttonName, () => y.buttonEvent.Invoke(), y.hasline); menuButtonView.Add(menuButtonItem, y.parentButtonName); }); } }); } }
private void InitializeComponent() { this.components = new Container(); this.sandDockManager = new SandDockManager(); this.sandBarManager = new SandBarManager(this.components); this.leftSandBarDock = new ToolBarContainer(); this.rightSandBarDock = new ToolBarContainer(); this.bottomSandBarDock = new ToolBarContainer(); this.topSandBarDock = new ToolBarContainer(); this.menuBar = new MenuBar(); this.menuBarItem1 = new MenuBarItem(); this.menuItem_newMap = new MenuButtonItem(); this.menuItem_newWilderness = new MenuButtonItem(); this.menuItem_loadMap = new MenuButtonItem(); this.menuItem_saveMap = new MenuButtonItem(); this.menuItem_saveMapAs = new MenuButtonItem(); this.menuItem_exit = new MenuButtonItem(); this.menuBarItem3 = new MenuBarItem(); this.menuItem_Undo = new MenuButtonItem(); this.menuItem_Redo = new MenuButtonItem(); this.menuBarItem2 = new MenuBarItem(); this.menuItem_viewToolParameters = new MenuButtonItem(); this.menuItem_viewEditorSettings = new MenuButtonItem(); this.menuItem_viewContextHelp = new MenuButtonItem(); this.menuBarItem4 = new MenuBarItem(); this.menuItem_TestIngame = new MenuButtonItem(); this.menuBarItem5 = new MenuBarItem(); this.menuItem_OpenCodeEditor = new MenuButtonItem(); this.menuItem_DumpMap = new MenuButtonItem(); this.menuItem_ExtractBigFile = new MenuButtonItem(); this.menuItem_ExportToPC = new MenuButtonItem(); this.menuItem_ExportToConsole = new MenuButtonItem(); this.menuItem_ResetLayout = new MenuButtonItem(); this.menuItem_PrepareThumbnails = new MenuButtonItem(); this.menuItem_ReloadEditor = new MenuButtonItem(); this.menuItem_ImportWorld = new MenuButtonItem(); this.menuItem_ObjectAdmin = new MenuButtonItem(); this.menuBarItem6 = new MenuBarItem(); this.menuItem_visitWebsite = new MenuButtonItem(); this.menuItem_about = new MenuButtonItem(); this.toolBarMain = new TD.SandBar.ToolBar(); this.buttonItem1 = new ButtonItem(); this.buttonItem2 = new ButtonItem(); this.buttonItem3 = new ButtonItem(); this.buttonItem4 = new ButtonItem(); this.buttonItem5 = new ButtonItem(); this.toolTip = new ToolTip(this.components); this.openMapDialog = new OpenFileDialog(); this.saveMapDialog = new SaveFileDialog(); this.timerUIUpdate = new Timer(this.components); this.statusBar = new StatusStrip(); this.statusBarContextMenu = new ContextMenuStrip(this.components); this.whatsThisToolStripMenuItem = new ToolStripMenuItem(); this.statusCaption = new ToolStripStatusLabel(); this.statusBarCameraSpeed = new ToolStripDropDownButton(); this.cameraSpeedStrip = new ContextMenuStrip(this.components); this.statusBarCameraPos = new ToolStripStatusLabel(); this.statusBarCursorPos = new ToolStripStatusLabel(); this.statusBarMemoryUsage = new ToolStripStatusLabel(); this.statusBarObjectUsage = new ToolStripStatusLabel(); this.statusBarFpsItem = new ToolStripStatusLabel(); this.folderBrowserDialog = new FolderBrowserDialog(); this.viewport = new ViewportControl(); this.topSandBarDock.SuspendLayout(); this.statusBar.SuspendLayout(); this.statusBarContextMenu.SuspendLayout(); base.SuspendLayout(); this.sandDockManager.DockSystemContainer = this; this.sandDockManager.MaximumDockContainerSize = 2000; this.sandDockManager.OwnerForm = this; this.sandBarManager.OwnerForm = this; this.sandBarManager.Renderer = new WhidbeyRenderer(); this.leftSandBarDock.Dock = DockStyle.Left; this.leftSandBarDock.Guid = new Guid("5af42533-b4bf-4ff9-b113-19c06ff822ad"); this.leftSandBarDock.Location = new Point(0, 49); this.leftSandBarDock.Manager = this.sandBarManager; this.leftSandBarDock.Name = "leftSandBarDock"; this.leftSandBarDock.Size = new Size(0, 592); this.leftSandBarDock.TabIndex = 0; this.rightSandBarDock.Dock = DockStyle.Right; this.rightSandBarDock.Guid = new Guid("dd1d865e-52de-4df1-b60b-8d95778c6a99"); this.rightSandBarDock.Location = new Point(973, 49); this.rightSandBarDock.Manager = this.sandBarManager; this.rightSandBarDock.Name = "rightSandBarDock"; this.rightSandBarDock.Size = new Size(0, 592); this.rightSandBarDock.TabIndex = 1; this.bottomSandBarDock.Dock = DockStyle.Bottom; this.bottomSandBarDock.Guid = new Guid("241b4d86-e08e-4fbd-9187-85417e2a6762"); this.bottomSandBarDock.Location = new Point(0, 641); this.bottomSandBarDock.Manager = this.sandBarManager; this.bottomSandBarDock.Name = "bottomSandBarDock"; this.bottomSandBarDock.Size = new Size(973, 0); this.bottomSandBarDock.TabIndex = 2; this.topSandBarDock.Controls.Add(this.menuBar); this.topSandBarDock.Controls.Add(this.toolBarMain); this.topSandBarDock.Dock = DockStyle.Top; this.topSandBarDock.Guid = new Guid("9d4d899c-2f1c-48a5-b6b3-c2965fee85b0"); this.topSandBarDock.Location = new Point(0, 0); this.topSandBarDock.Manager = this.sandBarManager; this.topSandBarDock.Name = "topSandBarDock"; this.topSandBarDock.Size = new Size(973, 49); this.topSandBarDock.TabIndex = 3; this.menuBar.Guid = new Guid("67d4f929-8914-4b23-9c2d-b9539a54dd9b"); this.menuBar.Items.AddRange(new ToolbarItemBase[] { this.menuBarItem1, this.menuBarItem3, this.menuBarItem2, this.menuBarItem4, this.menuBarItem5, this.menuBarItem6 }); this.menuBar.Location = new Point(2, 0); this.menuBar.Movable = false; this.menuBar.Name = "menuBar"; this.menuBar.OwnerForm = this; this.menuBar.Size = new Size(971, 23); this.menuBar.TabIndex = 0; this.menuBar.Text = "menuBar1"; this.menuBarItem1.Items.AddRange(new ToolbarItemBase[] { this.menuItem_newMap, this.menuItem_newWilderness, this.menuItem_loadMap, this.menuItem_saveMap, this.menuItem_saveMapAs, this.menuItem_exit }); this.menuBarItem1.Text = "MENU_FILE"; this.menuItem_newMap.Shortcut = Shortcut.CtrlN; this.menuItem_newMap.Text = "MENUITEM_FILE_NEW_MAP"; this.menuItem_newMap.Activate += new EventHandler(this.menuItem_newMap_Activate); this.menuItem_newWilderness.Text = "MENUITEM_FILE_NEW_WILDERNESS"; this.menuItem_newWilderness.Activate += new EventHandler(this.menuItem_newWilderness_Activate); this.menuItem_loadMap.Shortcut = Shortcut.CtrlO; this.menuItem_loadMap.Text = "MENUITEM_FILE_LOAD_MAP"; this.menuItem_loadMap.Activate += new EventHandler(this.menuItem_loadMap_Activate); this.menuItem_saveMap.BeginGroup = true; this.menuItem_saveMap.Shortcut = Shortcut.CtrlS; this.menuItem_saveMap.Text = "MENUITEM_FILE_SAVE_MAP"; this.menuItem_saveMap.Activate += new EventHandler(this.menuItem_saveMap_Activate); this.menuItem_saveMapAs.Text = "MENUITEM_FILE_SAVE_MAP_AS"; this.menuItem_saveMapAs.Activate += new EventHandler(this.menuItem_saveMapAs_Activate); this.menuItem_exit.BeginGroup = true; this.menuItem_exit.Text = "MENUITEM_FILE_EXIT"; this.menuItem_exit.Activate += new EventHandler(this.menuItem_exit_Activate); this.menuBarItem3.Items.AddRange(new ToolbarItemBase[] { this.menuItem_Undo, this.menuItem_Redo }); this.menuBarItem3.Text = "MENU_EDIT"; this.menuItem_Undo.Shortcut = Shortcut.CtrlZ; this.menuItem_Undo.Text = "MENUITEM_EDIT_UNDO"; this.menuItem_Undo.Activate += new EventHandler(this.menuItem_Undo_Activate); this.menuItem_Redo.Shortcut = Shortcut.CtrlShiftZ; this.menuItem_Redo.Text = "MENUITEM_EDIT_REDO"; this.menuItem_Redo.Activate += new EventHandler(this.menuItem_Redo_Activate); this.menuBarItem2.Items.AddRange(new ToolbarItemBase[] { this.menuItem_viewToolParameters, this.menuItem_viewEditorSettings, this.menuItem_viewContextHelp }); this.menuBarItem2.Text = "MENU_VIEW"; this.menuItem_viewToolParameters.Text = "DOCK_TOOL_PARAMETERS"; this.menuItem_viewToolParameters.Activate += new EventHandler(this.menuItem_viewToolParameters_Activate); this.menuItem_viewEditorSettings.Text = "DOCK_EDITOR_SETTINGS"; this.menuItem_viewEditorSettings.Activate += new EventHandler(this.menuItem_viewEditorSettings_Activate); this.menuItem_viewContextHelp.Text = "DOCK_CONTEXT_HELP"; this.menuItem_viewContextHelp.Activate += new EventHandler(this.menuItem_viewContextHelp_Activate); this.menuBarItem4.Items.AddRange(new ToolbarItemBase[] { this.menuItem_TestIngame }); this.menuBarItem4.Text = "MENU_GAME"; this.menuItem_TestIngame.Shortcut = Shortcut.CtrlG; this.menuItem_TestIngame.Text = "MENUITEM_GAME_TEST_INGAME"; this.menuItem_TestIngame.Activate += new EventHandler(this.menuItem_TestIngame_Activate); this.menuBarItem5.Items.AddRange(new ToolbarItemBase[] { this.menuItem_OpenCodeEditor, this.menuItem_DumpMap, this.menuItem_ExtractBigFile, this.menuItem_ExportToPC, this.menuItem_ExportToConsole, this.menuItem_ResetLayout, this.menuItem_PrepareThumbnails, this.menuItem_ReloadEditor, this.menuItem_ImportWorld, this.menuItem_ObjectAdmin }); this.menuBarItem5.Text = "MENU_ADVANCED"; this.menuItem_OpenCodeEditor.Text = "*Code Editor"; this.menuItem_OpenCodeEditor.Activate += new EventHandler(this.menuItem_OpenCodeEditor_Activate); this.menuItem_DumpMap.BeginGroup = true; this.menuItem_DumpMap.Text = "*Dump map"; this.menuItem_DumpMap.Activate += new EventHandler(this.menuItem_DumpMap_Activate); this.menuItem_ExtractBigFile.Text = "*Extract Bigfile"; this.menuItem_ExtractBigFile.Activate += new EventHandler(this.menuItem_ExtractBigFile_Activate); this.menuItem_ExportToPC.BeginGroup = true; this.menuItem_ExportToPC.Text = "*Export to PC"; this.menuItem_ExportToPC.Activate += new EventHandler(this.menuItem_ExportToPC_Activate); this.menuItem_ExportToConsole.Text = "*Export to Console"; this.menuItem_ExportToConsole.Activate += new EventHandler(this.menuItem_ExportToConsole_Activate); this.menuItem_ResetLayout.Text = "MENUITEM_ADVANCED_RESET_LAYOUT"; this.menuItem_ResetLayout.Activate += new EventHandler(this.menuItem_ResetLayout_Activate); this.menuItem_PrepareThumbnails.BeginGroup = true; this.menuItem_PrepareThumbnails.Text = "*Prepare thumbnails"; this.menuItem_PrepareThumbnails.Activate += new EventHandler(this.menuItem_PrepareThumbnails_Activate); this.menuItem_ReloadEditor.BeginGroup = true; this.menuItem_ReloadEditor.Text = "*Reload editor DLL"; this.menuItem_ReloadEditor.Activate += new EventHandler(this.menuItem_ReloadEditor_Activate); this.menuItem_ImportWorld.BeginGroup = true; this.menuItem_ImportWorld.Text = "*Import world"; this.menuItem_ImportWorld.Activate += new EventHandler(this.menuItem_ImportWorld_Activate); this.menuItem_ObjectAdmin.Text = "*Object admin"; this.menuItem_ObjectAdmin.Activate += new EventHandler(this.menuItem_ObjectAdmin_Activate); this.menuBarItem6.Items.AddRange(new ToolbarItemBase[] { this.menuItem_visitWebsite, this.menuItem_about }); this.menuBarItem6.Text = "MENU_HELP"; this.menuItem_visitWebsite.Text = "MENUITEM_HELP_VISIT_WEBSITE"; this.menuItem_visitWebsite.Activate += new EventHandler(this.menuItem_visitWebsite_Activate); this.menuItem_about.BeginGroup = true; this.menuItem_about.Text = "MENUITEM_HELP_ABOUT"; this.menuItem_about.Activate += new EventHandler(this.menuItem_about_Activate); this.toolBarMain.DockLine = 1; this.toolBarMain.FlipLastItem = true; this.toolBarMain.Guid = new Guid("472238c1-4ade-4ff2-ba4f-4429ed30f50f"); this.toolBarMain.Items.AddRange(new ToolbarItemBase[] { this.buttonItem1, this.buttonItem2, this.buttonItem3, this.buttonItem4, this.buttonItem5 }); this.toolBarMain.Location = new Point(2, 23); this.toolBarMain.Name = "toolBarMain"; this.toolBarMain.Size = new Size(146, 26); this.toolBarMain.TabIndex = 1; this.toolBarMain.Text = "TOOLBAR_MAIN"; this.buttonItem1.BuddyMenu = this.menuItem_newMap; this.buttonItem1.Image = Resources.newMap; this.buttonItem2.BuddyMenu = this.menuItem_loadMap; this.buttonItem2.Image = Resources.openMap; this.buttonItem3.BuddyMenu = this.menuItem_saveMap; this.buttonItem3.Image = Resources.save; this.buttonItem4.BeginGroup = true; this.buttonItem4.BuddyMenu = this.menuItem_Undo; this.buttonItem4.Image = Resources.undo; this.buttonItem5.BuddyMenu = this.menuItem_Redo; this.buttonItem5.Image = Resources.redo; this.openMapDialog.DefaultExt = "fc3map"; this.openMapDialog.Filter = "Far Cry 3 maps (*.fc3map)|*.fc3map|All files (*.*)|*.*"; this.openMapDialog.Title = "Open Far Cry 3 map"; this.saveMapDialog.DefaultExt = "fc3map"; this.saveMapDialog.Filter = "Far Cry 3 maps (*.fc3map)|*.fc3map|All files (*.*)|*.*"; this.saveMapDialog.Title = "Save Far Cry 3 map"; this.timerUIUpdate.Enabled = true; this.timerUIUpdate.Tick += new EventHandler(this.timerUIUpdate_Tick); this.statusBar.ContextMenuStrip = this.statusBarContextMenu; this.statusBar.Items.AddRange(new ToolStripItem[] { this.statusCaption, this.statusBarCameraSpeed, this.statusBarCameraPos, this.statusBarCursorPos, this.statusBarMemoryUsage, this.statusBarObjectUsage, this.statusBarFpsItem }); this.statusBar.Location = new Point(0, 641); this.statusBar.Name = "statusBar"; this.statusBar.Size = new Size(973, 22); this.statusBar.TabIndex = 7; this.statusBar.Text = "statusStrip1"; this.statusBarContextMenu.Items.AddRange(new ToolStripItem[] { this.whatsThisToolStripMenuItem }); this.statusBarContextMenu.Name = "statusBarContextMenu"; this.statusBarContextMenu.Size = new Size(179, 26); this.statusBarContextMenu.Opening += new CancelEventHandler(this.statusBarContextMenu_Opening); this.whatsThisToolStripMenuItem.Name = "whatsThisToolStripMenuItem"; this.whatsThisToolStripMenuItem.Size = new Size(178, 22); this.whatsThisToolStripMenuItem.Text = "HELP_WHATS_THIS"; this.whatsThisToolStripMenuItem.Click += new EventHandler(this.whatsThisToolStripMenuItem_Click); this.statusCaption.ImageAlign = ContentAlignment.MiddleLeft; this.statusCaption.Name = "statusCaption"; this.statusCaption.Size = new Size(408, 17); this.statusCaption.Spring = true; this.statusCaption.Text = "Ready"; this.statusCaption.TextAlign = ContentAlignment.MiddleLeft; this.statusBarCameraSpeed.AutoSize = false; this.statusBarCameraSpeed.DropDown = this.cameraSpeedStrip; this.statusBarCameraSpeed.Image = Resources.speed; this.statusBarCameraSpeed.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarCameraSpeed.ImageTransparentColor = Color.Magenta; this.statusBarCameraSpeed.Name = "statusBarCameraSpeed"; this.statusBarCameraSpeed.Size = new Size(55, 20); this.statusBarCameraSpeed.Text = "0"; this.statusBarCameraSpeed.TextAlign = ContentAlignment.MiddleLeft; this.cameraSpeedStrip.Name = "cameraSpeedStrip"; this.cameraSpeedStrip.OwnerItem = this.statusBarCameraSpeed; this.cameraSpeedStrip.ShowImageMargin = false; this.cameraSpeedStrip.Size = new Size(36, 4); this.statusBarCameraPos.AutoSize = false; this.statusBarCameraPos.Image = Resources.camera; this.statusBarCameraPos.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarCameraPos.Name = "statusBarCameraPos"; this.statusBarCameraPos.Size = new Size(150, 17); this.statusBarCameraPos.Text = "(0, 0, 0)"; this.statusBarCameraPos.TextAlign = ContentAlignment.MiddleLeft; this.statusBarCursorPos.AutoSize = false; this.statusBarCursorPos.Image = Resources.cursor; this.statusBarCursorPos.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarCursorPos.Name = "statusBarCursorPos"; this.statusBarCursorPos.Size = new Size(150, 17); this.statusBarCursorPos.Text = "(0, 0, 0)"; this.statusBarCursorPos.TextAlign = ContentAlignment.MiddleLeft; this.statusBarMemoryUsage.AutoSize = false; this.statusBarMemoryUsage.Image = Resources.MemoryUsage; this.statusBarMemoryUsage.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarMemoryUsage.Name = "statusBarMemoryUsage"; this.statusBarMemoryUsage.Size = new Size(60, 17); this.statusBarMemoryUsage.Text = "0"; this.statusBarMemoryUsage.TextAlign = ContentAlignment.MiddleLeft; this.statusBarObjectUsage.AutoSize = false; this.statusBarObjectUsage.Image = Resources.ObjectUsage; this.statusBarObjectUsage.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarObjectUsage.Name = "statusBarObjectUsage"; this.statusBarObjectUsage.Size = new Size(60, 17); this.statusBarObjectUsage.Text = "0"; this.statusBarObjectUsage.TextAlign = ContentAlignment.MiddleLeft; this.statusBarFpsItem.AutoSize = false; this.statusBarFpsItem.Image = Resources.frametime; this.statusBarFpsItem.ImageAlign = ContentAlignment.MiddleLeft; this.statusBarFpsItem.Name = "statusBarFpsItem"; this.statusBarFpsItem.Size = new Size(75, 17); this.statusBarFpsItem.Text = "0.0 fps"; this.statusBarFpsItem.TextAlign = ContentAlignment.MiddleLeft; this.folderBrowserDialog.Description = "Select export folder"; this.viewport.BackColor = SystemColors.AppWorkspace; this.viewport.BlockNextKeyRepeats = false; this.viewport.BorderStyle = BorderStyle.Fixed3D; this.viewport.CameraEnabled = true; this.viewport.CaptureMouse = false; this.viewport.CaptureWheel = false; this.viewport.Cursor = Cursors.Default; this.viewport.DefaultCursor = Cursors.Default; this.viewport.Dock = DockStyle.Fill; this.viewport.Location = new Point(0, 49); this.viewport.Name = "viewport"; this.viewport.Size = new Size(973, 592); this.viewport.TabIndex = 5; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(973, 663); base.Controls.Add(this.viewport); base.Controls.Add(this.leftSandBarDock); base.Controls.Add(this.rightSandBarDock); base.Controls.Add(this.bottomSandBarDock); base.Controls.Add(this.topSandBarDock); base.Controls.Add(this.statusBar); base.Name = "MainForm"; this.Text = "Far Cry 3 Editor"; base.Activated += new EventHandler(this.MainForm_Activated); base.Deactivate += new EventHandler(this.MainForm_Deactivate); base.FormClosing += new FormClosingEventHandler(this.MainForm_FormClosing); base.FormClosed += new FormClosedEventHandler(this.MainForm_FormClosed); base.Load += new EventHandler(this.MainForm_Load); base.LocationChanged += new EventHandler(this.MainForm_LocationChanged); base.SizeChanged += new EventHandler(this.MainForm_SizeChanged); this.topSandBarDock.ResumeLayout(false); this.statusBar.ResumeLayout(false); this.statusBar.PerformLayout(); this.statusBarContextMenu.ResumeLayout(false); base.ResumeLayout(false); base.PerformLayout(); }
private void MenuItem_BeforePopup(object sender, TD.SandBar.MenuPopupEventArgs e) { try { if (sender == this.dropDownMenuItemValidator) { // Get Validator this.menuButtonItemPGdb.Checked = (WorkspaceValidator.Default.Validator is PersonalGeodatabaseValidator); this.menuButtonItemFGdb.Checked = (WorkspaceValidator.Default.Validator is FileGeodatabaseValidator); // Clear SDE Connection Items this.menuButtonItemSdeConnection.Items.Clear(); // Find ArcCatalog SDE Connections string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string esri = System.IO.Path.Combine(applicationData, "ESRI"); string arcCatalog = System.IO.Path.Combine(esri, "ArcCatalog"); if (!Directory.Exists(arcCatalog)) { MenuButtonItem menuButton = new MenuButtonItem(); menuButton.Enabled = false; menuButton.Text = Resources.TEXT_NOT_AVAILABLE_BR; this.menuButtonItemSdeConnection.Items.Add(menuButton); return; } // Get List of SDE Connections string[] files = Directory.GetFiles(arcCatalog, "*.sde", SearchOption.TopDirectoryOnly); if (files.Length == 0) { MenuButtonItem menuButton = new MenuButtonItem(); menuButton.Enabled = false; menuButton.Text = Resources.TEXT_NONE_BR; this.menuButtonItemSdeConnection.Items.Add(menuButton); return; } // Add an Item for each SDE Connection foreach (string file in files) { string filename = System.IO.Path.GetFileNameWithoutExtension(file); MenuButtonItem menuButton = new MenuButtonItem(); menuButton.Enabled = true; menuButton.Text = filename; menuButton.Tag = file; menuButton.Activate += new EventHandler(this.MenuItem_Activate); this.menuButtonItemSdeConnection.Items.Add(menuButton); } } else if (sender == this.menuButtonItemSdeConnection) { // Get SDE Validator SdeValidator sdeValidator = WorkspaceValidator.Default.Validator as SdeValidator; if (sdeValidator == null) { return; } // Check if SDE Connection File match foreach (MenuButtonItem item in this.menuButtonItemSdeConnection.Items) { if (item.Tag == null) { continue; } string itemTag = item.Tag.ToString(); item.Checked = (itemTag == sdeValidator.SdeFile); } } else if (sender == this.contextMenuBarItemErrorList) { this.menuButtonItemScroll.Enabled = (this.listViewErrorList.SelectedItems.Count == 1); this.menuButtonItemSelect.Enabled = (this.listViewErrorList.SelectedItems.Count > 0); this.menuButtonItemFlashError.Enabled = (this.listViewErrorList.SelectedItems.Count > 0); this.menuButtonItemClearError.Enabled = (this.listViewErrorList.SelectedItems.Count > 0); this.menuButtonItemClearAllErrors.Enabled = (this.listViewErrorList.Items.Count > 0); } } catch (Exception ex) { ExceptionDialog.HandleException(ex); } }
private MenuButtonItem FindMenuButtonItem(string rootButtonName, string buttonName) { MenuButtonItem menuButton = FindMenuButton(rootButtonName); return(menuButton.buttonName == rootButtonName && menuButton.buttonName == buttonName ? menuButton : FindMenuButtonItem(buttonName, menuButton)); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TagExplorer)); this.toolBar1 = new System.Windows.Forms.ToolBar(); this.tbbLibView = new System.Windows.Forms.ToolBarButton(); this.tbbFileView = new System.Windows.Forms.ToolBarButton(); this.tbbSeperator1 = new System.Windows.Forms.ToolBarButton(); this.tbbImport = new System.Windows.Forms.ToolBarButton(); this.tnnInformation = new System.Windows.Forms.ToolBarButton(); this.tbbHelp = new System.Windows.Forms.ToolBarButton(); this.imageList = new System.Windows.Forms.ImageList(this.components); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.cboGame = new System.Windows.Forms.ComboBox(); this.TagTree = new Prometheus.Controls.FileTreeView(); this.menuBar1 = new TD.SandBar.MenuBar(); this.mbiFolder = new TD.SandBar.MenuBarItem(); this.mbiFolder_OpenAllForEdit = new TD.SandBar.MenuButtonItem(); this.mbiFolder_AddAllTags = new TD.SandBar.MenuButtonItem(); this.mbiFolder_DisplayFolderInfo = new TD.SandBar.MenuButtonItem(); this.mbiFolder_CheckDependencies = new TD.SandBar.MenuButtonItem(); this.mbiFolder_Help = new TD.SandBar.MenuButtonItem(); this.mbiFile = new TD.SandBar.MenuBarItem(); this.mbiFile_EditTagForProject = new TD.SandBar.MenuButtonItem(); this.mbiFile_AddTagToProject = new TD.SandBar.MenuButtonItem(); this.mbiFile_PreviewTag = new TD.SandBar.MenuButtonItem(); this.mbiFile_DisplayTagInfo = new TD.SandBar.MenuButtonItem(); this.mbiFile_CheckDependencies = new TD.SandBar.MenuButtonItem(); this.mbiFile_Help = new TD.SandBar.MenuButtonItem(); this.SuspendLayout(); // // toolBar1 // this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat; this.toolBar1.AutoSize = false; this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] { this.tbbLibView, this.tbbFileView, this.tbbSeperator1, this.tbbImport, this.tnnInformation, this.tbbHelp }); this.toolBar1.Dock = System.Windows.Forms.DockStyle.None; this.toolBar1.DropDownArrows = true; this.toolBar1.Enabled = false; this.toolBar1.ImageList = this.imageList; this.toolBar1.Location = new System.Drawing.Point(56, 32); this.toolBar1.Name = "toolBar1"; this.toolBar1.ShowToolTips = true; this.toolBar1.Size = new System.Drawing.Size(124, 26); this.toolBar1.TabIndex = 0; // // tbbLibView // this.tbbLibView.ImageIndex = 0; this.tbbLibView.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; // // tbbFileView // this.tbbFileView.ImageIndex = 1; this.tbbFileView.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton; // // tbbSeperator1 // this.tbbSeperator1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // tbbImport // this.tbbImport.ImageIndex = 2; // // tnnInformation // this.tnnInformation.ImageIndex = 3; // // tbbHelp // this.tbbHelp.ImageIndex = 4; // // imageList // this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.imageList.ImageSize = new System.Drawing.Size(16, 16); this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"))); this.imageList.TransparentColor = System.Drawing.Color.Transparent; // // label1 // this.label1.Enabled = false; this.label1.Location = new System.Drawing.Point(8, 40); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(40, 16); this.label1.TabIndex = 1; this.label1.Text = "View:"; this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight; // // label2 // this.label2.Location = new System.Drawing.Point(7, 7); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(41, 16); this.label2.TabIndex = 2; this.label2.Text = "Game:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // cboGame // this.cboGame.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboGame.Location = new System.Drawing.Point(56, 4); this.cboGame.Name = "cboGame"; this.cboGame.Size = new System.Drawing.Size(128, 24); this.cboGame.TabIndex = 3; this.cboGame.SelectedIndexChanged += new System.EventHandler(this.cboGame_SelectedIndex); // // TagTree // this.TagTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.TagTree.ImageIndex = -1; this.TagTree.Location = new System.Drawing.Point(8, 64); this.TagTree.Name = "TagTree"; this.menuBar1.SetSandBarMenu(this.TagTree, this.mbiFolder); this.TagTree.SelectedImageIndex = -1; this.TagTree.ShowFiles = Prometheus.Controls.FileTreeView.ShowFilesBehavior.Self; this.TagTree.Size = new System.Drawing.Size(176, 224); this.TagTree.TabIndex = 4; this.TagTree.DoubleClick += new System.EventHandler(this.TagTree_DoubleClick); this.TagTree.Click += new System.EventHandler(this.TagTree_Click); this.TagTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TagTree_AfterSelect); // // menuBar1 // this.menuBar1.Guid = new System.Guid("5ea56852-1bdf-4f90-b53f-3aca9dcae076"); this.menuBar1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.mbiFolder, this.mbiFile }); this.menuBar1.Location = new System.Drawing.Point(0, 0); this.menuBar1.Name = "menuBar1"; this.menuBar1.OwnerForm = null; this.menuBar1.Size = new System.Drawing.Size(192, 25); this.menuBar1.TabIndex = 5; this.menuBar1.Text = "menuBar1"; this.menuBar1.Visible = false; // // mbiFolder // this.mbiFolder.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.mbiFolder_OpenAllForEdit, this.mbiFolder_AddAllTags, this.mbiFolder_DisplayFolderInfo, this.mbiFolder_CheckDependencies, this.mbiFolder_Help }); this.mbiFolder.Text = "Library Folder"; // // mbiFolder_OpenAllForEdit // this.mbiFolder_OpenAllForEdit.Image = ((System.Drawing.Image)(resources.GetObject("mbiFolder_OpenAllForEdit.Image"))); this.mbiFolder_OpenAllForEdit.Text = "Open All for &Edit"; // // mbiFolder_AddAllTags // this.mbiFolder_AddAllTags.Image = ((System.Drawing.Image)(resources.GetObject("mbiFolder_AddAllTags.Image"))); this.mbiFolder_AddAllTags.Text = "&Add All Tags"; // // mbiFolder_DisplayFolderInfo // this.mbiFolder_DisplayFolderInfo.Image = ((System.Drawing.Image)(resources.GetObject("mbiFolder_DisplayFolderInfo.Image"))); this.mbiFolder_DisplayFolderInfo.Text = "DIsplay Folder &Info"; // // mbiFolder_CheckDependencies // this.mbiFolder_CheckDependencies.Image = ((System.Drawing.Image)(resources.GetObject("mbiFolder_CheckDependencies.Image"))); this.mbiFolder_CheckDependencies.Text = "Check &Dependencies"; // // mbiFolder_Help // this.mbiFolder_Help.BeginGroup = true; this.mbiFolder_Help.Image = ((System.Drawing.Image)(resources.GetObject("mbiFolder_Help.Image"))); this.mbiFolder_Help.Text = "&Help"; // // mbiFile // this.mbiFile.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.mbiFile_EditTagForProject, this.mbiFile_AddTagToProject, this.mbiFile_PreviewTag, this.mbiFile_DisplayTagInfo, this.mbiFile_CheckDependencies, this.mbiFile_Help }); this.mbiFile.Text = "Library File"; // // mbiFile_EditTagForProject // this.mbiFile_EditTagForProject.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_EditTagForProject.Image"))); this.mbiFile_EditTagForProject.Text = "Edit Tag for Project"; this.mbiFile_EditTagForProject.Activate += new System.EventHandler(this.mbiFile_EditTagForProject_Activate); // // mbiFile_AddTagToProject // this.mbiFile_AddTagToProject.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_AddTagToProject.Image"))); this.mbiFile_AddTagToProject.Text = "Add Tag to Project"; this.mbiFile_AddTagToProject.Activate += new System.EventHandler(this.mbiFile_AddTagToProject_Activate); // // mbiFile_PreviewTag // this.mbiFile_PreviewTag.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_PreviewTag.Image"))); this.mbiFile_PreviewTag.Text = "Preview Tag"; this.mbiFile_PreviewTag.Activate += new System.EventHandler(this.mbiFile_PreviewTag_Activate); // // mbiFile_DisplayTagInfo // this.mbiFile_DisplayTagInfo.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_DisplayTagInfo.Image"))); this.mbiFile_DisplayTagInfo.Text = "Display Tag Info"; // // mbiFile_CheckDependencies // this.mbiFile_CheckDependencies.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_CheckDependencies.Image"))); this.mbiFile_CheckDependencies.Text = "Check Dependencies"; // // mbiFile_Help // this.mbiFile_Help.BeginGroup = true; this.mbiFile_Help.Image = ((System.Drawing.Image)(resources.GetObject("mbiFile_Help.Image"))); this.mbiFile_Help.Text = "Help"; // // TagExplorer // this.Controls.Add(this.menuBar1); this.Controls.Add(this.TagTree); this.Controls.Add(this.cboGame); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.toolBar1); this.Name = "TagExplorer"; this.Size = new System.Drawing.Size(192, 296); this.ResumeLayout(false); }
/// <summary> /// Refreshes the recent file list. /// </summary> /// <param name="recentFiles">List of recent files, chronoligically ordered.</param> /// <param name="maximumListSize">The maximum size of the list.</param> public void RefreshRecentFilesList(StringCollection recentFiles, int maximumListSize) { MenuItemBag.FileRecentFileList.Items.Clear(); for (int file = 0; file < (recentFiles.Count < maximumListSize ? recentFiles.Count : maximumListSize); file ++) { MenuButtonItem recentFileButton = new MenuButtonItem(string.Format("&{0} {1}", file + 1, recentFiles[file])); recentFileButton.Tag = recentFiles[file]; MenuItemBag.FileRecentFileList.Items.Add(recentFileButton); } MenuItemBag.FileRecentFileList.Visible = (MenuItemBag.FileRecentFileList.Items.Count > 0); OnRecentFileListChanged(new PrimaryMenus.MenuItemsChangedEventArgs(MenuItemBag.FileRecentFileList)); }
/// <summary> /// /// </summary> public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Items.Add("Validate Module", ValidateModule); // Get common views, forms, and controls. NWN2BlueprintView blueprintView = (NWN2BlueprintView)ToolsetHelper.GetControlOfFieldType(typeof(NWN2BlueprintView)); // Create our toolbar. toolBar = ToolsetHelper.GenerateToolBar("acrToolBar"); ToolsetHelper.GetControl(typeof(ToolBarContainer), "topSandBarDock").Controls.Add(toolBar); // Populate it with some buttons. toolBar.Items.Add(ToolsetHelper.GenerateButtonItem("Creature", OpenCreatureEditor)); toolBar.Items.Add(ToolsetHelper.GenerateButtonItem("Trigger", OpenTriggerEditor)); toolBar.Items.Add(ToolsetHelper.GenerateButtonItem("Waypoint", OpenWaypointEditor)); // Handle blueprint view selection changes. blueprintView.SelectionChanged += delegate(object sender, BlueprintSelectionChangedEventArgs e) { if (e.Selection.Length > 0 && e.Selection != e.OldSelection) { INWN2Blueprint blueprint = (INWN2Blueprint)e.Selection[0]; switch ( blueprint.ObjectType ) { case NWN2ObjectType.Creature: creatureEditor.setFocus((NWN2CreatureBlueprint)blueprint); break; case NWN2ObjectType.Waypoint: waypointEditor.setFocus((NWN2WaypointBlueprint)blueprint); break; case NWN2ObjectType.Trigger: triggerEditor.setFocus((NWN2TriggerBlueprint)blueprint); break; } } }; }
// // Called during early stage toolset initialization. // public virtual void Startup(INWN2PluginHost Host) { // // Spin up the plugin menu UI. // Plugin = this; m_MenuItem = Host.GetMenuForPlugin(this); m_MenuItem.Activate += new EventHandler(this.OnPluginMenuActivated); }
private void UpdateMenu() { Hashtable images = new Hashtable(); int imageIndex = 0; foreach (CommandMapping cmd in Editor.Commands) { if (cmd.MenuPath == null) { continue; } string fullPath = cmd.MenuPath; string[] parts = fullPath.Split('/'); string current = ""; int n = parts.Length; ToolbarItemBaseCollection list = menuBar1.Items; MenuItemBase menuNode = null; foreach (string part in parts) { n--; if (part.Length == 0) { continue; } current += "/" + part; if (n == 0) { MenuButtonItem leaf = new MenuButtonItem(part); if (cmd.ImagePath != null) { object o = images[cmd.ImagePath]; if (o != null) { IntPtr index = (IntPtr)o; leaf.Image = commandImageList.Images[index.ToInt32()]; } else { if (ControlUtil.AddImage(commandImageList, typeof(XEditNetCtrl), cmd.ImagePath)) { leaf.Image = commandImageList.Images[imageIndex]; images[cmd.ImagePath] = new IntPtr(imageIndex++); } } } leaf.MergeIndex = 0; leaf.MergeAction = ItemMergeAction.Add; if (cmd.MenuIndex != -1) { leaf.MergeIndex = cmd.MenuIndex; leaf.MergeAction = ItemMergeAction.Insert; } leaf.BeginGroup = cmd.MenuBreak; leaf.Tag = cmd; leaf.Activate += new EventHandler(DispatchCommand); Shortcut[] keys = cmd.Keys; if (keys.Length > 0) { leaf.Shortcut = keys[0]; if (keys.Length > 1) { leaf.Shortcut2 = keys[1]; } } // TODO: M: check for invalid input (button at top level) menuNode.Items.Add(leaf); } else { menuNode = FindItem(list, part); if (menuNode == null) { menuNode = new MenuBarItem(part); menuNode.MergeIndex = -1; menuNode.MergeAction = ItemMergeAction.MergeChildren; menuNode.BeginGroup = cmd.MenuBreak; list.Add(menuNode); } } list = menuNode.Items; } } }
public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Activate += new EventHandler(this.HandlePluginLaunch); }
public void Startup(INWN2PluginHost Host) { this.menuItem = Host.GetMenuForPlugin(this); this.menuItem.Activate += new EventHandler(this.TerrainImporter_Activate); }
/// <summary> /// Initialization. Call this function in form Load handler. /// </summary> /// <param name="owner">Owner form</param> /// <param name="mruItem">Recent Files menu item</param> /// <param name="regPath">Registry Path to keep MRU list</param> public void Initialize(Form owner, MenuButtonItem mruItem, string regPath) { // keep reference to owner form ownerForm = owner; // check if owner form implements IMRUClient interface if ( ! ( owner is IMRUClient ) ) { throw new Exception( "MRUManager: Owner form doesn't implement IMRUClient interface"); } // keep reference to MRU menu item menuItemMRU = mruItem; // keep reference to MRU menu item parent menuItemParent = (MenuBarItem) menuItemMRU.Parent; // keep Registry path adding MRU key to it registryPath = regPath; if ( registryPath.EndsWith("\\") ) registryPath += "MRU"; else registryPath += "\\MRU"; // keep current directory in the time of initialization currentDirectory = Directory.GetCurrentDirectory(); // subscribe to MRU parent Popup event menuItemParent.BeforePopup += new MenuItemBase.BeforePopupEventHandler(this.OnMRUParentPopup); // subscribe to owner form Closing event ownerForm.Closing += new System.ComponentModel.CancelEventHandler(OnOwnerClosing); // load MRU list from Registry LoadMRU(); }
public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Activate += new EventHandler(this.HandlePluginLaunch); NWN2ToolsetMainForm.App.KeyPreview = true; NWN2ToolsetMainForm.App.KeyDown += new KeyEventHandler(NWN2BrushSaver); }
public static MenuButtonItem GenerateMenuButtonItem(string text) { MenuButtonItem button = new MenuButtonItem(); button.Text = text; return button; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.menuBarItem1 = new TD.SandBar.MenuBarItem(); this.menuBarItem2 = new TD.SandBar.MenuBarItem(); this.menuBarItem3 = new TD.SandBar.MenuBarItem(); this.menuBarItem4 = new TD.SandBar.MenuBarItem(); this.menuBarItem5 = new TD.SandBar.MenuBarItem(); this.sandDockManager = new TD.SandDock.SandDockManager(); this.leftSandDock = new TD.SandDock.DockContainer(); this.rightSandDock = new TD.SandDock.DockContainer(); this.dockElementInsert = new TD.SandDock.DockableWindow(); this.elementInsertPanel = new XEditNet.Widgets.ElementInsertPanel(); this.dockElementChange = new TD.SandDock.DockableWindow(); this.elementChangePanel = new XEditNet.Widgets.ElementChangePanel(); this.dockAttributes = new TD.SandDock.DockableWindow(); this.attributeChangePanel = new XEditNet.Widgets.AttributeChangePanel(); this.bottomSandDock = new TD.SandDock.DockContainer(); this.topSandDock = new TD.SandDock.DockContainer(); this.menuBar1 = new TD.SandBar.MenuBar(); this.menuBarItem6 = new TD.SandBar.MenuBarItem(); this.menuFileSave = new TD.SandBar.MenuButtonItem(); this.menuButtonItem1 = new TD.SandBar.MenuButtonItem(); this.menuBarItem7 = new TD.SandBar.MenuBarItem(); this.menuButtonItem2 = new TD.SandBar.MenuButtonItem(); this.menuBarItem8 = new TD.SandBar.MenuBarItem(); this.menuButtonItem3 = new TD.SandBar.MenuButtonItem(); this.toolBar1 = new TD.SandBar.ToolBar(); this.toolBar2 = new TD.SandBar.ToolBar(); this.buttonItem1 = new TD.SandBar.ButtonItem(); this.quickFixBar = new TD.SandBar.ContainerBar(); this.containerBarClientPanel1 = new TD.SandBar.ContainerBarClientPanel(); this.quickFixPanel = new XEditNet.Widgets.QuickFixPanel(); this.quickFixImageList = new System.Windows.Forms.ImageList(this.components); this.quickFixPreceeding = new TD.SandBar.ButtonItem(); this.quickFixFollowing = new TD.SandBar.ButtonItem(); this.commandImageList = new System.Windows.Forms.ImageList(this.components); this.rightSandDock.SuspendLayout(); this.dockElementInsert.SuspendLayout(); this.dockElementChange.SuspendLayout(); this.dockAttributes.SuspendLayout(); this.quickFixBar.SuspendLayout(); this.containerBarClientPanel1.SuspendLayout(); this.SuspendLayout(); // // menuBarItem1 // this.menuBarItem1.Text = "&File"; // // menuBarItem2 // this.menuBarItem2.Text = "&Edit"; // // menuBarItem3 // this.menuBarItem3.Text = "&View"; // // menuBarItem4 // this.menuBarItem4.MdiWindowList = true; this.menuBarItem4.Text = "&Window"; // // menuBarItem5 // this.menuBarItem5.Text = "&Help"; // // sandDockManager // this.sandDockManager.OwnerForm = this; this.sandDockManager.Renderer = new TD.SandDock.Rendering.Office2003Renderer(); // // leftSandDock // this.leftSandDock.Dock = System.Windows.Forms.DockStyle.Left; this.leftSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.leftSandDock.Location = new System.Drawing.Point(0, 22); this.leftSandDock.Manager = this.sandDockManager; this.leftSandDock.Name = "leftSandDock"; this.leftSandDock.Size = new System.Drawing.Size(0, 480); this.leftSandDock.TabIndex = 0; // // rightSandDock // this.rightSandDock.Controls.Add(this.dockElementInsert); this.rightSandDock.Controls.Add(this.dockElementChange); this.rightSandDock.Controls.Add(this.dockAttributes); this.rightSandDock.Dock = System.Windows.Forms.DockStyle.Right; this.rightSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400, System.Windows.Forms.Orientation.Horizontal, new TD.SandDock.LayoutSystemBase[] { new TD.SandDock.ControlLayoutSystem(212, 238, new TD.SandDock.DockableWindow[] { this.dockElementInsert, this.dockElementChange }, this.dockElementInsert), new TD.SandDock.ControlLayoutSystem(212, 238, new TD.SandDock.DockableWindow[] { this.dockAttributes }, this.dockAttributes) }); this.rightSandDock.Location = new System.Drawing.Point(600, 22); this.rightSandDock.Manager = this.sandDockManager; this.rightSandDock.Name = "rightSandDock"; this.rightSandDock.Size = new System.Drawing.Size(216, 480); this.rightSandDock.TabIndex = 1; // // dockElementInsert // this.dockElementInsert.Controls.Add(this.elementInsertPanel); this.dockElementInsert.Guid = new System.Guid("63fe64f8-5444-45cb-b17d-17f8baf0c91d"); this.dockElementInsert.Location = new System.Drawing.Point(4, 25); this.dockElementInsert.Name = "dockElementInsert"; this.dockElementInsert.Size = new System.Drawing.Size(212, 190); this.dockElementInsert.TabIndex = 1; this.dockElementInsert.Text = "Insert"; // // elementInsertPanel // this.elementInsertPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.elementInsertPanel.Location = new System.Drawing.Point(0, 0); this.elementInsertPanel.Name = "elementInsertPanel"; this.elementInsertPanel.Size = new System.Drawing.Size(212, 190); this.elementInsertPanel.TabIndex = 0; // // dockElementChange // this.dockElementChange.Controls.Add(this.elementChangePanel); this.dockElementChange.Guid = new System.Guid("cb2f6fbf-41de-4588-a08b-f4f00d505fa7"); this.dockElementChange.Location = new System.Drawing.Point(4, 25); this.dockElementChange.Name = "dockElementChange"; this.dockElementChange.Size = new System.Drawing.Size(212, 190); this.dockElementChange.TabIndex = 1; this.dockElementChange.Text = "Change"; // // elementChangePanel // this.elementChangePanel.Dock = System.Windows.Forms.DockStyle.Fill; this.elementChangePanel.Location = new System.Drawing.Point(0, 0); this.elementChangePanel.Name = "elementChangePanel"; this.elementChangePanel.Size = new System.Drawing.Size(212, 190); this.elementChangePanel.TabIndex = 0; // // dockAttributes // this.dockAttributes.Controls.Add(this.attributeChangePanel); this.dockAttributes.Guid = new System.Guid("7a4f064f-d569-4ab2-8133-ca0b6b8c4151"); this.dockAttributes.Location = new System.Drawing.Point(4, 267); this.dockAttributes.Name = "dockAttributes"; this.dockAttributes.Size = new System.Drawing.Size(212, 190); this.dockAttributes.TabIndex = 2; this.dockAttributes.Text = "Attributes"; // // attributeChangePanel // this.attributeChangePanel.Dock = System.Windows.Forms.DockStyle.Fill; this.attributeChangePanel.Location = new System.Drawing.Point(0, 0); this.attributeChangePanel.Name = "attributeChangePanel"; this.attributeChangePanel.Size = new System.Drawing.Size(212, 190); this.attributeChangePanel.TabIndex = 0; // // bottomSandDock // this.bottomSandDock.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.bottomSandDock.Location = new System.Drawing.Point(0, 502); this.bottomSandDock.Manager = this.sandDockManager; this.bottomSandDock.Name = "bottomSandDock"; this.bottomSandDock.Size = new System.Drawing.Size(816, 0); this.bottomSandDock.TabIndex = 2; // // topSandDock // this.topSandDock.Dock = System.Windows.Forms.DockStyle.Top; this.topSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.topSandDock.Location = new System.Drawing.Point(0, 22); this.topSandDock.Manager = this.sandDockManager; this.topSandDock.Name = "topSandDock"; this.topSandDock.Size = new System.Drawing.Size(816, 0); this.topSandDock.TabIndex = 3; // // menuBar1 // this.menuBar1.AllowMerge = true; this.menuBar1.Guid = new System.Guid("dc0a091b-fb9a-4a33-8bf0-a9a24af4064c"); this.menuBar1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuBarItem6, this.menuBarItem7, this.menuBarItem8 }); this.menuBar1.Location = new System.Drawing.Point(232, 22); this.menuBar1.Name = "menuBar1"; this.menuBar1.OwnerForm = this; this.menuBar1.Size = new System.Drawing.Size(368, 22); this.menuBar1.TabIndex = 0; this.menuBar1.Text = "menuBar1"; this.menuBar1.Visible = false; // // menuBarItem6 // this.menuBarItem6.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuFileSave, this.menuButtonItem1 }); this.menuBarItem6.Text = "&File"; // // menuFileSave // this.menuFileSave.BeginGroup = true; this.menuFileSave.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.menuFileSave.MergeIndex = 2; this.menuFileSave.Text = "Save"; this.menuFileSave.Activate += new System.EventHandler(this.SaveFile); // // menuButtonItem1 // this.menuButtonItem1.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.menuButtonItem1.MergeIndex = 3; this.menuButtonItem1.Text = "&Close"; this.menuButtonItem1.Activate += new System.EventHandler(this.CloseFile); // // menuBarItem7 // this.menuBarItem7.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem2 }); this.menuBarItem7.Text = "&Edit"; // // menuButtonItem2 // this.menuButtonItem2.MergeAction = TD.SandBar.ItemMergeAction.Add; this.menuButtonItem2.MergeIndex = 0; this.menuButtonItem2.Text = "&Test"; // // menuBarItem8 // this.menuBarItem8.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem3 }); this.menuBarItem8.Text = "&View"; // // menuButtonItem3 // this.menuButtonItem3.MergeAction = TD.SandBar.ItemMergeAction.Add; this.menuButtonItem3.MergeIndex = 0; this.menuButtonItem3.Text = "&ViewTest"; // // toolBar1 // this.toolBar1.DockLine = 1; this.toolBar1.Guid = new System.Guid("88196026-7bd7-4954-85b7-34999dcd37cd"); this.toolBar1.Location = new System.Drawing.Point(2, 24); this.toolBar1.Name = "toolBar1"; this.toolBar1.Size = new System.Drawing.Size(24, 18); this.toolBar1.TabIndex = 1; this.toolBar1.Text = "toolBar1"; // // toolBar2 // this.toolBar2.Guid = new System.Guid("458f1dcc-720e-4fb6-b794-41d5a9f186e2"); this.toolBar2.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.buttonItem1 }); this.toolBar2.Location = new System.Drawing.Point(0, 0); this.toolBar2.Name = "toolBar2"; this.toolBar2.Size = new System.Drawing.Size(816, 22); this.toolBar2.TabIndex = 4; this.toolBar2.Text = ""; this.toolBar2.Visible = false; // // buttonItem1 // this.buttonItem1.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.buttonItem1.MergeIndex = 2; this.buttonItem1.Text = "xxxx"; // // quickFixBar // this.quickFixBar.AddRemoveButtonsVisible = false; this.quickFixBar.AllowHorizontalDock = false; this.quickFixBar.Controls.Add(this.containerBarClientPanel1); this.quickFixBar.Dock = System.Windows.Forms.DockStyle.Left; this.quickFixBar.Flow = TD.SandBar.ToolBarLayout.Horizontal; this.quickFixBar.Guid = new System.Guid("0e1e9ede-d2fe-4307-a683-d2e3ea4f4e5f"); this.quickFixBar.ImageList = this.quickFixImageList; this.quickFixBar.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.quickFixPreceeding, this.quickFixFollowing }); this.quickFixBar.Location = new System.Drawing.Point(0, 22); this.quickFixBar.Name = "quickFixBar"; this.quickFixBar.Size = new System.Drawing.Size(232, 480); this.quickFixBar.TabIndex = 5; this.quickFixBar.Text = "Quick Fix"; // // containerBarClientPanel1 // this.containerBarClientPanel1.Controls.Add(this.quickFixPanel); this.containerBarClientPanel1.Location = new System.Drawing.Point(2, 45); this.containerBarClientPanel1.Name = "containerBarClientPanel1"; this.containerBarClientPanel1.Size = new System.Drawing.Size(228, 433); this.containerBarClientPanel1.TabIndex = 0; // // quickFixPanel // this.quickFixPanel.BackColor = System.Drawing.Color.Transparent; this.quickFixPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.quickFixPanel.Location = new System.Drawing.Point(0, 0); this.quickFixPanel.Name = "quickFixPanel"; this.quickFixPanel.Size = new System.Drawing.Size(228, 433); this.quickFixPanel.TabIndex = 0; this.quickFixPanel.FinishUpdate += new System.EventHandler(this.QuickFixUpdated); // // quickFixImageList // this.quickFixImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.quickFixImageList.ImageSize = new System.Drawing.Size(16, 16); this.quickFixImageList.TransparentColor = System.Drawing.Color.Transparent; // // quickFixPreceeding // this.quickFixPreceeding.ImageIndex = 0; this.quickFixPreceeding.Activate += new System.EventHandler(this.GotoPrecedingError); // // quickFixFollowing // this.quickFixFollowing.ImageIndex = 1; this.quickFixFollowing.Activate += new System.EventHandler(this.GotoFollowingError); // // commandImageList // this.commandImageList.ImageSize = new System.Drawing.Size(16, 16); this.commandImageList.TransparentColor = System.Drawing.Color.Transparent; // // XEditNetChildForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(816, 502); this.Controls.Add(this.menuBar1); this.Controls.Add(this.quickFixBar); this.Controls.Add(this.leftSandDock); this.Controls.Add(this.rightSandDock); this.Controls.Add(this.bottomSandDock); this.Controls.Add(this.topSandDock); this.Controls.Add(this.toolBar2); this.Name = "XEditNetChildForm"; this.Text = "XEditNetChildForm"; this.rightSandDock.ResumeLayout(false); this.dockElementInsert.ResumeLayout(false); this.dockElementChange.ResumeLayout(false); this.dockAttributes.ResumeLayout(false); this.quickFixBar.ResumeLayout(false); this.containerBarClientPanel1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Constructs the arguments class. /// </summary> /// <param name="parentItem">Parent item for which child items changed.</param> public MenuItemsChangedEventArgs(MenuButtonItem parentItem) { _parentItem = parentItem; }
private void UpdateMenu() { Hashtable images=new Hashtable(); int imageIndex=0; foreach ( CommandMapping cmd in Editor.Commands ) { if ( cmd.MenuPath == null ) continue; string fullPath=cmd.MenuPath; string[] parts=fullPath.Split('/'); string current=""; int n=parts.Length; ToolbarItemBaseCollection list=menuBar1.Items; MenuItemBase menuNode=null; foreach ( string part in parts ) { n--; if ( part.Length == 0 ) continue; current+="/"+part; if ( n == 0 ) { MenuButtonItem leaf=new MenuButtonItem(part); if ( cmd.ImagePath != null ) { object o=images[cmd.ImagePath]; if ( o != null ) { IntPtr index=(IntPtr) o; leaf.Image=commandImageList.Images[index.ToInt32()]; } else { if ( ControlUtil.AddImage(commandImageList, typeof(XEditNetCtrl), cmd.ImagePath) ) { leaf.Image=commandImageList.Images[imageIndex]; images[cmd.ImagePath]=new IntPtr(imageIndex++); } } } leaf.MergeIndex=0; leaf.MergeAction=ItemMergeAction.Add; if ( cmd.MenuIndex != -1 ) { leaf.MergeIndex=cmd.MenuIndex; leaf.MergeAction=ItemMergeAction.Insert; } leaf.BeginGroup=cmd.MenuBreak; leaf.Tag=cmd; leaf.Activate+=new EventHandler(DispatchCommand); Shortcut[] keys=cmd.Keys; if ( keys.Length > 0 ) { leaf.Shortcut=keys[0]; if ( keys.Length > 1 ) leaf.Shortcut2=keys[1]; } // TODO: M: check for invalid input (button at top level) menuNode.Items.Add(leaf); } else { menuNode=FindItem(list, part); if ( menuNode == null ) { menuNode=new MenuBarItem(part); menuNode.MergeIndex=-1; menuNode.MergeAction=ItemMergeAction.MergeChildren; menuNode.BeginGroup=cmd.MenuBreak; list.Add(menuNode); } } list=menuNode.Items; } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); this.contextMenu1 = new System.Windows.Forms.ContextMenu(); this.setFontMenuItem = new System.Windows.Forms.MenuItem(); this.openMenuItem = new System.Windows.Forms.MenuItem(); this.saveMenuItem = new System.Windows.Forms.MenuItem(); this.fontDialog1 = new System.Windows.Forms.FontDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.statusBar1 = new System.Windows.Forms.StatusBar(); this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel(); this.sandDockManager1 = new TD.SandDock.SandDockManager(); this.leftSandDock = new TD.SandDock.DockContainer(); this.rightSandDock = new TD.SandDock.DockContainer(); this.bottomSandDock = new TD.SandDock.DockContainer(); this.topSandDock = new TD.SandDock.DockContainer(); this.toolBar1 = new TD.SandBar.ToolBar(); this.buttonOpen = new TD.SandBar.ButtonItem(); this.saveButton = new TD.SandBar.ButtonItem(); this.recordButton = new TD.SandBar.ButtonItem(); this.assertButton = new TD.SandBar.ButtonItem(); this.playbackButton = new TD.SandBar.ButtonItem(); this.dropDownMenuItem1 = new TD.SandBar.DropDownMenuItem(); this.menuButtonItem2 = new TD.SandBar.MenuButtonItem(); this.menuButtonItem5 = new TD.SandBar.MenuButtonItem(); this.menuButtonItem6 = new TD.SandBar.MenuButtonItem(); this.menuButtonItem3 = new TD.SandBar.MenuButtonItem(); this.menuButtonItem4 = new TD.SandBar.MenuButtonItem(); this.menuButtonItem1 = new TD.SandBar.MenuButtonItem(); this.aboutButton = new TD.SandBar.ButtonItem(); this.documentContainer1 = new TD.SandDock.DocumentContainer(); this.dockControl1 = new TD.SandDock.DockControl(); this.panel1 = new System.Windows.Forms.Panel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.textScript = new System.Windows.Forms.RichTextBox(); this.splitter1 = new System.Windows.Forms.Splitter(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.lstEvents = new System.Windows.Forms.ListBox(); this.dockControlOutput = new TD.SandDock.DockControl(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.rtbStdOutLog = new System.Windows.Forms.RichTextBox(); this.btnSaveLog = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit(); this.documentContainer1.SuspendLayout(); this.dockControl1.SuspendLayout(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.dockControlOutput.SuspendLayout(); this.groupBox3.SuspendLayout(); this.SuspendLayout(); // // contextMenu1 // this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.setFontMenuItem, this.openMenuItem, this.saveMenuItem }); // // setFontMenuItem // this.setFontMenuItem.Index = 0; this.setFontMenuItem.Text = "Set Font..."; this.setFontMenuItem.Click += new System.EventHandler(this.setFontMenuItem_Click); // // openMenuItem // this.openMenuItem.Index = 1; this.openMenuItem.Text = "Open..."; this.openMenuItem.Click += new System.EventHandler(this.openMenuItem_Click); // // saveMenuItem // this.saveMenuItem.Index = 2; this.saveMenuItem.Text = "Save..."; this.saveMenuItem.Click += new System.EventHandler(this.saveMenuItem_Click); // // statusBar1 // this.statusBar1.Location = new System.Drawing.Point(0, 583); this.statusBar1.Name = "statusBar1"; this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { this.statusBarPanel1 }); this.statusBar1.ShowPanels = true; this.statusBar1.Size = new System.Drawing.Size(608, 22); this.statusBar1.TabIndex = 8; // // statusBarPanel1 // this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; this.statusBarPanel1.Name = "statusBarPanel1"; this.statusBarPanel1.Width = 592; // // sandDockManager1 // this.sandDockManager1.OwnerForm = this; // // leftSandDock // this.leftSandDock.Dock = System.Windows.Forms.DockStyle.Left; this.leftSandDock.Guid = new System.Guid("25ec745e-de38-4c1a-a783-53b829ea6734"); this.leftSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.leftSandDock.Location = new System.Drawing.Point(0, 0); this.leftSandDock.Manager = this.sandDockManager1; this.leftSandDock.Name = "leftSandDock"; this.leftSandDock.Size = new System.Drawing.Size(0, 605); this.leftSandDock.TabIndex = 10; // // rightSandDock // this.rightSandDock.Dock = System.Windows.Forms.DockStyle.Right; this.rightSandDock.Guid = new System.Guid("c4aec7ed-9055-44f4-af3f-2ea35df51099"); this.rightSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.rightSandDock.Location = new System.Drawing.Point(608, 0); this.rightSandDock.Manager = this.sandDockManager1; this.rightSandDock.Name = "rightSandDock"; this.rightSandDock.Size = new System.Drawing.Size(0, 605); this.rightSandDock.TabIndex = 11; // // bottomSandDock // this.bottomSandDock.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomSandDock.Guid = new System.Guid("5196e983-c717-40e9-b223-368ca5f449f3"); this.bottomSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.bottomSandDock.Location = new System.Drawing.Point(0, 605); this.bottomSandDock.Manager = this.sandDockManager1; this.bottomSandDock.Name = "bottomSandDock"; this.bottomSandDock.Size = new System.Drawing.Size(608, 0); this.bottomSandDock.TabIndex = 12; // // topSandDock // this.topSandDock.Dock = System.Windows.Forms.DockStyle.Top; this.topSandDock.Guid = new System.Guid("c11b7c3d-b652-47b2-bf7d-0a72097ec98e"); this.topSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.topSandDock.Location = new System.Drawing.Point(0, 0); this.topSandDock.Manager = this.sandDockManager1; this.topSandDock.Name = "topSandDock"; this.topSandDock.Size = new System.Drawing.Size(608, 0); this.topSandDock.TabIndex = 13; // // toolBar1 // this.toolBar1.ContextMenu = this.contextMenu1; this.toolBar1.FlipLastItem = true; this.toolBar1.Guid = new System.Guid("a57ee27e-f5fa-4a3f-986a-cbe4264539d5"); this.toolBar1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.buttonOpen, this.saveButton, this.recordButton, this.assertButton, this.playbackButton, this.dropDownMenuItem1, this.aboutButton }); this.toolBar1.Location = new System.Drawing.Point(0, 0); this.toolBar1.Name = "toolBar1"; this.toolBar1.ShowShortcutsInToolTips = true; this.toolBar1.Size = new System.Drawing.Size(608, 22); this.toolBar1.TabIndex = 14; this.toolBar1.Text = ""; this.toolBar1.TextAlign = TD.SandBar.ToolBarTextAlign.Underneath; // // buttonOpen // this.buttonOpen.IconSize = new System.Drawing.Size(32, 32); this.buttonOpen.Text = "Open"; this.buttonOpen.ToolTipText = "Open"; this.buttonOpen.Activate += new System.EventHandler(this.buttonOpen_Activate); // // saveButton // this.saveButton.IconSize = new System.Drawing.Size(32, 32); this.saveButton.Text = "Save"; this.saveButton.ToolTipText = "Save"; this.saveButton.Activate += new System.EventHandler(this.saveButton_Activate); // // recordButton // this.recordButton.BeginGroup = true; this.recordButton.Text = "Start"; this.recordButton.ToolTipText = "Start"; this.recordButton.Activate += new System.EventHandler(this.recordButton_Activate); // // assertButton // this.assertButton.IconSize = new System.Drawing.Size(128, 128); this.assertButton.Text = "Assert"; this.assertButton.ToolTipText = "Add assertion"; this.assertButton.Activate += new System.EventHandler(this.assertButton_Activate); // // playbackButton // this.playbackButton.Text = "Playback"; this.playbackButton.ToolTipText = "Playback"; this.playbackButton.Activate += new System.EventHandler(this.playbackButton_Activate); // // dropDownMenuItem1 // this.dropDownMenuItem1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem2, this.menuButtonItem3, this.menuButtonItem4, this.menuButtonItem1 }); this.dropDownMenuItem1.Text = "Options"; this.dropDownMenuItem1.Visible = false; // // menuButtonItem2 // this.menuButtonItem2.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem5, this.menuButtonItem6 }); this.menuButtonItem2.Text = "Browser Selection"; // // menuButtonItem5 // this.menuButtonItem5.Text = "Firewatir: Mozilla Firefox"; // // menuButtonItem6 // this.menuButtonItem6.Text = "Watir: Internet Explorer"; // // menuButtonItem3 // this.menuButtonItem3.Text = "Watir Project Page"; // // menuButtonItem4 // this.menuButtonItem4.Text = "Ruby Project Page"; // // menuButtonItem1 // this.menuButtonItem1.BeginGroup = true; this.menuButtonItem1.Text = "About..."; this.menuButtonItem1.Activate += new System.EventHandler(this.menuButtonItem1_Activate); // // aboutButton // this.aboutButton.BuddyMenu = this.menuButtonItem1; this.aboutButton.IconSize = new System.Drawing.Size(32, 32); this.aboutButton.Text = "About"; this.aboutButton.ToolTipText = "About"; this.aboutButton.Activate += new System.EventHandler(this.aboutButton_Activate); // // documentContainer1 // this.documentContainer1.Controls.Add(this.dockControl1); this.documentContainer1.Controls.Add(this.dockControlOutput); this.documentContainer1.Guid = new System.Guid("a1f0db60-29b8-4f8c-b3ca-0613232ae52d"); this.documentContainer1.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400, System.Windows.Forms.Orientation.Horizontal, new TD.SandDock.LayoutSystemBase[] { ((TD.SandDock.LayoutSystemBase)(new TD.SandDock.DocumentLayoutSystem(606, 559, new TD.SandDock.DockControl[] { this.dockControl1, this.dockControlOutput }, this.dockControl1))) }); this.documentContainer1.Location = new System.Drawing.Point(0, 22); this.documentContainer1.Manager = null; this.documentContainer1.Name = "documentContainer1"; this.documentContainer1.Renderer = new TD.SandDock.Rendering.Office2003Renderer(); this.documentContainer1.Size = new System.Drawing.Size(608, 561); this.documentContainer1.TabIndex = 15; this.documentContainer1.DragDrop += new System.Windows.Forms.DragEventHandler(this.textScript_DragDrop); this.documentContainer1.DragEnter += new System.Windows.Forms.DragEventHandler(this.textScript_DragEnter); // // dockControl1 // this.dockControl1.Controls.Add(this.panel1); this.dockControl1.Guid = new System.Guid("804e5184-274f-4191-a3ab-346cf996384a"); this.dockControl1.Location = new System.Drawing.Point(5, 33); this.dockControl1.Name = "dockControl1"; this.dockControl1.Size = new System.Drawing.Size(598, 523); this.dockControl1.TabIndex = 0; this.dockControl1.Text = "Recording"; this.dockControl1.Closing += new System.ComponentModel.CancelEventHandler(this.dockControl1_Closing); // // panel1 // this.panel1.Controls.Add(this.groupBox1); this.panel1.Controls.Add(this.splitter1); this.panel1.Controls.Add(this.groupBox2); this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(598, 523); this.panel1.TabIndex = 8; // // groupBox1 // this.groupBox1.Controls.Add(this.textScript); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(598, 384); this.groupBox1.TabIndex = 4; this.groupBox1.TabStop = false; this.groupBox1.Text = "Watir Test Code"; this.groupBox1.DragOver += new System.Windows.Forms.DragEventHandler(this.textScript_DragEnter); this.groupBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.textScript_DragDrop); this.groupBox1.DragEnter += new System.Windows.Forms.DragEventHandler(this.textScript_DragEnter); // // textScript // this.textScript.AllowDrop = true; this.textScript.ContextMenu = this.contextMenu1; this.textScript.DetectUrls = false; this.textScript.Dock = System.Windows.Forms.DockStyle.Fill; this.textScript.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textScript.Location = new System.Drawing.Point(3, 16); this.textScript.Name = "textScript"; this.textScript.Size = new System.Drawing.Size(592, 365); this.textScript.TabIndex = 1; this.textScript.Text = ""; this.textScript.DragDrop += new System.Windows.Forms.DragEventHandler(this.textScript_DragDrop); this.textScript.DragEnter += new System.Windows.Forms.DragEventHandler(this.textScript_DragEnter); // // splitter1 // this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom; this.splitter1.Location = new System.Drawing.Point(0, 384); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(598, 3); this.splitter1.TabIndex = 6; this.splitter1.TabStop = false; // // groupBox2 // this.groupBox2.Controls.Add(this.lstEvents); this.groupBox2.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox2.Location = new System.Drawing.Point(0, 387); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(598, 136); this.groupBox2.TabIndex = 5; this.groupBox2.TabStop = false; this.groupBox2.Text = "Events"; // // lstEvents // this.lstEvents.Dock = System.Windows.Forms.DockStyle.Fill; this.lstEvents.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lstEvents.IntegralHeight = false; this.lstEvents.ItemHeight = 16; this.lstEvents.Location = new System.Drawing.Point(3, 16); this.lstEvents.Name = "lstEvents"; this.lstEvents.Size = new System.Drawing.Size(592, 117); this.lstEvents.TabIndex = 2; // // dockControlOutput // this.dockControlOutput.Controls.Add(this.groupBox3); this.dockControlOutput.Controls.Add(this.btnSaveLog); this.dockControlOutput.Controls.Add(this.btnClear); this.dockControlOutput.Guid = new System.Guid("e4b3c490-2cd9-4436-a969-ac697467fb4a"); this.dockControlOutput.Location = new System.Drawing.Point(5, 33); this.dockControlOutput.Name = "dockControlOutput"; this.dockControlOutput.Size = new System.Drawing.Size(598, 523); this.dockControlOutput.TabIndex = 1; this.dockControlOutput.Text = "Standard Output Log"; // // groupBox3 // this.groupBox3.Controls.Add(this.rtbStdOutLog); this.groupBox3.Location = new System.Drawing.Point(0, 0); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(603, 460); this.groupBox3.TabIndex = 3; this.groupBox3.TabStop = false; this.groupBox3.Text = "Standard Output"; // // rtbStdOutLog // this.rtbStdOutLog.Dock = System.Windows.Forms.DockStyle.Fill; this.rtbStdOutLog.Enabled = false; this.rtbStdOutLog.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.rtbStdOutLog.ForeColor = System.Drawing.SystemColors.Desktop; this.rtbStdOutLog.Location = new System.Drawing.Point(3, 16); this.rtbStdOutLog.Name = "rtbStdOutLog"; this.rtbStdOutLog.ReadOnly = true; this.rtbStdOutLog.Size = new System.Drawing.Size(597, 441); this.rtbStdOutLog.TabIndex = 0; this.rtbStdOutLog.Text = ""; // // btnSaveLog // this.btnSaveLog.Location = new System.Drawing.Point(435, 466); this.btnSaveLog.Name = "btnSaveLog"; this.btnSaveLog.Size = new System.Drawing.Size(75, 23); this.btnSaveLog.TabIndex = 2; this.btnSaveLog.Text = "Save Log"; this.btnSaveLog.UseVisualStyleBackColor = true; this.btnSaveLog.Click += new System.EventHandler(this.btnSaveLog_Click); // // btnClear // this.btnClear.Location = new System.Drawing.Point(516, 466); this.btnClear.Name = "btnClear"; this.btnClear.Size = new System.Drawing.Size(75, 23); this.btnClear.TabIndex = 1; this.btnClear.Text = "Clear"; this.btnClear.UseVisualStyleBackColor = true; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); // // frmMain // this.AccessibleName = "WatirRecorder#"; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(608, 605); this.Controls.Add(this.documentContainer1); this.Controls.Add(this.toolBar1); this.Controls.Add(this.statusBar1); this.Controls.Add(this.leftSandDock); this.Controls.Add(this.rightSandDock); this.Controls.Add(this.bottomSandDock); this.Controls.Add(this.topSandDock); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "frmMain"; this.Text = "WatirRecorder#"; this.Load += new System.EventHandler(this.frmMain_Load); ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit(); this.documentContainer1.ResumeLayout(false); this.dockControl1.ResumeLayout(false); this.panel1.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.dockControlOutput.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.ResumeLayout(false); }
private void InitializeComponent() { this.components = new Container(); this.codeMapViewerDock1 = new CodeMapViewerDock(); this.sandDockManager1 = new SandDockManager(); this.statusStrip1 = new StatusStrip(); this.toolStripStatusLabel1 = new ToolStripStatusLabel(); this.lineStatusLabel = new ToolStripStatusLabel(); this.columnStatusLabel = new ToolStripStatusLabel(); this.sandBarManager1 = new SandBarManager(this.components); this.leftSandBarDock = new ToolBarContainer(); this.rightSandBarDock = new ToolBarContainer(); this.bottomSandBarDock = new ToolBarContainer(); this.topSandBarDock = new ToolBarContainer(); this.menuBar1 = new MenuBar(); this.menuBarItem1 = new MenuBarItem(); this.newFileMenuItem = new MenuButtonItem(); this.openScriptMenuItem = new MenuButtonItem(); this.saveScriptMenuItem = new MenuButtonItem(); this.exitMenuItem = new MenuButtonItem(); this.menuBarItem2 = new MenuBarItem(); this.undoMenuItem = new MenuButtonItem(); this.redoMenuItem = new MenuButtonItem(); this.cutMenuItem = new MenuButtonItem(); this.copyMenuItem = new MenuButtonItem(); this.pasteMenuItem = new MenuButtonItem(); this.menuBarItem3 = new MenuBarItem(); this.mapViewerMenuItem = new MenuButtonItem(); this.menuBarItem4 = new MenuBarItem(); this.runMenuItem = new MenuButtonItem(); this.menuBarItem5 = new MenuBarItem(); this.toolBar1 = new TD.SandBar.ToolBar(); this.buttonItem1 = new ButtonItem(); this.buttonItem3 = new ButtonItem(); this.buttonItem2 = new ButtonItem(); this.buttonItem4 = new ButtonItem(); this.buttonItem5 = new ButtonItem(); this.buttonItem6 = new ButtonItem(); this.buttonItem8 = new ButtonItem(); this.buttonItem9 = new ButtonItem(); this.buttonItem7 = new ButtonItem(); this.openFileDialog = new OpenFileDialog(); this.contextMenuStrip1 = new ContextMenuStrip(this.components); this.cutToolStripMenuItem = new ToolStripMenuItem(); this.copyToolStripMenuItem = new ToolStripMenuItem(); this.pasteToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.insertFunctionToolStripMenuItem = new ToolStripMenuItem(); this.insertTextureEntryIDToolStripMenuItem = new ToolStripMenuItem(); this.insertCollectionEntryIDToolStripMenuItem = new ToolStripMenuItem(); DockContainer dockContainer = new DockContainer(); dockContainer.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.topSandBarDock.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); base.SuspendLayout(); dockContainer.Controls.Add(this.codeMapViewerDock1); dockContainer.Dock = DockStyle.Right; dockContainer.LayoutSystem = new SplitLayoutSystem(250, 312, Orientation.Horizontal, new LayoutSystemBase[] { new ControlLayoutSystem(250, 312, new DockControl[] { this.codeMapViewerDock1 }, this.codeMapViewerDock1) }); dockContainer.Location = new Point(274, 49); dockContainer.Manager = this.sandDockManager1; dockContainer.Name = "dockContainer1"; dockContainer.Size = new Size(254, 312); dockContainer.TabIndex = 6; this.codeMapViewerDock1.Guid = new Guid("40b77176-f5ac-44ce-a28c-d2f296197e1d"); this.codeMapViewerDock1.Image = null; this.codeMapViewerDock1.Location = new Point(4, 18); this.codeMapViewerDock1.Name = "codeMapViewerDock1"; this.codeMapViewerDock1.Size = new Size(250, 270); this.codeMapViewerDock1.TabIndex = 0; this.codeMapViewerDock1.Text = "Map Viewer"; this.sandDockManager1.DockSystemContainer = this; this.sandDockManager1.OwnerForm = this; this.sandDockManager1.ActiveTabbedDocumentChanged += new EventHandler(this.sandDockManager1_ActiveTabbedDocumentChanged); this.statusStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabel1, this.lineStatusLabel, this.columnStatusLabel }); this.statusStrip1.Location = new Point(0, 361); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new Size(528, 22); this.statusStrip1.TabIndex = 1; this.statusStrip1.Text = "statusStrip1"; this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new Size(447, 17); this.toolStripStatusLabel1.Spring = true; this.lineStatusLabel.Name = "lineStatusLabel"; this.lineStatusLabel.Size = new Size(35, 17); this.lineStatusLabel.Text = "Line 0"; this.columnStatusLabel.Name = "columnStatusLabel"; this.columnStatusLabel.Size = new Size(31, 17); this.columnStatusLabel.Text = "Col 0"; this.sandBarManager1.OwnerForm = this; this.leftSandBarDock.Dock = DockStyle.Left; this.leftSandBarDock.Guid = new Guid("f51f9d3c-d12d-4b04-b3c1-dba150a785e6"); this.leftSandBarDock.Location = new Point(0, 49); this.leftSandBarDock.Manager = this.sandBarManager1; this.leftSandBarDock.Name = "leftSandBarDock"; this.leftSandBarDock.Size = new Size(0, 334); this.leftSandBarDock.TabIndex = 2; this.rightSandBarDock.Dock = DockStyle.Right; this.rightSandBarDock.Guid = new Guid("c3e7b6e1-de74-4788-aa84-badf07d4feb3"); this.rightSandBarDock.Location = new Point(528, 49); this.rightSandBarDock.Manager = this.sandBarManager1; this.rightSandBarDock.Name = "rightSandBarDock"; this.rightSandBarDock.Size = new Size(0, 334); this.rightSandBarDock.TabIndex = 3; this.bottomSandBarDock.Dock = DockStyle.Bottom; this.bottomSandBarDock.Guid = new Guid("214365d9-c066-4c57-b2e9-f4e9b8b58fd5"); this.bottomSandBarDock.Location = new Point(0, 383); this.bottomSandBarDock.Manager = this.sandBarManager1; this.bottomSandBarDock.Name = "bottomSandBarDock"; this.bottomSandBarDock.Size = new Size(528, 0); this.bottomSandBarDock.TabIndex = 4; this.topSandBarDock.Controls.Add(this.menuBar1); this.topSandBarDock.Controls.Add(this.toolBar1); this.topSandBarDock.Dock = DockStyle.Top; this.topSandBarDock.Guid = new Guid("31bfec4a-f321-4810-8e02-c4eccad1d7f9"); this.topSandBarDock.Location = new Point(0, 0); this.topSandBarDock.Manager = this.sandBarManager1; this.topSandBarDock.Name = "topSandBarDock"; this.topSandBarDock.Size = new Size(528, 49); this.topSandBarDock.TabIndex = 5; this.menuBar1.Guid = new Guid("0188290c-f307-4042-a99f-b3a2a1517a38"); this.menuBar1.Items.AddRange(new ToolbarItemBase[] { this.menuBarItem1, this.menuBarItem2, this.menuBarItem3, this.menuBarItem4, this.menuBarItem5 }); this.menuBar1.Location = new Point(2, 0); this.menuBar1.Name = "menuBar1"; this.menuBar1.OwnerForm = this; this.menuBar1.Size = new Size(526, 23); this.menuBar1.TabIndex = 0; this.menuBar1.Text = "menuBar1"; this.menuBarItem1.Items.AddRange(new ToolbarItemBase[] { this.newFileMenuItem, this.openScriptMenuItem, this.saveScriptMenuItem, this.exitMenuItem }); this.menuBarItem1.Text = "&File"; this.newFileMenuItem.Image = Resources.newMap; this.newFileMenuItem.Shortcut = Shortcut.CtrlN; this.newFileMenuItem.Text = "New script"; this.newFileMenuItem.Activate += new EventHandler(this.newFileMenuItem_Activate); this.openScriptMenuItem.Image = Resources.openMap; this.openScriptMenuItem.Shortcut = Shortcut.CtrlO; this.openScriptMenuItem.Text = "Open script"; this.openScriptMenuItem.Activate += new EventHandler(this.openScriptMenuItem_Activate); this.saveScriptMenuItem.BeginGroup = true; this.saveScriptMenuItem.Image = Resources.save; this.saveScriptMenuItem.Shortcut = Shortcut.CtrlS; this.saveScriptMenuItem.Text = "Save script"; this.saveScriptMenuItem.Activate += new EventHandler(this.saveScriptMenuItem_Activate); this.exitMenuItem.Text = "Exit"; this.menuBarItem2.Items.AddRange(new ToolbarItemBase[] { this.undoMenuItem, this.redoMenuItem, this.cutMenuItem, this.copyMenuItem, this.pasteMenuItem }); this.menuBarItem2.Text = "&Edit"; this.undoMenuItem.Image = Resources.undo; this.undoMenuItem.Shortcut = Shortcut.CtrlZ; this.undoMenuItem.Text = "&Undo"; this.undoMenuItem.Activate += new EventHandler(this.undoMenuItem_Activate); this.redoMenuItem.Image = Resources.redo; this.redoMenuItem.Shortcut = Shortcut.CtrlShiftZ; this.redoMenuItem.Text = "&Redo"; this.cutMenuItem.BeginGroup = true; this.cutMenuItem.Image = Resources.cut; this.cutMenuItem.Shortcut = Shortcut.CtrlX; this.cutMenuItem.Text = "C&ut"; this.cutMenuItem.Activate += new EventHandler(this.cutMenuItem_Activate); this.copyMenuItem.Image = Resources.copy; this.copyMenuItem.Shortcut = Shortcut.CtrlC; this.copyMenuItem.Text = "&Copy"; this.copyMenuItem.Activate += new EventHandler(this.copyMenuItem_Activate); this.pasteMenuItem.Image = Resources.paste; this.pasteMenuItem.Shortcut = Shortcut.CtrlV; this.pasteMenuItem.Text = "&Paste"; this.pasteMenuItem.Activate += new EventHandler(this.pasteMenuItem_Activate); this.menuBarItem3.Items.AddRange(new ToolbarItemBase[] { this.mapViewerMenuItem }); this.menuBarItem3.Text = "&View"; this.mapViewerMenuItem.Text = "Map Viewer"; this.mapViewerMenuItem.Activate += new EventHandler(this.mapViewerMenuItem_Activate); this.menuBarItem4.Items.AddRange(new ToolbarItemBase[] { this.runMenuItem }); this.menuBarItem4.MdiWindowList = true; this.menuBarItem4.Text = "&Script"; this.runMenuItem.Image = Resources.PlayHS; this.runMenuItem.Shortcut = Shortcut.F5; this.runMenuItem.Text = "&Run"; this.runMenuItem.Activate += new EventHandler(this.runMenuItem_Activate); this.menuBarItem5.Text = "&Help"; this.toolBar1.DockLine = 1; this.toolBar1.Guid = new Guid("46756475-373b-4e41-8b89-f8ab1b41c370"); this.toolBar1.Items.AddRange(new ToolbarItemBase[] { this.buttonItem1, this.buttonItem3, this.buttonItem2, this.buttonItem4, this.buttonItem5, this.buttonItem6, this.buttonItem8, this.buttonItem9, this.buttonItem7 }); this.toolBar1.Location = new Point(2, 23); this.toolBar1.Name = "toolBar1"; this.toolBar1.Size = new Size(252, 26); this.toolBar1.TabIndex = 1; this.toolBar1.Text = "toolBar1"; this.buttonItem1.BuddyMenu = this.newFileMenuItem; this.buttonItem1.Image = Resources.newMap; this.buttonItem3.BuddyMenu = this.openScriptMenuItem; this.buttonItem3.Image = Resources.openMap; this.buttonItem2.BuddyMenu = this.saveScriptMenuItem; this.buttonItem2.Image = Resources.save; this.buttonItem4.BeginGroup = true; this.buttonItem4.BuddyMenu = this.cutMenuItem; this.buttonItem4.Image = Resources.cut; this.buttonItem5.BuddyMenu = this.copyMenuItem; this.buttonItem5.Image = Resources.copy; this.buttonItem6.BuddyMenu = this.pasteMenuItem; this.buttonItem6.Image = Resources.paste; this.buttonItem8.BeginGroup = true; this.buttonItem8.BuddyMenu = this.undoMenuItem; this.buttonItem8.Image = Resources.undo; this.buttonItem9.BuddyMenu = this.redoMenuItem; this.buttonItem9.Image = Resources.redo; this.buttonItem7.BeginGroup = true; this.buttonItem7.BuddyMenu = this.runMenuItem; this.buttonItem7.Image = Resources.PlayHS; this.openFileDialog.DefaultExt = "lua"; this.openFileDialog.FileName = "openFileDialog1"; this.openFileDialog.Filter = "Far Cry 2 script files (*.lua)|*.lua|All files (*.*)|*.*"; this.openFileDialog.Title = "Open script"; this.contextMenuStrip1.Items.AddRange(new ToolStripItem[] { this.cutToolStripMenuItem, this.copyToolStripMenuItem, this.pasteToolStripMenuItem, this.toolStripSeparator1, this.insertFunctionToolStripMenuItem, this.insertTextureEntryIDToolStripMenuItem, this.insertCollectionEntryIDToolStripMenuItem }); this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Size = new Size(194, 164); this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; this.cutToolStripMenuItem.Size = new Size(193, 22); this.cutToolStripMenuItem.Text = "Cut"; this.cutToolStripMenuItem.Click += new EventHandler(this.cutToolStripMenuItem_Click); this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; this.copyToolStripMenuItem.Size = new Size(193, 22); this.copyToolStripMenuItem.Text = "Copy"; this.copyToolStripMenuItem.Click += new EventHandler(this.copyToolStripMenuItem_Click); this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; this.pasteToolStripMenuItem.Size = new Size(193, 22); this.pasteToolStripMenuItem.Text = "Paste"; this.pasteToolStripMenuItem.Click += new EventHandler(this.pasteToolStripMenuItem_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new Size(190, 6); this.insertFunctionToolStripMenuItem.Name = "insertFunctionToolStripMenuItem"; this.insertFunctionToolStripMenuItem.Size = new Size(193, 22); this.insertFunctionToolStripMenuItem.Text = "Insert function"; this.insertTextureEntryIDToolStripMenuItem.Name = "insertTextureEntryIDToolStripMenuItem"; this.insertTextureEntryIDToolStripMenuItem.Size = new Size(193, 22); this.insertTextureEntryIDToolStripMenuItem.Text = "Insert texture entry ID"; this.insertCollectionEntryIDToolStripMenuItem.Name = "insertCollectionEntryIDToolStripMenuItem"; this.insertCollectionEntryIDToolStripMenuItem.Size = new Size(193, 22); this.insertCollectionEntryIDToolStripMenuItem.Text = "Insert collection entry ID"; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; base.ClientSize = new Size(528, 383); base.Controls.Add(dockContainer); base.Controls.Add(this.statusStrip1); base.Controls.Add(this.leftSandBarDock); base.Controls.Add(this.rightSandBarDock); base.Controls.Add(this.bottomSandBarDock); base.Controls.Add(this.topSandBarDock); base.Name = "CodeEditor"; this.Text = "Far Cry 2 Script Editor"; dockContainer.ResumeLayout(false); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.topSandBarDock.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false); base.ResumeLayout(false); base.PerformLayout(); }
private void MenuItem_Activate(object sender, EventArgs e) { try { // // Error List Context Menu // if (sender == this.menuButtonItemScroll) { // Can only zoom to one item if (this.listViewErrorList.SelectedItems.Count != 1) { return; } // Get EsriTable containing the error ListViewItemError item = (ListViewItemError)this.listViewErrorList.SelectedItems[0]; EsriTable table = null; if (item.Error is ErrorTable) { ErrorTable errorTable = (ErrorTable)item.Error; table = errorTable.Table; } else if (item.Error is ErrorTableRow) { ErrorTableRow errorTableRow = (ErrorTableRow)item.Error; EsriTableRow esriTableRow = (EsriTableRow)errorTableRow.TableRow; table = (EsriTable)esriTableRow.Table; } else if (item.Error is ErrorObject) { ErrorObject errorObject = (ErrorObject)item.Error; table = errorObject.Table; } if (table == null) { return; } // Get Containing Model EsriModel model = (EsriModel)table.Container; // Scroll to Table model.ScrollToElement(table); // Flash Table table.Flash(); } else if (sender == this.menuButtonItemSelect) { // Can only zoom to one item if (this.listViewErrorList.SelectedItems.Count == 0) { return; } foreach (ListViewItemError item in this.listViewErrorList.SelectedItems) { EsriModel model = null; if (item.Error is ErrorTable) { ErrorTable errorTable = (ErrorTable)item.Error; EsriTable table = errorTable.Table; model = (EsriModel)table.Container; } else if (item.Error is ErrorTableRow) { ErrorTableRow errorTableRow = (ErrorTableRow)item.Error; EsriTableRow esriTableRow = (EsriTableRow)errorTableRow.TableRow; EsriTable table = (EsriTable)esriTableRow.Table; model = (EsriModel)table.Container; } else if (item.Error is ErrorObject) { ErrorObject errorObject = (ErrorObject)item.Error; EsriTable table = errorObject.Table; model = (EsriModel)table.Container; } if (model == null) { continue; } // Clear Model Selection model.SelectElements(false); } // foreach (ListViewItemError item in this.listViewErrorList.SelectedItems) { // Get Table EsriTable table = null; if (item.Error is ErrorTable) { ErrorTable errorTable = (ErrorTable)item.Error; table = errorTable.Table; } else if (item.Error is ErrorTableRow) { ErrorTableRow errorTableRow = (ErrorTableRow)item.Error; EsriTableRow esriTableRow = (EsriTableRow)errorTableRow.TableRow; table = (EsriTable)esriTableRow.Table; } else if (item.Error is ErrorObject) { ErrorObject errorObject = (ErrorObject)item.Error; table = errorObject.Table; } if (table == null) { continue; } // Flash Table table.Selected = true; } } else if (sender == this.menuButtonItemFlashError) { // Can only zoom to one item if (this.listViewErrorList.SelectedItems.Count == 0) { return; } // foreach (ListViewItemError item in this.listViewErrorList.SelectedItems) { // Get Table EsriTable table = null; if (item.Error is ErrorTable) { ErrorTable errorTable = (ErrorTable)item.Error; table = errorTable.Table; } else if (item.Error is ErrorTableRow) { ErrorTableRow errorTableRow = (ErrorTableRow)item.Error; EsriTableRow esriTableRow = (EsriTableRow)errorTableRow.TableRow; table = (EsriTable)esriTableRow.Table; } else if (item.Error is ErrorObject) { ErrorObject errorObject = (ErrorObject)item.Error; table = errorObject.Table; } if (table == null) { continue; } // Flash Table table.Flash(); } } else if (sender == this.menuButtonItemClearError) { // Remove Selected Items foreach (ListViewItemError item in this.listViewErrorList.SelectedItems) { if (this.m_errors.Contains(item.Error)) { this.m_errors.Remove(item.Error); } } // Refresh Error List this.RefreshErrorList(); } else if (sender == menuButtonItemClearAllErrors) { // Remove All Errors this.m_errors.Clear(); // Refresh Error List this.RefreshErrorList(); } // // Validator Dropdown Menu // else if (sender == this.menuButtonItemPGdb) { WorkspaceValidator.Default.Validator = new PersonalGeodatabaseValidator(); } else if (sender == this.menuButtonItemFGdb) { WorkspaceValidator.Default.Validator = new FileGeodatabaseValidator(); } else if (sender == this.menuButtonItemSelectGeodatabase) { // Create GxObjectFilter for GxDialog IGxObjectFilter gxObjectFilter = new GxFilterWorkspacesClass(); // Create GxDialog IGxDialog gxDialog = new GxDialogClass(); gxDialog.AllowMultiSelect = false; gxDialog.ButtonCaption = Resources.TEXT_SELECT; gxDialog.ObjectFilter = gxObjectFilter; gxDialog.RememberLocation = true; gxDialog.Title = Resources.TEXT_SELECT_EXISTING_GEODATABASE; // Declare Enumerator to hold selected objects IEnumGxObject enumGxObject = null; // Open Dialog if (!gxDialog.DoModalOpen(0, out enumGxObject)) { return; } if (enumGxObject == null) { return; } // Get Selected Object (if any) IGxObject gxObject = enumGxObject.Next(); if (gxObject == null) { return; } if (!gxObject.IsValid) { return; } // Get GxDatabase if (!(gxObject is IGxDatabase)) { return; } IGxDatabase gxDatabase = (IGxDatabase)gxObject; // Get Workspace IWorkspace workspace = gxDatabase.Workspace; if (workspace == null) { return; } // Get Workspace Factory IWorkspaceFactory workspaceFactory = workspace.WorkspaceFactory; if (workspaceFactory == null) { return; } // Get Workspace Factory ID IUID uid = workspaceFactory.GetClassID(); string guid = uid.Value.ToString().ToUpper(); switch (guid) { case EsriRegistry.GEODATABASE_PERSONAL: WorkspaceValidator.Default.Validator = new PersonalGeodatabaseValidator(workspace); break; case EsriRegistry.GEODATABASE_FILE: WorkspaceValidator.Default.Validator = new FileGeodatabaseValidator(workspace); break; case EsriRegistry.GEODATABASE_SDE: WorkspaceValidator.Default.Validator = new SdeValidator(workspace); break; default: break; } } else if ((sender is MenuButtonItem) && (((MenuButtonItem)sender).Parent == this.menuButtonItemSdeConnection)) { MenuButtonItem item = (MenuButtonItem)sender; if (item.Tag == null) { return; } WorkspaceValidator.Default.Validator = new SdeValidator(item.Tag.ToString()); } } catch (Exception ex) { ExceptionDialog.HandleException(ex); } }
/// <summary> /// Update MRU list when MRU menu item parent is opened /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnMRUParentPopup(object sender, MenuPopupEventArgs e) { // remove all childs if ( menuItemMRU.HasChildren ) { menuItemMRU.Items.Clear(); } // Disable menu item if MRU list is empty if ( mruList.Count == 0 ) { menuItemMRU.Enabled = false; return; } // enable menu item and add child items menuItemMRU.Enabled = true; MenuButtonItem item; IEnumerator myEnumerator = mruList.GetEnumerator(); while ( myEnumerator.MoveNext() ) { item = new MenuButtonItem(GetDisplayName((string)myEnumerator.Current)); // subscribe to item's Click event item.Activate += new EventHandler(this.OnMRUClicked); menuItemMRU.Items.Add(item); } }
public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Activate += new EventHandler(this.HandlePluginLaunch); // Add the following line of code to the end of the function buildToolbars(); NWN2ToolsetMainForm.App.KeyPreview = true; NWN2ToolsetMainForm.App.KeyDown += new System.Windows.Forms.KeyEventHandler(NWN2BrushSaver); }
public void Startup(INWN2PluginHost cHost) { m_cMenuItem = cHost.GetMenuForPlugin(this); m_cMenuItem.Items.Add("Maximize all creature HP", new EventHandler(this.MaxHp)); m_cMenuItem.Items.Add("Halve all creature HP", new EventHandler(this.HalfHp)); m_cMenuItem.Items.Add("Average all creature HP", new EventHandler(this.AverageHp)); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.menuBarItem1 = new TD.SandBar.MenuBarItem(); this.menuBarItem2 = new TD.SandBar.MenuBarItem(); this.menuBarItem3 = new TD.SandBar.MenuBarItem(); this.menuBarItem4 = new TD.SandBar.MenuBarItem(); this.menuBarItem5 = new TD.SandBar.MenuBarItem(); this.sandDockManager = new TD.SandDock.SandDockManager(); this.leftSandDock = new TD.SandDock.DockContainer(); this.rightSandDock = new TD.SandDock.DockContainer(); this.dockElementInsert = new TD.SandDock.DockableWindow(); this.elementInsertPanel = new XEditNet.Widgets.ElementInsertPanel(); this.dockElementChange = new TD.SandDock.DockableWindow(); this.elementChangePanel = new XEditNet.Widgets.ElementChangePanel(); this.dockAttributes = new TD.SandDock.DockableWindow(); this.attributeChangePanel = new XEditNet.Widgets.AttributeChangePanel(); this.bottomSandDock = new TD.SandDock.DockContainer(); this.topSandDock = new TD.SandDock.DockContainer(); this.menuBar1 = new TD.SandBar.MenuBar(); this.menuBarItem6 = new TD.SandBar.MenuBarItem(); this.menuFileSave = new TD.SandBar.MenuButtonItem(); this.menuButtonItem1 = new TD.SandBar.MenuButtonItem(); this.menuBarItem7 = new TD.SandBar.MenuBarItem(); this.menuButtonItem2 = new TD.SandBar.MenuButtonItem(); this.menuBarItem8 = new TD.SandBar.MenuBarItem(); this.menuButtonItem3 = new TD.SandBar.MenuButtonItem(); this.toolBar1 = new TD.SandBar.ToolBar(); this.toolBar2 = new TD.SandBar.ToolBar(); this.buttonItem1 = new TD.SandBar.ButtonItem(); this.quickFixBar = new TD.SandBar.ContainerBar(); this.containerBarClientPanel1 = new TD.SandBar.ContainerBarClientPanel(); this.quickFixPanel = new XEditNet.Widgets.QuickFixPanel(); this.quickFixImageList = new System.Windows.Forms.ImageList(this.components); this.quickFixPreceeding = new TD.SandBar.ButtonItem(); this.quickFixFollowing = new TD.SandBar.ButtonItem(); this.commandImageList = new System.Windows.Forms.ImageList(this.components); this.rightSandDock.SuspendLayout(); this.dockElementInsert.SuspendLayout(); this.dockElementChange.SuspendLayout(); this.dockAttributes.SuspendLayout(); this.quickFixBar.SuspendLayout(); this.containerBarClientPanel1.SuspendLayout(); this.SuspendLayout(); // // menuBarItem1 // this.menuBarItem1.Text = "&File"; // // menuBarItem2 // this.menuBarItem2.Text = "&Edit"; // // menuBarItem3 // this.menuBarItem3.Text = "&View"; // // menuBarItem4 // this.menuBarItem4.MdiWindowList = true; this.menuBarItem4.Text = "&Window"; // // menuBarItem5 // this.menuBarItem5.Text = "&Help"; // // sandDockManager // this.sandDockManager.OwnerForm = this; this.sandDockManager.Renderer = new TD.SandDock.Rendering.Office2003Renderer(); // // leftSandDock // this.leftSandDock.Dock = System.Windows.Forms.DockStyle.Left; this.leftSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.leftSandDock.Location = new System.Drawing.Point(0, 22); this.leftSandDock.Manager = this.sandDockManager; this.leftSandDock.Name = "leftSandDock"; this.leftSandDock.Size = new System.Drawing.Size(0, 480); this.leftSandDock.TabIndex = 0; // // rightSandDock // this.rightSandDock.Controls.Add(this.dockElementInsert); this.rightSandDock.Controls.Add(this.dockElementChange); this.rightSandDock.Controls.Add(this.dockAttributes); this.rightSandDock.Dock = System.Windows.Forms.DockStyle.Right; this.rightSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400, System.Windows.Forms.Orientation.Horizontal, new TD.SandDock.LayoutSystemBase[] { new TD.SandDock.ControlLayoutSystem(212, 238, new TD.SandDock.DockableWindow[] { this.dockElementInsert, this.dockElementChange}, this.dockElementInsert), new TD.SandDock.ControlLayoutSystem(212, 238, new TD.SandDock.DockableWindow[] { this.dockAttributes}, this.dockAttributes)}); this.rightSandDock.Location = new System.Drawing.Point(600, 22); this.rightSandDock.Manager = this.sandDockManager; this.rightSandDock.Name = "rightSandDock"; this.rightSandDock.Size = new System.Drawing.Size(216, 480); this.rightSandDock.TabIndex = 1; // // dockElementInsert // this.dockElementInsert.Controls.Add(this.elementInsertPanel); this.dockElementInsert.Guid = new System.Guid("63fe64f8-5444-45cb-b17d-17f8baf0c91d"); this.dockElementInsert.Location = new System.Drawing.Point(4, 25); this.dockElementInsert.Name = "dockElementInsert"; this.dockElementInsert.Size = new System.Drawing.Size(212, 190); this.dockElementInsert.TabIndex = 1; this.dockElementInsert.Text = "Insert"; // // elementInsertPanel // this.elementInsertPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.elementInsertPanel.Location = new System.Drawing.Point(0, 0); this.elementInsertPanel.Name = "elementInsertPanel"; this.elementInsertPanel.Size = new System.Drawing.Size(212, 190); this.elementInsertPanel.TabIndex = 0; // // dockElementChange // this.dockElementChange.Controls.Add(this.elementChangePanel); this.dockElementChange.Guid = new System.Guid("cb2f6fbf-41de-4588-a08b-f4f00d505fa7"); this.dockElementChange.Location = new System.Drawing.Point(4, 25); this.dockElementChange.Name = "dockElementChange"; this.dockElementChange.Size = new System.Drawing.Size(212, 190); this.dockElementChange.TabIndex = 1; this.dockElementChange.Text = "Change"; // // elementChangePanel // this.elementChangePanel.Dock = System.Windows.Forms.DockStyle.Fill; this.elementChangePanel.Location = new System.Drawing.Point(0, 0); this.elementChangePanel.Name = "elementChangePanel"; this.elementChangePanel.Size = new System.Drawing.Size(212, 190); this.elementChangePanel.TabIndex = 0; // // dockAttributes // this.dockAttributes.Controls.Add(this.attributeChangePanel); this.dockAttributes.Guid = new System.Guid("7a4f064f-d569-4ab2-8133-ca0b6b8c4151"); this.dockAttributes.Location = new System.Drawing.Point(4, 267); this.dockAttributes.Name = "dockAttributes"; this.dockAttributes.Size = new System.Drawing.Size(212, 190); this.dockAttributes.TabIndex = 2; this.dockAttributes.Text = "Attributes"; // // attributeChangePanel // this.attributeChangePanel.Dock = System.Windows.Forms.DockStyle.Fill; this.attributeChangePanel.Location = new System.Drawing.Point(0, 0); this.attributeChangePanel.Name = "attributeChangePanel"; this.attributeChangePanel.Size = new System.Drawing.Size(212, 190); this.attributeChangePanel.TabIndex = 0; // // bottomSandDock // this.bottomSandDock.Dock = System.Windows.Forms.DockStyle.Bottom; this.bottomSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.bottomSandDock.Location = new System.Drawing.Point(0, 502); this.bottomSandDock.Manager = this.sandDockManager; this.bottomSandDock.Name = "bottomSandDock"; this.bottomSandDock.Size = new System.Drawing.Size(816, 0); this.bottomSandDock.TabIndex = 2; // // topSandDock // this.topSandDock.Dock = System.Windows.Forms.DockStyle.Top; this.topSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400); this.topSandDock.Location = new System.Drawing.Point(0, 22); this.topSandDock.Manager = this.sandDockManager; this.topSandDock.Name = "topSandDock"; this.topSandDock.Size = new System.Drawing.Size(816, 0); this.topSandDock.TabIndex = 3; // // menuBar1 // this.menuBar1.AllowMerge = true; this.menuBar1.Guid = new System.Guid("dc0a091b-fb9a-4a33-8bf0-a9a24af4064c"); this.menuBar1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuBarItem6, this.menuBarItem7, this.menuBarItem8}); this.menuBar1.Location = new System.Drawing.Point(232, 22); this.menuBar1.Name = "menuBar1"; this.menuBar1.OwnerForm = this; this.menuBar1.Size = new System.Drawing.Size(368, 22); this.menuBar1.TabIndex = 0; this.menuBar1.Text = "menuBar1"; this.menuBar1.Visible = false; // // menuBarItem6 // this.menuBarItem6.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuFileSave, this.menuButtonItem1}); this.menuBarItem6.Text = "&File"; // // menuFileSave // this.menuFileSave.BeginGroup = true; this.menuFileSave.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.menuFileSave.MergeIndex = 2; this.menuFileSave.Text = "Save"; this.menuFileSave.Activate += new System.EventHandler(this.SaveFile); // // menuButtonItem1 // this.menuButtonItem1.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.menuButtonItem1.MergeIndex = 3; this.menuButtonItem1.Text = "&Close"; this.menuButtonItem1.Activate += new System.EventHandler(this.CloseFile); // // menuBarItem7 // this.menuBarItem7.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem2}); this.menuBarItem7.Text = "&Edit"; // // menuButtonItem2 // this.menuButtonItem2.MergeAction = TD.SandBar.ItemMergeAction.Add; this.menuButtonItem2.MergeIndex = 0; this.menuButtonItem2.Text = "&Test"; // // menuBarItem8 // this.menuBarItem8.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.menuButtonItem3}); this.menuBarItem8.Text = "&View"; // // menuButtonItem3 // this.menuButtonItem3.MergeAction = TD.SandBar.ItemMergeAction.Add; this.menuButtonItem3.MergeIndex = 0; this.menuButtonItem3.Text = "&ViewTest"; // // toolBar1 // this.toolBar1.DockLine = 1; this.toolBar1.Guid = new System.Guid("88196026-7bd7-4954-85b7-34999dcd37cd"); this.toolBar1.Location = new System.Drawing.Point(2, 24); this.toolBar1.Name = "toolBar1"; this.toolBar1.Size = new System.Drawing.Size(24, 18); this.toolBar1.TabIndex = 1; this.toolBar1.Text = "toolBar1"; // // toolBar2 // this.toolBar2.Guid = new System.Guid("458f1dcc-720e-4fb6-b794-41d5a9f186e2"); this.toolBar2.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.buttonItem1}); this.toolBar2.Location = new System.Drawing.Point(0, 0); this.toolBar2.Name = "toolBar2"; this.toolBar2.Size = new System.Drawing.Size(816, 22); this.toolBar2.TabIndex = 4; this.toolBar2.Text = ""; this.toolBar2.Visible = false; // // buttonItem1 // this.buttonItem1.MergeAction = TD.SandBar.ItemMergeAction.Insert; this.buttonItem1.MergeIndex = 2; this.buttonItem1.Text = "xxxx"; // // quickFixBar // this.quickFixBar.AddRemoveButtonsVisible = false; this.quickFixBar.AllowHorizontalDock = false; this.quickFixBar.Controls.Add(this.containerBarClientPanel1); this.quickFixBar.Dock = System.Windows.Forms.DockStyle.Left; this.quickFixBar.Flow = TD.SandBar.ToolBarLayout.Horizontal; this.quickFixBar.Guid = new System.Guid("0e1e9ede-d2fe-4307-a683-d2e3ea4f4e5f"); this.quickFixBar.ImageList = this.quickFixImageList; this.quickFixBar.Items.AddRange(new TD.SandBar.ToolbarItemBase[] { this.quickFixPreceeding, this.quickFixFollowing}); this.quickFixBar.Location = new System.Drawing.Point(0, 22); this.quickFixBar.Name = "quickFixBar"; this.quickFixBar.Size = new System.Drawing.Size(232, 480); this.quickFixBar.TabIndex = 5; this.quickFixBar.Text = "Quick Fix"; // // containerBarClientPanel1 // this.containerBarClientPanel1.Controls.Add(this.quickFixPanel); this.containerBarClientPanel1.Location = new System.Drawing.Point(2, 45); this.containerBarClientPanel1.Name = "containerBarClientPanel1"; this.containerBarClientPanel1.Size = new System.Drawing.Size(228, 433); this.containerBarClientPanel1.TabIndex = 0; // // quickFixPanel // this.quickFixPanel.BackColor = System.Drawing.Color.Transparent; this.quickFixPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.quickFixPanel.Location = new System.Drawing.Point(0, 0); this.quickFixPanel.Name = "quickFixPanel"; this.quickFixPanel.Size = new System.Drawing.Size(228, 433); this.quickFixPanel.TabIndex = 0; this.quickFixPanel.FinishUpdate += new System.EventHandler(this.QuickFixUpdated); // // quickFixImageList // this.quickFixImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; this.quickFixImageList.ImageSize = new System.Drawing.Size(16, 16); this.quickFixImageList.TransparentColor = System.Drawing.Color.Transparent; // // quickFixPreceeding // this.quickFixPreceeding.ImageIndex = 0; this.quickFixPreceeding.Activate += new System.EventHandler(this.GotoPrecedingError); // // quickFixFollowing // this.quickFixFollowing.ImageIndex = 1; this.quickFixFollowing.Activate += new System.EventHandler(this.GotoFollowingError); // // commandImageList // this.commandImageList.ImageSize = new System.Drawing.Size(16, 16); this.commandImageList.TransparentColor = System.Drawing.Color.Transparent; // // XEditNetChildForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(816, 502); this.Controls.Add(this.menuBar1); this.Controls.Add(this.quickFixBar); this.Controls.Add(this.leftSandDock); this.Controls.Add(this.rightSandDock); this.Controls.Add(this.bottomSandDock); this.Controls.Add(this.topSandDock); this.Controls.Add(this.toolBar2); this.Name = "XEditNetChildForm"; this.Text = "XEditNetChildForm"; this.rightSandDock.ResumeLayout(false); this.dockElementInsert.ResumeLayout(false); this.dockElementChange.ResumeLayout(false); this.dockAttributes.ResumeLayout(false); this.quickFixBar.ResumeLayout(false); this.containerBarClientPanel1.ResumeLayout(false); this.ResumeLayout(false); }