示例#1
0
 private void NewRoom_Click(object sender, EventArgs e)
 {
     if (ImpTreeView.SelectedNode == null)
     {
         MessageBox.Show("Моля изберете етаж!");
         return;
     }
     if (ImpTreeView.SelectedNode.Level != 1)
     {
         MessageBox.Show("Моля изберете етаж!");
         return;
     }
     room = tempImp.ListOfSectors.ElementAt(sector).ListOfFloors.ElementAt(floor).ListOfRooms.Count;
     tempImp.ListOfSectors.ElementAt(sector).ListOfFloors.ElementAt(floor).ListOfRooms.Add(new Rooms());
     ImpRoom f = new ImpRoom(this, refRoom, tempImp, sector, floor, room, true);
     f.Show();
 }
示例#2
0
 private void EditRoom_Click(object sender, EventArgs e)
 {
     if(ImpTreeView.SelectedNode == null)
     {
         MessageBox.Show("Моля изберете помещение!");
         return;
     }
     if (ImpTreeView.SelectedNode.Level != 2)
     {
         MessageBox.Show("Моля изберете помещение!");
         return;
     }
     room = ImpTreeView.SelectedNode.Index;
     ImpRoom f = new ImpRoom(this, refRoom, tempImp, sector, floor, room, false);
     f.Show();
 }