示例#1
0
        private void FrEDM_Load(object sender, EventArgs e)
        {
            Test = null;
            DialogResult dr = DialogResult.Cancel;

            if (File.Exists(TestPathFileName))
            {
                try
                {
                    string fntst;
                    using (StreamReader file = File.OpenText(TestPathFileName))
                    {
                        fntst = file.ReadToEnd();
                        file.Close();
                    }
                    Test = (EDMTest)BaseTest.LoadTest(fntst);
                }
                catch
                {
                }

                //if (Test!=null)
                //{
                //  UpdateForm(Test.TestInfo);
                //  Application.DoEvents();
                //  dr = TimeMassageBox.Show("Warning!", "Unfinished test exist.\nContinue?", 30);
                //}
            }

            if (Test == null)
            {
                Test = new EDMTest();
                UpdateForm(Test.TestInfo);
            }

            UpdateForm(Test.TestInfo);
            Application.DoEvents();

            if ((Test != null) && (Test.IsTestBroken()))
            {
                dr = TimeMassageBox.Show("Warning!", "Unfinished test exist.\nContinue?", 30);

                if (dr == DialogResult.OK)
                {
                    DoTest(false);
                }
            }
        }
示例#2
0
        private void test8ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EDMTest edmtst = new EDMTest();
            string  fn     = CommonProc.ApplicationExePath + @"tmp\tmp.tst";

            edmtst.TestInfo.GPUId        = "12345";
            edmtst.TestInfo.ThermalLimit = 100;
            edmtst.StageInfo.MemoryCloc  = 1800;
            edmtst.Save(fn);

            BaseTest basetst = BaseTest.LoadTest(fn);

            edmtst = (EDMTest)basetst;
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
            edmtst = new EDMTest();
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
            edmtst.Load(fn);
            Log.Wrl(edmtst.TestInfo.GPUId + " " + edmtst.TestInfo.ThermalLimit.ToString() + " " + edmtst.StageInfo.MemoryCloc.ToString());
        }