Exemple #1
0
 public WinFormsQueries()
 {
     _dataManager = new FullDataManager();
     _context = new MetricsContext();
     _context.Database.EnsureCreated();
     ComputerSummary = _dataManager.GetComputerSummary();
 }
Exemple #2
0
        static void Main(string[] args)
        {
            var dataManager = new FullDataManager();
            WriteLine("If you want computer summary write 'CS' , \n" +
                      "if you want application list write 'AL', \n" +
                      "if you want hardware list write 'HL': \n");


            var option = ReadLine();
            WriteLine();

            switch (option)
            {
                case "CS":
                    PrintComputerSummary(dataManager);
                    break;
                case "HL":
                    PrintHardwareList(dataManager);
                    break;
                case "AL":
                    PrintApplicationList(dataManager);
                    break;
                default:
                    WriteLine("Wrong command please try again!");
                    break;
            }

            ReadLine();
        }