private void SaveButton_Click(object sender, EventArgs e) { try { Controls.MapControl p = new Controls.MapControl(); p.Description.Text = DeviceBox.Text; Tb.Controls.Add(p); this.Close(); } catch (Exception) { throw; } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.panel4 = new System.Windows.Forms.Panel(); this.nodeListControl1 = new URCT.App.Views.Controls.NodeListControl(); this.panel3 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.btnAddConnector = new System.Windows.Forms.Button(); this.btnAddNewNode = new System.Windows.Forms.Button(); this.mapControl1 = new URCT.App.Views.Controls.MapControl(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addNodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.selectedNodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.entireMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.panel4.SuspendLayout(); this.panel3.SuspendLayout(); this.panel2.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // splitContainer1 // this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Location = new System.Drawing.Point(0, 0); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 // this.splitContainer1.Panel1.AllowDrop = true; this.splitContainer1.Panel1.Controls.Add(this.panel4); this.splitContainer1.Panel1.Controls.Add(this.panel3); this.splitContainer1.Panel1.Controls.Add(this.panel2); // // splitContainer1.Panel2 // this.splitContainer1.Panel2.AllowDrop = true; this.splitContainer1.Panel2.Controls.Add(this.mapControl1); this.splitContainer1.Size = new System.Drawing.Size(1208, 571); this.splitContainer1.SplitterDistance = 206; this.splitContainer1.TabIndex = 0; // // panel4 // this.panel4.Controls.Add(this.nodeListControl1); this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; this.panel4.Location = new System.Drawing.Point(0, 28); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(202, 461); this.panel4.TabIndex = 1; // // nodeListControl1 // this.nodeListControl1.AutoSize = true; this.nodeListControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.nodeListControl1.IsMouseDown = false; this.nodeListControl1.Location = new System.Drawing.Point(0, 0); this.nodeListControl1.Name = "nodeListControl1"; this.nodeListControl1.Size = new System.Drawing.Size(202, 461); this.nodeListControl1.TabIndex = 0; this.nodeListControl1.Edit += new System.EventHandler<URCT.App.Views.NodeEventArgs>(this.nodeListControl1_Edit); this.nodeListControl1.Delete += new System.EventHandler<URCT.App.Views.NodeEventArgs>(this.nodeListControl1_Delete); this.nodeListControl1.AddNew += new System.EventHandler(this.nodeListControl1_AddNew); // // panel3 // this.panel3.Controls.Add(this.label1); this.panel3.Dock = System.Windows.Forms.DockStyle.Top; this.panel3.Location = new System.Drawing.Point(0, 0); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(202, 28); this.panel3.TabIndex = 0; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(11, 7); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(169, 17); this.label1.TabIndex = 0; this.label1.Text = "Available Network Nodes:"; // // panel2 // this.panel2.Controls.Add(this.btnAddConnector); this.panel2.Controls.Add(this.btnAddNewNode); this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel2.Location = new System.Drawing.Point(0, 489); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(202, 78); this.panel2.TabIndex = 0; // // btnAddConnector // this.btnAddConnector.Image = global::URCT.App.Properties.Resources.connector; this.btnAddConnector.Location = new System.Drawing.Point(106, 10); this.btnAddConnector.Name = "btnAddConnector"; this.btnAddConnector.Size = new System.Drawing.Size(74, 61); this.btnAddConnector.TabIndex = 3; this.btnAddConnector.UseVisualStyleBackColor = true; this.btnAddConnector.Click += new System.EventHandler(this.btnAddConnector_Click); // // btnAddNewNode // this.btnAddNewNode.Image = global::URCT.App.Properties.Resources.router; this.btnAddNewNode.Location = new System.Drawing.Point(14, 10); this.btnAddNewNode.Name = "btnAddNewNode"; this.btnAddNewNode.Size = new System.Drawing.Size(86, 61); this.btnAddNewNode.TabIndex = 1; this.btnAddNewNode.UseVisualStyleBackColor = true; this.btnAddNewNode.Click += new System.EventHandler(this.OnAddNewNodeClick); // // mapControl1 // this.mapControl1.AllowDrop = true; this.mapControl1.AutoScroll = true; this.mapControl1.AutoSize = true; this.mapControl1.BackColor = System.Drawing.SystemColors.Window; this.mapControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.mapControl1.Location = new System.Drawing.Point(0, 0); this.mapControl1.Name = "mapControl1"; this.mapControl1.Size = new System.Drawing.Size(994, 567); this.mapControl1.TabIndex = 0; this.mapControl1.NodeAddedToMap += new System.EventHandler<URCT.App.Views.MapNodeEventArgs>(this.OnNodeAddedToMap); this.mapControl1.NodeMoved += new System.EventHandler<URCT.App.Views.MapNodeEventArgs>(this.OnNodeMoved); this.mapControl1.NodeRemoved += new System.EventHandler<URCT.App.Views.NodeEventArgs>(this.OnNodeRemoved); this.mapControl1.EditNode += new System.EventHandler<URCT.App.Views.NodeEventArgs>(this.OnEditNode); this.mapControl1.ConnectionAdded += new System.EventHandler<URCT.App.Views.NodeConnectionEventArgs>(this.OnConnectionAdded); this.mapControl1.ConnectionRemoved += new System.EventHandler<URCT.App.Views.NodeConnectionEventArgs>(this.OnConnectionRemoved); this.mapControl1.GenerateNodeConfig += new System.EventHandler<URCT.App.Views.NodeEventArgs>(this.OnGenerateNodeConfig); // // menuStrip1 // this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItem1, this.fileToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.MdiWindowListItem = this.fileToolStripMenuItem; this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1208, 28); this.menuStrip1.TabIndex = 1; this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Visible = false; // // toolStripMenuItem1 // this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.saveToolStripMenuItem1, this.saveAsToolStripMenuItem, this.toolStripSeparator1, this.closeToolStripMenuItem}); this.toolStripMenuItem1.MergeAction = System.Windows.Forms.MergeAction.Replace; this.toolStripMenuItem1.MergeIndex = 0; this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(44, 24); this.toolStripMenuItem1.Text = "File"; // // saveToolStripMenuItem1 // this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; this.saveToolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); this.saveToolStripMenuItem1.Size = new System.Drawing.Size(219, 24); this.saveToolStripMenuItem1.Text = "Save"; this.saveToolStripMenuItem1.Click += new System.EventHandler(this.OnSaveClick); // // saveAsToolStripMenuItem // this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.S))); this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(219, 24); this.saveAsToolStripMenuItem.Text = "Save As"; this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.OnSaveAsClick); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(216, 6); // // closeToolStripMenuItem // this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); this.closeToolStripMenuItem.Size = new System.Drawing.Size(219, 24); this.closeToolStripMenuItem.Text = "Close"; this.closeToolStripMenuItem.Click += new System.EventHandler(this.OnCloseClick); // // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addNodeToolStripMenuItem, this.saveToolStripMenuItem}); this.fileToolStripMenuItem.MergeAction = System.Windows.Forms.MergeAction.Insert; this.fileToolStripMenuItem.MergeIndex = 1; this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(111, 24); this.fileToolStripMenuItem.Text = "Network Map"; // // addNodeToolStripMenuItem // this.addNodeToolStripMenuItem.Name = "addNodeToolStripMenuItem"; this.addNodeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); this.addNodeToolStripMenuItem.Size = new System.Drawing.Size(199, 24); this.addNodeToolStripMenuItem.Text = "Add Node"; this.addNodeToolStripMenuItem.Click += new System.EventHandler(this.OnAddNewNodeClick); // // saveToolStripMenuItem // this.saveToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.selectedNodesToolStripMenuItem, this.entireMapToolStripMenuItem}); this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.Size = new System.Drawing.Size(199, 24); this.saveToolStripMenuItem.Text = "Generate Config"; // // selectedNodesToolStripMenuItem // this.selectedNodesToolStripMenuItem.Name = "selectedNodesToolStripMenuItem"; this.selectedNodesToolStripMenuItem.ShortcutKeyDisplayString = ""; this.selectedNodesToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); this.selectedNodesToolStripMenuItem.Size = new System.Drawing.Size(241, 24); this.selectedNodesToolStripMenuItem.Text = "Selected Nodes"; this.selectedNodesToolStripMenuItem.Click += new System.EventHandler(this.OnGenerateConfigForSelected); // // entireMapToolStripMenuItem // this.entireMapToolStripMenuItem.Name = "entireMapToolStripMenuItem"; this.entireMapToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.C))); this.entireMapToolStripMenuItem.Size = new System.Drawing.Size(241, 24); this.entireMapToolStripMenuItem.Text = "Entire Map"; this.entireMapToolStripMenuItem.Click += new System.EventHandler(this.OnGenerateConfigForMap); // // saveFileDialog1 // this.saveFileDialog1.DefaultExt = global::URCT.App.Properties.Settings.Default.MapFileExtension; this.saveFileDialog1.InitialDirectory = global::URCT.App.Properties.Settings.Default.DefaultNetworkMapDirectory; this.saveFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.OnSaveAsSelectedFile); // // NetworkForm // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; this.ClientSize = new System.Drawing.Size(1208, 571); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.menuStrip1); this.KeyPreview = true; this.MainMenuStrip = this.menuStrip1; this.Name = "NetworkForm"; this.ShowInTaskbar = false; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.NetworkForm_FormClosing); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnKeyDown); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.panel4.ResumeLayout(false); this.panel4.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); this.panel2.ResumeLayout(false); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }