예제 #1
0
        public List <CustomProgram> BuildProgramList()
        {
            Programs = new List <CustomProgram>();
            foreach (var parameter in PresetDictionary[ConfigurationManager.CurrentPreset])
            {
                string path = parameter.Value;
                string args = parameter.Value2;

                //Set default order to 15
                int order = 15;

                //Use warning to hold custom order
                if (!string.IsNullOrWhiteSpace(parameter.Warning))
                {
                    Int32.TryParse(parameter.Warning, out order);
                }

                if (string.IsNullOrWhiteSpace(path))
                {
                    continue;
                }

                CustomProgram program = new CustomProgram(path, args, parameter.ReadOutput, parameter.WaitForExit, order);

                Programs.Add(program);
            }

            return(Programs);
        }
예제 #2
0
        protected bool Equals(CustomProgram other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Equals(Process, other.Process) && string.Equals(Name, other.Name) && string.Equals(Description, other.Description) && string.Equals(Path, other.Path) && Equals(StartInfo, other.StartInfo) && string.Equals(Args, other.Args) && ReadOutput == other.ReadOutput && CustomOrder == other.CustomOrder);
        }