示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            VerilogPortDirection inout = VerilogPortDirection.In;

            if (rbOut.Checked)
            {
                inout = VerilogPortDirection.Out;
            }
            if (rbInOut.Checked)
            {
                inout = VerilogPortDirection.InOut;
            }

            Verilog_Port newPort = new Verilog_Port("", "wire", inout);

            tbPortName.Enabled = true;
            rbIn.Enabled       = true;
            rbOut.Enabled      = true;
            rbInOut.Enabled    = true;
            cbPortType.Enabled = true;

            PortList.Add(newPort);
            lbPortList.Items.Add(newPort.Name);
            lbPortList.SelectedIndex = PortList.Count - 1;
            pictureBoxPreview.Invalidate();
            tbPortName.Text = string.Empty;
            tbPortName.Focus();
        }
示例#2
0
 public Verilog_Port(string Name, string Type, VerilogPortDirection Direction)
 {
     this.Name      = Name;
     this.Type      = Type;
     this.Direction = Direction;
     isBus          = false;
 }
示例#3
0
 public Verilog_Port(string Name, string Type, VerilogPortDirection Direction, int LeftIndex, int RightIndex)
 {
     this.Name       = Name;
     this.Type       = Type;
     this.Direction  = Direction;
     this.LeftIndex  = LeftIndex;
     this.RightIndex = RightIndex;
     isBus           = true;
 }