public PluginManager(MenuStrip menuStrip, ToolStripContainer toolStripContainer, MapPanel mapPanel, MapTreeView mapTreeView) { m_plugins = new Dictionary <string, IPlugin>(); m_applicationBridge = new ApplicationBridge(menuStrip, toolStripContainer, mapPanel, mapTreeView); //PurgePluginDomain(); }
static void Main(string[] arg) { Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentCulture; // For testing localization //Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ja"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.DoEvents(); ShowBitNess(); ISledCrashReporter crashReporter = null; ISledUsageStatistics usageStatistics = null; try { // Try and create crash reporter crashReporter = SledLibCrashReportNetWrapper.TryCreateCrashReporter(); // Try and create usage statistics usageStatistics = SledLibCrashReportNetWrapper.TryCreateUsageStatistics(); // Create 'master' catalog to hold all // other catalogs we might create var aggregateCatalog = new AggregateCatalog(); // Add 'standard/default' parts to 'master' catalog aggregateCatalog.Catalogs.Add( new TypeCatalog( /* ATF related services */ typeof(SettingsService), typeof(StatusService), typeof(CommandService), typeof(ControlHostService), typeof(UnhandledExceptionService), typeof(UserFeedbackService), typeof(OutputService), typeof(Outputs), typeof(FileDialogService), typeof(DocumentRegistry), typeof(ContextRegistry), typeof(StandardFileExitCommand), typeof(RecentDocumentCommands), typeof(StandardEditCommands), typeof(StandardEditHistoryCommands), typeof(TabbedControlSelector), typeof(DefaultTabCommands), typeof(WindowLayoutService), typeof(WindowLayoutServiceCommands), typeof(SkinService), /* SLED related services */ typeof(SledOutDevice), typeof(SledAboutService), typeof(SledAboutDocumentService), typeof(SledGotoService), typeof(SledTitleBarTextService), typeof(SledDocumentService), typeof(SledProjectService), typeof(SledProjectWatcherService), typeof(SledModifiedProjectFormService), typeof(SledProjectFileGathererService), typeof(SledLanguageParserService), typeof(SledProjectFilesTreeEditor), typeof(SledProjectFilesDiskViewEditor), typeof(SledProjectFileFinderService), typeof(SledProjectFilesUtilityService), typeof(SledProjectFileAdderService), typeof(SledBreakpointService), typeof(SledBreakpointEditor), typeof(SledNetworkPluginService), typeof(SledLanguagePluginService), typeof(SledTargetService), typeof(SledFindAndReplaceService), typeof(SledFindAndReplaceService.SledFindResultsEditor1), typeof(SledFindAndReplaceService.SledFindResultsEditor2), typeof(SledDebugService), typeof(SledDebugScriptCacheService), typeof(SledDebugBreakpointService), typeof(SledDebugFileService), typeof(SledDebugHeartbeatService), typeof(SledDebugNegotiationTimeoutService), typeof(SledDebugFlashWindowService), typeof(SledFileWatcherService), typeof(SledModifiedFilesFormService), typeof(SledFileExtensionService), typeof(SledSyntaxCheckerService), typeof(SledSyntaxErrorsEditor), typeof(SledTtyService), typeof(SledDebugFreezeService), typeof(SledSourceControlService), typeof(SledSharedSchemaLoader) )); // Create directory information service var directoryInfoService = new SledDirectoryInfoService(); // Create dynamic plugin service var dynamicPluginService = new SledDynamicPluginService(); // Grab all dynamically loaded plugins // from the "SLED\Plugins" directory var dynamicAssemblies = dynamicPluginService.GetDynamicAssemblies(directoryInfoService); // Add dynamically obtained assemblies to // the master catalog AddAssembliesToMasterCatalog(aggregateCatalog, dynamicAssemblies); // Add 'master' catalog to container using (var container = new CompositionContainer(aggregateCatalog)) { // Create tool strip container using (var toolStripContainer = new ToolStripContainer()) { toolStripContainer.Dock = DockStyle.Fill; // Grab SledShared.dll for resource loading var assem = Assembly.GetAssembly(typeof(SledShared)); // Create main form & set up some properties var mainForm = new MainForm(toolStripContainer) { AllowDrop = true, Text = Resources.Resource.SLED, Icon = GdiUtil.GetIcon( assem, SledShared.IconPathBase + ".Sled.ico") }; // Load all the icons and images SLED will need SledShared.RegisterImages(); directoryInfoService.MainForm = mainForm; // Create batch and add any manual parts var batch = new CompositionBatch(); batch.AddPart(mainForm); batch.AddPart(directoryInfoService); batch.AddPart(dynamicPluginService); SetupDebugEventFiringWatching(batch); container.Compose(batch); // Set this one time SledServiceReferenceCompositionContainer.SetCompositionContainer(container); // Initialize all IInitializable interfaces try { try { foreach (var initializable in container.GetExportedValues <IInitializable>()) { initializable.Initialize(); } } catch (CompositionException ex) { foreach (var error in ex.Errors) { MessageBox.Show(error.Description, MefCompositionExceptionText); } throw; } } catch (Exception ex) { MessageBox.Show(ex.ToString(), ExceptionDetailsText); Environment.Exit(-1); } // Send usage data to the server now that everything is loaded if (usageStatistics != null) { usageStatistics.PhoneHome(); } SledOutDevice.OutBreak(); // Notify directoryInfoService.LoadingFinished(); // Let ATF's UnhandledExceptionService know about our ICrashLogger if (crashReporter != null) { var unhandledExceptionService = SledServiceInstance.TryGet <UnhandledExceptionService>(); if (unhandledExceptionService != null) { unhandledExceptionService.CrashLogger = crashReporter; } } // Show main form finally Application.Run(mainForm); } } } finally { // // Cleanup // if (crashReporter != null) { crashReporter.Dispose(); } if (usageStatistics != null) { usageStatistics.Dispose(); } } }
/// <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(FViewer)); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.tiffViewer1 = new NAPS2.WinForms.TiffViewerCtl(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.tbPageCurrent = new System.Windows.Forms.ToolStripTextBox(); this.lblPageTotal = new System.Windows.Forms.ToolStripLabel(); this.tsPrev = new System.Windows.Forms.ToolStripButton(); this.tsNext = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.tsdRotate = new System.Windows.Forms.ToolStripDropDownButton(); this.tsRotateLeft = new System.Windows.Forms.ToolStripMenuItem(); this.tsRotateRight = new System.Windows.Forms.ToolStripMenuItem(); this.tsFlip = new System.Windows.Forms.ToolStripMenuItem(); this.tsDeskew = new System.Windows.Forms.ToolStripMenuItem(); this.tsCustomRotation = new System.Windows.Forms.ToolStripMenuItem(); this.tsCrop = new System.Windows.Forms.ToolStripButton(); this.tsBrightnessContrast = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.tsSavePDF = new System.Windows.Forms.ToolStripButton(); this.tsSaveImage = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.tsDelete = new System.Windows.Forms.ToolStripButton(); this.tsSharpen = new System.Windows.Forms.ToolStripButton(); this.tsBlackWhite = new System.Windows.Forms.ToolStripButton(); this.tsHueSaturation = new System.Windows.Forms.ToolStripButton(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // // toolStripContainer1 // // // toolStripContainer1.ContentPanel // this.toolStripContainer1.ContentPanel.Controls.Add(this.tiffViewer1); resources.ApplyResources(this.toolStripContainer1.ContentPanel, "toolStripContainer1.ContentPanel"); resources.ApplyResources(this.toolStripContainer1, "toolStripContainer1"); this.toolStripContainer1.Name = "toolStripContainer1"; // // toolStripContainer1.TopToolStripPanel // this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); // // tiffViewer1 // resources.ApplyResources(this.tiffViewer1, "tiffViewer1"); this.tiffViewer1.Image = null; this.tiffViewer1.Name = "tiffViewer1"; this.tiffViewer1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tiffViewer1_KeyDown); // // toolStrip1 // resources.ApplyResources(this.toolStrip1, "toolStrip1"); this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tbPageCurrent, this.lblPageTotal, this.tsPrev, this.tsNext, this.toolStripSeparator1, this.tsdRotate, this.tsCrop, this.tsBrightnessContrast, this.tsHueSaturation, this.tsBlackWhite, this.tsSharpen, this.toolStripSeparator3, this.tsSavePDF, this.tsSaveImage, this.toolStripSeparator2, this.tsDelete }); this.toolStrip1.Name = "toolStrip1"; // // tbPageCurrent // this.tbPageCurrent.Name = "tbPageCurrent"; resources.ApplyResources(this.tbPageCurrent, "tbPageCurrent"); this.tbPageCurrent.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbPageCurrent_KeyDown); this.tbPageCurrent.TextChanged += new System.EventHandler(this.tbPageCurrent_TextChanged); // // lblPageTotal // this.lblPageTotal.Name = "lblPageTotal"; resources.ApplyResources(this.lblPageTotal, "lblPageTotal"); // // tsPrev // this.tsPrev.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsPrev.Image = global::NAPS2.Icons.arrow_left; resources.ApplyResources(this.tsPrev, "tsPrev"); this.tsPrev.Name = "tsPrev"; this.tsPrev.Click += new System.EventHandler(this.tsPrev_Click); // // tsNext // this.tsNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsNext.Image = global::NAPS2.Icons.arrow_right; resources.ApplyResources(this.tsNext, "tsNext"); this.tsNext.Name = "tsNext"; this.tsNext.Click += new System.EventHandler(this.tsNext_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); // // tsdRotate // this.tsdRotate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsdRotate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsRotateLeft, this.tsRotateRight, this.tsFlip, this.tsDeskew, this.tsCustomRotation }); this.tsdRotate.Image = global::NAPS2.Icons.arrow_rotate_anticlockwise_small; resources.ApplyResources(this.tsdRotate, "tsdRotate"); this.tsdRotate.Name = "tsdRotate"; this.tsdRotate.ShowDropDownArrow = false; // // tsRotateLeft // this.tsRotateLeft.Image = global::NAPS2.Icons.arrow_rotate_anticlockwise_small; this.tsRotateLeft.Name = "tsRotateLeft"; resources.ApplyResources(this.tsRotateLeft, "tsRotateLeft"); this.tsRotateLeft.Click += new System.EventHandler(this.tsRotateLeft_Click); // // tsRotateRight // this.tsRotateRight.Image = global::NAPS2.Icons.arrow_rotate_clockwise_small; this.tsRotateRight.Name = "tsRotateRight"; resources.ApplyResources(this.tsRotateRight, "tsRotateRight"); this.tsRotateRight.Click += new System.EventHandler(this.tsRotateRight_Click); // // tsFlip // this.tsFlip.Image = global::NAPS2.Icons.arrow_switch_small; this.tsFlip.Name = "tsFlip"; resources.ApplyResources(this.tsFlip, "tsFlip"); this.tsFlip.Click += new System.EventHandler(this.tsFlip_Click); // // tsDeskew // this.tsDeskew.Name = "tsDeskew"; resources.ApplyResources(this.tsDeskew, "tsDeskew"); this.tsDeskew.Click += new System.EventHandler(this.tsDeskew_Click); // // tsCustomRotation // this.tsCustomRotation.Name = "tsCustomRotation"; resources.ApplyResources(this.tsCustomRotation, "tsCustomRotation"); this.tsCustomRotation.Click += new System.EventHandler(this.tsCustomRotation_Click); // // tsCrop // this.tsCrop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsCrop.Image = global::NAPS2.Icons.transform_crop; resources.ApplyResources(this.tsCrop, "tsCrop"); this.tsCrop.Name = "tsCrop"; this.tsCrop.Click += new System.EventHandler(this.tsCrop_Click); // // tsBrightnessContrast // this.tsBrightnessContrast.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsBrightnessContrast.Image = global::NAPS2.Icons.contrast_with_sun; resources.ApplyResources(this.tsBrightnessContrast, "tsBrightnessContrast"); this.tsBrightnessContrast.Name = "tsBrightnessContrast"; this.tsBrightnessContrast.Click += new System.EventHandler(this.tsBrightnessContrast_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3"); // // tsSavePDF // this.tsSavePDF.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsSavePDF.Image = global::NAPS2.Icons.file_extension_pdf_small; resources.ApplyResources(this.tsSavePDF, "tsSavePDF"); this.tsSavePDF.Name = "tsSavePDF"; this.tsSavePDF.Click += new System.EventHandler(this.tsSavePDF_Click); // // tsSaveImage // this.tsSaveImage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsSaveImage.Image = global::NAPS2.Icons.picture_small; resources.ApplyResources(this.tsSaveImage, "tsSaveImage"); this.tsSaveImage.Name = "tsSaveImage"; this.tsSaveImage.Click += new System.EventHandler(this.tsSaveImage_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2"); // // tsDelete // this.tsDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsDelete.Image = global::NAPS2.Icons.cross_small; resources.ApplyResources(this.tsDelete, "tsDelete"); this.tsDelete.Name = "tsDelete"; this.tsDelete.Click += new System.EventHandler(this.tsDelete_Click); // // tsSharpen // this.tsSharpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsSharpen.Image = global::NAPS2.Icons.sharpen; resources.ApplyResources(this.tsSharpen, "tsSharpen"); this.tsSharpen.Name = "tsSharpen"; this.tsSharpen.Click += new System.EventHandler(this.tsSharpen_Click); // // tsBlackWhite // this.tsBlackWhite.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsBlackWhite.Image = global::NAPS2.Icons.contrast_high; resources.ApplyResources(this.tsBlackWhite, "tsBlackWhite"); this.tsBlackWhite.Name = "tsBlackWhite"; this.tsBlackWhite.Click += new System.EventHandler(this.tsBlackWhite_Click); // // tsHueSaturation // this.tsHueSaturation.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsHueSaturation.Image = global::NAPS2.Icons.color_management; resources.ApplyResources(this.tsHueSaturation, "tsHueSaturation"); this.tsHueSaturation.Name = "tsHueSaturation"; this.tsHueSaturation.Click += new System.EventHandler(this.tsHueSaturation_Click); // // FViewer // resources.ApplyResources(this, "$this"); this.Controls.Add(this.toolStripContainer1); this.Name = "FViewer"; this.ShowInTaskbar = false; this.toolStripContainer1.ContentPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { components = new Container(); System.ComponentModel.ComponentResourceManager resources = new ComponentResourceManager(typeof(PDDLTabItem)); ProblemsNode = new TreeNode(Parsing.PROBLEMS_NODE_NAME); DomainNode = new TreeNode(Parsing.DOMAIN_NODE_NAME); //TreeNode treeNode8 = new TreeNode(Parsing.PDDL_MODEL_NODE_NAME, // new[] {DomainNode, FunctionsNode}); DomainNode = new TreeNode(Parsing.DOMAIN_NODE_NAME, new[] { ProblemsNode }); splitContainer1 = new SplitContainer(); TreeView_Structure = new TreeView(); contextMenuStrip2 = new ContextMenuStrip(components); openWindowsExplorerToolStripMenuItem = new ToolStripMenuItem(); importDomainFileToolStripMenuItem = new ToolStripMenuItem(); openModelInWindowsExplorerToolStripMenuItem = new ToolStripMenuItem(); addFunctionToolStripMenuItem = new ToolStripMenuItem(); changeFunctionNameToolStripMenuItem = new ToolStripMenuItem(); deleteFunctionToolStripMenuItem = new ToolStripMenuItem(); imageList2 = new ImageList(components); toolStripContainer1 = new ToolStripContainer(); toolStrip1 = new ToolStrip(); toolStripSeparator3 = new ToolStripSeparator(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); splitContainer1.SuspendLayout(); contextMenuStrip2.SuspendLayout(); toolStripContainer1.TopToolStripPanel.SuspendLayout(); toolStripContainer1.SuspendLayout(); toolStrip1.SuspendLayout(); SuspendLayout(); // // splitContainer1 // splitContainer1.Dock = DockStyle.Fill; splitContainer1.Location = new Point(0, 0); splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 // splitContainer1.Panel1.Controls.Add(TreeView_Structure); splitContainer1.Panel1MinSize = 120; // // splitContainer1.Panel2 // splitContainer1.Panel2.Controls.Add(toolStripContainer1); splitContainer1.Panel2MinSize = 100; splitContainer1.Size = new Size(617, 399); splitContainer1.SplitterDistance = 178; splitContainer1.TabIndex = 3; // // TreeView_Structure // TreeView_Structure.ContextMenuStrip = contextMenuStrip2; TreeView_Structure.Dock = DockStyle.Fill; TreeView_Structure.HideSelection = false; TreeView_Structure.Location = new Point(0, 0); TreeView_Structure.Name = "TreeView_Structure"; DomainNode.Name = Parsing.DOMAIN_NODE_NAME; DomainNode.StateImageIndex = 0; DomainNode.Text = Parsing.DOMAIN_NODE_NAME; DomainNode.Tag = new PDDLFile("", "", ""); ProblemsNode.Name = Parsing.PROBLEMS_NODE_NAME; ProblemsNode.StateImageIndex = 1; ProblemsNode.Text = Parsing.PROBLEMS_NODE_NAME; DomainNode.Name = Parsing.DOMAIN_NODE_NAME; DomainNode.Text = Parsing.DOMAIN_NODE_NAME; TreeView_Structure.Nodes.AddRange(new[] { DomainNode }); TreeView_Structure.Size = new Size(178, 399); TreeView_Structure.StateImageList = imageList2; TreeView_Structure.TabIndex = 0; TreeView_Structure.NodeMouseClick += TreeView_Structure_NodeMouseClick; TreeView_Structure.NodeMouseDoubleClick += TreeView_Structure_NodeMouseDoubleClick; // // contextMenuStrip2 // contextMenuStrip2.Items.Add(openWindowsExplorerToolStripMenuItem); contextMenuStrip2.Items.Add(importDomainFileToolStripMenuItem); contextMenuStrip2.Items.Add(openModelInWindowsExplorerToolStripMenuItem); contextMenuStrip2.Items.Add(addFunctionToolStripMenuItem); contextMenuStrip2.Items.Add(changeFunctionNameToolStripMenuItem); contextMenuStrip2.Items.Add(deleteFunctionToolStripMenuItem); contextMenuStrip2.Name = "contextMenuStrip2"; contextMenuStrip2.Size = new Size(50, 15); contextMenuStrip2.Opening += contextMenuStrip2_Opening; // // openWindowsExplorerToolStripMenuItem // openWindowsExplorerToolStripMenuItem.Name = "openWindowsExplorerToolStripMenuItem"; openWindowsExplorerToolStripMenuItem.Size = new Size(50, 15); openWindowsExplorerToolStripMenuItem.Text = "View File in Windows Explorer"; openWindowsExplorerToolStripMenuItem.Click += openWindowsExplorerToolStripMenuItem_Click; // // importDomainFileToolStripMenuItem // importDomainFileToolStripMenuItem.Name = "importDomainFileToolStripMenuItem"; importDomainFileToolStripMenuItem.Size = new Size(50, 15); importDomainFileToolStripMenuItem.Text = "Import a PDDL domain file"; importDomainFileToolStripMenuItem.Click += importDomainFileToolStripMenuItem_Click; // // changeFunctionNameToolStripMenuItem // changeFunctionNameToolStripMenuItem.Name = "changeDiagramNameToolStripMenuItem"; changeFunctionNameToolStripMenuItem.Size = new Size(50, 15); changeFunctionNameToolStripMenuItem.Text = "Change Name"; //changeFunctionNameToolStripMenuItem.Click += changeDiagramNameToolStripMenuItem_Click; // // deleteFunctionToolStripMenuItem // deleteFunctionToolStripMenuItem.Name = "deleteFunctionToolStripMenuItem"; deleteFunctionToolStripMenuItem.Size = new Size(50, 15); deleteFunctionToolStripMenuItem.Text = "Delete this Problem"; deleteFunctionToolStripMenuItem.Click += DeleteFunctionToolStripMenuItemClick; // // addFunctionToolStripMenuItem // addFunctionToolStripMenuItem.Name = "addFunctionToolStripMenuItem"; addFunctionToolStripMenuItem.Size = new Size(50, 15); addFunctionToolStripMenuItem.Text = "Add a PDDL Problem"; addFunctionToolStripMenuItem.Click += AddFunctionToolStripMenuItemClick; // //openModelInWindowsExplorerToolStripMenuItem // openModelInWindowsExplorerToolStripMenuItem.Name = "openModelInWindowsExplorerToolStripMenuItem"; openModelInWindowsExplorerToolStripMenuItem.Size = new Size(50, 15); openModelInWindowsExplorerToolStripMenuItem.Text = "View Model in Windows Explorer"; openModelInWindowsExplorerToolStripMenuItem.Click += openModelInWindowsExplorerToolStripMenuItem_Click; // // imageList2 // imageList2.ImageStream = ((ImageListStreamer)(resources.GetObject("imageList2.ImageStream"))); imageList2.TransparentColor = Color.Transparent; imageList2.Images.SetKeyName(0, "declare.png"); imageList2.Images.SetKeyName(1, "channel.png"); imageList2.Images.SetKeyName(2, "templates.png"); imageList2.Images.SetKeyName(3, "questionMark.png"); // // toolStripContainer1 // // // toolStripContainer1.ContentPanel // toolStripContainer1.ContentPanel.Size = new Size(435, 374); toolStripContainer1.Dock = DockStyle.Fill; toolStripContainer1.Location = new Point(0, 0); toolStripContainer1.Name = "toolStripContainer1"; toolStripContainer1.Size = new Size(435, 399); toolStripContainer1.TabIndex = 3; // // toolStripContainer1.TopToolStripPanel // toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1); // // toolStrip1 // toolStrip1.Dock = DockStyle.None; toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripSeparator3, }); toolStrip1.Location = new Point(3, 0); toolStrip1.Name = "toolStrip1"; toolStrip1.Size = new Size(133, 25); toolStrip1.TabIndex = 1; // // toolStripSeparator3 // toolStripSeparator3.Name = "toolStripSeparator3"; toolStripSeparator3.Size = new Size(6, 25); // // PDDLTabItem // ClientSize = new Size(617, 399); Controls.Add(splitContainer1); Name = "PDDLTabItem"; //contextMenuStrip1.ResumeLayout(false); splitContainer1.Panel1.ResumeLayout(false); splitContainer1.Panel2.ResumeLayout(false); splitContainer1.ResumeLayout(false); contextMenuStrip2.ResumeLayout(false); toolStripContainer1.TopToolStripPanel.ResumeLayout(false); toolStripContainer1.TopToolStripPanel.PerformLayout(); toolStripContainer1.ResumeLayout(false); toolStripContainer1.PerformLayout(); toolStrip1.ResumeLayout(false); toolStrip1.PerformLayout(); ResumeLayout(false); //InitializeCanvasMethod(); //InitializePOROverheadsMethod(); }
public static void Init(MenuStrip menu, ToolStripContainer toolStripContainer) { _menu = menu; _container = toolStripContainer; AddDefault(); }
public void ChangeParent() { Cursor current = Cursor.Current; DesignerTransaction transaction = this._host.CreateTransaction("Add ToolStripContainer Transaction"); try { Cursor.Current = Cursors.WaitCursor; Control rootComponent = this._host.RootComponent as Control; ParentControlDesigner designer = this._host.GetDesigner(rootComponent) as ParentControlDesigner; if (designer != null) { ToolStrip component = this._designer.Component as ToolStrip; if (((component != null) && (this._designer != null)) && ((this._designer.Component != null) && (this._provider != null))) { (this._provider.GetService(typeof(DesignerActionUIService)) as DesignerActionUIService).HideUI(component); } ToolboxItem tool = new ToolboxItem(typeof(ToolStripContainer)); OleDragDropHandler oleDragHandler = designer.GetOleDragHandler(); if (oleDragHandler != null) { ToolStripContainer container = oleDragHandler.CreateTool(tool, rootComponent, 0, 0, 0, 0, false, false)[0] as ToolStripContainer; if ((container != null) && (component != null)) { IComponentChangeService service = this._provider.GetService(typeof(IComponentChangeService)) as IComponentChangeService; Control parent = this.GetParent(container, component); PropertyDescriptor member = TypeDescriptor.GetProperties(parent)["Controls"]; Control control3 = component.Parent; if (control3 != null) { service.OnComponentChanging(control3, member); control3.Controls.Remove(component); } if (parent != null) { service.OnComponentChanging(parent, member); parent.Controls.Add(component); } if (((service != null) && (control3 != null)) && (parent != null)) { service.OnComponentChanged(control3, member, null, null); service.OnComponentChanged(parent, member, null, null); } ISelectionService service3 = this._provider.GetService(typeof(ISelectionService)) as ISelectionService; if (service3 != null) { service3.SetSelectedComponents(new IComponent[] { container }); } } } } } catch (Exception exception) { if (exception is InvalidOperationException) { ((IUIService)this._provider.GetService(typeof(IUIService))).ShowError(exception.Message); } if (transaction != null) { transaction.Cancel(); transaction = null; } } finally { if (transaction != null) { transaction.Commit(); transaction = null; } Cursor.Current = current; } }
private void InitializeComponent() { System.Windows.Forms.ToolStrip tsRoot; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.tscbRootList = new System.Windows.Forms.ToolStripComboBox(); this.toolContainer = new System.Windows.Forms.ToolStripContainer(); this.tsMisc = new System.Windows.Forms.ToolStrip(); this.tsbMakeRoot = new System.Windows.Forms.ToolStripButton(); this.tsbFindPage = new System.Windows.Forms.ToolStripButton(); this.tsbRefresh = new System.Windows.Forms.ToolStripButton(); this.tsWorkingSet = new System.Windows.Forms.ToolStrip(); this.tsbAddWorkingSet = new System.Windows.Forms.ToolStripButton(); this.tsbRemoveWorkingSet = new System.Windows.Forms.ToolStripButton(); this.tsbAddLink = new System.Windows.Forms.ToolStripButton(); this.tsbRemoveLink = new System.Windows.Forms.ToolStripButton(); tsRoot = new System.Windows.Forms.ToolStrip(); tsRoot.SuspendLayout(); this.toolContainer.BottomToolStripPanel.SuspendLayout(); this.toolContainer.TopToolStripPanel.SuspendLayout(); this.toolContainer.SuspendLayout(); this.tsMisc.SuspendLayout(); this.tsWorkingSet.SuspendLayout(); this.SuspendLayout(); // // tsRoot // tsRoot.BackColor = System.Drawing.Color.White; tsRoot.Dock = System.Windows.Forms.DockStyle.None; tsRoot.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tscbRootList }); tsRoot.Location = new System.Drawing.Point(3, 0); tsRoot.Name = "tsRoot"; tsRoot.Padding = new System.Windows.Forms.Padding(0); tsRoot.Size = new System.Drawing.Size(211, 25); tsRoot.TabIndex = 0; tsRoot.Text = "toolStrip1"; // // tscbRootList // this.tscbRootList.BackColor = System.Drawing.Color.White; this.tscbRootList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.tscbRootList.Margin = new System.Windows.Forms.Padding(0); this.tscbRootList.Name = "tscbRootList"; this.tscbRootList.Size = new System.Drawing.Size(200, 25); this.tscbRootList.SelectedIndexChanged += new System.EventHandler(this.tscbRootListSelectionChanged); // // toolContainer // // // toolContainer.BottomToolStripPanel // this.toolContainer.BottomToolStripPanel.BackColor = System.Drawing.Color.White; this.toolContainer.BottomToolStripPanel.Controls.Add(this.tsWorkingSet); this.toolContainer.BottomToolStripPanel.Controls.Add(this.tsMisc); this.toolContainer.BottomToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; // // toolContainer.ContentPanel // this.toolContainer.ContentPanel.BackColor = System.Drawing.Color.White; this.toolContainer.ContentPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.toolContainer.ContentPanel.Size = new System.Drawing.Size(237, 508); this.toolContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.toolContainer.Location = new System.Drawing.Point(0, 0); this.toolContainer.Margin = new System.Windows.Forms.Padding(0); this.toolContainer.Name = "toolContainer"; this.toolContainer.Size = new System.Drawing.Size(237, 564); this.toolContainer.TabIndex = 1; this.toolContainer.Text = "toolStripContainer1"; // // toolContainer.TopToolStripPanel // this.toolContainer.TopToolStripPanel.BackColor = System.Drawing.SystemColors.ControlLightLight; this.toolContainer.TopToolStripPanel.Controls.Add(tsRoot); this.toolContainer.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; // // tsMisc // this.tsMisc.AllowItemReorder = true; this.tsMisc.BackColor = System.Drawing.Color.White; this.tsMisc.Dock = System.Windows.Forms.DockStyle.None; this.tsMisc.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbMakeRoot, this.tsbFindPage, this.tsbRefresh }); this.tsMisc.Location = new System.Drawing.Point(127, 0); this.tsMisc.Name = "tsMisc"; this.tsMisc.Size = new System.Drawing.Size(96, 31); this.tsMisc.TabIndex = 1; // // tsbMakeRoot // this.tsbMakeRoot.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbMakeRoot.Image = ((System.Drawing.Image)(resources.GetObject("tsbMakeRoot.Image"))); this.tsbMakeRoot.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.tsbMakeRoot.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbMakeRoot.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbMakeRoot.Name = "tsbMakeRoot"; this.tsbMakeRoot.Size = new System.Drawing.Size(28, 28); this.tsbMakeRoot.Text = "Make Selected Node the Root"; this.tsbMakeRoot.ToolTipText = "Make Selected Node the Root"; this.tsbMakeRoot.Click += new System.EventHandler(this.MakeRootButton); // // tsbFindPage // this.tsbFindPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbFindPage.Image = ((System.Drawing.Image)(resources.GetObject("tsbFindPage.Image"))); this.tsbFindPage.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.tsbFindPage.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbFindPage.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbFindPage.Name = "tsbFindPage"; this.tsbFindPage.Size = new System.Drawing.Size(28, 28); this.tsbFindPage.Text = "Find Current Page in Tree"; this.tsbFindPage.ToolTipText = "Find Current Page in Tree"; this.tsbFindPage.Click += new System.EventHandler(this.FindInTreeButton); // // tsbRefresh // this.tsbRefresh.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbRefresh.Image = ((System.Drawing.Image)(resources.GetObject("tsbRefresh.Image"))); this.tsbRefresh.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.tsbRefresh.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbRefresh.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbRefresh.Name = "tsbRefresh"; this.tsbRefresh.Size = new System.Drawing.Size(28, 28); this.tsbRefresh.Text = "Refresh"; this.tsbRefresh.Click += new System.EventHandler(this.RefreshViewButton); // // tsWorkingSet // this.tsWorkingSet.AllowItemReorder = true; this.tsWorkingSet.BackColor = System.Drawing.Color.White; this.tsWorkingSet.Dock = System.Windows.Forms.DockStyle.None; this.tsWorkingSet.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbAddWorkingSet, this.tsbRemoveWorkingSet, this.tsbAddLink, this.tsbRemoveLink }); this.tsWorkingSet.Location = new System.Drawing.Point(3, 0); this.tsWorkingSet.Name = "tsWorkingSet"; this.tsWorkingSet.Size = new System.Drawing.Size(124, 31); this.tsWorkingSet.TabIndex = 1; // // tsbAddWorkingSet // this.tsbAddWorkingSet.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbAddWorkingSet.Image = ((System.Drawing.Image)(resources.GetObject("tsbAddWorkingSet.Image"))); this.tsbAddWorkingSet.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbAddWorkingSet.ImageTransparentColor = System.Drawing.Color.Black; this.tsbAddWorkingSet.Name = "tsbAddWorkingSet"; this.tsbAddWorkingSet.Size = new System.Drawing.Size(28, 28); this.tsbAddWorkingSet.Text = "Add Favorites Folder"; this.tsbAddWorkingSet.ToolTipText = "Add Favorites Folder"; this.tsbAddWorkingSet.Click += new System.EventHandler(this.tsbAddWorkingSet_Click); // // tsbRemoveWorkingSet // this.tsbRemoveWorkingSet.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbRemoveWorkingSet.Image = ((System.Drawing.Image)(resources.GetObject("tsbRemoveWorkingSet.Image"))); this.tsbRemoveWorkingSet.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbRemoveWorkingSet.ImageTransparentColor = System.Drawing.Color.Black; this.tsbRemoveWorkingSet.Name = "tsbRemoveWorkingSet"; this.tsbRemoveWorkingSet.Size = new System.Drawing.Size(28, 28); this.tsbRemoveWorkingSet.Text = "Remove Favorites Folder"; this.tsbRemoveWorkingSet.Click += new System.EventHandler(this.tsbRemoveWorkingSet_Click); // // tsbAddLink // this.tsbAddLink.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbAddLink.Image = ((System.Drawing.Image)(resources.GetObject("tsbAddLink.Image"))); this.tsbAddLink.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbAddLink.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbAddLink.Name = "tsbAddLink"; this.tsbAddLink.Size = new System.Drawing.Size(28, 28); this.tsbAddLink.Text = "Add Link"; this.tsbAddLink.Click += new System.EventHandler(this.tsbAddLink_Click); // // tsbRemoveLink // this.tsbRemoveLink.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbRemoveLink.Image = ((System.Drawing.Image)(resources.GetObject("tsbRemoveLink.Image"))); this.tsbRemoveLink.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.tsbRemoveLink.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbRemoveLink.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbRemoveLink.Name = "tsbRemoveLink"; this.tsbRemoveLink.Size = new System.Drawing.Size(28, 28); this.tsbRemoveLink.Text = "Remove Link"; this.tsbRemoveLink.Click += new System.EventHandler(this.tsbRemoveLink_Click); // // MainForm // this.ClientSize = new System.Drawing.Size(237, 564); this.Controls.Add(this.toolContainer); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "MainForm"; this.Text = "OneNote TreeView"; this.Load += new System.EventHandler(this.MainForm_Load); tsRoot.ResumeLayout(false); tsRoot.PerformLayout(); this.toolContainer.BottomToolStripPanel.ResumeLayout(false); this.toolContainer.BottomToolStripPanel.PerformLayout(); this.toolContainer.TopToolStripPanel.ResumeLayout(false); this.toolContainer.TopToolStripPanel.PerformLayout(); this.toolContainer.ResumeLayout(false); this.toolContainer.PerformLayout(); this.tsMisc.ResumeLayout(false); this.tsMisc.PerformLayout(); this.tsWorkingSet.ResumeLayout(false); this.tsWorkingSet.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmMain)); this.toolStripContainer1 = new ToolStripContainer(); this.statusStrip1 = new StatusStrip(); this.toolStripStatusLabel1 = new ToolStripStatusLabel(); this.leftSideMenu = new MenuStrip(); this.menuItemDatabaseSetup = new ToolStripMenuItem(); this.menuItemQueryCommander = new ToolStripMenuItem(); this.menuItemDuplicateDestroyer = new ToolStripMenuItem(); this.codeGenerationToolStripMenuItem = new ToolStripMenuItem(); this.menuItemTableModule = new ToolStripMenuItem(); this.menuItemTMWServiceLayer = new ToolStripMenuItem(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.LeftToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.leftSideMenu.SuspendLayout(); this.SuspendLayout(); this.toolStripContainer1.BottomToolStripPanel.Controls.Add((Control)this.statusStrip1); this.toolStripContainer1.ContentPanel.Size = new Size(742, 499); this.toolStripContainer1.Dock = DockStyle.Fill; this.toolStripContainer1.LeftToolStripPanel.Controls.Add((Control)this.leftSideMenu); this.toolStripContainer1.Location = new Point(0, 0); this.toolStripContainer1.Name = "toolStripContainer1"; this.toolStripContainer1.Size = new Size(878, 546); this.toolStripContainer1.TabIndex = 1; this.toolStripContainer1.Text = "toolStripContainer1"; this.statusStrip1.Dock = DockStyle.None; this.statusStrip1.Items.AddRange(new ToolStripItem[1] { (ToolStripItem)this.toolStripStatusLabel1 }); this.statusStrip1.Location = new Point(0, 0); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new Size(878, 22); this.statusStrip1.TabIndex = 0; //this.toolStripStatusLabel1.Image = (Image)componentResourceManager.GetObject("toolStripStatusLabel1.Image"); this.toolStripStatusLabel1.ImageAlign = ContentAlignment.MiddleLeft; this.toolStripStatusLabel1.ImageScaling = ToolStripItemImageScaling.None; this.toolStripStatusLabel1.IsLink = true; this.toolStripStatusLabel1.LinkBehavior = LinkBehavior.HoverUnderline; this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new Size(863, 17); this.toolStripStatusLabel1.Spring = true; this.toolStripStatusLabel1.Text = "Berke Sokhan"; this.toolStripStatusLabel1.Click += new EventHandler(this.toolStripStatusLabel1_Click); this.leftSideMenu.AllowMerge = false; this.leftSideMenu.BackColor = Color.White; this.leftSideMenu.Dock = DockStyle.None; this.leftSideMenu.Items.AddRange(new ToolStripItem[4] { (ToolStripItem)this.menuItemDatabaseSetup, (ToolStripItem)this.menuItemQueryCommander, (ToolStripItem)this.menuItemDuplicateDestroyer, (ToolStripItem)this.codeGenerationToolStripMenuItem }); this.leftSideMenu.LayoutStyle = ToolStripLayoutStyle.Table; this.leftSideMenu.Location = new Point(0, 0); this.leftSideMenu.Name = "leftSideMenu"; this.leftSideMenu.RenderMode = ToolStripRenderMode.Professional; this.leftSideMenu.ShowItemToolTips = true; this.leftSideMenu.Size = new Size(136, 499); this.leftSideMenu.TabIndex = 0; this.leftSideMenu.Text = "menuStrip1"; //this.menuItemDatabaseSetup.Image = (Image)componentResourceManager.GetObject("menuItemDatabaseSetup.Image"); this.menuItemDatabaseSetup.ImageScaling = ToolStripItemImageScaling.None; this.menuItemDatabaseSetup.Name = "menuItemDatabaseSetup"; this.menuItemDatabaseSetup.Size = new Size(112, 20); this.menuItemDatabaseSetup.Text = "Database Setup"; this.menuItemDatabaseSetup.Click += new EventHandler(this.menuItemDatabaseSetup_Click); //this.menuItemQueryCommander.Image = (Image)componentResourceManager.GetObject("menuItemQueryCommander.Image"); this.menuItemQueryCommander.Name = "menuItemQueryCommander"; this.menuItemQueryCommander.Size = new Size(109, 20); this.menuItemQueryCommander.Text = "Sql Commander"; this.menuItemQueryCommander.Click += new EventHandler(this.menuItemQueryCommander_Click); //this.menuItemDuplicateDestroyer.Image = (Image)componentResourceManager.GetObject("menuItemDuplicateDestroyer.Image"); this.menuItemDuplicateDestroyer.Name = "menuItemDuplicateDestroyer"; this.menuItemDuplicateDestroyer.Size = new Size(130, 20); this.menuItemDuplicateDestroyer.Text = "Duplicate Destroyer"; this.menuItemDuplicateDestroyer.Click += new EventHandler(this.menuItemDuplicateDestroyer_Click); this.codeGenerationToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[2] { (ToolStripItem)this.menuItemTableModule, (ToolStripItem)this.menuItemTMWServiceLayer }); //this.codeGenerationToolStripMenuItem.Image = (Image)componentResourceManager.GetObject("codeGenerationToolStripMenuItem.Image"); this.codeGenerationToolStripMenuItem.Name = "codeGenerationToolStripMenuItem"; this.codeGenerationToolStripMenuItem.Size = new Size(117, 20); this.codeGenerationToolStripMenuItem.Text = "Code Generators"; this.menuItemTableModule.Name = "menuItemTableModule"; this.menuItemTableModule.Size = new Size(182, 22); this.menuItemTableModule.Text = "Table Module"; this.menuItemTableModule.Click += new EventHandler(this.menuItemTableModule_Click); this.menuItemTMWServiceLayer.Name = "menuItemTMWServiceLayer"; this.menuItemTMWServiceLayer.Size = new Size(182, 22); this.menuItemTMWServiceLayer.Text = "TM w/ Service Layer"; this.menuItemTMWServiceLayer.Click += new EventHandler(this.menuItemTMWServiceLayer_Click); this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new Size(878, 546); this.Controls.Add((Control)this.toolStripContainer1); //this.Icon = (Icon)componentResourceManager.GetObject("$this.Icon"); this.Name = "FrmMain"; this.Text = "Sharp Generator 1.0.0.10"; this.Load += new EventHandler(this.frmMdiParent_Load); this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.PerformLayout(); this.toolStripContainer1.LeftToolStripPanel.ResumeLayout(false); this.toolStripContainer1.LeftToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.leftSideMenu.ResumeLayout(false); this.leftSideMenu.PerformLayout(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LayoutForm)); this._toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this._splitContainer1 = new System.Windows.Forms.SplitContainer(); this._splitContainer2 = new System.Windows.Forms.SplitContainer(); this._layoutControl1 = new DotSpatial.Controls.LayoutControl(); this._layoutDocToolStrip1 = new DotSpatial.Controls.LayoutDocToolStrip(); this._layoutInsertToolStrip1 = new DotSpatial.Controls.LayoutInsertToolStrip(); this._layoutListBox1 = new DotSpatial.Controls.LayoutListBox(); this._layoutMapToolStrip1 = new DotSpatial.Controls.LayoutMapToolStrip(); this._layoutMenuStrip1 = new DotSpatial.Controls.LayoutMenuStrip(); this._layoutPropertyGrid1 = new DotSpatial.Controls.LayoutPropertyGrid(); this._layoutZoomToolStrip1 = new DotSpatial.Controls.LayoutZoomToolStrip(); this._toolStripContainer1.ContentPanel.SuspendLayout(); this._toolStripContainer1.TopToolStripPanel.SuspendLayout(); this._toolStripContainer1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._splitContainer1)).BeginInit(); this._splitContainer1.Panel1.SuspendLayout(); this._splitContainer1.Panel2.SuspendLayout(); this._splitContainer1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._splitContainer2)).BeginInit(); this._splitContainer2.Panel1.SuspendLayout(); this._splitContainer2.Panel2.SuspendLayout(); this._splitContainer2.SuspendLayout(); this.SuspendLayout(); // // _toolStripContainer1 // // // _toolStripContainer1.ContentPanel // this._toolStripContainer1.ContentPanel.Controls.Add(this._splitContainer1); resources.ApplyResources(this._toolStripContainer1.ContentPanel, "_toolStripContainer1.ContentPanel"); resources.ApplyResources(this._toolStripContainer1, "_toolStripContainer1"); this._toolStripContainer1.Name = "_toolStripContainer1"; // // _toolStripContainer1.TopToolStripPanel // this._toolStripContainer1.TopToolStripPanel.Controls.Add(this._layoutDocToolStrip1); this._toolStripContainer1.TopToolStripPanel.Controls.Add(this._layoutZoomToolStrip1); this._toolStripContainer1.TopToolStripPanel.Controls.Add(this._layoutInsertToolStrip1); this._toolStripContainer1.TopToolStripPanel.Controls.Add(this._layoutMapToolStrip1); // // _splitContainer1 // resources.ApplyResources(this._splitContainer1, "_splitContainer1"); this._splitContainer1.Name = "_splitContainer1"; // // _splitContainer1.Panel1 // this._splitContainer1.Panel1.Controls.Add(this._layoutControl1); // // _splitContainer1.Panel2 // this._splitContainer1.Panel2.Controls.Add(this._splitContainer2); // // _splitContainer2 // resources.ApplyResources(this._splitContainer2, "_splitContainer2"); this._splitContainer2.Name = "_splitContainer2"; // // _splitContainer2.Panel1 // this._splitContainer2.Panel1.Controls.Add(this._layoutListBox1); // // _splitContainer2.Panel2 // this._splitContainer2.Panel2.Controls.Add(this._layoutPropertyGrid1); // // _layoutControl1 // this._layoutControl1.Cursor = System.Windows.Forms.Cursors.Default; resources.ApplyResources(this._layoutControl1, "_layoutControl1"); this._layoutControl1.DrawingQuality = System.Drawing.Drawing2D.SmoothingMode.HighQuality; this._layoutControl1.Filename = ""; this._layoutControl1.LayoutDocToolStrip = this._layoutDocToolStrip1; this._layoutControl1.LayoutInsertToolStrip = this._layoutInsertToolStrip1; this._layoutControl1.LayoutListBox = this._layoutListBox1; this._layoutControl1.LayoutMapToolStrip = this._layoutMapToolStrip1; this._layoutControl1.LayoutMenuStrip = this._layoutMenuStrip1; this._layoutControl1.LayoutPropertyGrip = this._layoutPropertyGrid1; this._layoutControl1.LayoutZoomToolStrip = this._layoutZoomToolStrip1; this._layoutControl1.MapControl = null; this._layoutControl1.MapPanMode = false; this._layoutControl1.Name = "_layoutControl1"; this._layoutControl1.ShowMargin = false; this._layoutControl1.Zoom = 0.3541667F; this._layoutControl1.FilenameChanged += new System.EventHandler(this.layoutControl1_FilenameChanged); // // _layoutDocToolStrip1 // resources.ApplyResources(this._layoutDocToolStrip1, "_layoutDocToolStrip1"); this._layoutDocToolStrip1.LayoutControl = this._layoutControl1; this._layoutDocToolStrip1.Name = "_layoutDocToolStrip1"; // // _layoutInsertToolStrip1 // resources.ApplyResources(this._layoutInsertToolStrip1, "_layoutInsertToolStrip1"); this._layoutInsertToolStrip1.LayoutControl = this._layoutControl1; this._layoutInsertToolStrip1.Name = "_layoutInsertToolStrip1"; // // _layoutListBox1 // this._layoutListBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; resources.ApplyResources(this._layoutListBox1, "_layoutListBox1"); this._layoutListBox1.LayoutControl = this._layoutControl1; this._layoutListBox1.Name = "_layoutListBox1"; // // _layoutMapToolStrip1 // resources.ApplyResources(this._layoutMapToolStrip1, "_layoutMapToolStrip1"); this._layoutMapToolStrip1.LayoutControl = this._layoutControl1; this._layoutMapToolStrip1.Name = "_layoutMapToolStrip1"; // // _layoutMenuStrip1 // this._layoutMenuStrip1.LayoutControl = this._layoutControl1; resources.ApplyResources(this._layoutMenuStrip1, "_layoutMenuStrip1"); this._layoutMenuStrip1.Name = "_layoutMenuStrip1"; this._layoutMenuStrip1.CloseClicked += new System.EventHandler(this.layoutMenuStrip1_CloseClicked); // // _layoutPropertyGrid1 // this._layoutPropertyGrid1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; resources.ApplyResources(this._layoutPropertyGrid1, "_layoutPropertyGrid1"); this._layoutPropertyGrid1.LayoutControl = this._layoutControl1; this._layoutPropertyGrid1.Name = "_layoutPropertyGrid1"; // // _layoutZoomToolStrip1 // resources.ApplyResources(this._layoutZoomToolStrip1, "_layoutZoomToolStrip1"); this._layoutZoomToolStrip1.LayoutControl = this._layoutControl1; this._layoutZoomToolStrip1.Name = "_layoutZoomToolStrip1"; // // LayoutForm // resources.ApplyResources(this, "$this"); this.Controls.Add(this._toolStripContainer1); this.Controls.Add(this._layoutMenuStrip1); this.ForeColor = System.Drawing.SystemColors.ControlText; this.Name = "LayoutForm"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LayoutForm_FormClosing); this.Load += new System.EventHandler(this.LayoutForm_Load); this._toolStripContainer1.ContentPanel.ResumeLayout(false); this._toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this._toolStripContainer1.TopToolStripPanel.PerformLayout(); this._toolStripContainer1.ResumeLayout(false); this._toolStripContainer1.PerformLayout(); this._splitContainer1.Panel1.ResumeLayout(false); this._splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._splitContainer1)).EndInit(); this._splitContainer1.ResumeLayout(false); this._splitContainer2.Panel1.ResumeLayout(false); this._splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._splitContainer2)).EndInit(); this._splitContainer2.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this._mainSplitter = new System.Windows.Forms.SplitContainer(); this._toolStripContainer = new System.Windows.Forms.ToolStripContainer(); this._flowPanelFilter = new System.Windows.Forms.FlowLayoutPanel(); this._searchBox = new System.Windows.Forms.TextBox(); this._orderByLevel = new System.Windows.Forms.CheckBox(); this._itemQuality = new System.Windows.Forms.ComboBox(); this._slotFilter = new System.Windows.Forms.ComboBox(); this._modFilter = new System.Windows.Forms.ComboBox(); this._levelRequirementGroup = new System.Windows.Forms.GroupBox(); this._minLevel = new System.Windows.Forms.TextBox(); this._maxLevel = new System.Windows.Forms.TextBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this._mainSplitter)).BeginInit(); this._mainSplitter.Panel2.SuspendLayout(); this._mainSplitter.SuspendLayout(); this._toolStripContainer.SuspendLayout(); this._flowPanelFilter.SuspendLayout(); this._levelRequirementGroup.SuspendLayout(); this.SuspendLayout(); // // _mainSplitter // this._mainSplitter.Dock = System.Windows.Forms.DockStyle.Fill; this._mainSplitter.Location = new System.Drawing.Point(0, 0); this._mainSplitter.Name = "_mainSplitter"; // // _mainSplitter.Panel2 // this._mainSplitter.Panel2.Controls.Add(this._toolStripContainer); this._mainSplitter.Panel2.Controls.Add(this._flowPanelFilter); this._mainSplitter.Size = new System.Drawing.Size(1313, 650); this._mainSplitter.SplitterDistance = 204; this._mainSplitter.SplitterWidth = 3; this._mainSplitter.TabIndex = 0; this._mainSplitter.TabStop = false; // // _toolStripContainer // this._toolStripContainer.BottomToolStripPanelVisible = false; // // _toolStripContainer.ContentPanel // this._toolStripContainer.ContentPanel.Size = new System.Drawing.Size(1106, 576); this._toolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill; this._toolStripContainer.LeftToolStripPanelVisible = false; this._toolStripContainer.Location = new System.Drawing.Point(0, 49); this._toolStripContainer.Name = "_toolStripContainer"; this._toolStripContainer.RightToolStripPanelVisible = false; this._toolStripContainer.Size = new System.Drawing.Size(1106, 601); this._toolStripContainer.TabIndex = 48; this._toolStripContainer.Text = "toolStripContainer1"; // // _flowPanelFilter // this._flowPanelFilter.AutoSize = true; this._flowPanelFilter.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this._flowPanelFilter.Controls.Add(this._searchBox); this._flowPanelFilter.Controls.Add(this._orderByLevel); this._flowPanelFilter.Controls.Add(this._itemQuality); this._flowPanelFilter.Controls.Add(this._slotFilter); this._flowPanelFilter.Controls.Add(this._modFilter); this._flowPanelFilter.Controls.Add(this._levelRequirementGroup); this._flowPanelFilter.Dock = System.Windows.Forms.DockStyle.Top; this._flowPanelFilter.Location = new System.Drawing.Point(0, 0); this._flowPanelFilter.Name = "_flowPanelFilter"; this._flowPanelFilter.Size = new System.Drawing.Size(1106, 49); this._flowPanelFilter.TabIndex = 52; // // _searchBox // this._searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._searchBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; this._searchBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.RecentlyUsedList; this._searchBox.Location = new System.Drawing.Point(3, 17); this._searchBox.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._searchBox.MaxLength = 255; this._searchBox.Name = "_searchBox"; this._searchBox.Size = new System.Drawing.Size(304, 20); this._searchBox.TabIndex = 41; this.toolTip1.SetToolTip(this._searchBox, "The item name, partially works fine."); // // _orderByLevel // this._orderByLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._orderByLevel.AutoSize = true; this._orderByLevel.Checked = true; this._orderByLevel.CheckState = System.Windows.Forms.CheckState.Checked; this._orderByLevel.Location = new System.Drawing.Point(313, 19); this._orderByLevel.Margin = new System.Windows.Forms.Padding(3, 19, 3, 3); this._orderByLevel.Name = "_orderByLevel"; this._orderByLevel.Size = new System.Drawing.Size(96, 17); this._orderByLevel.TabIndex = 42; this._orderByLevel.Tag = "iatag_ui_orderbylevel"; this._orderByLevel.Text = "Order By Level"; this.toolTip1.SetToolTip(this._orderByLevel, "If items should be ordered by level, instead of alphabetically."); this._orderByLevel.UseVisualStyleBackColor = true; // // _itemQuality // this._itemQuality.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._itemQuality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._itemQuality.FormattingEnabled = true; this._itemQuality.Location = new System.Drawing.Point(415, 17); this._itemQuality.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._itemQuality.Name = "_itemQuality"; this._itemQuality.Size = new System.Drawing.Size(59, 21); this._itemQuality.TabIndex = 43; this.toolTip1.SetToolTip(this._itemQuality, "The minimum item quality"); // // _slotFilter // this._slotFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._slotFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._slotFilter.FormattingEnabled = true; this._slotFilter.Location = new System.Drawing.Point(480, 17); this._slotFilter.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._slotFilter.Name = "_slotFilter"; this._slotFilter.Size = new System.Drawing.Size(120, 21); this._slotFilter.TabIndex = 44; this.toolTip1.SetToolTip(this._slotFilter, "Slot/Type"); // // _modFilter // this._modFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._modFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._modFilter.FormattingEnabled = true; this._modFilter.Location = new System.Drawing.Point(606, 17); this._modFilter.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._modFilter.Name = "_modFilter"; this._modFilter.Size = new System.Drawing.Size(102, 21); this._modFilter.TabIndex = 45; this.toolTip1.SetToolTip(this._modFilter, "Mod / Hardcore / Vanilla"); // // _levelRequirementGroup // this._levelRequirementGroup.Controls.Add(this._minLevel); this._levelRequirementGroup.Controls.Add(this._maxLevel); this._levelRequirementGroup.Location = new System.Drawing.Point(714, 3); this._levelRequirementGroup.Name = "_levelRequirementGroup"; this._levelRequirementGroup.Size = new System.Drawing.Size(78, 43); this._levelRequirementGroup.TabIndex = 50; this._levelRequirementGroup.TabStop = false; this._levelRequirementGroup.Tag = "iatag_ui_level_requirement"; this._levelRequirementGroup.Text = "Level"; this.toolTip1.SetToolTip(this._levelRequirementGroup, "Level requirements for the item"); // // _minLevel // this._minLevel.Location = new System.Drawing.Point(5, 15); this._minLevel.MaxLength = 3; this._minLevel.Name = "_minLevel"; this._minLevel.Size = new System.Drawing.Size(30, 20); this._minLevel.TabIndex = 46; this._minLevel.Text = "0"; this._minLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.toolTip1.SetToolTip(this._minLevel, "The minimum level required to use this item"); this._minLevel.WordWrap = false; // // _maxLevel // this._maxLevel.Location = new System.Drawing.Point(40, 15); this._maxLevel.MaxLength = 3; this._maxLevel.Name = "_maxLevel"; this._maxLevel.Size = new System.Drawing.Size(30, 20); this._maxLevel.TabIndex = 47; this._maxLevel.Text = "110"; this._maxLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.toolTip1.SetToolTip(this._maxLevel, "The maximum level required to use this item"); this._maxLevel.WordWrap = false; // // toolTip1 // this.toolTip1.ToolTipTitle = "This is:"; // // SplitSearchWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1313, 650); this.Controls.Add(this._mainSplitter); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "SplitSearchWindow"; this.Text = "SearchWindow"; this.Load += new System.EventHandler(this.SplitSearchWindow_Load); this._mainSplitter.Panel2.ResumeLayout(false); this._mainSplitter.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this._mainSplitter)).EndInit(); this._mainSplitter.ResumeLayout(false); this._toolStripContainer.ResumeLayout(false); this._toolStripContainer.PerformLayout(); this._flowPanelFilter.ResumeLayout(false); this._flowPanelFilter.PerformLayout(); this._levelRequirementGroup.ResumeLayout(false); this._levelRequirementGroup.PerformLayout(); this.ResumeLayout(false); }
public void InitializeComponent() { this.m_Version = new List <uint>(); this.m_Length = new List <uint>(); this.m_ID = new List <uint>(); this.m_InitCoordsX = new List <short>(); this.m_InitCoordsY = new List <short>(); this.m_EndCoordsX = new List <short>(); this.m_EndCoordsY = new List <short>(); this.m_ColorCount = new List <uint>(); this.m_ColorAddress = new List <uint>(); this.m_FrameCount = new List <uint>(); this.m_FrameAddress = new List <uint>(); this._ImageDataOffset = new List <long>(); ComponentResourceManager resources = new ComponentResourceManager(typeof(KRFrameViewer)); this.worker = new BackgroundWorker(); this.exportFileDialog = new FolderBrowserDialog(); this.openFileDialog = new OpenFileDialog(); this.TopToolStripPanel = new ToolStripPanel(); this.ContentPanel = new ToolStripContentPanel(); this.treeFramesBox = new TreeView(); this.colorTableBox = new PictureBox(); this.mainImageBox = new PictureBox(); this.statusBar = new TextBox(); this.infoBox = new RichTextBox(); this.progressBar = new ProgressBar(); this.mainContainer = new ToolStripContainer(); this.toolStrip = new ToolStrip(); this.fileDropdown = new ToolStripDropDownButton(); this.openFileMenuItem = new ToolStripMenuItem(); this.openFolderFileMenuItem = new ToolStripMenuItem(); this.exportMenuItem = new ToolStripMenuItem(); this.exitFileMenuItem = new ToolStripMenuItem(); this.openFolderDialog = new FolderBrowserDialog(); ((ISupportInitialize)(this.colorTableBox)).BeginInit(); ((ISupportInitialize)(this.mainImageBox)).BeginInit(); this.mainContainer.ContentPanel.SuspendLayout(); this.mainContainer.SuspendLayout(); this.toolStrip.SuspendLayout(); this.SuspendLayout(); // // worker // this.worker.WorkerReportsProgress = true; this.worker.DoWork += new DoWorkEventHandler(this.WorkerExportFile); this.worker.ProgressChanged += new ProgressChangedEventHandler(this.worker_ProgressChanged); this.worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.worker_RunWorkerCompleted); // // exportFileDialog // this.exportFileDialog.RootFolder = System.Environment.SpecialFolder.MyComputer; // // openFileDialog // this.openFileDialog.FileName = "openFileDialog"; this.openFileDialog.Multiselect = true; // // TopToolStripPanel // this.TopToolStripPanel.Location = new System.Drawing.Point(0, 0); this.TopToolStripPanel.Name = "TopToolStripPanel"; this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal; this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.TopToolStripPanel.Size = new System.Drawing.Size(0, 0); // // ContentPanel // this.ContentPanel.Size = new System.Drawing.Size(150, 3); // // treeFramesBox // this.treeFramesBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.treeFramesBox.Location = new System.Drawing.Point(12, 42); this.treeFramesBox.Name = "treeFramesBox"; this.treeFramesBox.Size = new System.Drawing.Size(96, 410); this.treeFramesBox.TabIndex = 1; this.treeFramesBox.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.tree_frames_BeforeSelect); this.treeFramesBox.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tree_frames_AfterSelect); this.treeFramesBox.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.tree_frames_NodeMouseClick); // // colorTableBox // this.colorTableBox.BackColor = System.Drawing.SystemColors.Info; this.colorTableBox.Location = new System.Drawing.Point(114, 42); this.colorTableBox.Name = "colorTableBox"; this.colorTableBox.Size = new System.Drawing.Size(480, 101); this.colorTableBox.TabIndex = 2; this.colorTableBox.TabStop = false; // // mainImageBox // this.mainImageBox.BackColor = System.Drawing.Color.DimGray; this.mainImageBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.mainImageBox.InitialImage = null; this.mainImageBox.Location = new System.Drawing.Point(114, 169); this.mainImageBox.MinimumSize = new System.Drawing.Size(300, 300); this.mainImageBox.Name = "mainImageBox"; this.mainImageBox.Size = new System.Drawing.Size(300, 300); this.mainImageBox.TabIndex = 4; this.mainImageBox.TabStop = false; this.mainImageBox.WaitOnLoad = true; // // statusBar // this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom; this.statusBar.Location = new System.Drawing.Point(0, 493); this.statusBar.Name = "statusBar"; this.statusBar.ReadOnly = true; this.statusBar.Size = new System.Drawing.Size(624, 20); this.statusBar.TabIndex = 6; // // infoBox // this.infoBox.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.infoBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.infoBox.Location = new System.Drawing.Point(420, 169); this.infoBox.Name = "infoBox"; this.infoBox.ReadOnly = true; this.infoBox.Size = new System.Drawing.Size(165, 283); this.infoBox.TabIndex = 7; this.infoBox.Text = ""; // // progressBar // this.progressBar.Dock = System.Windows.Forms.DockStyle.Bottom; this.progressBar.Location = new System.Drawing.Point(0, 469); this.progressBar.Name = "progressBar"; this.progressBar.Size = new System.Drawing.Size(624, 24); this.progressBar.TabIndex = 9; // // mainContainer // // mainContainer.ContentPanel // this.mainContainer.ContentPanel.AutoScroll = true; this.mainContainer.ContentPanel.Controls.Add(this.toolStrip); this.mainContainer.ContentPanel.Controls.Add(this.progressBar); this.mainContainer.ContentPanel.Controls.Add(this.infoBox); this.mainContainer.ContentPanel.Controls.Add(this.statusBar); this.mainContainer.ContentPanel.Controls.Add(this.mainImageBox); this.mainContainer.ContentPanel.Controls.Add(this.colorTableBox); this.mainContainer.ContentPanel.Controls.Add(this.treeFramesBox); this.mainContainer.ContentPanel.Size = new System.Drawing.Size(641, 509); this.mainContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.mainContainer.Location = new System.Drawing.Point(0, 0); this.mainContainer.Name = "mainContainer"; this.mainContainer.Size = new System.Drawing.Size(641, 534); this.mainContainer.TabIndex = 0; // // toolStrip // this.toolStrip.AllowMerge = false; this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileDropdown }); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; this.toolStrip.Size = new System.Drawing.Size(624, 25); this.toolStrip.Stretch = true; this.toolStrip.TabIndex = 8; this.toolStrip.Text = "toolStrip1"; // // fileDropdown // this.fileDropdown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.fileDropdown.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openFileMenuItem, this.openFolderFileMenuItem, this.exportMenuItem, this.exitFileMenuItem }); this.fileDropdown.Image = ((System.Drawing.Image)(resources.GetObject("fileDropdown.Image"))); this.fileDropdown.ImageTransparentColor = System.Drawing.Color.Magenta; this.fileDropdown.Name = "fileDropdown"; this.fileDropdown.Size = new System.Drawing.Size(38, 22); this.fileDropdown.Text = "FIle"; // // openFileMenuItem // this.openFileMenuItem.Name = "openFileMenuItem"; this.openFileMenuItem.Size = new System.Drawing.Size(180, 22); this.openFileMenuItem.Text = "Open"; this.openFileMenuItem.Click += new System.EventHandler(this.OpenButtonClick); // // openFolderFileMenuItem // this.openFolderFileMenuItem.Name = "openFolderFileMenuItem"; this.openFolderFileMenuItem.Size = new System.Drawing.Size(180, 22); this.openFolderFileMenuItem.Text = "Open Folder"; this.openFolderFileMenuItem.Click += new System.EventHandler(this.OpenFolderClick); // // exportMenuItem // this.exportMenuItem.Name = "exportMenuItem"; this.exportMenuItem.Size = new System.Drawing.Size(180, 22); this.exportMenuItem.Text = "Export"; this.exportMenuItem.Click += new System.EventHandler(this.exportButton_Click); // // exitFileMenuItem // this.exitFileMenuItem.Name = "exitFileMenuItem"; this.exitFileMenuItem.Size = new System.Drawing.Size(180, 22); this.exitFileMenuItem.Text = "Exit"; // // openFolderDialog // this.openFolderDialog.ShowNewFolderButton = false; // // KRFrameViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(641, 534); this.Controls.Add(this.mainContainer); this.MaximizeBox = false; this.MinimumSize = new System.Drawing.Size(549, 503); this.Name = "KRFrameViewer"; this.ShowIcon = false; this.Text = "KRFrameViewer 0.6.1"; ((System.ComponentModel.ISupportInitialize)(this.colorTableBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.mainImageBox)).EndInit(); this.mainContainer.ContentPanel.ResumeLayout(false); this.mainContainer.ContentPanel.PerformLayout(); this.mainContainer.ResumeLayout(false); this.mainContainer.PerformLayout(); this.toolStrip.ResumeLayout(false); this.toolStrip.PerformLayout(); this.ResumeLayout(false); }
static void Main(string[] args) { // important to call these before creating application host Application.EnableVisualStyles(); Application.DoEvents(); // see http://www.codeproject.com/buglist/EnableVisualStylesBug.asp?df=100&forumid=25268&exp=0&select=984714 // Set up localization support early on, so that user-readable strings will be localized // during the initialization phase below. Use XML files that are embedded resources. Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CurrentCulture; Localizer.SetStringLocalizer(new EmbeddedResourceStringLocalizer()); var catalog = new TypeCatalog( typeof(SettingsService), // persistent settings and user preferences dialog typeof(StatusService), // status bar at bottom of main Form typeof(CommandService), // handles commands in menus and toolbars typeof(ControlHostService), // docking control host typeof(AtfUsageLogger), // logs computer info to an ATF server typeof(CrashLogger), // logs unhandled exceptions to an ATF server typeof(UnhandledExceptionService), // catches unhandled exceptions, displays info, and gives user a chance to save typeof(FileDialogService), // standard Windows file dialogs typeof(DocumentRegistry), // central document registry with change notification typeof(AutoDocumentService), // opens documents from last session, or creates a new document, on startup typeof(RecentDocumentCommands), // standard recent document commands in File menu typeof(StandardFileCommands), // standard File menu commands for New, Open, Save, SaveAs, Close typeof(MainWindowTitleService), // tracks document changes and updates main form title typeof(TabbedControlSelector), // enable ctrl-tab selection of documents and controls within the app typeof(ContextRegistry), // central context registry with change notification typeof(StandardFileExitCommand), // standard File exit menu command typeof(StandardEditCommands), // standard Edit menu commands for copy/paste typeof(StandardEditHistoryCommands), // standard Edit menu commands for undo/redo typeof(StandardSelectionCommands), // standard Edit menu selection commands //typeof(StandardLockCommands), // standard Edit menu lock/unlock commands typeof(HelpAboutCommand), // Help -> About command typeof(PaletteService), // global palette, for drag/drop instancing typeof(HistoryLister), // vistual list of undo/redo stack typeof(PropertyEditor), // property grid for editing selected objects typeof(GridPropertyEditor), // grid control for editing selected objects typeof(PropertyEditingCommands), // commands for PropertyEditor and GridPropertyEditor, like Reset, // Reset All, Copy Value, Paste Value, Copy All, Paste All typeof(Outputs), // passes messages to all log writers typeof(ErrorDialogService), // displays errors to the user in a message box typeof(HelpAboutCommand), // custom command component to display Help/About dialog typeof(DefaultTabCommands), // provides the default commands related to document tab Controls typeof(Editor), // editor which manages event sequence documents typeof(DomTypes), // defines the DOM's metadata for this sample app typeof(PaletteClient), // component which adds items to palette typeof(EventListEditor), // adds drag/drop and context menu to event sequence ListViews typeof(ResourceListEditor), // adds "slave" resources ListView control, drag/drop and context menu typeof(PythonService), // scripting service for automated tests typeof(ScriptConsole), // provides a dockable command console for entering Python commands typeof(AtfScriptVariables), // exposes common ATF services as script variables typeof(AutomationService) // provides facilities to run an automated script using the .NET remoting service ); // Set up the MEF container with these components var container = new CompositionContainer(catalog); // Configure the main Form and add it to the composition container var batch = new CompositionBatch(); var toolStripContainer = new ToolStripContainer(); var mainForm = new MainForm(toolStripContainer) { Text = "Simple DOM, No XML, Editor Sample".Localize(), Icon = GdiUtil.CreateIcon(ResourceUtil.GetImage(Sce.Atf.Resources.AtfIconImage)) }; batch.AddPart(mainForm); batch.AddPart(new WebHelpCommands("https://github.com/SonyWWS/ATF/wiki/ATF-Simple-DOM-No-XML-Editor-Sample".Localize())); // Compose the MEF container container.Compose(batch); // Initialize components that require it. Initialization often can't be done in the constructor, // or even after imports have been satisfied by MEF, since we allow circular dependencies between // components, via the System.Lazy class. IInitializable allows components to defer some operations // until all MEF composition has been completed. container.InitializeAll(); // Show the main form and start message handling. The main Form Load event provides a final chance // for components to perform initialization and configuration. Application.Run(mainForm); // Give components a chance to clean up. container.Dispose(); }
private void InitializeComponent() { this.toolStripContainer1 = new ToolStripContainer(); this.statusStrip1 = new StatusStrip(); this.toolStripStatusLabelSost = new ToolStripStatusLabel(); this.menuStrip1 = new MenuStrip(); this.файлToolStripMenuItem1 = new ToolStripMenuItem(); this.выходToolStripMenuItem1 = new ToolStripMenuItem(); this.файлToolStripMenuItem = new ToolStripMenuItem(); this.изменитьПарольToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.списокПользователейToolStripMenuItem = new ToolStripMenuItem(); this.редактированиеПользователяToolStripMenuItem = new ToolStripMenuItem(); this.добавитьПользователяToolStripMenuItem = new ToolStripMenuItem(); this.справкаToolStripMenuItem = new ToolStripMenuItem(); this.оПрограммеToolStripMenuItem = new ToolStripMenuItem(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); base.SuspendLayout(); this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.statusStrip1); this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(698, 392); this.toolStripContainer1.Dock = DockStyle.Fill; this.toolStripContainer1.Location = new Point(0, 0); this.toolStripContainer1.Name = "toolStripContainer1"; this.toolStripContainer1.Size = new System.Drawing.Size(698, 455); this.toolStripContainer1.TabIndex = 0; this.toolStripContainer1.Text = "toolStripContainer1"; this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); this.statusStrip1.Dock = DockStyle.None; this.statusStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabelSost }); this.statusStrip1.Location = new Point(0, 0); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(698, 30); this.statusStrip1.TabIndex = 0; this.toolStripStatusLabelSost.Name = "toolStripStatusLabelSost"; this.toolStripStatusLabelSost.Size = new System.Drawing.Size(178, 25); this.toolStripStatusLabelSost.Text = "Нет аутентификации"; this.menuStrip1.Dock = DockStyle.None; ToolStripItemCollection items = this.menuStrip1.Items; ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.файлToolStripMenuItem1, this.файлToolStripMenuItem, this.справкаToolStripMenuItem }; items.AddRange(toolStripItemArray); this.menuStrip1.Location = new Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(698, 33); this.menuStrip1.TabIndex = 0; this.menuStrip1.Text = "menuStrip1"; this.файлToolStripMenuItem1.DropDownItems.AddRange(new ToolStripItem[] { this.выходToolStripMenuItem1 }); this.файлToolStripMenuItem1.Name = "файлToolStripMenuItem1"; this.файлToolStripMenuItem1.Size = new System.Drawing.Size(65, 29); this.файлToolStripMenuItem1.Text = "&Файл"; this.выходToolStripMenuItem1.Name = "выходToolStripMenuItem1"; this.выходToolStripMenuItem1.Size = new System.Drawing.Size(136, 30); this.выходToolStripMenuItem1.Text = "&Выход"; this.выходToolStripMenuItem1.Click += new EventHandler(this.выходToolStripMenuItem1_Click); ToolStripItemCollection dropDownItems = this.файлToolStripMenuItem.DropDownItems; ToolStripItem[] toolStripItemArray1 = new ToolStripItem[] { this.изменитьПарольToolStripMenuItem, this.toolStripSeparator1, this.списокПользователейToolStripMenuItem, this.редактированиеПользователяToolStripMenuItem, this.добавитьПользователяToolStripMenuItem }; dropDownItems.AddRange(toolStripItemArray1); this.файлToolStripMenuItem.Name = "файлToolStripMenuItem"; this.файлToolStripMenuItem.Size = new System.Drawing.Size(112, 29); this.файлToolStripMenuItem.Text = "&Настройки"; this.изменитьПарольToolStripMenuItem.Name = "изменитьПарольToolStripMenuItem"; this.изменитьПарольToolStripMenuItem.Size = new System.Drawing.Size(344, 30); this.изменитьПарольToolStripMenuItem.Text = "Изменить пароль"; this.изменитьПарольToolStripMenuItem.Click += new EventHandler(this.изменитьПарольToolStripMenuItem_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(341, 6); this.списокПользователейToolStripMenuItem.Name = "списокПользователейToolStripMenuItem"; this.списокПользователейToolStripMenuItem.Size = new System.Drawing.Size(344, 30); this.списокПользователейToolStripMenuItem.Text = "Список пользователей"; this.списокПользователейToolStripMenuItem.Click += new EventHandler(this.списокПользователейToolStripMenuItem_Click); this.редактированиеПользователяToolStripMenuItem.Name = "редактированиеПользователяToolStripMenuItem"; this.редактированиеПользователяToolStripMenuItem.Size = new System.Drawing.Size(344, 30); this.редактированиеПользователяToolStripMenuItem.Text = "Редактирование пользователей"; this.редактированиеПользователяToolStripMenuItem.Click += new EventHandler(this.редактированиеПользователяToolStripMenuItem_Click); this.добавитьПользователяToolStripMenuItem.Name = "добавитьПользователяToolStripMenuItem"; this.добавитьПользователяToolStripMenuItem.Size = new System.Drawing.Size(344, 30); this.добавитьПользователяToolStripMenuItem.Text = "Добавить пользователя"; this.добавитьПользователяToolStripMenuItem.Click += new EventHandler(this.добавитьПользователяToolStripMenuItem_Click); this.справкаToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.оПрограммеToolStripMenuItem }); this.справкаToolStripMenuItem.Name = "справкаToolStripMenuItem"; this.справкаToolStripMenuItem.Size = new System.Drawing.Size(93, 29); this.справкаToolStripMenuItem.Text = "&Справка"; this.оПрограммеToolStripMenuItem.Name = "оПрограммеToolStripMenuItem"; this.оПрограммеToolStripMenuItem.Size = new System.Drawing.Size(197, 30); this.оПрограммеToolStripMenuItem.Text = "&О программе"; this.оПрограммеToolStripMenuItem.Click += new EventHandler(this.оПрограммеToolStripMenuItem_Click); base.AutoScaleDimensions = new SizeF(9f, 20f); base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; base.ClientSize = new System.Drawing.Size(698, 455); base.Controls.Add(this.toolStripContainer1); base.MainMenuStrip = this.menuStrip1; base.Name = "MainForm"; this.Text = "Парольная аутентификация"; base.FormClosing += new FormClosingEventHandler(this.MainForm_FormClosing); base.Load += new EventHandler(this.MainForm_Load); this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.PerformLayout(); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); base.ResumeLayout(false); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("有窗口的进程", System.Windows.Forms.HorizontalAlignment.Left); System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Unwindowed Processes", System.Windows.Forms.HorizontalAlignment.Left); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); this.lvwProcess = new System.Windows.Forms.ListView(); this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.cmsItem = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmsHideProc = new System.Windows.Forms.ToolStripMenuItem(); this.cmsShowProc = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.tslblStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.tslnkError = new System.Windows.Forms.ToolStripStatusLabel(); this.tsMain = new System.Windows.Forms.ToolStrip(); this.tsbtnHide = new System.Windows.Forms.ToolStripButton(); this.tsbtnShow = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.tsbtnKill = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.tsbtnOptions = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.tsbtnUpdate = new System.Windows.Forms.ToolStripButton(); this.tsbtnAbout = new System.Windows.Forms.ToolStripButton(); this.iconTray = new System.Windows.Forms.NotifyIcon(this.components); this.cmsTray = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmsShow = new System.Windows.Forms.ToolStripMenuItem(); this.cmsAbout = new System.Windows.Forms.ToolStripMenuItem(); this.cmsCheckUpdates = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); this.cmsOptions = new System.Windows.Forms.ToolStripMenuItem(); this.cmsExit = new System.Windows.Forms.ToolStripMenuItem(); this.processWorker = new System.ComponentModel.BackgroundWorker(); this.cmsItem.SuspendLayout(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.tsMain.SuspendLayout(); this.cmsTray.SuspendLayout(); this.SuspendLayout(); // // lvwProcess // this.lvwProcess.CheckBoxes = true; this.lvwProcess.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1, this.columnHeader2, this.columnHeader3, this.columnHeader4 }); this.lvwProcess.ContextMenuStrip = this.cmsItem; this.lvwProcess.Dock = System.Windows.Forms.DockStyle.Fill; this.lvwProcess.FullRowSelect = true; this.lvwProcess.GridLines = true; listViewGroup1.Header = "有窗口的进程"; listViewGroup1.Name = "Windowed"; listViewGroup2.Header = "Unwindowed Processes"; listViewGroup2.Name = "没有窗口的进程"; this.lvwProcess.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { listViewGroup1, listViewGroup2 }); this.lvwProcess.HideSelection = false; this.lvwProcess.Location = new System.Drawing.Point(0, 0); this.lvwProcess.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.lvwProcess.MultiSelect = false; this.lvwProcess.Name = "lvwProcess"; this.lvwProcess.Size = new System.Drawing.Size(860, 480); this.lvwProcess.TabIndex = 0; this.lvwProcess.UseCompatibleStateImageBehavior = false; this.lvwProcess.View = System.Windows.Forms.View.Details; this.lvwProcess.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvwProcess_ItemChecked); this.lvwProcess.SelectedIndexChanged += new System.EventHandler(this.lvwProcess_SelectedIndexChanged); // // columnHeader1 // this.columnHeader1.Text = "进程名称"; this.columnHeader1.Width = 131; // // columnHeader2 // this.columnHeader2.Text = "标题"; this.columnHeader2.Width = 180; // // columnHeader3 // this.columnHeader3.Text = "ID"; // // columnHeader4 // this.columnHeader4.Text = "状态"; this.columnHeader4.Width = 90; // // cmsItem // this.cmsItem.BackColor = System.Drawing.Color.White; this.cmsItem.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsHideProc, this.cmsShowProc }); this.cmsItem.Name = "cmsItem"; this.cmsItem.Size = new System.Drawing.Size(101, 48); // // cmsHideProc // this.cmsHideProc.Name = "cmsHideProc"; this.cmsHideProc.Size = new System.Drawing.Size(100, 22); this.cmsHideProc.Text = "隐藏"; this.cmsHideProc.Click += new System.EventHandler(this.cmsHideProc_Click); // // cmsShowProc // this.cmsShowProc.Name = "cmsShowProc"; this.cmsShowProc.Size = new System.Drawing.Size(100, 22); this.cmsShowProc.Text = "显示"; this.cmsShowProc.Click += new System.EventHandler(this.cmsShowProc_Click); // // toolStripContainer1 // // // toolStripContainer1.BottomToolStripPanel // this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.statusStrip1); // // toolStripContainer1.ContentPanel // this.toolStripContainer1.ContentPanel.Controls.Add(this.lvwProcess); this.toolStripContainer1.ContentPanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(860, 480); this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); this.toolStripContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.toolStripContainer1.Name = "toolStripContainer1"; this.toolStripContainer1.Size = new System.Drawing.Size(860, 541); this.toolStripContainer1.TabIndex = 3; this.toolStripContainer1.Text = "toolStripContainer1"; // // toolStripContainer1.TopToolStripPanel // this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.tsMain); // // statusStrip1 // this.statusStrip1.BackColor = System.Drawing.Color.White; this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None; this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tslblStatus, this.tslnkError }); this.statusStrip1.Location = new System.Drawing.Point(0, 0); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(860, 22); this.statusStrip1.TabIndex = 0; // // tslblStatus // this.tslblStatus.Name = "tslblStatus"; this.tslblStatus.Size = new System.Drawing.Size(44, 17); this.tslblStatus.Text = "已就位"; // // tslnkError // this.tslnkError.Image = global::WinVisible.Properties.Resources.delete16x16; this.tslnkError.IsLink = true; this.tslnkError.Name = "tslnkError"; this.tslnkError.Size = new System.Drawing.Size(204, 17); this.tslnkError.Text = "发生了一个错误。单击查看详情。"; this.tslnkError.Visible = false; this.tslnkError.Click += new System.EventHandler(this.tslnkError_Click); // // tsMain // this.tsMain.BackColor = System.Drawing.Color.White; this.tsMain.Dock = System.Windows.Forms.DockStyle.None; this.tsMain.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbtnHide, this.tsbtnShow, this.toolStripSeparator1, this.tsbtnKill, this.toolStripSeparator3, this.tsbtnOptions, this.toolStripSeparator4, this.tsbtnUpdate, this.tsbtnAbout }); this.tsMain.Location = new System.Drawing.Point(0, 0); this.tsMain.Name = "tsMain"; this.tsMain.Size = new System.Drawing.Size(860, 39); this.tsMain.Stretch = true; this.tsMain.TabIndex = 1; this.tsMain.Text = "Options"; // // tsbtnHide // this.tsbtnHide.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnHide.Enabled = false; this.tsbtnHide.Image = global::WinVisible.Properties.Resources.hide32x32; this.tsbtnHide.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnHide.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnHide.Name = "tsbtnHide"; this.tsbtnHide.Size = new System.Drawing.Size(36, 36); this.tsbtnHide.Text = "隐藏选中窗口"; this.tsbtnHide.Click += new System.EventHandler(this.tsbtnHide_Click); // // tsbtnShow // this.tsbtnShow.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnShow.Enabled = false; this.tsbtnShow.Image = global::WinVisible.Properties.Resources.show32x32; this.tsbtnShow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnShow.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnShow.Name = "tsbtnShow"; this.tsbtnShow.Size = new System.Drawing.Size(36, 36); this.tsbtnShow.Text = "显示选中窗口"; this.tsbtnShow.Click += new System.EventHandler(this.tsbtnShow_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39); // // tsbtnKill // this.tsbtnKill.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnKill.Enabled = false; this.tsbtnKill.Image = global::WinVisible.Properties.Resources.kill32x32; this.tsbtnKill.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnKill.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnKill.Name = "tsbtnKill"; this.tsbtnKill.Size = new System.Drawing.Size(36, 36); this.tsbtnKill.Text = "结束选中进程"; this.tsbtnKill.Click += new System.EventHandler(this.tsbtnKill_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(6, 39); // // tsbtnOptions // this.tsbtnOptions.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnOptions.Image = global::WinVisible.Properties.Resources.options32x32; this.tsbtnOptions.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnOptions.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnOptions.Name = "tsbtnOptions"; this.tsbtnOptions.Size = new System.Drawing.Size(36, 36); this.tsbtnOptions.Text = "设置"; this.tsbtnOptions.Click += new System.EventHandler(this.tsbtnOptions_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39); // // tsbtnUpdate // this.tsbtnUpdate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnUpdate.Image = global::WinVisible.Properties.Resources.internet32x321; this.tsbtnUpdate.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnUpdate.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnUpdate.Name = "tsbtnUpdate"; this.tsbtnUpdate.Size = new System.Drawing.Size(36, 36); this.tsbtnUpdate.Text = "检查更新"; this.tsbtnUpdate.Click += new System.EventHandler(this.tsbtnUpdate_Click); // // tsbtnAbout // this.tsbtnAbout.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsbtnAbout.Image = global::WinVisible.Properties.Resources.about32x32; this.tsbtnAbout.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tsbtnAbout.ImageTransparentColor = System.Drawing.Color.Magenta; this.tsbtnAbout.Name = "tsbtnAbout"; this.tsbtnAbout.Size = new System.Drawing.Size(36, 36); this.tsbtnAbout.Text = "关于"; this.tsbtnAbout.Click += new System.EventHandler(this.tsbtnAbout_Click); // // iconTray // this.iconTray.ContextMenuStrip = this.cmsTray; this.iconTray.Icon = ((System.Drawing.Icon)(resources.GetObject("iconTray.Icon"))); this.iconTray.Text = "WinVisible"; this.iconTray.Visible = true; this.iconTray.MouseClick += new System.Windows.Forms.MouseEventHandler(this.iconTray_MouseClick); // // cmsTray // this.cmsTray.BackColor = System.Drawing.Color.White; this.cmsTray.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.cmsTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsShow, this.cmsAbout, this.cmsCheckUpdates, this.toolStripSeparator5, this.cmsOptions, this.cmsExit }); this.cmsTray.Name = "cmsTray"; this.cmsTray.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.cmsTray.Size = new System.Drawing.Size(134, 120); // // cmsShow // this.cmsShow.BackColor = System.Drawing.Color.White; this.cmsShow.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmsShow.Name = "cmsShow"; this.cmsShow.Size = new System.Drawing.Size(133, 22); this.cmsShow.Text = "WinVisible"; this.cmsShow.Click += new System.EventHandler(this.cmsShow_Click); // // cmsAbout // this.cmsAbout.Name = "cmsAbout"; this.cmsAbout.Size = new System.Drawing.Size(133, 22); this.cmsAbout.Text = "关于..."; this.cmsAbout.Click += new System.EventHandler(this.cmsAbout_Click); // // cmsCheckUpdates // this.cmsCheckUpdates.Name = "cmsCheckUpdates"; this.cmsCheckUpdates.Size = new System.Drawing.Size(133, 22); this.cmsCheckUpdates.Text = "检查更新"; this.cmsCheckUpdates.Click += new System.EventHandler(this.cmsCheckUpdates_Click); // // toolStripSeparator5 // this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(130, 6); // // cmsOptions // this.cmsOptions.Name = "cmsOptions"; this.cmsOptions.Size = new System.Drawing.Size(133, 22); this.cmsOptions.Text = "选项..."; this.cmsOptions.Click += new System.EventHandler(this.cmsOptions_Click); // // cmsExit // this.cmsExit.Name = "cmsExit"; this.cmsExit.Size = new System.Drawing.Size(133, 22); this.cmsExit.Text = "退出"; this.cmsExit.Click += new System.EventHandler(this.cmsExit_Click); // // processWorker // this.processWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.processWorker_DoWork); // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(860, 541); this.Controls.Add(this.toolStripContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Name = "frmMain"; this.Text = "WinVisible"; this.WindowState = System.Windows.Forms.FormWindowState.Minimized; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing); this.Load += new System.EventHandler(this.frmMain_Load); this.Shown += new System.EventHandler(this.frmMain_Shown); this.cmsItem.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.PerformLayout(); this.toolStripContainer1.ContentPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.tsMain.ResumeLayout(false); this.tsMain.PerformLayout(); this.cmsTray.ResumeLayout(false); this.ResumeLayout(false); }
static void Main() { // Important to call these before starting the app. Otherwise theming and bitmaps may not render correctly. Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.DoEvents(); // see http://www.codeproject.com/buglist/EnableVisualStylesBug.asp?df=100&forumid=25268&exp=0&select=984714 // Set up localization support early on, so that user-readable strings will be localized // during the initialization phase below. Use XML files that are embedded resources. Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CurrentCulture; Localizer.SetStringLocalizer(new EmbeddedResourceStringLocalizer()); // Using MEF, declare the composable parts that will make up this application TypeCatalog catalog = new TypeCatalog( typeof(SettingsService), // persistent settings and user preferences dialog typeof(CommandService), // handles commands in menus and toolbars typeof(ControlHostService), // docking control host typeof(ContextRegistry), // central context registry with change notification typeof(StandardFileExitCommand), // standard File exit menu command typeof(FileDialogService), // standard Windows file dialogs typeof(DocumentRegistry), // central document registry with change notification typeof(StandardFileCommands), // standard File menu commands for New, Open, Save, SaveAs, Close typeof(AutoDocumentService), // opens documents from last session, or creates a new document, on startup typeof(RecentDocumentCommands), // standard recent document commands in File menu typeof(MainWindowTitleService), // tracks document changes and updates main form title typeof(AtfUsageLogger), // logs computer info to an ATF server typeof(WindowLayoutService), // service to allow multiple window layouts typeof(WindowLayoutServiceCommands), // command layer to allow easy switching between and managing of window layouts // Client-specific plug-ins typeof(Editor), // editor class component that creates and saves application documents typeof(SchemaLoader), // loads schema and extends types typeof(PythonService), // scripting service for automated tests typeof(ScriptConsole), // provides a dockable command console for entering Python commands typeof(AtfScriptVariables), // exposes common ATF services as script variables typeof(AutomationService) // provides facilities to run an automated script using the .NET remoting service ); // Create the MEF container for the composable parts CompositionContainer container = new CompositionContainer(catalog); // Create the main form, give it a toolstrip ToolStripContainer toolStripContainer = new ToolStripContainer(); toolStripContainer.Dock = DockStyle.Fill; MainForm mainForm = new MainForm(toolStripContainer) { Text = "Sample Application".Localize(), Icon = GdiUtil.CreateIcon(ResourceUtil.GetImage(Sce.Atf.Resources.AtfIconImage)) }; // Create an MEF composable part from the main form, and add into container CompositionBatch batch = new CompositionBatch(); AttributedModelServices.AddPart(batch, mainForm); container.Compose(batch); // Initialize components that require it. Initialization often can't be done in the constructor, // or even after imports have been satisfied by MEF, since we allow circular dependencies between // components, via the System.Lazy class. IInitializable allows components to defer some operations // until all MEF composition has been completed. container.InitializeAll(); // Show the main form and start message handling. The main Form Load event provides a final chance // for components to perform initialization and configuration. Application.Run(mainForm); // Give components a chance to clean up. container.Dispose(); }
public WebBrowserTabPage(WebKitBrowser browserControl, bool goHome) { InitializeComponent(); statusStrip = new StatusStrip(); statusStrip.Name = "statusStrip"; statusStrip.Visible = true; statusStrip.SizingGrip = false; container = new ToolStripContainer(); container.Name = "container"; container.Visible = true; container.Dock = DockStyle.Fill; statusLabel = new ToolStripLabel(); statusLabel.Name = "statusLabel"; statusLabel.Text = "Done"; statusLabel.Visible = true; iconLabel = new ToolStripLabel(); iconLabel.Name = "iconLabel"; iconLabel.Text = "No Icon"; iconLabel.Visible = true; progressBar = new ToolStripProgressBar(); progressBar.Name = "progressBar"; progressBar.Visible = true; statusStrip.Items.Add(statusLabel); statusStrip.Items.Add(iconLabel); statusStrip.Items.Add(progressBar); container.BottomToolStripPanel.Controls.Add(statusStrip); // create webbrowser control browser = browserControl; browser.Visible = true; browser.Dock = DockStyle.Fill; browser.Name = "browser"; //browser.IsWebBrowserContextMenuEnabled = false; //browser.IsScriptingEnabled = false; container.ContentPanel.Controls.Add(browser); browser.ObjectForScripting = new TestScriptObject(); // context menu this.Controls.Add(container); this.Text = "<New Tab>"; // events browser.DocumentTitleChanged += (s, e) => this.Text = browser.DocumentTitle; browser.Navigating += (s, e) => statusLabel.Text = "Loading..."; browser.Navigated += (s, e) => { statusLabel.Text = "Downloading..."; }; browser.DocumentCompleted += (s, e) => { statusLabel.Text = "Done"; }; browser.ProgressStarted += (s, e) => { progressBar.Visible = true; }; browser.ProgressChanged += (s, e) => { progressBar.Value = e.ProgressPercentage; }; browser.ProgressFinished += (s, e) => { progressBar.Visible = false; }; if (goHome) { browser.Navigate("http://www.google.com"); } browser.ShowJavaScriptAlertPanel += (s, e) => MessageBox.Show(e.Message, "[JavaScript Alert]"); browser.ShowJavaScriptConfirmPanel += (s, e) => { e.ReturnValue = MessageBox.Show(e.Message, "[JavaScript Confirm]", MessageBoxButtons.YesNo) == DialogResult.Yes; }; browser.ShowJavaScriptPromptPanel += (s, e) => { var frm = new JSPromptForm(e.Message, e.DefaultValue); if (frm.ShowDialog() == DialogResult.OK) { e.ReturnValue = frm.Value; } }; }
/// <summary> /// Erforderliche Methode für die Designerunterstützung. /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DgvSelect)); this.ToolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.DgvLayer = new System.Windows.Forms.DataGridView(); this.ToolStrip1 = new System.Windows.Forms.ToolStrip(); this.TsbCheckAll = new System.Windows.Forms.ToolStripButton(); this.TsbCheckNone = new System.Windows.Forms.ToolStripButton(); this.TsbSelectAll = new System.Windows.Forms.ToolStripButton(); this.TsbSelectNone = new System.Windows.Forms.ToolStripButton(); this.DgvcSelectable = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.DgvcLayerName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.DgvcUnselect = new System.Windows.Forms.DataGridViewImageColumn(); this.DgvcCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ToolStripContainer1.ContentPanel.SuspendLayout(); this.ToolStripContainer1.TopToolStripPanel.SuspendLayout(); this.ToolStripContainer1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvLayer)).BeginInit(); this.ToolStrip1.SuspendLayout(); this.SuspendLayout(); // // ToolStripContainer1 // resources.ApplyResources(this.ToolStripContainer1, "ToolStripContainer1"); // // ToolStripContainer1.BottomToolStripPanel // resources.ApplyResources(this.ToolStripContainer1.BottomToolStripPanel, "ToolStripContainer1.BottomToolStripPanel"); // // ToolStripContainer1.ContentPanel // resources.ApplyResources(this.ToolStripContainer1.ContentPanel, "ToolStripContainer1.ContentPanel"); this.ToolStripContainer1.ContentPanel.Controls.Add(this.DgvLayer); // // ToolStripContainer1.LeftToolStripPanel // resources.ApplyResources(this.ToolStripContainer1.LeftToolStripPanel, "ToolStripContainer1.LeftToolStripPanel"); this.ToolStripContainer1.Name = "ToolStripContainer1"; // // ToolStripContainer1.RightToolStripPanel // resources.ApplyResources(this.ToolStripContainer1.RightToolStripPanel, "ToolStripContainer1.RightToolStripPanel"); // // ToolStripContainer1.TopToolStripPanel // resources.ApplyResources(this.ToolStripContainer1.TopToolStripPanel, "ToolStripContainer1.TopToolStripPanel"); this.ToolStripContainer1.TopToolStripPanel.Controls.Add(this.ToolStrip1); // // DgvLayer // resources.ApplyResources(this.DgvLayer, "DgvLayer"); this.DgvLayer.AllowUserToAddRows = false; this.DgvLayer.AllowUserToDeleteRows = false; this.DgvLayer.AllowUserToResizeRows = false; this.DgvLayer.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader; this.DgvLayer.BackgroundColor = System.Drawing.Color.White; this.DgvLayer.BorderStyle = System.Windows.Forms.BorderStyle.None; this.DgvLayer.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.DgvLayer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.DgvLayer.ColumnHeadersVisible = false; this.DgvLayer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.DgvcSelectable, this.DgvcLayerName, this.DgvcUnselect, this.DgvcCount }); this.DgvLayer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.DgvLayer.MultiSelect = false; this.DgvLayer.Name = "DgvLayer"; this.DgvLayer.RowHeadersVisible = false; this.DgvLayer.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.DgvLayer.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvLayerCellContentClick); this.DgvLayer.CellToolTipTextNeeded += new System.Windows.Forms.DataGridViewCellToolTipTextNeededEventHandler(this.DgvLayerCellToolTipTextNeeded); // // ToolStrip1 // resources.ApplyResources(this.ToolStrip1, "ToolStrip1"); this.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.ToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.TsbCheckAll, this.TsbCheckNone, this.TsbSelectAll, this.TsbSelectNone }); this.ToolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; this.ToolStrip1.Name = "ToolStrip1"; this.ToolStrip1.Stretch = true; // // TsbCheckAll // resources.ApplyResources(this.TsbCheckAll, "TsbCheckAll"); this.TsbCheckAll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.TsbCheckAll.Image = global::DotSpatial.Plugins.SetSelectable.Resources.checkall; this.TsbCheckAll.Name = "TsbCheckAll"; this.TsbCheckAll.Click += new System.EventHandler(this.TsbCheckAllClick); // // TsbCheckNone // resources.ApplyResources(this.TsbCheckNone, "TsbCheckNone"); this.TsbCheckNone.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.TsbCheckNone.Image = global::DotSpatial.Plugins.SetSelectable.Resources.uncheckall; this.TsbCheckNone.Name = "TsbCheckNone"; this.TsbCheckNone.Click += new System.EventHandler(this.TsbCheckNoneClick); // // TsbSelectAll // resources.ApplyResources(this.TsbSelectAll, "TsbSelectAll"); this.TsbSelectAll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.TsbSelectAll.Image = global::DotSpatial.Plugins.SetSelectable.Resources.select_all; this.TsbSelectAll.Name = "TsbSelectAll"; this.TsbSelectAll.Click += new System.EventHandler(this.TsbSelectAllClick); // // TsbSelectNone // resources.ApplyResources(this.TsbSelectNone, "TsbSelectNone"); this.TsbSelectNone.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.TsbSelectNone.Image = global::DotSpatial.Plugins.SetSelectable.Resources.select_none; this.TsbSelectNone.Name = "TsbSelectNone"; this.TsbSelectNone.Click += new System.EventHandler(this.TsbSelectNoneClick); // // DgvcSelectable // this.DgvcSelectable.DataPropertyName = "DgvcSelectable"; this.DgvcSelectable.FalseValue = "0"; resources.ApplyResources(this.DgvcSelectable, "DgvcSelectable"); this.DgvcSelectable.Name = "DgvcSelectable"; this.DgvcSelectable.Resizable = System.Windows.Forms.DataGridViewTriState.False; this.DgvcSelectable.TrueValue = "1"; // // DgvcLayerName // this.DgvcLayerName.DataPropertyName = "DgvcLayerName"; resources.ApplyResources(this.DgvcLayerName, "DgvcLayerName"); this.DgvcLayerName.Name = "DgvcLayerName"; this.DgvcLayerName.ReadOnly = true; this.DgvcLayerName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // DgvcUnselect // resources.ApplyResources(this.DgvcUnselect, "DgvcUnselect"); this.DgvcUnselect.Image = global::DotSpatial.Plugins.SetSelectable.Resources.select_none; this.DgvcUnselect.Name = "DgvcUnselect"; this.DgvcUnselect.ReadOnly = true; this.DgvcUnselect.Resizable = System.Windows.Forms.DataGridViewTriState.True; // // DgvcCount // this.DgvcCount.DataPropertyName = "DgvcCount"; resources.ApplyResources(this.DgvcCount, "DgvcCount"); this.DgvcCount.Name = "DgvcCount"; this.DgvcCount.ReadOnly = true; this.DgvcCount.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // // DgvSelect // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.ToolStripContainer1); this.Name = "DgvSelect"; this.Load += new System.EventHandler(this.DgvSelectLoad); this.ToolStripContainer1.ContentPanel.ResumeLayout(false); this.ToolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.ToolStripContainer1.TopToolStripPanel.PerformLayout(); this.ToolStripContainer1.ResumeLayout(false); this.ToolStripContainer1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgvLayer)).EndInit(); this.ToolStrip1.ResumeLayout(false); this.ToolStrip1.PerformLayout(); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ModelerForm)); this._toolStripContainer = new System.Windows.Forms.ToolStripContainer(); this._modeler = new DotSpatial.Controls.Modeler(); this._modelerToolStrip = new DotSpatial.Controls.ModelerToolStrip(); this._modelerMenuStrip = new DotSpatial.Modeling.Forms.ModelerMenuStrip(); this._toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this._toolStripContainer.ContentPanel.SuspendLayout(); this._toolStripContainer.TopToolStripPanel.SuspendLayout(); this._toolStripContainer.SuspendLayout(); this.SuspendLayout(); // // _toolStripContainer // resources.ApplyResources(this._toolStripContainer, "_toolStripContainer"); // // _toolStripContainer.BottomToolStripPanel // resources.ApplyResources(this._toolStripContainer.BottomToolStripPanel, "_toolStripContainer.BottomToolStripPanel"); // // _toolStripContainer.ContentPanel // resources.ApplyResources(this._toolStripContainer.ContentPanel, "_toolStripContainer.ContentPanel"); this._toolStripContainer.ContentPanel.Controls.Add(this._modeler); // // _toolStripContainer.LeftToolStripPanel // resources.ApplyResources(this._toolStripContainer.LeftToolStripPanel, "_toolStripContainer.LeftToolStripPanel"); this._toolStripContainer.Name = "_toolStripContainer"; // // _toolStripContainer.RightToolStripPanel // resources.ApplyResources(this._toolStripContainer.RightToolStripPanel, "_toolStripContainer.RightToolStripPanel"); // // _toolStripContainer.TopToolStripPanel // resources.ApplyResources(this._toolStripContainer.TopToolStripPanel, "_toolStripContainer.TopToolStripPanel"); this._toolStripContainer.TopToolStripPanel.Controls.Add(this._modelerMenuStrip); this._toolStripContainer.TopToolStripPanel.Controls.Add(this._modelerToolStrip); // // _modeler // resources.ApplyResources(this._modeler, "_modeler"); this._modeler.AllowDrop = true; this._modeler.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this._modeler.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this._modeler.Cursor = System.Windows.Forms.Cursors.Default; this._modeler.DataColor = System.Drawing.Color.LightGreen; this._modeler.DataFont = new System.Drawing.Font("Tahoma", 8F); this._modeler.DataShape = DotSpatial.Modeling.Forms.ModelShape.Ellipse; this._modeler.DefaultFileExtension = "mwm"; this._modeler.DrawingQuality = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; this._modeler.EnableLinking = false; this._modeler.IsInitialized = true; this._modeler.MaxExecutionThreads = 2; this._modeler.ModelFilename = null; this._modeler.Name = "_modeler"; this._modeler.ShowWaterMark = true; this._modeler.ToolColor = System.Drawing.Color.Khaki; this._modeler.ToolFont = new System.Drawing.Font("Tahoma", 8F); this._modeler.ToolManager = null; this._modeler.ToolShape = DotSpatial.Modeling.Forms.ModelShape.Rectangle; this._modeler.WorkingPath = null; this._modeler.ZoomFactor = 1F; // // _modelerToolStrip // resources.ApplyResources(this._modelerToolStrip, "_modelerToolStrip"); this._modelerToolStrip.Modeler = this._modeler; this._modelerToolStrip.Name = "_modelerToolStrip"; // // _modelerMenuStrip // resources.ApplyResources(this._modelerMenuStrip, "_modelerMenuStrip"); this._modelerMenuStrip.Name = "_modelerMenuStrip"; // // _toolStripMenuItem // resources.ApplyResources(this._toolStripMenuItem, "_toolStripMenuItem"); this._toolStripMenuItem.Name = "_toolStripMenuItem"; // // ModelerForm // resources.ApplyResources(this, "$this"); this.Controls.Add(this._toolStripContainer); this.Icon = global::DotSpatial.Controls.Images.NewModel; this.Name = "ModelerForm"; this._toolStripContainer.ContentPanel.ResumeLayout(false); this._toolStripContainer.TopToolStripPanel.ResumeLayout(false); this._toolStripContainer.TopToolStripPanel.PerformLayout(); this._toolStripContainer.ResumeLayout(false); this._toolStripContainer.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { this._mainSplitter = new System.Windows.Forms.SplitContainer(); this._toolStripContainer = new System.Windows.Forms.ToolStripContainer(); this._flowPanelFilter = new System.Windows.Forms.FlowLayoutPanel(); this._searchBox = new System.Windows.Forms.TextBox(); this._orderByLevel = new System.Windows.Forms.CheckBox(); this._itemQuality = new System.Windows.Forms.ComboBox(); this._slotFilter = new System.Windows.Forms.ComboBox(); this._modFilter = new System.Windows.Forms.ComboBox(); this._levelRequirementGroup = new System.Windows.Forms.GroupBox(); this._minLevel = new System.Windows.Forms.TextBox(); this._maxLevel = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this._mainSplitter)).BeginInit(); this._mainSplitter.Panel2.SuspendLayout(); this._mainSplitter.SuspendLayout(); this._toolStripContainer.SuspendLayout(); this._flowPanelFilter.SuspendLayout(); this._levelRequirementGroup.SuspendLayout(); this.SuspendLayout(); // // mainSplitter // this._mainSplitter.Dock = System.Windows.Forms.DockStyle.Fill; this._mainSplitter.Location = new System.Drawing.Point(0, 0); this._mainSplitter.Name = "_mainSplitter"; // // mainSplitter.Panel2 // this._mainSplitter.Panel2.Controls.Add(this._toolStripContainer); this._mainSplitter.Panel2.Controls.Add(this._flowPanelFilter); this._mainSplitter.Size = new System.Drawing.Size(1313, 650); this._mainSplitter.SplitterDistance = 204; this._mainSplitter.SplitterWidth = 3; this._mainSplitter.TabIndex = 0; this._mainSplitter.TabStop = false; // // toolStripContainer // this._toolStripContainer.BottomToolStripPanelVisible = false; // // toolStripContainer.ContentPanel // this._toolStripContainer.ContentPanel.Size = new System.Drawing.Size(1106, 576); this._toolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill; this._toolStripContainer.LeftToolStripPanelVisible = false; this._toolStripContainer.Location = new System.Drawing.Point(0, 49); this._toolStripContainer.Name = "_toolStripContainer"; this._toolStripContainer.RightToolStripPanelVisible = false; this._toolStripContainer.Size = new System.Drawing.Size(1106, 601); this._toolStripContainer.TabIndex = 48; this._toolStripContainer.Text = "toolStripContainer1"; // // flowPanelFilter // this._flowPanelFilter.AutoSize = true; this._flowPanelFilter.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this._flowPanelFilter.Controls.Add(this._searchBox); this._flowPanelFilter.Controls.Add(this._orderByLevel); this._flowPanelFilter.Controls.Add(this._itemQuality); this._flowPanelFilter.Controls.Add(this._slotFilter); this._flowPanelFilter.Controls.Add(this._modFilter); this._flowPanelFilter.Controls.Add(this._levelRequirementGroup); this._flowPanelFilter.Dock = System.Windows.Forms.DockStyle.Top; this._flowPanelFilter.Location = new System.Drawing.Point(0, 0); this._flowPanelFilter.Name = "_flowPanelFilter"; this._flowPanelFilter.Size = new System.Drawing.Size(1106, 49); this._flowPanelFilter.TabIndex = 52; // // searchBox // this._searchBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._searchBox.Location = new System.Drawing.Point(3, 17); this._searchBox.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._searchBox.Name = "_searchBox"; this._searchBox.Size = new System.Drawing.Size(304, 20); this._searchBox.TabIndex = 41; // // orderByLevel // this._orderByLevel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._orderByLevel.AutoSize = true; this._orderByLevel.Checked = true; this._orderByLevel.CheckState = System.Windows.Forms.CheckState.Checked; this._orderByLevel.Location = new System.Drawing.Point(313, 19); this._orderByLevel.Margin = new System.Windows.Forms.Padding(3, 19, 3, 3); this._orderByLevel.Name = "_orderByLevel"; this._orderByLevel.Size = new System.Drawing.Size(96, 17); this._orderByLevel.TabIndex = 42; this._orderByLevel.Tag = "iatag_ui_orderbylevel"; this._orderByLevel.Text = "Order By Level"; this._orderByLevel.UseVisualStyleBackColor = true; // // itemQuality // this._itemQuality.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._itemQuality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._itemQuality.FormattingEnabled = true; this._itemQuality.Location = new System.Drawing.Point(415, 17); this._itemQuality.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._itemQuality.Name = "_itemQuality"; this._itemQuality.Size = new System.Drawing.Size(59, 21); this._itemQuality.TabIndex = 43; // // slotFilter // this._slotFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._slotFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._slotFilter.FormattingEnabled = true; this._slotFilter.Location = new System.Drawing.Point(480, 17); this._slotFilter.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._slotFilter.Name = "_slotFilter"; this._slotFilter.Size = new System.Drawing.Size(120, 21); this._slotFilter.TabIndex = 44; // // modFilter // this._modFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this._modFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._modFilter.FormattingEnabled = true; this._modFilter.Location = new System.Drawing.Point(606, 17); this._modFilter.Margin = new System.Windows.Forms.Padding(3, 17, 3, 3); this._modFilter.Name = "_modFilter"; this._modFilter.Size = new System.Drawing.Size(102, 21); this._modFilter.TabIndex = 45; // // levelRequirementGroup // this._levelRequirementGroup.Controls.Add(this._minLevel); this._levelRequirementGroup.Controls.Add(this._maxLevel); this._levelRequirementGroup.Location = new System.Drawing.Point(714, 3); this._levelRequirementGroup.Name = "_levelRequirementGroup"; this._levelRequirementGroup.Size = new System.Drawing.Size(78, 43); this._levelRequirementGroup.TabIndex = 50; this._levelRequirementGroup.TabStop = false; this._levelRequirementGroup.Tag = "iatag_ui_level_requirement"; this._levelRequirementGroup.Text = "Level"; // // minLevel // this._minLevel.Location = new System.Drawing.Point(5, 15); this._minLevel.MaxLength = 3; this._minLevel.Name = "_minLevel"; this._minLevel.Size = new System.Drawing.Size(30, 20); this._minLevel.TabIndex = 46; this._minLevel.Text = "0"; this._minLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this._minLevel.WordWrap = false; // // maxLevel // this._maxLevel.Location = new System.Drawing.Point(40, 15); this._maxLevel.MaxLength = 3; this._maxLevel.Name = "_maxLevel"; this._maxLevel.Size = new System.Drawing.Size(30, 20); this._maxLevel.TabIndex = 47; this._maxLevel.Text = "110"; this._maxLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this._maxLevel.WordWrap = false; // // SplitSearchWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1313, 650); this.Controls.Add(this._mainSplitter); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "SplitSearchWindow"; this.Text = "SearchWindow"; this.Load += new System.EventHandler(this.SplitSearchWindow_Load); this._mainSplitter.Panel2.ResumeLayout(false); this._mainSplitter.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this._mainSplitter)).EndInit(); this._mainSplitter.ResumeLayout(false); this._toolStripContainer.ResumeLayout(false); this._toolStripContainer.PerformLayout(); this._flowPanelFilter.ResumeLayout(false); this._flowPanelFilter.PerformLayout(); this._levelRequirementGroup.ResumeLayout(false); this._levelRequirementGroup.PerformLayout(); this.ResumeLayout(false); }
partial void InitializeMainWindow() { ClientSize = new Size(640, 480); Text = "WSL Manager"; StartPosition = FormStartPosition.WindowsDefaultBounds; Load += MainForm_Load; layout = new ToolStripContainer() { Parent = this, Dock = DockStyle.Fill, }; listView = new CustomListView() { Parent = layout.ContentPanel, Dock = DockStyle.Fill, View = View.Details, MultiSelect = false, Sorting = SortOrder.None, FullRowSelect = true, LargeImageList = largeImageList, SmallImageList = smallImageList, BaseSmallImageList = smallImageList, StateImageList = stateImageList, DataSource = bindingSource, EnableAutoScaleColumn = true, ColumnScaleList = new Collection <float>(new float[] { 3f, 1f, 1f, 1f, }), UseExplorerTheme = true, UseTranslucentHotItem = true, UseTranslucentSelection = true, ShowHeaderInAllViews = false, ShowGroups = false, }; listView.PrimarySortColumn = listView.AllColumns.Find(x => string.Equals( x.Name, nameof(WslDistro.DistroName), StringComparison.Ordinal)); listView.PrimarySortOrder = SortOrder.Ascending; listView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); var defaultDistroColumn = listView.AllColumns.Find(x => string.Equals( x.Name, nameof(WslDistro.IsDefault), StringComparison.Ordinal)); if (defaultDistroColumn != null) { defaultDistroColumn.IsEditable = false; } var distroNameColumn = listView.AllColumns.Find(x => string.Equals( x.Name, nameof(WslDistro.DistroName), StringComparison.Ordinal)); if (distroNameColumn != null) { distroNameColumn.ImageGetter = new ImageGetterDelegate(o => { var modelName = ((o as WslDistro)?.DistroName ?? string.Empty).Trim(); var keyList = Resources.LogoImages.Keys.ToArray(); return(keyList.FirstOrDefault(x => modelName.Contains(x, StringComparison.OrdinalIgnoreCase)) ?? string.Empty); }); } listView.KeyUp += ListView_KeyUp; listView.MouseDown += ListView_MouseDown; listView.ItemActivate += ListView_ItemActivate; listView.FormatRow += ListView_FormatRow; statusStrip = new StatusStrip() { Parent = layout.BottomToolStripPanel, Dock = DockStyle.Fill, }; statusItem = new ToolStripStatusLabel() { Spring = true, Text = "Ready", TextAlign = ContentAlignment.MiddleLeft, }; statusStrip.Items.Add(statusItem); }
public FiltersPanel() { InitializeComponent(); _messageSearchTextBox = new SearchTextBox { Dock = DockStyle.Top, }; _messageSearchTextBox.TextChanged += MessageSearchTextBoxTextChanged; _fieldSearchTextBox = new SearchTextBox { Dock = DockStyle.Top, }; _fieldSearchTextBox.TextChanged += FieldSearchTextBoxTextChanged; #region Message ToolStrip var messageToolstrip = new ToolStrip { GripStyle = ToolStripGripStyle.Hidden, BackColor = LookAndFeel.Color.ToolStrip, Renderer = new ToolStripRenderer() }; _checkAllMessagesButton = new ToolStripButton { Image = Properties.Resources.CheckAll, ImageTransparentColor = Color.White, ToolTipText = "Check all the messages" }; _checkAllMessagesButton.Click += (sender, ev) => SetAllMessagesVisibility(true); messageToolstrip.Items.Add(_checkAllMessagesButton); _uncheckAllMessagesButton = new ToolStripButton { Image = Properties.Resources.UnCheckAll, ImageTransparentColor = Color.White, ToolTipText = "UnCheck all the messages" }; _uncheckAllMessagesButton.Click += (sender, ev) => SetAllMessagesVisibility(false); messageToolstrip.Items.Add(_uncheckAllMessagesButton); #endregion #region Field ToolStrip var fieldToolStrip = new ToolStrip { GripStyle = ToolStripGripStyle.Hidden, BackColor = LookAndFeel.Color.ToolStrip }; _checkAllFieldsButton = new ToolStripButton { Image = Properties.Resources.CheckAll, ImageTransparentColor = Color.White, ToolTipText = "Check all the fields of the selected message" }; _checkAllFieldsButton.Click += (sender, ev) => SetAllFieldsVisibility(true); fieldToolStrip.Items.Add(_checkAllFieldsButton); _uncheckAllFieldsButton = new ToolStripButton { Image = Properties.Resources.UnCheckAll, ImageTransparentColor = Color.White, ToolTipText = "UnCheck all the fields of the selected message" }; _uncheckAllFieldsButton.Click += (sender, ev) => SetAllFieldsVisibility(false); fieldToolStrip.Items.Add(_uncheckAllFieldsButton); #endregion #region Action Menu var menu = new ToolStripMenuItem("Action"); SetMenuStrip(menu); _checkAllMessagesMenuItem = new ToolStripMenuItem("Check All Messages", _checkAllMessagesButton.Image); _checkAllMessagesMenuItem.Click += (sender, ev) => SetAllMessagesVisibility(true); menu.DropDownItems.Add(_checkAllMessagesMenuItem); _uncheckAllMessagesMenuItem = new ToolStripMenuItem("UnCheck All Messages", _uncheckAllMessagesButton.Image); _uncheckAllMessagesMenuItem.Click += (sender, ev) => SetAllMessagesVisibility(false); menu.DropDownItems.Add(_uncheckAllMessagesMenuItem); menu.DropDownItems.Add(new ToolStripSeparator()); _checkAllFieldsMenuItem = new ToolStripMenuItem("Check All Fields", _checkAllFieldsButton.Image); _checkAllFieldsMenuItem.Click += (sender, ev) => SetAllFieldsVisibility(true); menu.DropDownItems.Add(_checkAllFieldsMenuItem); _uncheckAllFieldsMenuItem = new ToolStripMenuItem("UnCheck All Fields", _uncheckAllFieldsButton.Image); _uncheckAllFieldsMenuItem.Click += (sender, ev) => SetAllFieldsVisibility(false); menu.DropDownItems.Add(_uncheckAllFieldsMenuItem); #endregion _messageTable = new FilterMessageDataTable("Messages"); _messageView = new DataView(_messageTable); _fieldTable = new FilterFieldDataTable("Fields"); _fieldView = new DataView(_fieldTable); _messageGrid = new FilterMessageDataGridView { Dock = DockStyle.Fill, VirtualMode = true }; _messageGrid.CellValueNeeded += MessageGridCellValueNeeded; _messageGrid.SelectionChanged += MessageGridSelectionChanged; _messageGrid.CellContentClick += MessageGridCellContentClick; _fieldGrid = new FilterFieldDataGridView { Dock = DockStyle.Fill, VirtualMode = true }; _fieldGrid.CellValueNeeded += FieldGridCellValueNeeded; _fieldGrid.CellContentClick += FieldGridCellContentClick; var messageContainer = new ToolStripContainer { Dock = DockStyle.Fill, BackColor = LookAndFeel.Color.ToolStrip }; messageContainer.TopToolStripPanel.BackColor = LookAndFeel.Color.ToolStrip; messageContainer.ContentPanel.Controls.Add(_messageGrid); messageContainer.ContentPanel.Controls.Add(_messageSearchTextBox); messageContainer.TopToolStripPanel.Controls.Add(messageToolstrip); var fieldContainer = new ToolStripContainer { Dock = DockStyle.Fill, BackColor = LookAndFeel.Color.ToolStrip }; fieldContainer.TopToolStripPanel.BackColor = LookAndFeel.Color.ToolStrip; fieldContainer.ContentPanel.Controls.Add(_fieldGrid); fieldContainer.ContentPanel.Controls.Add(_fieldSearchTextBox); fieldContainer.TopToolStripPanel.Controls.Add(fieldToolStrip); var splitter = new SplitContainer { Dock = DockStyle.Fill, Orientation = Orientation.Vertical }; splitter.Panel1.Controls.Add(messageContainer); splitter.Panel2.Controls.Add(fieldContainer); ContentPanel.Controls.Add(splitter); UpdateUiState(); }
static void Main() { // important to call these before creating application host Application.EnableVisualStyles(); Application.DoEvents(); // see http://www.codeproject.com/buglist/EnableVisualStylesBug.asp?df=100&forumid=25268&exp=0&select=984714 // Set up localization support early on, so that user-readable strings will be localized // during the initialization phase below. Use XML files that are embedded resources. Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CurrentCulture; Localizer.SetStringLocalizer(new EmbeddedResourceStringLocalizer()); var catalog = new TypeCatalog( typeof(SettingsService), // persistent settings and user preferences dialog typeof(StatusService), // status bar at bottom of main Form typeof(CommandService), // handles commands in menus and toolbars typeof(ControlHostService), // docking control host typeof(AtfUsageLogger), // logs computer info to an ATF server #if !DEBUG typeof(CrashLogger), // logs unhandled exceptions to an ATF server typeof(UnhandledExceptionService), // catches unhandled exceptions, displays info, and gives user a chance to save #endif typeof(DomExplorer), //Debug view the DOM typeof(FileDialogService), // standard Windows file dialogs typeof(DocumentRegistry), // central document registry with change notification typeof(RecentDocumentCommands), // standard recent document commands in File menu typeof(StandardFileCommands), // standard File menu commands for New, Open, Save, SaveAs, Close typeof(MainWindowTitleService), // tracks document changes and updates main form title typeof(TabbedControlSelector), // enable Ctrl+tab selection of documents and controls within the app typeof(ContextRegistry), // central context registry with change notification typeof(StandardFileExitCommand), // standard File exit menu command typeof(StandardEditCommands), // standard Edit menu commands for copy/paste typeof(StandardEditHistoryCommands), // standard Edit menu commands for undo/redo typeof(StandardSelectionCommands), // standard Edit menu selection commands typeof(HelpAboutCommand), // Help -> About command typeof(PropertyEditor), // property grid for editing selected objects typeof(PropertyEditingCommands), // commands for PropertyEditor and GridPropertyEditor typeof(Outputs), // passes messages to all log writers typeof(ErrorDialogService), // displays errors to the user a in message box typeof(HelpAboutCommand), // custom command component to display Help/About dialog typeof(DefaultTabCommands), // provides the default commands related to document tab Controls typeof(PythonService), // scripting service for automated tests typeof(ScriptConsole), // provides a dockable command console for entering Python commands typeof(AtfScriptVariables), // exposes common ATF services as script variables typeof(AutomationService), // provides facilities to run an automated script using the .NET remoting service //Worldsmith stuff typeof(SchemaLoader), //Loads the schema typeof(Project.DotaVPKService), //Handles the VPK stuff, including reading from the VPK and building the DOM node //UI Elements typeof(ProjectTreeLister), typeof(UnitTreeLister), typeof(TextEditing.TextEditor), typeof(DotaVPKTreeLister), typeof(KeyValueEditor), // typeof(UnitPropertyEditor), //Commands typeof(ProjectCommands), typeof(TreeListCommands), typeof(KeyValueCommands) ); // Set up the MEF container with these components var container = new CompositionContainer(catalog); // Configure the main Form var batch = new CompositionBatch(); var toolStripContainer = new ToolStripContainer(); var mainForm = new MainForm(toolStripContainer) { Text = "Worldsmith".Localize(), Icon = GdiUtil.CreateIcon(WorldsmithATF.Properties.Resources.WSIcon32) }; // Add the main Form instance to the container batch.AddPart(mainForm); batch.AddPart(new WebHelpCommands("http://www.worldsmith.net".Localize())); container.Compose(batch); // Initialize components that require it. Initialization often can't be done in the constructor, // or even after imports have been satisfied by MEF, since we allow circular dependencies between // components, via the System.Lazy class. IInitializable allows components to defer some operations // until all MEF composition has been completed. container.InitializeAll(); // Show the main form and start message handling. The main Form Load event provides a final chance // for components to perform initialization and configuration. Application.Run(mainForm); // Give components a chance to clean up. container.Dispose(); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); this.printToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); this.cutToolStripButton = new System.Windows.Forms.ToolStripButton(); this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); this.pasteToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStrip2 = new System.Windows.Forms.ToolStrip(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripContainer1.LeftToolStripPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.toolStrip2.SuspendLayout(); this.SuspendLayout(); // // toolStripContainer1 // this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; // // LeftToolStripPanel // // <snippet2> this.toolStripContainer1.LeftToolStripPanel.Controls.Add(this.toolStrip2); this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); this.toolStripContainer1.Name = "toolStripContainer1"; this.toolStripContainer1.Size = new System.Drawing.Size(292, 273); this.toolStripContainer1.TabIndex = 0; this.toolStripContainer1.Text = "toolStripContainer1"; // // TopToolStripPanel // this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); // </snippet2> // toolStrip1 // this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; // <snippet3> this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripButton, this.openToolStripButton, this.saveToolStripButton, this.printToolStripButton, this.toolStripSeparator, this.cutToolStripButton, this.copyToolStripButton, this.pasteToolStripButton, this.toolStripSeparator1, this.helpToolStripButton }); // </snippet3> this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.TabIndex = 0; this.toolStrip1.Text = "toolStrip1"; // // newToolStripButton // this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.newToolStripButton.Name = "newToolStripButton"; this.newToolStripButton.Text = "&New"; // // openToolStripButton // this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.openToolStripButton.Name = "openToolStripButton"; this.openToolStripButton.Text = "&Open"; // // saveToolStripButton // this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.saveToolStripButton.Name = "saveToolStripButton"; this.saveToolStripButton.Text = "&Save"; // // printToolStripButton // this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image"))); this.printToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.printToolStripButton.Name = "printToolStripButton"; this.printToolStripButton.Text = "&Print"; // // toolStripSeparator // this.toolStripSeparator.Name = "toolStripSeparator"; // // cutToolStripButton // this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.cutToolStripButton.Name = "cutToolStripButton"; this.cutToolStripButton.Text = "Cu&t"; // // copyToolStripButton // this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.copyToolStripButton.Name = "copyToolStripButton"; this.copyToolStripButton.Text = "&Copy"; // // pasteToolStripButton // this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image"))); this.pasteToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.pasteToolStripButton.Name = "pasteToolStripButton"; this.pasteToolStripButton.Text = "&Paste"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; // // helpToolStripButton // this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image"))); this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; this.helpToolStripButton.Name = "helpToolStripButton"; this.helpToolStripButton.Text = "&Help"; // // toolStrip2 // this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripButton1, this.toolStripButton2 }); this.toolStrip2.Location = new System.Drawing.Point(0, 0); this.toolStrip2.Name = "toolStrip2"; this.toolStrip2.TabIndex = 0; this.toolStrip2.Text = "toolStrip2"; // // toolStripButton1 // this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Text = "toolStripButton1"; // // toolStripButton2 // this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Text = "toolStripButton2"; // // Form1 // this.ClientSize = new System.Drawing.Size(292, 273); this.Controls.Add(this.toolStripContainer1); this.Name = "Form1"; this.toolStripContainer1.LeftToolStripPanel.ResumeLayout(false); this.toolStripContainer1.LeftToolStripPanel.PerformLayout(); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip2.ResumeLayout(false); this.ResumeLayout(false); }
public static void RestoreToolbarStates(ToolStripContainer container, XmlDocument data) { // TODO: Instead of bailing here, which means we will ignore saved settings, we need to either // cache the settings we're given here until we CAN apply them, or else we need to // ensure that we don't register for settings until we're able to process them since we // do not know when the settings service will decide to deliver values to us. // A third option would be to continue to bail here, but FORCE a redelivery of the settings // later when we're ready for them (ie: OnLoad). // See also other comments in this file labled SCREAM_TOOLBAR_STATE_ISSUE var comparer = new ElementSortComparer <XmlElement>(); Dictionary <string, ToolStrip> toolStrips = new Dictionary <string, ToolStrip>(); Dictionary <string, ToolStripItem> toolStripItems = new Dictionary <string, ToolStripItem>(); try { // build dictionaries of existing toolstrips and items PrepareLoadPanelState(container.TopToolStripPanel, toolStrips, toolStripItems); PrepareLoadPanelState(container.LeftToolStripPanel, toolStrips, toolStripItems); PrepareLoadPanelState(container.BottomToolStripPanel, toolStrips, toolStripItems); PrepareLoadPanelState(container.RightToolStripPanel, toolStrips, toolStripItems); container.SuspendLayout(); XmlDocument xmlDoc = data; XmlElement root = xmlDoc.DocumentElement; if (root == null || root.Name != "ToolStripContainerSettings") { throw new InvalidOperationException("Invalid Toolstrip settings"); } // walk xml to restore matching toolstrips and items to their previous state XmlNodeList Panels = root.SelectNodes("ToolStripPanel"); foreach (XmlElement panelElement in Panels) { string panelName = panelElement.GetAttribute("Name"); ToolStripPanel panel; if (panelName == "TopToolStripPanel") { panel = container.TopToolStripPanel; } else if (panelName == "LeftToolStripPanel") { panel = container.LeftToolStripPanel; } else if (panelName == "BottomToolStripPanel") { panel = container.BottomToolStripPanel; } else if (panelName == "RightToolStripPanel") { panel = container.RightToolStripPanel; } else { continue; } List <XmlElement> stripElements = new List <XmlElement>(); foreach (XmlElement toolStripElement in panelElement.ChildNodes) { stripElements.Add(toolStripElement); } // sort toolstrips on Y then X. // create list of ToolStrips for each row. // rows are sorted. SortedDictionary <int, List <XmlElement> > rowOrder = new SortedDictionary <int, List <XmlElement> >(); foreach (XmlElement toolStripElement in stripElements) { string[] location = toolStripElement.GetAttribute("Location").Split(','); int yloc = int.Parse(location[1]); List <XmlElement> toolstripList; if (!rowOrder.TryGetValue(yloc, out toolstripList)) { toolstripList = new List <XmlElement>(); rowOrder.Add(yloc, toolstripList); } toolstripList.Add(toolStripElement); } // sort on x. foreach (var toolstripList in rowOrder.Values) { toolstripList.Sort(comparer); } int cIndex = 0; // keeps track of the toolstrip's index in Controls Collection. int prevHeight = 0; // height of the previous toolstrip in row order. // Don't use persisted y-position directly, instead compute y-position from cumulative heights of all the previous ToolStrips. // Persisted Y-position is only used for determining Row number for each ToolStrip. int yPos = rowOrder.Count == 0 ? 0 : rowOrder.Keys.First(); foreach (var toolStripElements in rowOrder.Values) { yPos += prevHeight; foreach (XmlElement toolStripElement in toolStripElements) { string toolStripName = toolStripElement.GetAttribute("Name"); ToolStrip toolStrip; if (!toolStrips.TryGetValue(toolStripName, out toolStrip)) { continue; } toolStrip.Parent.Controls.Remove(toolStrip); panel.Controls.Add(toolStrip); panel.Controls.SetChildIndex(toolStrip, cIndex++); if (toolStrip.Height > prevHeight) { prevHeight = toolStrip.Height; } string[] coords = toolStripElement.GetAttribute("Location").Split(','); int xPos = int.Parse(coords[0]); toolStrip.Location = new Point(xPos, yPos); XmlNodeList itemNodes = toolStripElement.ChildNodes; int j = 0; foreach (XmlElement itemElement in itemNodes) { string itemName = itemElement.GetAttribute("Name"); ToolStripItem item; if (toolStripItems.TryGetValue(itemName, out item)) { item.Owner.Items.Remove(item); toolStrip.Items.Insert(j, item); // ToolStripItem has two visibility properties: Visible and Available. // Visible indicates whether the item is displayed, // Available indicates whether the ToolStripItem should be placed on a ToolStrip. // Use Available property here for toolstrip layout. string visible = itemElement.GetAttribute("Visible"); if (visible == "false") { item.Available = false; } else { item.Available = true; } if (item is ToolStripButton) { var button = item as ToolStripButton; // Only if the attribute is available and is set to "true"... string isChecked = itemElement.GetAttribute("Checked"); if (isChecked == "true") { button.Checked = true; } } j++; } } } // foreach (XmlElement toolStripElement in toolStripElements) } // foreach (var toolStripElements in rowOrder.Values) } // foreach (XmlElement panelElement in Panels) } finally { foreach (ToolStrip toolStrip in toolStrips.Values) { toolStrip.ResumeLayout(true); } container.TopToolStripPanel.ResumeLayout(true); container.LeftToolStripPanel.ResumeLayout(true); container.BottomToolStripPanel.ResumeLayout(true); container.RightToolStripPanel.ResumeLayout(true); container.ResumeLayout(true); } }
/// <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(FViewer)); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.tiffViewer1 = new NAPS2.WinForms.TiffViewerCtl(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.tbPageCurrent = new System.Windows.Forms.ToolStripTextBox(); this.lblPageTotal = new System.Windows.Forms.ToolStripLabel(); this.tsPrev = new System.Windows.Forms.ToolStripButton(); this.tsNext = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.tsdRotate = new System.Windows.Forms.ToolStripDropDownButton(); this.tsRotateLeft = new System.Windows.Forms.ToolStripMenuItem(); this.tsRotateRight = new System.Windows.Forms.ToolStripMenuItem(); this.tsFlip = new System.Windows.Forms.ToolStripMenuItem(); this.tsCustomRotation = new System.Windows.Forms.ToolStripMenuItem(); this.tsCrop = new System.Windows.Forms.ToolStripButton(); this.tsBrightness = new System.Windows.Forms.ToolStripButton(); this.tsContrast = new System.Windows.Forms.ToolStripButton(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // // toolStripContainer1 // // // toolStripContainer1.ContentPanel // this.toolStripContainer1.ContentPanel.Controls.Add(this.tiffViewer1); resources.ApplyResources(this.toolStripContainer1.ContentPanel, "toolStripContainer1.ContentPanel"); resources.ApplyResources(this.toolStripContainer1, "toolStripContainer1"); this.toolStripContainer1.Name = "toolStripContainer1"; // // toolStripContainer1.TopToolStripPanel // this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); // // tiffViewer1 // resources.ApplyResources(this.tiffViewer1, "tiffViewer1"); this.tiffViewer1.Image = null; this.tiffViewer1.Name = "tiffViewer1"; // // toolStrip1 // resources.ApplyResources(this.toolStrip1, "toolStrip1"); this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tbPageCurrent, this.lblPageTotal, this.tsPrev, this.tsNext, this.toolStripSeparator1, this.tsdRotate, this.tsCrop, this.tsBrightness, this.tsContrast }); this.toolStrip1.Name = "toolStrip1"; // // tbPageCurrent // this.tbPageCurrent.Name = "tbPageCurrent"; resources.ApplyResources(this.tbPageCurrent, "tbPageCurrent"); this.tbPageCurrent.TextChanged += new System.EventHandler(this.tbPageCurrent_TextChanged); // // lblPageTotal // this.lblPageTotal.Name = "lblPageTotal"; resources.ApplyResources(this.lblPageTotal, "lblPageTotal"); // // tsPrev // this.tsPrev.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsPrev.Image = Icons.arrow_left; resources.ApplyResources(this.tsPrev, "tsPrev"); this.tsPrev.Name = "tsPrev"; this.tsPrev.Click += new System.EventHandler(this.tsPrev_Click); // // tsNext // this.tsNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsNext.Image = Icons.arrow_right; resources.ApplyResources(this.tsNext, "tsNext"); this.tsNext.Name = "tsNext"; this.tsNext.Click += new System.EventHandler(this.tsNext_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); // // tsdRotate // this.tsdRotate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsdRotate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsRotateLeft, this.tsRotateRight, this.tsFlip, this.tsCustomRotation }); this.tsdRotate.Image = Icons.arrow_rotate_anticlockwise_small; resources.ApplyResources(this.tsdRotate, "tsdRotate"); this.tsdRotate.Name = "tsdRotate"; this.tsdRotate.ShowDropDownArrow = false; // // tsRotateLeft // this.tsRotateLeft.Image = Icons.arrow_rotate_anticlockwise_small; this.tsRotateLeft.Name = "tsRotateLeft"; resources.ApplyResources(this.tsRotateLeft, "tsRotateLeft"); this.tsRotateLeft.Click += new System.EventHandler(this.tsRotateLeft_Click); // // tsRotateRight // this.tsRotateRight.Image = Icons.arrow_rotate_clockwise_small; this.tsRotateRight.Name = "tsRotateRight"; resources.ApplyResources(this.tsRotateRight, "tsRotateRight"); this.tsRotateRight.Click += new System.EventHandler(this.tsRotateRight_Click); // // tsFlip // this.tsFlip.Image = Icons.arrow_switch_small; this.tsFlip.Name = "tsFlip"; resources.ApplyResources(this.tsFlip, "tsFlip"); this.tsFlip.Click += new System.EventHandler(this.tsFlip_Click); // // tsCustomRotation // this.tsCustomRotation.Name = "tsCustomRotation"; resources.ApplyResources(this.tsCustomRotation, "tsCustomRotation"); this.tsCustomRotation.Click += new System.EventHandler(this.tsCustomRotation_Click); // // tsCrop // this.tsCrop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsCrop.Image = Icons.transform_crop; resources.ApplyResources(this.tsCrop, "tsCrop"); this.tsCrop.Name = "tsCrop"; this.tsCrop.Click += new System.EventHandler(this.tsCrop_Click); // // tsBrightness // this.tsBrightness.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsBrightness.Image = Icons.weather_sun; resources.ApplyResources(this.tsBrightness, "tsBrightness"); this.tsBrightness.Name = "tsBrightness"; this.tsBrightness.Click += new System.EventHandler(this.tsBrightness_Click); // // tsContrast // this.tsContrast.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.tsContrast.Image = Icons.contrast; resources.ApplyResources(this.tsContrast, "tsContrast"); this.tsContrast.Name = "tsContrast"; this.tsContrast.Click += new System.EventHandler(this.tsContrast_Click); // // FViewer // resources.ApplyResources(this, "$this"); this.Controls.Add(this.toolStripContainer1); this.Name = "FViewer"; this.ShowInTaskbar = false; this.toolStripContainer1.ContentPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(MainForm)); this.treeView1 = new TreeView(); this.contextMenuStrip1 = new ContextMenuStrip(); this.setAllChildAsExposedToolStripMenuItem = new ToolStripMenuItem(); this.setAllChildAsNonExposedToolStripMenuItem = new ToolStripMenuItem(); this.applyExposedMethodsToChildServicesToolStripMenuItem = new ToolStripMenuItem(); this.includeNonExposedToolStripMenuItem = new ToolStripMenuItem(); this.excludeNonExposedToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator7 = new ToolStripSeparator(); this.setAllMethodsAsToolStripMenuItem = new ToolStripMenuItem(); this.exposedToolStripMenuItem = new ToolStripMenuItem(); this.nonExposedToolStripMenuItem = new ToolStripMenuItem(); this.baseToolStripMenuItem = new ToolStripMenuItem(); this.baseAndExposedToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator4 = new ToolStripSeparator(); this.setFilterToToolStripMenuItem = new ToolStripMenuItem(); this.removeFilterToolStripMenuItem = new ToolStripMenuItem(); this.editToolStripMenuItem = new ToolStripMenuItem(); this.imageList1 = new ImageList(); this.propertyGrid1 = new PropertyGrid(); this.panel1 = new Panel(); this.splitter1 = new Splitter(); this.saveFileDialog1 = new SaveFileDialog(); this.openFileDialog1 = new OpenFileDialog(); this.toolStripContainer1 = new ToolStripContainer(); this.statusStrip1 = new StatusStrip(); this.toolStripStatusLabel1 = new ToolStripStatusLabel(); this.menuStrip1 = new MenuStrip(); this.fileToolStripMenuItem = new ToolStripMenuItem(); this.openToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator = new ToolStripSeparator(); this.saveToolStripMenuItem = new ToolStripMenuItem(); this.saveAsToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator3 = new ToolStripSeparator(); this.generateToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator1 = new ToolStripSeparator(); this.exitToolStripMenuItem = new ToolStripMenuItem(); this.toolsToolStripMenuItem = new ToolStripMenuItem(); this.optionsToolStripMenuItem = new ToolStripMenuItem(); this.helpToolStripMenuItem = new ToolStripMenuItem(); this.contentsToolStripMenuItem = new ToolStripMenuItem(); this.toolStripSeparator5 = new ToolStripSeparator(); this.aboutToolStripMenuItem = new ToolStripMenuItem(); this.LightModeComboBox = new ToolStripComboBox(); this.toolStrip1 = new ToolStrip(); this.openToolStripButton = new ToolStripButton(); this.saveToolStripButton = new ToolStripButton(); this.toolStripSeparator2 = new ToolStripSeparator(); this.toolStripButton2 = new ToolStripButton(); this.toolStripSeparator6 = new ToolStripSeparator(); this.toolStripButton1 = new ToolStripButton(); this.filterToolStripButton = new ToolStripButton(); this.contextMenuStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); this.toolStripContainer1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); this.treeView1.ContextMenuStrip = this.contextMenuStrip1; this.treeView1.Dock = DockStyle.Left; this.treeView1.HideSelection = false; this.treeView1.ImageIndex = 0; this.treeView1.ImageList = this.imageList1; this.treeView1.Location = new Point(0, 0); this.treeView1.Name = "treeView1"; this.treeView1.SelectedImageIndex = 0; this.treeView1.ShowNodeToolTips = true; this.treeView1.Size = new Size(336, 439); this.treeView1.TabIndex = 0; this.treeView1.AfterSelect += new TreeViewEventHandler(this.treeView1_AfterSelect); this.treeView1.MouseClick += new MouseEventHandler(this.treeView1_MouseClick); this.contextMenuStrip1.Items.AddRange(new ToolStripItem[8] { (ToolStripItem)this.setAllChildAsExposedToolStripMenuItem, (ToolStripItem)this.setAllChildAsNonExposedToolStripMenuItem, (ToolStripItem)this.applyExposedMethodsToChildServicesToolStripMenuItem, (ToolStripItem)this.toolStripSeparator7, (ToolStripItem)this.setAllMethodsAsToolStripMenuItem, (ToolStripItem)this.toolStripSeparator4, (ToolStripItem)this.setFilterToToolStripMenuItem, (ToolStripItem)this.removeFilterToolStripMenuItem }); this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Size = new Size(247, 148); this.contextMenuStrip1.Opening += new CancelEventHandler(this.contextMenuStrip1_Opening); // this.setAllChildAsExposedToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("setAllChildAsExposedToolStripMenuItem.Image"); this.setAllChildAsExposedToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.setAllChildAsExposedToolStripMenuItem.Name = "setAllChildAsExposedToolStripMenuItem"; this.setAllChildAsExposedToolStripMenuItem.Size = new Size(246, 22); this.setAllChildAsExposedToolStripMenuItem.Text = "Set child services as Exposed"; this.setAllChildAsExposedToolStripMenuItem.Click += new EventHandler(this.setAllChildAsExposedToolStripMenuItem_Click); // this.setAllChildAsNonExposedToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("setAllChildAsNonExposedToolStripMenuItem.Image"); this.setAllChildAsNonExposedToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.setAllChildAsNonExposedToolStripMenuItem.Name = "setAllChildAsNonExposedToolStripMenuItem"; this.setAllChildAsNonExposedToolStripMenuItem.Size = new Size(246, 22); this.setAllChildAsNonExposedToolStripMenuItem.Text = "Set child services as NonExposed"; this.setAllChildAsNonExposedToolStripMenuItem.Click += new EventHandler(this.setAllChildAsNonExposedToolStripMenuItem_Click); this.applyExposedMethodsToChildServicesToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[2] { (ToolStripItem)this.includeNonExposedToolStripMenuItem, (ToolStripItem)this.excludeNonExposedToolStripMenuItem }); this.applyExposedMethodsToChildServicesToolStripMenuItem.Name = "applyExposedMethodsToChildServicesToolStripMenuItem"; this.applyExposedMethodsToChildServicesToolStripMenuItem.Size = new Size(246, 22); this.applyExposedMethodsToChildServicesToolStripMenuItem.Text = "Apply methods to child services"; this.includeNonExposedToolStripMenuItem.Name = "includeNonExposedToolStripMenuItem"; this.includeNonExposedToolStripMenuItem.Size = new Size(183, 22); this.includeNonExposedToolStripMenuItem.Text = "Include NonExposed"; this.includeNonExposedToolStripMenuItem.Click += new EventHandler(this.includeNonExposedToolStripMenuItem_Click); this.excludeNonExposedToolStripMenuItem.Name = "excludeNonExposedToolStripMenuItem"; this.excludeNonExposedToolStripMenuItem.Size = new Size(183, 22); this.excludeNonExposedToolStripMenuItem.Text = "Exclude NonExposed"; this.excludeNonExposedToolStripMenuItem.Click += new EventHandler(this.excludeNonExposedToolStripMenuItem_Click); this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Size = new Size(243, 6); this.setAllMethodsAsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[4] { (ToolStripItem)this.exposedToolStripMenuItem, (ToolStripItem)this.nonExposedToolStripMenuItem, (ToolStripItem)this.baseToolStripMenuItem, (ToolStripItem)this.baseAndExposedToolStripMenuItem }); this.setAllMethodsAsToolStripMenuItem.Name = "setAllMethodsAsToolStripMenuItem"; this.setAllMethodsAsToolStripMenuItem.Size = new Size(246, 22); this.setAllMethodsAsToolStripMenuItem.Text = "Set all methods as"; // this.exposedToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("exposedToolStripMenuItem.Image"); this.exposedToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.exposedToolStripMenuItem.Name = "exposedToolStripMenuItem"; this.exposedToolStripMenuItem.Size = new Size(169, 22); this.exposedToolStripMenuItem.Text = "Exposed"; this.exposedToolStripMenuItem.Click += new EventHandler(this.exposedToolStripMenuItem_Click); // this.nonExposedToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("nonExposedToolStripMenuItem.Image"); this.nonExposedToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.nonExposedToolStripMenuItem.Name = "nonExposedToolStripMenuItem"; this.nonExposedToolStripMenuItem.Size = new Size(169, 22); this.nonExposedToolStripMenuItem.Text = "NonExposed"; this.nonExposedToolStripMenuItem.Click += new EventHandler(this.nonExposedToolStripMenuItem_Click); // this.baseToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("baseToolStripMenuItem.Image"); this.baseToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.baseToolStripMenuItem.Name = "baseToolStripMenuItem"; this.baseToolStripMenuItem.Size = new Size(169, 22); this.baseToolStripMenuItem.Text = "Base"; this.baseToolStripMenuItem.Click += new EventHandler(this.baseToolStripMenuItem_Click); // this.baseAndExposedToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("baseAndExposedToolStripMenuItem.Image"); this.baseAndExposedToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.baseAndExposedToolStripMenuItem.Name = "baseAndExposedToolStripMenuItem"; this.baseAndExposedToolStripMenuItem.Size = new Size(169, 22); this.baseAndExposedToolStripMenuItem.Text = "Base And Exposed"; this.baseAndExposedToolStripMenuItem.Click += new EventHandler(this.baseAndExposedToolStripMenuItem_Click); this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Size = new Size(243, 6); // this.setFilterToToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("setFilterToToolStripMenuItem.Image"); this.setFilterToToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.setFilterToToolStripMenuItem.Name = "setFilterToToolStripMenuItem"; this.setFilterToToolStripMenuItem.Size = new Size(246, 22); this.setFilterToToolStripMenuItem.Text = "Set filter to ..."; this.setFilterToToolStripMenuItem.Click += new EventHandler(this.setFilterToToolStripMenuItem_Click); // this.removeFilterToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("removeFilterToolStripMenuItem.Image"); this.removeFilterToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.removeFilterToolStripMenuItem.Name = "removeFilterToolStripMenuItem"; this.removeFilterToolStripMenuItem.Size = new Size(246, 22); this.removeFilterToolStripMenuItem.Text = "Remove filter"; this.removeFilterToolStripMenuItem.Visible = false; this.removeFilterToolStripMenuItem.Click += new EventHandler(this.removeFilterToolStripMenuItem_Click); this.editToolStripMenuItem.DropDown = (ToolStripDropDown)this.contextMenuStrip1; this.editToolStripMenuItem.Name = "editToolStripMenuItem"; this.editToolStripMenuItem.Size = new Size(39, 23); this.editToolStripMenuItem.Text = "&Edit"; // this.imageList1.ImageStream = (ImageListStreamer) componentResourceManager.GetObject("imageList1.ImageStream"); this.imageList1.TransparentColor = Color.Magenta; this.imageList1.Images.SetKeyName(0, "Stop.bmp"); this.imageList1.Images.SetKeyName(1, "Play.bmp"); this.imageList1.Images.SetKeyName(2, "Relationships.bmp"); this.imageList1.Images.SetKeyName(3, "gear_2.bmp"); this.imageList1.Images.SetKeyName(4, "gear_32.bmp"); this.propertyGrid1.Dock = DockStyle.Fill; this.propertyGrid1.Location = new Point(339, 0); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.Size = new Size(339, 439); this.propertyGrid1.TabIndex = 1; this.propertyGrid1.SelectedGridItemChanged += new SelectedGridItemChangedEventHandler(this.propertyGrid1_SelectedGridItemChanged); this.propertyGrid1.Leave += new EventHandler(this.propertyGrid1_Leave); this.panel1.Controls.Add((Control)this.propertyGrid1); this.panel1.Controls.Add((Control)this.splitter1); this.panel1.Controls.Add((Control)this.treeView1); this.panel1.Dock = DockStyle.Fill; this.panel1.Location = new Point(0, 0); this.panel1.Name = "panel1"; this.panel1.Size = new Size(678, 439); this.panel1.TabIndex = 4; this.splitter1.Location = new Point(336, 0); this.splitter1.Name = "splitter1"; this.splitter1.Size = new Size(3, 439); this.splitter1.TabIndex = 2; this.splitter1.TabStop = false; this.openFileDialog1.DefaultExt = "xml"; this.toolStripContainer1.BottomToolStripPanel.Controls.Add((Control)this.statusStrip1); this.toolStripContainer1.ContentPanel.AutoScroll = true; this.toolStripContainer1.ContentPanel.Controls.Add((Control)this.panel1); this.toolStripContainer1.ContentPanel.Size = new Size(678, 439); this.toolStripContainer1.Dock = DockStyle.Fill; this.toolStripContainer1.Location = new Point(0, 0); this.toolStripContainer1.Name = "toolStripContainer1"; this.toolStripContainer1.Size = new Size(678, 513); this.toolStripContainer1.TabIndex = 4; this.toolStripContainer1.Text = "toolStripContainer1"; this.toolStripContainer1.TopToolStripPanel.Controls.Add((Control)this.menuStrip1); this.toolStripContainer1.TopToolStripPanel.Controls.Add((Control)this.toolStrip1); this.statusStrip1.Dock = DockStyle.None; this.statusStrip1.Items.AddRange(new ToolStripItem[1] { (ToolStripItem)this.toolStripStatusLabel1 }); this.statusStrip1.Location = new Point(0, 0); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new Size(678, 22); this.statusStrip1.TabIndex = 0; this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new Size(39, 17); this.toolStripStatusLabel1.Text = "Ready"; this.menuStrip1.Dock = DockStyle.None; this.menuStrip1.GripStyle = ToolStripGripStyle.Visible; this.menuStrip1.Items.AddRange(new ToolStripItem[5] { (ToolStripItem)this.fileToolStripMenuItem, (ToolStripItem)this.editToolStripMenuItem, (ToolStripItem)this.toolsToolStripMenuItem, (ToolStripItem)this.helpToolStripMenuItem, (ToolStripItem)this.LightModeComboBox }); this.menuStrip1.Location = new Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new Size(678, 27); this.menuStrip1.TabIndex = 1; this.menuStrip1.Text = "menuStrip1"; this.fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[8] { (ToolStripItem)this.openToolStripMenuItem, (ToolStripItem)this.toolStripSeparator, (ToolStripItem)this.saveToolStripMenuItem, (ToolStripItem)this.saveAsToolStripMenuItem, (ToolStripItem)this.toolStripSeparator3, (ToolStripItem)this.generateToolStripMenuItem, (ToolStripItem)this.toolStripSeparator1, (ToolStripItem)this.exitToolStripMenuItem }); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new Size(37, 23); this.fileToolStripMenuItem.Text = "&File"; // this.openToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("openToolStripMenuItem.Image"); this.openToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.ShortcutKeys = Keys.O | Keys.Control; this.openToolStripMenuItem.Size = new Size(225, 22); this.openToolStripMenuItem.Text = "&Open Configuration"; this.openToolStripMenuItem.Click += new EventHandler(this.openToolStripMenuItem_Click); this.toolStripSeparator.Name = "toolStripSeparator"; this.toolStripSeparator.Size = new Size(222, 6); // this.saveToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("saveToolStripMenuItem.Image"); this.saveToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.ShortcutKeys = Keys.S | Keys.Control; this.saveToolStripMenuItem.Size = new Size(225, 22); this.saveToolStripMenuItem.Text = "&Save Configuration"; this.saveToolStripMenuItem.Click += new EventHandler(this.saveToolStripMenuItem_Click); this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; this.saveAsToolStripMenuItem.Size = new Size(225, 22); this.saveAsToolStripMenuItem.Text = "Save Configuration &As"; this.saveAsToolStripMenuItem.Click += new EventHandler(this.saveAsToolStripMenuItem_Click); this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new Size(222, 6); // this.generateToolStripMenuItem.Image = (Image) componentResourceManager.GetObject("generateToolStripMenuItem.Image"); this.generateToolStripMenuItem.ImageTransparentColor = Color.Magenta; this.generateToolStripMenuItem.Name = "generateToolStripMenuItem"; this.generateToolStripMenuItem.ShortcutKeys = Keys.G | Keys.Control; this.generateToolStripMenuItem.Size = new Size(225, 22); this.generateToolStripMenuItem.Text = "Generate Assemblies"; this.generateToolStripMenuItem.Click += new EventHandler(this.generateToolStripMenuItem_Click); this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new Size(222, 6); this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.Size = new Size(225, 22); this.exitToolStripMenuItem.Text = "E&xit"; this.exitToolStripMenuItem.Click += new EventHandler(this.exitToolStripMenuItem_Click); this.toolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[1] { (ToolStripItem)this.optionsToolStripMenuItem }); this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; this.toolsToolStripMenuItem.Size = new Size(48, 23); this.toolsToolStripMenuItem.Text = "&Tools"; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; this.optionsToolStripMenuItem.Size = new Size(116, 22); this.optionsToolStripMenuItem.Text = "&Options"; this.optionsToolStripMenuItem.Click += new EventHandler(this.optionsToolStripMenuItem_Click); this.helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[3] { (ToolStripItem)this.contentsToolStripMenuItem, (ToolStripItem)this.toolStripSeparator5, (ToolStripItem)this.aboutToolStripMenuItem }); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; this.helpToolStripMenuItem.Size = new Size(44, 23); this.helpToolStripMenuItem.Text = "&Help"; this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; this.contentsToolStripMenuItem.Size = new Size(175, 22); this.contentsToolStripMenuItem.Text = "&Support Web Site"; this.contentsToolStripMenuItem.Click += new EventHandler(this.contentsToolStripMenuItem_Click); this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new Size(172, 6); this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; this.aboutToolStripMenuItem.Size = new Size(175, 22); this.aboutToolStripMenuItem.Text = "&About WCF Builder"; this.aboutToolStripMenuItem.Click += new EventHandler(this.aboutToolStripMenuItem_Click); this.LightModeComboBox.Alignment = ToolStripItemAlignment.Right; this.LightModeComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.LightModeComboBox.Items.AddRange(new object[2] { (object)"Regular", (object)"Silverlight" }); this.LightModeComboBox.Name = "LightModeComboBox"; this.LightModeComboBox.Size = new Size(121, 23); this.LightModeComboBox.SelectedIndexChanged += new EventHandler(this.LightModeComboBox_SelectedIndexChanged); this.toolStrip1.Dock = DockStyle.None; this.toolStrip1.Items.AddRange(new ToolStripItem[7] { (ToolStripItem)this.openToolStripButton, (ToolStripItem)this.saveToolStripButton, (ToolStripItem)this.toolStripSeparator2, (ToolStripItem)this.toolStripButton2, (ToolStripItem)this.toolStripSeparator6, (ToolStripItem)this.toolStripButton1, (ToolStripItem)this.filterToolStripButton }); this.toolStrip1.Location = new Point(0, 27); this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Size = new Size(678, 25); this.toolStrip1.Stretch = true; this.toolStrip1.TabIndex = 0; this.openToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image; // this.openToolStripButton.Image = (Image) componentResourceManager.GetObject("openToolStripButton.Image"); this.openToolStripButton.ImageTransparentColor = Color.Magenta; this.openToolStripButton.Name = "openToolStripButton"; this.openToolStripButton.Size = new Size(23, 22); this.openToolStripButton.Text = "&Open Configuration"; this.openToolStripButton.Click += new EventHandler(this.openToolStripMenuItem_Click); this.saveToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image; // this.saveToolStripButton.Image = (Image) componentResourceManager.GetObject("saveToolStripButton.Image"); this.saveToolStripButton.ImageTransparentColor = Color.Magenta; this.saveToolStripButton.Name = "saveToolStripButton"; this.saveToolStripButton.Size = new Size(23, 22); this.saveToolStripButton.Text = "&Save Configuration"; this.saveToolStripButton.Click += new EventHandler(this.saveToolStripMenuItem_Click); this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new Size(6, 25); this.toolStripButton2.DisplayStyle = ToolStripItemDisplayStyle.Image; // this.toolStripButton2.Image = (Image) componentResourceManager.GetObject("toolStripButton2.Image"); this.toolStripButton2.ImageTransparentColor = Color.Magenta; this.toolStripButton2.Name = "toolStripButton2"; this.toolStripButton2.Size = new Size(23, 22); this.toolStripButton2.Text = "Generate Assemblies"; this.toolStripButton2.Click += new EventHandler(this.generateToolStripMenuItem_Click); this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Size = new Size(6, 25); this.toolStripButton1.DisplayStyle = ToolStripItemDisplayStyle.Image; // this.toolStripButton1.Image = (Image) componentResourceManager.GetObject("toolStripButton1.Image"); this.toolStripButton1.ImageTransparentColor = Color.Magenta; this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Size = new Size(23, 22); this.toolStripButton1.Text = "Filter"; this.toolStripButton1.Click += new EventHandler(this.setFilterToToolStripMenuItem_Click); this.filterToolStripButton.Alignment = ToolStripItemAlignment.Right; // this.filterToolStripButton.Image = (Image) componentResourceManager.GetObject("filterToolStripButton.Image"); this.filterToolStripButton.ImageTransparentColor = Color.Magenta; this.filterToolStripButton.Name = "filterToolStripButton"; this.filterToolStripButton.Size = new Size(106, 22); this.filterToolStripButton.Text = "Remove '' filter"; this.filterToolStripButton.ToolTipText = "Remove filter"; this.filterToolStripButton.Visible = false; this.filterToolStripButton.Click += new EventHandler(this.removeFilterToolStripMenuItem_Click); this.AutoScaleDimensions = new SizeF(6f, 13f); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new Size(678, 513); this.Controls.Add((Control)this.toolStripContainer1); this.Name = "MainForm"; this.StartPosition = FormStartPosition.CenterScreen; this.Text = "WCF Services Generator"; this.contextMenuStrip1.ResumeLayout(false); this.panel1.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); this.toolStripContainer1.BottomToolStripPanel.PerformLayout(); this.toolStripContainer1.ContentPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); this.toolStripContainer1.TopToolStripPanel.PerformLayout(); this.toolStripContainer1.ResumeLayout(false); this.toolStripContainer1.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); }
static void Main() { double start = LevelEditorCore.Timing.GetHiResCurrentTime(); #if DEBUG AllocConsole(); #endif // It's important to call these before starting the app; otherwise theming and bitmaps // may not render correctly. Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.DoEvents(); // see http://www.codeproject.com/buglist/EnableVisualStylesBug.asp?df=100&forumid=25268&exp=0&select=984714 // Set up localization support early on, so that user-readable strings will be localized // during the initialization phase below. Use XML files that are embedded resources. Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CurrentCulture; Localizer.SetStringLocalizer(new EmbeddedResourceStringLocalizer()); #if !DEBUG SplashForm.ShowForm(typeof(LevelEditorApplication), "LevelEditor.Resources.SplashImg.png"); #endif // Register the embedded image resources so that they will be available for all users of ResourceUtil, // such as the PaletteService. ResourceUtil.Register(typeof(Resources)); // enable metadata driven property editing DomNodeType.BaseOfAllTypes.AddAdapterCreator(new AdapterCreator <CustomTypeDescriptorNodeAdapter>()); // Add selected ATF components. TypeCatalog AtfCatalog = new TypeCatalog( typeof(SettingsService), // persistent settings and user preferences dialog typeof(Outputs), // service that provides static methods for writing to IOutputWriter objects. typeof(OutputService), // rich text box for displaying error and warning messages. Implements IOutputWriter. typeof(CommandService), // menus and toolbars typeof(ControlHostService), // docking control host typeof(AtfUsageLogger), // logs computer info to an ATF server typeof(CrashLogger), // logs unhandled exceptions to an ATF server typeof(PythonService), // scripting service for automated tests typeof(ScriptConsole), typeof(AtfScriptVariables), typeof(AutomationService), typeof(FileDialogService), // standard Windows file dialogs typeof(DocumentRegistry), // central document registry with change notification typeof(RecentDocumentCommands), // standard recent document commands in File menu typeof(AutoDocumentService), // opens documents from last session, or creates a new document, on startup typeof(StandardFileExitCommand), // standard File exit menu command typeof(StandardViewCommands), // standard View commands: frame selection, frame all typeof(MainWindowTitleService), // tracks document changes and updates main form title typeof(ContextRegistry), // central context registry with change notification typeof(StandardEditCommands), // standard Edit menu commands for copy/paste typeof(StandardEditHistoryCommands), // standard Edit menu commands for undo/redo typeof(StandardSelectionCommands), // standard Edit menu selection commands typeof(StandardLockCommands), // standard Edit menu lock/unlock commands typeof(PaletteService), // global palette, for drag/drop instancing typeof(PropertyEditingCommands), // commands for PropertyEditor and GridPropertyEditor typeof(PropertyEditor), typeof(GridPropertyEditor), typeof(WindowLayoutService), // multiple window layout support typeof(WindowLayoutServiceCommands), // window layout commands typeof(HistoryLister), // visual undo/redo typeof(SkinService), typeof(ResourceService) ); TypeCatalog LECoreCatalog = new TypeCatalog( typeof(LevelEditorCore.DesignViewSettings), typeof(LevelEditorCore.ResourceLister), typeof(LevelEditorCore.ThumbnailService), typeof(LevelEditorCore.ResourceMetadataEditor), typeof(LevelEditorCore.LayerLister), typeof(LevelEditorCore.ResourceConverterService), typeof(LevelEditorCore.Commands.PickFilterCommands), typeof(LevelEditorCore.Commands.DesignViewCommands), typeof(LevelEditorCore.Commands.ManipulatorCommands), typeof(LevelEditorCore.Commands.ShowCommands), typeof(LevelEditorCore.Commands.GroupCommands), typeof(LevelEditorCore.Commands.CameraCommands), typeof(LevelEditorCore.MayaStyleCameraController), typeof(LevelEditorCore.ArcBallCameraController), typeof(LevelEditorCore.WalkCameraController), typeof(LevelEditorCore.FlyCameraController) ); TypeCatalog thisAssemCatalog = new TypeCatalog( typeof(LevelEditor.GameLoopService), typeof(LevelEditor.GameEditor), typeof(LevelEditor.BookmarkLister), typeof(LevelEditor.GameDocumentRegistry), typeof(LevelEditor.SchemaLoader), typeof(LevelEditor.PrototypingService), typeof(LevelEditor.PrefabService), typeof(LevelEditor.GameProjectLister), typeof(LevelEditor.ResourceMetadataService), typeof(LevelEditor.ResourceConverter), typeof(LevelEditor.Terrain.TerrainEditor), typeof(LevelEditor.Terrain.TerrainManipulator), typeof(LevelEditor.SnapFilter), typeof(LevelEditor.PickFilters.LocatorPickFilter), typeof(LevelEditor.PickFilters.BasicShapePickFilter), typeof(LevelEditor.PickFilters.NoCubePickFilter), typeof(LevelEditor.Commands.PaletteCommands), typeof(LevelEditor.Commands.LevelEditorFileCommands), typeof(LevelEditor.Commands.HelpAboutCommand), typeof(LevelEditor.Commands.LevelEditorCommands), typeof(LevelEditor.Commands.LayeringCommands), typeof(LevelEditor.Commands.PivotCommands) // To use Open Sound Control (OSC), enable these three components: //, //typeof(LevelEditor.OSC.OscClient), //typeof(OscCommands), // Provides a GUI for configuring OSC support and to diagnose problems. //typeof(OscCommandReceiver) // Executes this app's commands in response to receiving matching OSC messages. // Needs to come after all the other ICommandClients in the catalog. ); TypeCatalog renderingInteropCatalog = new TypeCatalog( typeof(RenderingInterop.GameEngine), typeof(RenderingInterop.NativeGameEditor), typeof(RenderingInterop.ThumbnailResolver), typeof(RenderingInterop.RenderCommands), typeof(RenderingInterop.AssetResolver), typeof(RenderingInterop.NativeDesignView), typeof(RenderingInterop.ResourcePreview), typeof(RenderingInterop.TranslateManipulator), typeof(RenderingInterop.ExtensionManipulator), typeof(RenderingInterop.ScaleManipulator), typeof(RenderingInterop.RotateManipulator), typeof(RenderingInterop.TranslatePivotManipulator), typeof(RenderingInterop.TextureThumbnailResolver) ); List <ComposablePartCatalog> catalogs = new List <ComposablePartCatalog>(); catalogs.Add(AtfCatalog); catalogs.Add(LECoreCatalog); catalogs.Add(renderingInteropCatalog); catalogs.Add(thisAssemCatalog); // temp solution, look for statemachine plugin by name. string pluginDir = Application.StartupPath; string stmPlg = pluginDir + "\\StateMachinePlugin.dll"; if (File.Exists(stmPlg)) { Assembly stmPlgAssem = Assembly.LoadFrom(stmPlg); catalogs.Add(new AssemblyCatalog(stmPlgAssem)); } // load all dlls in \MEFPlugin string mefpluginDir = pluginDir + "\\MEFPlugin"; if (Directory.Exists(mefpluginDir)) { var filepaths = Directory.GetFiles(mefpluginDir).Where(path => path.EndsWith(".dll")); foreach (var filepath in filepaths) { Assembly filepathAssembly = Assembly.LoadFrom(filepath); catalogs.Add(new AssemblyCatalog(filepathAssembly)); } } AggregateCatalog catalog = new AggregateCatalog(catalogs); // Initialize ToolStripContainer container and MainForm ToolStripContainer toolStripContainer = new ToolStripContainer(); toolStripContainer.Dock = DockStyle.Fill; MainForm mainForm = new MainForm(toolStripContainer); mainForm.Text = "LevelEditor".Localize("the name of this application, on the title bar"); CompositionContainer container = new CompositionContainer(catalog); CompositionBatch batch = new CompositionBatch(); AttributedModelServices.AddPart(batch, mainForm); container.Compose(batch); LevelEditorCore.Globals.InitializeComponents(container); // Initialize components var gameEngine = container.GetExportedValue <IGameEngineProxy>(); foreach (IInitializable initializable in container.GetExportedValues <IInitializable>()) { initializable.Initialize(); } GC.KeepAlive(gameEngine); AutoDocumentService autoDocument = container.GetExportedValue <AutoDocumentService>(); autoDocument.AutoLoadDocuments = false; autoDocument.AutoNewDocument = true; mainForm.Shown += delegate { SplashForm.CloseForm(); }; // The settings file is incompatible between languages that LevelEditor and ATF are localized to. // For example, the LayoutService saves different Control names depending on the language and so // the Windows layout saved in one language can't be loaded correctly in another language. string language = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName; //"en" or "ja" if (language == "ja") { var settingsService = container.GetExportedValue <SettingsService>(); string nonEnglishPath = settingsService.SettingsPath; nonEnglishPath = Path.Combine(Path.GetDirectoryName(nonEnglishPath), "AppSettings_" + language + ".xml"); settingsService.SettingsPath = nonEnglishPath; } Application.Run(mainForm); // MAIN LOOP container.Dispose(); GC.KeepAlive(start); }
private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ErrorListWindow)); this.ToolStripContainer = new System.Windows.Forms.ToolStripContainer(); this.ListView = new System.Windows.Forms.ListView(); this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.ToolStrip = new System.Windows.Forms.ToolStrip(); this.Button_Error = new System.Windows.Forms.ToolStripButton(); this.Button_Warnings = new System.Windows.Forms.ToolStripButton(); this.ToolStripContainer.ContentPanel.SuspendLayout(); this.ToolStripContainer.TopToolStripPanel.SuspendLayout(); this.ToolStripContainer.SuspendLayout(); this.ToolStrip.SuspendLayout(); this.SuspendLayout(); // // ToolStripContainer // this.ToolStripContainer.BottomToolStripPanelVisible = false; // // ToolStripContainer.ContentPanel // this.ToolStripContainer.ContentPanel.Controls.Add(this.ListView); resources.ApplyResources(this.ToolStripContainer.ContentPanel, "ToolStripContainer.ContentPanel"); resources.ApplyResources(this.ToolStripContainer, "ToolStripContainer"); this.ToolStripContainer.LeftToolStripPanelVisible = false; this.ToolStripContainer.Name = "ToolStripContainer"; this.ToolStripContainer.RightToolStripPanelVisible = false; // // ToolStripContainer.TopToolStripPanel // this.ToolStripContainer.TopToolStripPanel.Controls.Add(this.ToolStrip); // // ListView // this.ListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader3, this.columnHeader1, this.columnHeader2, this.columnHeader4, this.columnHeader5 }); resources.ApplyResources(this.ListView, "ListView"); this.ListView.FullRowSelect = true; this.ListView.GridLines = true; this.ListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.ListView.HideSelection = false; this.ListView.LargeImageList = this.imageList1; this.ListView.MultiSelect = false; this.ListView.Name = "ListView"; this.ListView.SmallImageList = this.imageList1; this.ListView.UseCompatibleStateImageBehavior = false; this.ListView.View = System.Windows.Forms.View.Details; // // columnHeader3 // resources.ApplyResources(this.columnHeader3, "columnHeader3"); // // columnHeader1 // resources.ApplyResources(this.columnHeader1, "columnHeader1"); // // columnHeader2 // resources.ApplyResources(this.columnHeader2, "columnHeader2"); // // columnHeader4 // resources.ApplyResources(this.columnHeader4, "columnHeader4"); // // columnHeader5 // resources.ApplyResources(this.columnHeader5, "columnHeader5"); // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, "warning.ico"); this.imageList1.Images.SetKeyName(1, "redcross.ico"); // // ToolStrip // resources.ApplyResources(this.ToolStrip, "ToolStrip"); this.ToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.Button_Error, this.Button_Warnings }); this.ToolStrip.Name = "ToolStrip"; // // Button_Error // this.Button_Error.Checked = true; this.Button_Error.CheckOnClick = true; this.Button_Error.CheckState = System.Windows.Forms.CheckState.Checked; resources.ApplyResources(this.Button_Error, "Button_Error"); this.Button_Error.Name = "Button_Error"; this.Button_Error.CheckStateChanged += new System.EventHandler(this.Button_Error_CheckStateChanged); // // Button_Warnings // this.Button_Warnings.Checked = true; this.Button_Warnings.CheckOnClick = true; this.Button_Warnings.CheckState = System.Windows.Forms.CheckState.Checked; resources.ApplyResources(this.Button_Warnings, "Button_Warnings"); this.Button_Warnings.Name = "Button_Warnings"; this.Button_Warnings.CheckStateChanged += new System.EventHandler(this.Button_Warnings_CheckStateChanged); // // ErrorListWindow // resources.ApplyResources(this, "$this"); this.Controls.Add(this.ToolStripContainer); this.Name = "ErrorListWindow"; this.ToolStripContainer.ContentPanel.ResumeLayout(false); this.ToolStripContainer.TopToolStripPanel.ResumeLayout(false); this.ToolStripContainer.TopToolStripPanel.PerformLayout(); this.ToolStripContainer.ResumeLayout(false); this.ToolStripContainer.PerformLayout(); this.ToolStrip.ResumeLayout(false); this.ToolStrip.PerformLayout(); this.ResumeLayout(false); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DifferenceDetailWindow)); this.ToolStripContainer = new System.Windows.Forms.ToolStripContainer(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.StatusLabel_Status = new System.Windows.Forms.ToolStripStatusLabel(); this.SimulatorViewer = new Microsoft.Msagl.GraphViewerGdi.GViewer(); this.ToolStripContainer.BottomToolStripPanel.SuspendLayout(); this.ToolStripContainer.ContentPanel.SuspendLayout(); this.ToolStripContainer.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); // // ToolStripContainer // // // ToolStripContainer.BottomToolStripPanel // this.ToolStripContainer.BottomToolStripPanel.Controls.Add(this.statusStrip1); // // ToolStripContainer.ContentPanel // this.ToolStripContainer.ContentPanel.Controls.Add(this.SimulatorViewer); resources.ApplyResources(this.ToolStripContainer.ContentPanel, "ToolStripContainer.ContentPanel"); resources.ApplyResources(this.ToolStripContainer, "ToolStripContainer"); this.ToolStripContainer.LeftToolStripPanelVisible = false; this.ToolStripContainer.Name = "ToolStripContainer"; this.ToolStripContainer.RightToolStripPanelVisible = false; // // statusStrip1 // resources.ApplyResources(this.statusStrip1, "statusStrip1"); this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.StatusLabel_Status }); this.statusStrip1.Name = "statusStrip1"; // // StatusLabel_Status // this.StatusLabel_Status.Name = "StatusLabel_Status"; resources.ApplyResources(this.StatusLabel_Status, "StatusLabel_Status"); // // SimulatorViewer // this.SimulatorViewer.AsyncLayout = false; resources.ApplyResources(this.SimulatorViewer, "SimulatorViewer"); this.SimulatorViewer.BackwardEnabled = true; this.SimulatorViewer.BuildHitTree = true; this.SimulatorViewer.ForwardEnabled = true; this.SimulatorViewer.Graph = null; this.SimulatorViewer.LayoutAlgorithmSettingsButtonVisible = true; this.SimulatorViewer.MouseHitDistance = 0.05; this.SimulatorViewer.Name = "SimulatorViewer"; this.SimulatorViewer.NavigationVisible = true; this.SimulatorViewer.NeedToCalculateLayout = true; this.SimulatorViewer.PanButtonPressed = false; this.SimulatorViewer.SaveAsImageEnabled = true; this.SimulatorViewer.SaveAsMsaglEnabled = true; this.SimulatorViewer.SaveButtonVisible = true; this.SimulatorViewer.SaveGraphButtonVisible = true; this.SimulatorViewer.SaveInVectorFormatEnabled = true; this.SimulatorViewer.ToolBarIsVisible = true; this.SimulatorViewer.ZoomF = 1; this.SimulatorViewer.ZoomFraction = 0.5; this.SimulatorViewer.ZoomWindowThreshold = 0.05; // // DifferenceDetailWindow // resources.ApplyResources(this, "$this"); this.Controls.Add(this.ToolStripContainer); this.Name = "DifferenceDetailWindow"; this.ShowIcon = false; this.ToolStripContainer.BottomToolStripPanel.ResumeLayout(false); this.ToolStripContainer.BottomToolStripPanel.PerformLayout(); this.ToolStripContainer.ContentPanel.ResumeLayout(false); this.ToolStripContainer.ResumeLayout(false); this.ToolStripContainer.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.ResumeLayout(false); }
public static void SecureAndTranslate(Int64 ModuleID, User UserID, System.Windows.Forms.Control.ControlCollection controlCollection, ref ResourceManager RM, bool debug, SecureAndTranslateMode Mode) { foreach (Control C in controlCollection) { bool IsActive = false; bool IsVisible = false; bool SetLabel = false; if (C.Name != null && C.Name.Length > 0) { IsActive = UserID.IsControlEnabledForUser(C.FindForm().Name + C.Name); IsVisible = UserID.IsControlVisibleForUser(C.FindForm().Name + C.Name); } else { IsActive = true; IsVisible = true; } if ((Mode & SecureAndTranslateMode.Secure) != 0) { C.Visible = IsVisible; C.Enabled = IsActive; } switch (C.GetType().ToString()) { case "System.Windows.Forms.Label": SetLabel = true; break; case "System.Windows.Forms.Button": SetLabel = true; break; case "System.Windows.Forms.MenuStrip": MenuStrip Menu = (MenuStrip)C; ValidateMenuStrip(ModuleID, UserID, Menu.Items, C.FindForm().Name, ref RM, debug, Mode); break; case "System.Windows.Forms.TextBox": if ((Mode & SecureAndTranslateMode.Secure) != 0) { TextBox Edit = (TextBox)C; Edit.ReadOnly = !IsActive; } break; case "System.Windows.Forms.FlowLayoutPanel": FlowLayoutPanel FP = (FlowLayoutPanel)C; SecureAndTranslate(ModuleID, UserID, FP.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.GroupBox": SetLabel = true; GroupBox group = (GroupBox)C; SecureAndTranslate(ModuleID, UserID, group.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.CheckedListBox": break; case "System.Windows.Forms.CheckBox": SetLabel = true; break; case "System.Windows.Forms.ToolStrip": ToolStrip Tool = (ToolStrip)C; ValidateMenuStrip(ModuleID, UserID, Tool.Items, C.FindForm().Name, ref RM, debug, Mode); break; case "System.Windows.Forms.StatusStrip": StatusStrip Status = (StatusStrip)C; ValidateMenuStrip(ModuleID, UserID, Status.Items, C.FindForm().Name, ref RM, debug, Mode); break; case "System.Windows.Forms.ToolStripPanel": ContainerControl mycontainer = (ContainerControl)C; SecureAndTranslate(ModuleID, UserID, mycontainer.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.TabPage": SetLabel = true; Panel mytabpage = (Panel)C; SecureAndTranslate(ModuleID, UserID, mytabpage.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.Panel": case "System.Windows.Forms.SplitterPanel": case "System.Windows.Forms.ToolStripContentPanel": Panel myPanel = (Panel)C; SecureAndTranslate(ModuleID, UserID, myPanel.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.ToolStripContainer": ToolStripContainer tscontainer = (ToolStripContainer)C; SecureAndTranslate(ModuleID, UserID, tscontainer.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.SplitContainer": SplitContainer mySplit = (SplitContainer)C; SecureAndTranslate(ModuleID, UserID, mySplit.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.TabControl": TabControl tabControl = (TabControl)C; SecureAndTranslate(ModuleID, UserID, tabControl.Controls, ref RM, debug, Mode); break; case "System.Windows.Forms.ListView": ListView liste = (ListView)C; foreach (ColumnHeader Col in liste.Columns) { string sublabel = GetLabel(ref RM, C.FindForm().Name + "." + C.Name + "." + Col.Name, debug); if (((Mode & SecureAndTranslateMode.Transalte) != 0) && sublabel != null && sublabel != string.Empty && sublabel.Length > 0) { Col.Text = sublabel; } if ((Mode & SecureAndTranslateMode.Secure) != 0) { } } break; case "SynapseAdvancedControls.ObjectListView": ObjectListView oliste = (ObjectListView)C; oliste.MenuLabelColumns = GetLabel(ref RM, "ObjectListView.MenuLabelColumns", debug); oliste.MenuLabelGroupBy = GetLabel(ref RM, "ObjectListView.MenuLabelColumns", debug); oliste.MenuLabelLockGroupingOn = GetLabel(ref RM, "ObjectListView.MenuLabelLockGroupingOn", debug); oliste.MenuLabelSelectColumns = GetLabel(ref RM, "ObjectListView.MenuLabelSelectColumns", debug); oliste.MenuLabelSortAscending = GetLabel(ref RM, "ObjectListView.MenuLabelSortAscending", debug); oliste.MenuLabelSortDescending = GetLabel(ref RM, "ObjectListView.MenuLabelSortDescending", debug); oliste.MenuLabelTurnOffGroups = GetLabel(ref RM, "ObjectListView.MenuLabelTurnOffGroups", debug); oliste.MenuLabelUnlockGroupingOn = GetLabel(ref RM, "ObjectListView.MenuLabelUnlockGroupingOn", debug); oliste.MenuLabelUnsort = GetLabel(ref RM, "ObjectListView.MenuLabelUnsort", debug); foreach (OLVColumn Col in oliste.AllColumns) { string sublabel = GetLabel(ref RM, C.FindForm().Name + "." + C.Name + "." + Col.Text.Replace(' ', '_').ToUpper(), debug); if ((Mode & SecureAndTranslateMode.Secure) != 0) { bool CIsActive = UserID.IsControlEnabledForUser(C.FindForm().Name + C.Name + "." + Col.Text.Replace(' ', '_').ToUpper()); bool CIsVisible = UserID.IsControlVisibleForUser(C.FindForm().Name + C.Name + "." + Col.Text.Replace(' ', '_').ToUpper()); Col.IsVisible = CIsVisible; Col.IsEditable = CIsActive; } if (((Mode & SecureAndTranslateMode.Transalte) != 0) && sublabel != null && sublabel != string.Empty && sublabel.Length > 0) { Col.Text = sublabel; } } oliste.RebuildColumns(); break; case "SynapseCore.Controls.SynapseGraphic": SynapseGraphic graph = (SynapseGraphic)C; graph.CopyMenu = GetLabel(ref RM, "SynapseGraphic.CopyMenu", debug); graph.CurveOnlyMenu = GetLabel(ref RM, "SynapseGraphic.CurveOnlyMenu", debug); graph.CurvesMenu = GetLabel(ref RM, "SynapseGraphic.CurvesMenu", debug); graph.PageSetupMenu = GetLabel(ref RM, "SynapseGraphic.PageSetupMenu", debug); graph.PrintMenu = GetLabel(ref RM, "SynapseGraphic.PrintMenu", debug); graph.SaveAsMenu = GetLabel(ref RM, "SynapseGraphic.SaveAsMenu", debug); graph.SetDefaultScaleMenu = GetLabel(ref RM, "SynapseGraphic.SetDefaultScaleMenu", debug); graph.ShowAllCurvesMenu = GetLabel(ref RM, "SynapseGraphic.ShowAllCurvesMenu", debug); graph.ShowHideCurveMenu = GetLabel(ref RM, "SynapseGraphic.ShowHideCurveMenu", debug); graph.ShowHideLegendMenu = GetLabel(ref RM, "SynapseGraphic.ShowHideLegendMenu", debug); graph.ShowPointValuesMenu = GetLabel(ref RM, "SynapseGraphic.ShowPointValuesMenu", debug); graph.UndoAllZoomMenu = GetLabel(ref RM, "SynapseGraphic.UndoAllZoomMenu", debug); graph.UnZoomMenu = GetLabel(ref RM, "SynapseGraphic.UnZoomMenu", debug); break; default: if (C is UserControl) { if ((Mode & SecureAndTranslateMode.Secure) != 0) { C.Enabled = IsActive; C.Visible = IsVisible; } } break; } if (((Mode & SecureAndTranslateMode.Transalte) != 0) && SetLabel) { string label = GetLabel(ref RM, C.FindForm().Name + "." + C.Name, debug); if (label != null && label != string.Empty && label.Length > 0) { C.Text = label; } } if (C.ContextMenuStrip != null) { ValidateMenuStrip(ModuleID, UserID, C.ContextMenuStrip.Items, C.FindForm().Name, ref RM, debug, Mode); } if (debug) { System.Windows.Forms.ToolTip ToolTip = new System.Windows.Forms.ToolTip(); ToolTip.ToolTipTitle = "Synapse Security"; ToolTip.UseFading = true; ToolTip.UseAnimation = true; ToolTip.IsBalloon = true; ToolTip.ShowAlways = true; ToolTip.AutoPopDelay = 5000; ToolTip.InitialDelay = 500; ToolTip.ReshowDelay = 100; ToolTip.SetToolTip(C, C.FindForm().Name + "\n" + C.Name + "\n" + GetControlGroups(ModuleID, C.FindForm().Name, C.Name)); } } }