Exemple #1
0
        public static void CheckForNamedJobFlag()
        {
            if (IgorJobConfig.IsStringParamSet(NamedJobFlag))
            {
                string JobToStart = IgorJobConfig.GetStringParam(NamedJobFlag);

                foreach (IgorPersistentJobConfig Job in IgorConfig.GetInstance().JobConfigs)
                {
                    if (Job.JobName == JobToStart)
                    {
                        IgorJobConfig ConfigInst = IgorJobConfig.GetConfig();

                        ConfigInst.Persistent = Job;

                        ConfigInst.Save(IgorJobConfig.IgorJobConfigPath);

                        IgorDebug.CoreLog("Starting named job " + JobToStart + ".");

                        return;
                    }
                }

                IgorDebug.CoreLogError("Couldn't find named job " + JobToStart + "!");
            }
        }
Exemple #2
0
        public static void SetBoolParam(string BoolParam, bool bTrue)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.Persistent.JobCommandLineParams = IgorRuntimeUtils.SetBoolParam(Inst.Persistent.JobCommandLineParams, BoolParam, bTrue);

                Inst.Save(IgorJobConfigPath);
            }
        }
Exemple #3
0
        public static void SetWasMenuTriggered(bool bMenu)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.bMenuTriggered = bMenu;

                Inst.Save(IgorJobConfigPath);
            }
        }
Exemple #4
0
        public static void SetIsRunning(bool bRunning)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.bIsRunning = bRunning;

                Inst.Save(IgorJobConfigPath);
            }
        }
Exemple #5
0
        public static void SetLastIndexInPriority(int NewLastIndex)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.LastIndexInPriority = NewLastIndex;

                Inst.Save(IgorJobConfigPath);
            }
        }
Exemple #6
0
        public static void SetStringParam(string ParamKey, string ParamValue)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.Persistent.JobCommandLineParams = IgorRuntimeUtils.SetStringParam(Inst.Persistent.JobCommandLineParams, ParamKey, ParamValue);

                Inst.Save(IgorJobConfigPath);
            }
        }
Exemple #7
0
        public static IgorJobConfig GetConfig()
        {
            if (InternalOverride != null)
            {
                return(InternalOverride);
            }

            if (File.Exists(IgorJobConfigPath))
            {
                return(IgorJobConfig.Load(IgorJobConfigPath));
            }
            else
            {
                IgorJobConfig NewConfig = new IgorJobConfig();

                NewConfig.Save(IgorJobConfigPath);

                return(NewConfig);
            }
        }
Exemple #8
0
        public static void SetJobToRunByName(string JobName)
        {
            IgorConfig Inst = GetInstance();

            if (Inst != null)
            {
                foreach (IgorPersistentJobConfig CurrentJob in Inst.JobConfigs)
                {
                    if (CurrentJob.JobName == JobName)
                    {
                        IgorJobConfig NewConfig = new IgorJobConfig();

                        NewConfig.Persistent = CurrentJob;

                        NewConfig.Save(IgorJobConfig.IgorJobConfigPath);

                        IgorJobConfig.SetLastPriority(-1);
                        IgorJobConfig.SetLastIndexInPriority(-1);

                        return;
                    }
                }
            }
        }