Esempio n. 1
0
        public bool FDispatchCmdLineSwitch(TCore.CmdLine.CmdLineSwitch cls, string sParam, object oClient, out string sError)
        {
            sError = "";

            if (cls.Switch == "PW")
            {
                ShowPassword = true;
            }
            else if (cls.Switch == "R")
            {
                m_sSqlFile = sParam;
            }
            else if (cls.Switch == "L")
            {
                m_sLogFile = sParam;
            }
            else if (cls.Switch == "C")
            {
                m_sLocalCoverRoot = sParam;
            }
            else if (cls.Switch == "B")
            {
                m_action = RequestedAction.Books;
            }
            else if (cls.Switch == "D")
            {
                m_action = RequestedAction.Dvds;
            }
            else if (cls.Switch == "Bs" || cls.Switch == "Ds")
            {
                m_fForceUpdateSummary = !m_fForceUpdateSummary;
            }
            else
            {
                sError = $"Invalid switch {cls.Switch}";
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
			public bool FDispatchCmdLineSwitch(CmdLineSwitch cls, string sParam, object oClient, out string sError)
			{
                sError = null;
				if (cls.Switch.Length == 1)
					{
					switch (cls.Switch[0])
						{
						case 't':
							m_fTSet = true;
							break;
						case 'a':
							m_fASet = true;
							break;
						case 'b':
							m_fBSet = true;
							m_sBParam = sParam;
							break;
						default:
							sError = String.Format("unknown arg '{0}'", cls.Switch);
							return false;
						}
					}
				else
					{
					if (String.Compare(cls.Switch, "abc") == 0)
						{
						m_fABCSet = true;
						m_sABCParam = sParam;
						}
					else
						{
						sError = String.Format("unknown arg '{0}'", cls.Switch);
						return false;
						}
					}
                return true;
			}
Esempio n. 3
0
        public bool FDispatchCmdLineSwitch(CmdLineSwitch cls, string sParam, object oClient, out string sError)
        {
            sError = null;
            if (cls.Switch.Length == 1)
                {
                switch (cls.Switch[0])
                    {
                    case 'f':
                        m_fFast = true;
                        break;
                    case 'd':
                        m_nMaxDepth = Int32.Parse(sParam);
                        break;
                    case 'n':
                        m_sServerName = sParam;
                        break;
                    case 'h':
                        m_sServerShare = sParam;
                        break;
                    case 'r':
                        m_sRecordFile = sParam;
                        m_fRecord = true;
                        break;
                    case 'p':
                        m_sRecordFile = sParam;
                        m_fPlayback = true;
                        break;
                    case '0':
                    case '1':
                    case '2':
                    case '3':
                        m_nMaxDepth = cls.Switch[0] - '0';
                        break;
                    case 'z':
                        m_fReportZeros = true;
                        break;
                    case 'v':
                        m_fVerbose = true;
                        break;
                    case 'i':
                        m_belSelection.LoadFromFile(sParam);
                        m_fDoExclusions = true;
                        break;
                    case 'X':
                        m_belExclusions.LoadFromFile(sParam);
                        m_fDoExclusions = true;
                        break;
                    case 'x':
                        m_belExclusions.LoadFromFile(m_sProgramDir + @"\default_exclusions.txt");
                        m_fDoExclusions = true;
                        break;

                    default:
                        sError = String.Format("unknown arg '{0}'", cls.Switch);
                        return false;
                    }
                }
            return true;
        }
Esempio n. 4
0
        public bool FDispatchCmdLineSwitch(CmdLineSwitch cls, string sParam, object oClient, out string sError)
        {
            sError = null;

            if (cls.Switch.Length == 1)
                {
                switch (cls.Switch[0])
                    {
                    case 'H':
                        m_fAutomateUpdateHelp = true;
                        break;
                    case 'F':
                        m_plsAutomateIncludeSport.Add(sParam);
                        break;
                    case 'f':
                        m_fForceFutureGames = true;
                        break;
                    default:
                        sError = String.Format("Unknown arg: '{0}'", cls.Switch);
                        return false;
                    }
                return true;
                }
            if (cls.Switch == "DS")
                m_sAutomateDateStart = sParam;
            else if (cls.Switch == "DE")
                m_sAutomateDateEnd = sParam;
            else
                {
                sError = String.Format("Unknown arg: '{0}'", cls.Switch);
                return false;
                }
            return true;
        }
Esempio n. 5
0
		/* C M D  L I N E  C O N F I G */
		/*----------------------------------------------------------------------------
			%%Function: CmdLineConfig
			%%Qualified: CmdLineSupport.CmdLineConfig.CmdLineConfig
			%%Contact: rlittle

		----------------------------------------------------------------------------*/
		public CmdLineConfig(CmdLineSwitch[] rgcls)
		{
			m_rgcls = rgcls;
		}