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); }
public CompInfo(CtrlComputer C) { InitializeComponent(); this.Computer = C; this.label4.Text = C.Name; this.label5.Text = C.MACAddress; this.label6.Text = C.IPAddress; }
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); }
public void Remove(CtrlComputer ThisComputer) { Computers.Remove(ThisComputer); }
public void Add(CtrlComputer ThisComputer) { Computers.Add(ThisComputer); }