示例#1
0
        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;
        }
示例#2
0
    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;
    }
示例#3
0
        // 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);
 */
        }