//---------------------------------------------------------------------------
        // Constructor

        public MyCmdLineFile()
        {
            CmdLineFile tCmdLineFile = new CmdLineFile();

            String tFilePath = @"..\..\..\Files\MyCmdLineFile.txt";

            // Open command line file
            if (!tCmdLineFile.open(tFilePath))
            {
                Console.WriteLine("MyCmdLineFile.readFromFilePath FAIL {0}\n", tFilePath);
                return;
            }
            else
            {
                Console.WriteLine("MyCmdLineFile.readFromFilePath PASS {0}\n", tFilePath);
            }

            // Read command line file, execute commands for each line in the file,
            // using this command line executive
            tCmdLineFile.execute(this);

            // Close command line file
            tCmdLineFile.close();
        }
Beispiel #2
0
        //**************************************************************************
        //**************************************************************************
        //**************************************************************************
        // Read from settings file

        public static void readFromFilePath(InputData tInputData, String aFilePath)
        {
            MsgGen.InputFile tInputFile = new MsgGen.InputFile(tInputData);

            CmdLineFile tCmdLineFile = new CmdLineFile();

            // Open command line file
            if (!tCmdLineFile.open(aFilePath))
            {
                Console.WriteLine("MsgGen.Reader.readFromFilePath FAIL {0}\n", aFilePath);
                return;
            }
            else
            {
                Console.WriteLine("MsgGen.Reader.readFromFilePath PASS {0}\n", aFilePath);
            }

            // Read command line file, execute commands for each line in the file,
            // using this command line executive
            tCmdLineFile.execute(tInputFile);

            // Close command line file
            tCmdLineFile.close();
        }