private void testMessageBoxTestToolStripMenuItem_Click(object sender, EventArgs e) { //DialogResult dr = MessageBoxEx.Show("Text", "Caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, 10000); //DialogResult dr = MessageBoxWithTimeout.Show("Text", "Caption", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, 10000); DialogResult dr = TimeMassageBox.Show("Text", "Caption", 5); Log.Wrl("MessageBoxEx: " + dr); }
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); } } }