コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            roomsToolStripMenuItem.DropDownItems.Clear();
            bool DictionaryBuilt = false;

            foreach (var Room in Global.Aquinas.Aquinas)
            {
                ToolStripMenuItem NewItem = new ToolStripMenuItem(Room.RoomID);
                NewItem.Name   = Room.RoomID;
                NewItem.Click += new EventHandler(RoomClick);
                roomsToolStripMenuItem.DropDownItems.Add(NewItem);
            }
            if (DictionaryBuilt == false)
            {
                BuildDictionary();
                DictionaryBuilt = true;
            }
            Room F31 = new Room();

            foreach (KeyValuePair <string, string> entry in F31Dictionary)
            {
                string       IP          = entry.Value;
                string       Host        = entry.Key;
                CtrlComputer NewComputer = new CtrlComputer();
                NewComputer.IPAddress     = IP;
                NewComputer.Name          = Host;
                NewComputer.Text          = Host;
                NewComputer.ContainerRoom = F31;
                F31.Add(NewComputer);
            }
            LoadNetworkPanel(F31);
        }
コード例 #2
0
 public CompInfo(CtrlComputer C)
 {
     InitializeComponent();
     this.Computer    = C;
     this.label4.Text = C.Name;
     this.label5.Text = C.MACAddress;
     this.label6.Text = C.IPAddress;
 }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            CtrlComputer NewComputer = new CtrlComputer();

            NewComputer.ComputerID = textBox1.Text;
            NewComputer.Text       = NewComputer.ComputerID;
            NewComputer.Parent     = RoomDesignerPanel;
            RoomDesignerPanel.Controls.Add(NewComputer);
            NewRoom.Add(NewComputer);
        }
コード例 #4
0
 public void Remove(CtrlComputer ThisComputer)
 {
     Computers.Remove(ThisComputer);
 }
コード例 #5
0
 public void Add(CtrlComputer ThisComputer)
 {
     Computers.Add(ThisComputer);
 }