Beispiel #1
0
        public void ExecCmd(M6DG6CmdFlag flag, string paramValue = null)
        {
            switch (flag)
            {
            case M6DG6CmdFlag.AUTHOR:
                PrintAuthor();
                break;

            case M6DG6CmdFlag.VERSION:
                PrintVersion();
                break;

            case M6DG6CmdFlag.USERNAME:
                _cCmdStatus.Inc();
                if (_cCmdStatus._cNoUsername = (string.IsNullOrEmpty(paramValue)) ? true : false)
                {
                    PrintMissingUsername();
                }
                break;

            case M6DG6CmdFlag.PASSWORD:
                _cCmdStatus.Dec();
                if (_cCmdStatus._cNoPassword = (string.IsNullOrEmpty(paramValue)) ? true : false)
                {
                    _cCmdStatus.Inc();
                    PrintMissingPassword();
                }
                break;

            case M6DG6CmdFlag.DTXKEY:

                if (_cCmdStatus._cNoDtxKey = (string.IsNullOrEmpty(paramValue)) ? true : false)
                {
                    _cCmdStatus.Inc();
                    PrintMissingDtxKey();
                }
                break;

            case M6DG6CmdFlag.HELP:
                PrintHelp();
                break;

            default:
                System.Console.WriteLine("!ERROR!: Un-expected command flag => " + flag);
                break;
            }
        }
Beispiel #2
0
        public void ExecCmd(M6DG6CmdFlag flag, string paramValue = null)
        {
            switch (flag)
            {
                case M6DG6CmdFlag.AUTHOR:
                    PrintAuthor();
                    break;
                case M6DG6CmdFlag.VERSION:
                    PrintVersion();
                    break;
                case M6DG6CmdFlag.USERNAME:
                    _cCmdStatus.Inc();
                    if (_cCmdStatus._cNoUsername = (string.IsNullOrEmpty(paramValue)) ? true : false)
                        PrintMissingUsername();
                    break;
                case M6DG6CmdFlag.PASSWORD:
                    _cCmdStatus.Dec();
                    if (_cCmdStatus._cNoPassword = (string.IsNullOrEmpty(paramValue)) ? true : false)
                    {
                        _cCmdStatus.Inc();
                        PrintMissingPassword();
                    }
                    break;
                case M6DG6CmdFlag.DTXKEY:

                    if (_cCmdStatus._cNoDtxKey = (string.IsNullOrEmpty(paramValue)) ? true : false)
                    {
                        _cCmdStatus.Inc();
                        PrintMissingDtxKey();

                    }
                    break;
                case M6DG6CmdFlag.HELP:
                    PrintHelp();
                    break;
                default:
                    System.Console.WriteLine("!ERROR!: Un-expected command flag => " + flag);
                    break;
            }
        }