Пример #1
0
 static ResourcesGenerator()
 {
     hlpF   = new ArgFlg(false, "?", "help", "to see this help");
     vF     = new ArgFlg(false, "v", "verbose", "additional info");
     dbgF   = new ArgFlg(false, "d", "debug", "debug mode");
     logLvl = new ArgIntMM(1, "l", "log", "log level", "LLL");
     logLvl.setMin(1);
     logLvl.setMax(8);
     flNm = new ArgStr("none", "f", "file", "data file, if not set - list (recourceNm, fileNm) from stdin", "FLNM");
     resx = new ArgStr(".r.resx", "r", "resx", "resurce file", "RFNM");
 }
Пример #2
0
//        static public ArgIntMM  max ;
//        static public ArgInt   sleep ;
//        static public int     current = 3;

        static Program()
        {
            hlpF   = new ArgFlg(false, "?", "help", "to see this help");
            vF     = new ArgFlg(false, "v", "verbose", "additional info");
            dbgF   = new ArgFlg(false, "d", "debug", "debug mode");
            nm     = new ArgStr("eeee", "t", "text", "parameter for text", "tttt");
            num    = new ArgFloat(1.0, "n", "number", "parameter for float");
            logLvl = new ArgIntMM(1, "l", "log", "log level", "LLL");
//           sleep  =  new ArgIntMM(125,  "s",  "sleep",   "msecs to sleep", "SSS");
            logLvl.setMin(1);
            logLvl.setMax(8);
//           max =  new ArgIntMM(1000,  "m",  "max",   "to count prime numbers up to MAX", "MAX");
//           max.setMin(1);
        }
Пример #3
0
        static public int current = 3; ///<текущий претендент на выполнение свойства быть простым числом

        static Program()               /// статический конструктор
        {
            string lLvl = "log level names:{" + Loger.ILList() + "}";

            hlpF   = new ArgFlg(false, "?", "help", "to see this help");
            vF     = new ArgFlg(false, "v", "verbose", "additional info");
            dbgF   = new ArgFlg(false, "d", "debug", "debug mode");
            logLvl = new ArgIntMM(1, "l", "log", "log level", "LLL");
            logNm  = new ArgStr("Error", "ln", "logName", lLvl, "NNN");
            sleep  = new ArgIntMM(125, "s", "sleep", "msecs to sleep", "SSS");
            logLvl.setMin(1);
            logLvl.setMax(8);
            max = new ArgIntMM(1000, "m", "max", "to count prime numbers up to MAX", "MAX");
            max.setMin(1);
        }
Пример #4
0
        static public ArgFlg tsk2;        ///<  пример ключа для выбора работы2,
                                          ///< один из ключей обязан быть в командной строке.

        static Program()                  ///< статический конструктор для глобальных переменных
        {
            hlpF      = new ArgFlg(false, "?", "help", "to see this help");
            vF        = new ArgFlg(false, "v", "verbose", "additional info");
            dbgF      = new ArgFlg(false, "d", "debug", "debug mode");
            tsk1      = new ArgFlg(false, "t1", "workOne", "to do some work");
            tsk1.show = false;
            tsk2      = new ArgFlg(false, "t2", "workNext", "to do another work");
            tsk2.show = false;
            //  dbgF.required = true;
            logLvl = new ArgIntMM(1, "l", "log", "log level", "LLL");
            logLvl.setMin(1);
            logLvl.setMax(8);

            //logLvl.show = false;
            flNm          = new ArgStr("somefile.dat", "f", "file", "data file", "FLNM");
            flNm.required = true;
//           flNm.show = false;

            perCent = new ArgFloatMM(0.05, "p", "percent", "percent for something", "PPP");
            perCent.setMax(100.0);
        }