示例#1
0
        private void bgw_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get the BackgroundWorker that raised this event.
            BackgroundWorker worker = sender as BackgroundWorker;

            if (worker.CancellationPending)
            {
                return;
            }
            UserData userData = new UserData();

            lock (userInput)
            {
                userInput.nClicks.CopyTo(userData.nClicks, 0);
                userData.nIters = userInput.nIters;
                userData.nUsers = userInput.nUsers;
                userInput.probExamine.CopyTo(userData.probExamine, 0);
            }
            createClicks(userData);
            if (worker.CancellationPending)
            {
                return;
            }
            e.Result = infer.performInference(userData);
        }
示例#2
0
		public Form1()
		{
			InitializeComponent();

			makeArrays();

	   	     dataPictureBoxHeight = pictureBoxFF.Size.Height;
			dataPictureBoxLocationY = pictureBoxFF.Location.Y;
			dataTrackBarRange = trackBarFF.Maximum - trackBarFF.Minimum;
		
			infer = new Inference(nRanks);
			userInput = new UserData();
			initializeUserData();
			intializeDependentComponents();

			createClicks();
			showResults(infer.performInference(userInput));
		}
示例#3
0
        public Form1()
        {
            InitializeComponent();

            makeArrays();

            dataPictureBoxHeight    = pictureBoxFF.Size.Height;
            dataPictureBoxLocationY = pictureBoxFF.Location.Y;
            dataTrackBarRange       = trackBarFF.Maximum - trackBarFF.Minimum;

            infer     = new Inference(nRanks);
            userInput = new UserData();
            initializeUserData();
            intializeDependentComponents();

            createClicks(userInput);
            showResults(infer.performInference(userInput));
        }