Beispiel #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;
        }
Beispiel #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;
    }
Beispiel #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);
 */
        }
Beispiel #4
0
        // Initializer to call after Constructor with a reference to test interface class
        public void PASATTestThreadInit(PasatTest pasatTest)
        {
            this.pTest = pasatTest;

            prvLoadSounds();    // load sound files into memory buffers
        }
Beispiel #5
0
 // Constructor
 public PASATTestThread()
 {
     pTest        = null;
     backThread   = null;
     isSoundsInit = false;
 }
Beispiel #6
0
		// Initializer to call after Constructor with a reference to test interface class
		public void PASATTestThreadInit( PasatTest pasatTest )
		{
			this.pTest = pasatTest;

			prvLoadSounds();	// load sound files into memory buffers
		}
Beispiel #7
0
        // Constructor
        public PASATTestThread() {
			pTest = null;
			backThread = null;
			isSoundsInit = false;
        }