Esempio n. 1
0
        static void Main(string[] args)
        {
            //starting point of the application
            //we will load the menu of the application
            //here
            rooms = new List<Classroom>();

            Computer PC1 = new Computer("L113-", "OK", 5);
            Computer PC2 = new Computer("L11", "OK", 2);
            Computer PC3 = new Computer("L1", "NOT OK", 3);
            Computer PC4 = new Computer("L113-8", "NOT OK", 3);
            Laptop PC5 = new Laptop("L113-9", "NOT OK", 3);

            List<Computer> computers = new List<Computer>();

            computers.Add(PC1);
            computers.Add(PC2);
            computers.Add(PC3);
            computers.Add(PC4);
            computers.Add(PC5);

            //myClassroom = L113
            Classroom myClassroom = new Classroom("L113", true,computers);

            List<Computer> computers2 = new List<Computer>();

            computers2.Add(new Computer("L114-1", "OK", 1));
            computers2.Add(new Computer("L114-2", "OK", 5));

            //myClassroom2 = L114
            Classroom myClassroom2 = new Classroom("L114", true, computers2);

            //max classrooms = 4

            //first 2 classrooms
               rooms.Add(myClassroom);
            rooms.Add(myClassroom2);

            String menu =
                "1.) List all classrooms in system \t\n" +
                "2.) Add new classroom \t\n" +
                "3.) Add new computer to classroom \t\n" +
                "4.) List all computers in classroom \t\n" +
                "5.) Update computer status by computer name \t\n" +
                "6.) List all computers ordered by fault \t\n" +
                "7.) GUI \t\n" +
                "8.) Quit \t\n";

            Menu(menu);

            Console.ReadLine();
        }
Esempio n. 2
0
 public ClassroomChooser(Laptop computerToMove, Classroom sourceClassroom)
 {
     InitializeComponent();
     comp        = computerToMove;
     sourceCroom = sourceClassroom;
 }
Esempio n. 3
0
 public ClassroomChooser(Laptop computerToMove,Classroom sourceClassroom)
 {
     InitializeComponent();
     comp = computerToMove;
     sourceCroom = sourceClassroom;
 }