public MainWindow() { InitializeComponent(); // Set the reference to be this window so test call back can use later thisMainWindow = this; // Create an instance of the test interface model class pTest = new PasatTest(); // Create an instance of the class that will run the test pThread = new PASATTestThread(); pThread.PASATTestThreadInit(pTest); primaryThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId; // Set defaults radioButtonFormA.IsChecked = true; radioButtonFormB.IsChecked = false; radioButtonPractice.IsChecked = true; radioButtonActualTest.IsChecked = false; radioButton3seconds.IsChecked = true; radioButton2seconds.IsChecked = false; }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); // Set the reference to be this window so test call back can use later thisMainWindow = this; // Create an instance of the test interface model class pTest = new PasatTest(); // Create an instance of the class that will run the test pThread = new PASATTestThread(); primaryThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId; }
// Constructor public MainPage() { InitializeComponent(); // Create PASAT classes to use later pTest = new PasatTest(); pThread = new PASATTestThread(); /* KEEP this as comment for now... * currently using common approach to create/start a thread: see RunTest * * // Set up to have a worker thread * // Set up the PASAT test code on a background thread * bw = new BackgroundWorker(); * * bw.WorkerSupportsCancellation = true; * bw.WorkerReportsProgress = false; * * bw.DoWork += new DoWorkEventHandler(pThread.bw_DoWork); * bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); */ }