Beispiel #1
0
        public static void actionSelection(String option)
        {
            String mainMessage = "JOBSEC V" + version + "--------------------------------------------------\n" +
                                 "Designed by Ismail EL MOUANI- all rights reserved-----------\n\n\n" +


                                 "List of commands" +
                                 "--information  : display information regarding the tool.....\n" +
                                 "--schedule     : applying one of the method to schedule jobs\n" +
                                 "                 selection is done in a second time.........\n" +
                                 "--changeIO     : changing the IO Excel file.................\n" +
                                 "--readIOFile   : reding Input-Output file. Mandatory before.\n" +
                                 "                 scheduling\n" +
                                 "--quit         : Quiting JOBSEC.............................\n";

            switch (option)
            {
            case "--schedule":
                schedule();
                break;

            case "--information":
                MyConsole.displayMain(mainMessage);
                break;

            case "--changeIO":
                MyConsole.displayResult("changingIO");
                break;

            case "--readIOFile":
                string outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
                string excelFilePath   = Path.Combine(outPutDirectory, "res\\ExcelFile.xlsx");
                excelFile = new ExcelFile(excelFilePath);
                model     = new Model(excelFile);
                if (excelFile == null || model == null)
                {
                    MyConsole.displayError("Couldn't red input file and/or initialize scheduling schema....");
                }
                break;


            case "--quit":
                MyConsole.displayResult("quiting, press a key...");
                break;

            default:
                MyConsole.displayResult("input parameter not identified !\n");
                break;
            }
        }
Beispiel #2
0
                        f;                          // Stressors level induced by a reference processing



        // Constructor : initializing the indices limits ...
        // ...and input variables values
        public Model(ExcelFile excelFile)
        {
            readInputs(excelFile);
            if (checkInputConstraints())
            {
                MyConsole.displayResult("Do you wish to show the input read ? Yes(Y)/ No (N)");
                if (MyConsole.readInput().Equals("Y") || MyConsole.readInput().ToLower().Equals("yes"))
                {
                    showInputs();
                }
            }
            else
            {
                MyConsole.displayError("ERROR : input are not consitent ");
            }
        }