示例#1
0
        private void Start()
        {
            this.CancelEvName  = StringTools.MakeUUID();
            this.ReportEvName  = StringTools.MakeUUID();
            this.ReportMtxName = StringTools.MakeUUID();
            this.ReportDir     = new WorkDir();
            this.ReportFile    = this.ReportDir.MakePath() + ".txt";

            this.CancelEv  = new EventWaitHandle(false, EventResetMode.AutoReset, this.CancelEvName);
            this.ReportEv  = new EventWaitHandle(false, EventResetMode.AutoReset, this.ReportEvName);
            this.ReportMtx = new Mutex(false, this.ReportMtxName);

            string command = this.CountMode ? "/C2" : "/R2";

            if (this.DivMode)
            {
                command += " /D";
            }

            this.ProcMan = new ProcessMan();
            this.ProcMan.Start(
                Gnd.I.Prime64File,
                Gnd.I.MainWin.CmdPartOptUMRTM() +
                command + " " +
                this.Minval + " " +
                this.Maxval + " " +
                "\"" + this.OutFile + "\" " +
                this.CancelEvName + " " +
                this.ReportEvName + " " +
                this.ReportMtxName + " " +
                "\"" + this.ReportFile + "\""
                );
        }
示例#2
0
        private void Start()
        {
            this.CancelEvName  = StringTools.MakeUUID();
            this.ReportEvName  = StringTools.MakeUUID();
            this.ReportMtxName = StringTools.MakeUUID();
            this.ReportDir     = new WorkDir();
            this.ReportFile    = this.ReportDir.MakePath() + ".txt";

            this.CancelEv  = new EventWaitHandle(false, EventResetMode.AutoReset, this.CancelEvName);
            this.ReportEv  = new EventWaitHandle(false, EventResetMode.AutoReset, this.ReportEvName);
            this.ReportMtx = new Mutex(false, this.ReportMtxName);

            this.ProcMan = new ProcessMan();
            this.ProcMan.Start(
                Gnd.I.Prime64File,
                Gnd.I.MainWin.CmdPartOptUMRTM() +
                "/US2 " +
                this.L + " " +
                this.T + " " +
                this.R + " " +
                this.B + " " +
                this.PrimeColor + " " +
                this.NotPrimeColor + " " +
                this.CenterColor + " " +
                "\"" + this.OutFile + "\" " +
                this.CancelEvName + " " +
                this.ReportEvName + " " +
                this.ReportMtxName + " " +
                "\"" + this.ReportFile + "\""
                );
        }
示例#3
0
        public WorkDir()
        {
            if (InstanceCount == 0)
            {
                try
                {
                    Directory.Delete(ROOT_DIR, true);
                }
                catch
                { }

                Directory.CreateDirectory(ROOT_DIR);
            }
            this.Id  = StringTools.MakeUUID();
            this.Dir = Path.Combine(ROOT_DIR, this.Id);

            Directory.CreateDirectory(this.Dir);
            InstanceCount++;
        }
示例#4
0
 public string MakePath()
 {
     return(Path.Combine(this.Dir, StringTools.MakeUUID()));
 }