def __init__(self):
        self.components = ComponentModel.Container()
        #resources = ComponentModel.ComponentResourceManager(typeof(Form1))
        #listViewItem1 = Forms.ListViewItem(Array[string](["Source","U1","A1","DQ0","True"]), -1, Drawing.Color.OrangeRed, Drawing.Color.Empty, None)
        self.toolStrip1 = Forms.ToolStrip()
        self.toolStripButton1 = Forms.ToolStripButton()
        self.toolStripButton2 = Forms.ToolStripButton()
        self.toolStripButton3 = Forms.ToolStripButton()
        self.toolStripSeparator1 = Forms.ToolStripSeparator()
        self.toolStripLabel1 = Forms.ToolStripLabel()
        self.toolStripComboBox1 = Forms.ToolStripComboBox()

        self.listView1 = Forms.ListView()
        self.columnHeader1 = ((Forms.ColumnHeader()))
        self.columnHeader2 = ((Forms.ColumnHeader()))
        self.columnHeader3 = ((Forms.ColumnHeader()))
        self.columnHeader4 = ((Forms.ColumnHeader()))
        self.columnHeader5 = ((Forms.ColumnHeader()))
        self.button1 = Forms.Button()
        self.toolStripLabel1 = Forms.ToolStripLabel()
        self.checkBox1 = Forms.CheckBox()
        self.checkBox2 = Forms.CheckBox()
        self.toolTip1 = Forms.ToolTip(self.components)
        self.contextMenuStrip1 = Forms.ContextMenuStrip(self.components)
        self.sourceToolStripMenuItem = Forms.ToolStripMenuItem()
        self.sinkToolStripMenuItem = Forms.ToolStripMenuItem()
        self.floatToolStripMenuItem = Forms.ToolStripMenuItem()
        self.toolStrip1.SuspendLayout()
        self.contextMenuStrip1.SuspendLayout()
        self.SuspendLayout()
        # toolStrip1
        self.toolStrip1.ImageScalingSize = Drawing.Size(20, 20)
        self.toolStrip1.Items.Add(self.toolStripButton1)
        self.toolStrip1.Items.Add(self.toolStripButton2)
        self.toolStrip1.Items.Add(self.toolStripButton3)
        self.toolStrip1.Items.Add(self.toolStripSeparator1)
        self.toolStrip1.Items.Add(self.toolStripLabel1)
        self.toolStrip1.Items.Add(self.toolStripComboBox1)
        #self.toolStrip1.SelectedIndex = 0
        self.toolStrip1.Location = Drawing.Point(10, 10)
        self.toolStrip1.Name = "toolStrip1"
        self.toolStrip1.Size = Drawing.Size(815, 26)
        self.toolStrip1.TabIndex = 0
        self.toolStrip1.Text = "toolStrip1"
        # toolStripButton1
        self.toolStripButton1.DisplayStyle = Forms.ToolStripItemDisplayStyle.Text
        self.toolStripButton1.ForeColor = Drawing.Color.OrangeRed

        self.toolStripButton1.ImageTransparentColor = Drawing.Color.Magenta
        self.toolStripButton1.Name = "toolStripButton1"
        self.toolStripButton1.Size = Drawing.Size(61, 23)
        self.toolStripButton1.Text = "Source"
        self.toolStripButton1.Click += self.toolStripButton1_Click
        # toolStripButton2
        self.toolStripButton2.DisplayStyle = Forms.ToolStripItemDisplayStyle.Text
        self.toolStripButton2.ForeColor = Drawing.Color.SeaGreen

        self.toolStripButton2.ImageTransparentColor = Drawing.Color.Magenta
        self.toolStripButton2.Name = "toolStripButton2"
        self.toolStripButton2.Size = Drawing.Size(43, 23)
        self.toolStripButton2.Text = "Sink"
        self.toolStripButton2.Click += self.toolStripButton2_Click
        # toolStripButton3
        self.toolStripButton3.DisplayStyle = Forms.ToolStripItemDisplayStyle.Text
        self.toolStripButton3.ForeColor = Drawing.Color.DodgerBlue

        self.toolStripButton3.ImageTransparentColor = Drawing.Color.Magenta
        self.toolStripButton3.Name = "toolStripButton3"
        self.toolStripButton3.Size = Drawing.Size(47, 23)
        self.toolStripButton3.Text = "Float"
        self.toolStripButton3.Click += self.toolStripButton3_Click
        # toolStripSeparator1
        self.toolStripSeparator1.Name = "toolStripSeparator1"
        self.toolStripSeparator1.Size = Drawing.Size(6, 26)

        # toolStripLabel1
        self.toolStripLabel1.Name = "toolStripLabel1"
        self.toolStripLabel1.Size = Drawing.Size(104, 24)
        self.toolStripLabel1.Text = "Naming Rule:"
        # toolStripComboBox1
        self.toolStripComboBox1.Items.Add("net_comp_pin")
        self.toolStripComboBox1.Items.Add("net_pin_comp")
        self.toolStripComboBox1.Items.Add("comp_pin_net")
        self.toolStripComboBox1.Items.Add("comp_net_pin")
        self.toolStripComboBox1.Items.Add("pin_net_comp")
        self.toolStripComboBox1.Items.Add("pin_comp_net")
        self.toolStripComboBox1.SelectedIndex = 0
        self.toolStripComboBox1.Name = "toolStripComboBox1"
        self.toolStripComboBox1.Size = Drawing.Size(200, 27)

        # listView1
        self.listView1.Anchor = (((
            ((Forms.AnchorStyles.Top | Forms.AnchorStyles.Bottom)
             | Forms.AnchorStyles.Left) | Forms.AnchorStyles.Right)))
        self.listView1.BorderStyle = Forms.BorderStyle.FixedSingle
        self.listView1.Columns.Add(self.columnHeader1)
        self.listView1.Columns.Add(self.columnHeader2)
        self.listView1.Columns.Add(self.columnHeader3)
        self.listView1.Columns.Add(self.columnHeader4)
        self.listView1.Columns.Add(self.columnHeader5)
        #self.listView1.Columns.SelectedIndex = 0
        self.listView1.ContextMenuStrip = self.contextMenuStrip1
        self.listView1.FullRowSelect = True
        self.listView1.GridLines = True
        self.listView1.HideSelection = False
        #self.listView1.Items.Add(listViewItem1)
        #self.listView1.SelectedIndex = 0
        self.listView1.Location = Drawing.Point(10, 41)
        self.listView1.Name = "listView1"
        self.listView1.Size = Drawing.Size(815, 453)
        self.listView1.TabIndex = 1
        self.listView1.UseCompatibleStateImageBehavior = False
        self.listView1.View = Forms.View.Details
        self.listView1.ColumnClick += self.listView1_ColumnClick
        self.listView1.ItemSelectionChanged += self.listView1_ItemSelectionChanged
        # columnHeader1
        self.columnHeader1.Text = "Type"
        self.columnHeader1.Width = 126
        # columnHeader2
        self.columnHeader2.Text = "Component"
        self.columnHeader2.Width = 154
        # columnHeader3
        self.columnHeader3.Text = "Pin"
        self.columnHeader3.Width = 83
        # columnHeader4
        self.columnHeader4.Text = "Net"
        self.columnHeader4.Width = 286
        # columnHeader5
        self.columnHeader5.Text = "Both Source/Sink "
        self.columnHeader5.Width = 127
        # button1
        self.button1.Anchor = (((Forms.AnchorStyles.Bottom
                                 | Forms.AnchorStyles.Right)))
        self.button1.BackColor = Drawing.Color.DodgerBlue
        self.button1.Font = Drawing.Font("Microsoft Sans Serif", 12,
                                         Drawing.FontStyle.Bold,
                                         Drawing.GraphicsUnit.Point)
        self.button1.ForeColor = Drawing.SystemColors.ButtonHighlight
        self.button1.Location = Drawing.Point(715, 500)
        self.button1.Name = "button1"
        self.button1.Size = Drawing.Size(110, 41)
        self.button1.TabIndex = 2
        self.button1.Text = "Export"
        self.button1.UseVisualStyleBackColor = False
        self.button1.Click += self.button1_Click_1
        # toolStripLabel1
        self.toolStripLabel1.Name = "toolStripLabel1"
        self.toolStripLabel1.Size = Drawing.Size(0, 23)
        # checkBox1
        self.checkBox1.Anchor = (((Forms.AnchorStyles.Bottom
                                   | Forms.AnchorStyles.Left)))
        self.checkBox1.AutoSize = True
        self.checkBox1.Font = Drawing.Font("Microsoft Sans Serif", 10.2,
                                           Drawing.FontStyle.Regular,
                                           Drawing.GraphicsUnit.Point)
        self.checkBox1.Location = Drawing.Point(13, 511)
        self.checkBox1.Name = "checkBox1"
        self.checkBox1.Size = Drawing.Size(136, 24)
        self.checkBox1.TabIndex = 3
        self.checkBox1.Text = "Merge Source"
        self.checkBox1.UseVisualStyleBackColor = True
        # checkBox2
        self.checkBox2.Anchor = (((Forms.AnchorStyles.Bottom
                                   | Forms.AnchorStyles.Left)))
        self.checkBox2.AutoSize = True
        self.checkBox2.Checked = True
        self.checkBox2.CheckState = Forms.CheckState.Checked
        self.checkBox2.Font = Drawing.Font("Microsoft Sans Serif", 10.2,
                                           Drawing.FontStyle.Regular,
                                           Drawing.GraphicsUnit.Point)
        self.checkBox2.Location = Drawing.Point(155, 511)
        self.checkBox2.Name = "checkBox2"
        self.checkBox2.Size = Drawing.Size(115, 24)
        self.checkBox2.TabIndex = 4
        self.checkBox2.Text = "Merge Sink"
        self.checkBox2.UseVisualStyleBackColor = True
        # contextMenuStrip1
        self.contextMenuStrip1.ImageScalingSize = Drawing.Size(20, 20)
        self.contextMenuStrip1.Items.Add(self.sourceToolStripMenuItem)
        self.contextMenuStrip1.Items.Add(self.sinkToolStripMenuItem)
        self.contextMenuStrip1.Items.Add(self.floatToolStripMenuItem)
        #self.contextMenuStrip1.SelectedIndex = 0
        self.contextMenuStrip1.Name = "contextMenuStrip1"
        self.contextMenuStrip1.Size = Drawing.Size(127, 76)
        # sourceToolStripMenuItem
        self.sourceToolStripMenuItem.Name = "sourceToolStripMenuItem"
        self.sourceToolStripMenuItem.Size = Drawing.Size(126, 24)
        self.sourceToolStripMenuItem.Text = "Source"
        self.sourceToolStripMenuItem.Click += self.sourceToolStripMenuItem_Click
        # sinkToolStripMenuItem
        self.sinkToolStripMenuItem.Name = "sinkToolStripMenuItem"
        self.sinkToolStripMenuItem.Size = Drawing.Size(126, 24)
        self.sinkToolStripMenuItem.Text = "Sink"
        self.sinkToolStripMenuItem.Click += self.sinkToolStripMenuItem_Click
        # floatToolStripMenuItem
        self.floatToolStripMenuItem.Name = "floatToolStripMenuItem"
        self.floatToolStripMenuItem.Size = Drawing.Size(126, 24)
        self.floatToolStripMenuItem.Text = "Float"
        self.floatToolStripMenuItem.Click += self.floatToolStripMenuItem_Click
        # Form1
        self.AutoScaleDimensions = Drawing.SizeF(8, 16)
        self.AutoScaleMode = Forms.AutoScaleMode.Font
        self.BackColor = Drawing.Color.Azure
        self.ClientSize = Drawing.Size(835, 554)
        self.Controls.Add(self.checkBox2)
        self.Controls.Add(self.checkBox1)
        self.Controls.Add(self.button1)
        self.Controls.Add(self.listView1)
        self.Controls.Add(self.toolStrip1)
        self.Name = "Form1"
        self.Padding = Forms.Padding(10)
        self.Text = "Q3D Terminal Assignment"
        self.Load += self.Form1_Load
        self.toolStrip1.ResumeLayout(False)
        self.toolStrip1.PerformLayout()
        self.contextMenuStrip1.ResumeLayout(False)
        self.ResumeLayout(False)
        self.PerformLayout()
Example #2
0
 def __init__(self, links):
     self.tableLayoutOverall = swf.TableLayoutPanel()
     self.labelLink = swf.Label()
     self.comboBoxLink = swf.ComboBox()
     self.flowLayoutPanelButtons = swf.FlowLayoutPanel()
     self.buttonSelect = swf.Button()
     self.buttonCancel = swf.Button()
     self.tableLayoutOverall.SuspendLayout()
     self.flowLayoutPanelButtons.SuspendLayout()
     self.SuspendLayout()
     # labelLink
     self.labelLink.Anchor = swf.AnchorStyles.Right
     self.labelLink.AutoSize = True
     self.labelLink.Location = sd.Point(25, 18)
     self.labelLink.Name = "labelLink"
     self.labelLink.Size = sd.Size(27, 13)
     self.labelLink.TabIndex = 0
     self.labelLink.Text = "Link"
     # comboBoxLink
     self.comboBoxLink.Anchor = swf.AnchorStyles.Left | swf.AnchorStyles.Right
     self.comboBoxLink.FormattingEnabled = True
     self.comboBoxLink.Location = sd.Point(58, 14)
     self.comboBoxLink.Name = "comboBoxLink"
     self.comboBoxLink.Size = sd.Size(258, 21)
     self.comboBoxLink.TabIndex = 1
     # buttonSelect
     self.buttonSelect.DialogResult = swf.DialogResult.OK
     self.buttonSelect.Location = sd.Point(149, 3)
     self.buttonSelect.Name = "buttonSelect"
     self.buttonSelect.Size = sd.Size(75, 23)
     self.buttonSelect.TabIndex = 0
     self.buttonSelect.Text = "Select"
     self.buttonSelect.UseVisualStyleBackColor = True
     # buttonCancel
     self.buttonCancel.Anchor = swf.AnchorStyles.None
     self.buttonCancel.DialogResult = swf.DialogResult.Cancel
     self.buttonCancel.Location = sd.Point(230, 3)
     self.buttonCancel.Name = "buttonCancel"
     self.buttonCancel.Size = sd.Size(75, 23)
     self.buttonCancel.TabIndex = 1
     self.buttonCancel.Text = "Cancel"
     self.buttonCancel.UseVisualStyleBackColor = True
     # flowLayoutPanelButtons
     self.flowLayoutPanelButtons.BackColor = sd.SystemColors.Control
     self.tableLayoutOverall.SetColumnSpan(self.flowLayoutPanelButtons, 2)
     self.flowLayoutPanelButtons.Controls.Add(self.buttonCancel)
     self.flowLayoutPanelButtons.Controls.Add(self.buttonSelect)
     self.flowLayoutPanelButtons.Dock = swf.DockStyle.Fill
     self.flowLayoutPanelButtons.FlowDirection = swf.FlowDirection.RightToLeft
     self.flowLayoutPanelButtons.Location = sd.Point(8, 48)
     self.flowLayoutPanelButtons.Name = "flowLayoutPanelButtons"
     self.flowLayoutPanelButtons.Size = sd.Size(308, 35)
     self.flowLayoutPanelButtons.TabIndex = 2
     # tableLayoutOverall
     self.tableLayoutOverall.ColumnCount = 2
     self.tableLayoutOverall.ColumnStyles.Add(
         swf.ColumnStyle(swf.SizeType.Absolute, 50))
     self.tableLayoutOverall.ColumnStyles.Add(swf.ColumnStyle())
     self.tableLayoutOverall.Controls.Add(self.labelLink, 0, 0)
     self.tableLayoutOverall.Controls.Add(self.comboBoxLink, 1, 0)
     self.tableLayoutOverall.Controls.Add(self.flowLayoutPanelButtons, 0, 1)
     self.tableLayoutOverall.Dock = swf.DockStyle.Fill
     self.tableLayoutOverall.Location = sd.Point(0, 0)
     self.tableLayoutOverall.Name = "tableLayoutOverall"
     self.tableLayoutOverall.Padding = swf.Padding(5)
     self.tableLayoutOverall.RowCount = 2
     self.tableLayoutOverall.RowStyles.Add(
         swf.RowStyle(swf.SizeType.Percent, 50))
     self.tableLayoutOverall.RowStyles.Add(
         swf.RowStyle(swf.SizeType.Percent, 50))
     self.tableLayoutOverall.Size = sd.Size(324, 91)
     self.tableLayoutOverall.TabIndex = 0
     # RoomSpaceCopyForm
     self.AcceptButton = self.buttonSelect
     self.AutoScaleDimensions = sd.SizeF(6, 13)
     self.AutoScaleMode = swf.AutoScaleMode.Font
     self.CancelButton = self.buttonCancel
     self.ClientSize = sd.Size(324, 91)
     self.Controls.Add(self.tableLayoutOverall)
     self.MaximizeBox = False
     self.MinimizeBox = False
     self.MinimumSize = sd.Size(340, 130)
     self.Name = "RoomSpaceCopyForm"
     self.Text = "RoomSpaceCopyForm"
     self.tableLayoutOverall.ResumeLayout(False)
     self.tableLayoutOverall.PerformLayout()
     self.flowLayoutPanelButtons.ResumeLayout(False)
     self.ResumeLayout(False)
     # Populate comboBox and preselec first item
     for link_title in links.keys():
         self.comboBoxLink.Items.Add(link_title)
     self.comboBoxLink.SelectedIndex = 0
    def __init__(self):
        self.label1 = Forms.Label()
        self.label2 = Forms.Label()
        self.listBox_selection = Forms.ListBox()
        self.comboBox_layer = Forms.ComboBox()
        self.textBox_net = Forms.TextBox()
        self.label3 = Forms.Label()
        self.textBox_linewidth = Forms.TextBox()
        self.button_change = Forms.Button()
        self.label4 = Forms.Label()
        self.SuspendLayout()
        # label1
        self.label1.AutoSize = True
        self.label1.Location = Drawing.Point(13, 10)
        self.label1.Name = "label1"
        self.label1.Size = Drawing.Size(50, 19)
        self.label1.TabIndex = 0
        self.label1.Text = "Layer:"
        # label2
        self.label2.AutoSize = True
        self.label2.Location = Drawing.Point(13, 72)
        self.label2.Name = "label2"
        self.label2.Size = Drawing.Size(103, 19)
        self.label2.TabIndex = 1
        self.label2.Text = "Net Keyword:"
        self.label2.Click += self.label2_Click

        # listBox_selection
        self.listBox_selection.FormattingEnabled = True
        self.listBox_selection.ItemHeight = 19
        self.listBox_selection.Location = Drawing.Point(174, 32)
        self.listBox_selection.Name = "listBox_selection"
        self.listBox_selection.SelectionMode = Forms.SelectionMode.MultiExtended
        self.listBox_selection.Size = Drawing.Size(225, 308)
        self.listBox_selection.TabIndex = 2
        self.listBox_selection.SelectedIndexChanged += self.listBox_selection_SelectedIndexChanged

        # comboBox_layer
        self.comboBox_layer.FormattingEnabled = True
        self.comboBox_layer.Location = Drawing.Point(13, 32)
        self.comboBox_layer.Name = "comboBox_layer"
        self.comboBox_layer.Size = Drawing.Size(151, 27)
        self.comboBox_layer.TabIndex = 3
        self.comboBox_layer.SelectedIndexChanged += self.comboBox_layer_SelectedIndexChanged

        # textBox_net
        self.textBox_net.Location = Drawing.Point(13, 94)
        self.textBox_net.Name = "textBox_net"
        self.textBox_net.Size = Drawing.Size(151, 27)
        self.textBox_net.TabIndex = 4
        self.textBox_net.Text = ".*"
        self.textBox_net.TextChanged += self.textBox_net_TextChanged

        # label3
        self.label3.AutoSize = True
        self.label3.Location = Drawing.Point(13, 207)
        self.label3.Name = "label3"
        self.label3.Size = Drawing.Size(88, 19)
        self.label3.TabIndex = 5
        self.label3.Text = "Line Width:"
        # textBox_linewidth
        self.textBox_linewidth.Location = Drawing.Point(13, 229)
        self.textBox_linewidth.Name = "textBox_linewidth"
        self.textBox_linewidth.Size = Drawing.Size(151, 27)
        self.textBox_linewidth.TabIndex = 6
        # button_change
        self.button_change.Font = Drawing.Font("Microsoft JhengHei UI", 12, Drawing.FontStyle.Bold, Drawing.GraphicsUnit.Point)
        self.button_change.Location = Drawing.Point(13, 278)
        self.button_change.Name = "button_change"
        self.button_change.Size = Drawing.Size(151, 62)
        self.button_change.TabIndex = 7
        self.button_change.Text = "CHANGE"
        self.button_change.UseVisualStyleBackColor = True
        self.button_change.Click += self.button_change_Click

        # label4
        self.label4.AutoSize = True
        self.label4.Location = Drawing.Point(174, 10)
        self.label4.Name = "label4"
        self.label4.Size = Drawing.Size(104, 19)
        self.label4.TabIndex = 8
        self.label4.Text = "Net Selection:"
        # Form1
        self.AutoScaleDimensions = Drawing.SizeF(9, 19)
        self.AutoScaleMode = Forms.AutoScaleMode.Font
        self.ClientSize = Drawing.Size(412, 353)
        self.Controls.Add(self.label4)
        self.Controls.Add(self.button_change)
        self.Controls.Add(self.textBox_linewidth)
        self.Controls.Add(self.label3)
        self.Controls.Add(self.textBox_net)
        self.Controls.Add(self.comboBox_layer)
        self.Controls.Add(self.listBox_selection)
        self.Controls.Add(self.label2)
        self.Controls.Add(self.label1)
        self.FormBorderStyle = Forms.FormBorderStyle.FixedSingle
        self.MaximizeBox = False
        self.MinimizeBox = False
        self.MinimumSize = Drawing.Size(400, 400)
        self.Name = "Form1"
        self.Padding = Forms.Padding(10)
        self.SizeGripStyle = Forms.SizeGripStyle.Show
        self.StartPosition = Forms.FormStartPosition.CenterScreen
        self.Text = "Line Width Editor"
        self.TopMost = True
        self.Load += self.Form1_Load

        self.ResumeLayout(False)
        self.PerformLayout()