Exemplo n.º 1
0
        private void OpenVibeClassification_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (AsyncWorker.IsBusy)
            {
                AsyncWorker.CancelAsync();
            }

            OpenVibeController.Stop();
        }
Exemplo n.º 2
0
 void asyncWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     OpenVibeController.OpenVibeDesignerWorkingFolder = this.textBoxOpenVibeWorkingFolder.Text;
     OpenVibeController.Scenario = this.textBoxScenario.Text;
     if (rButtonRealtime.Checked)
     {
         OpenVibeController.Scenario = OpenVibeController.Scenario.Substring(0, OpenVibeController.Scenario.Length - 4) + "-realtime.xml";
     }
     OpenVibeController.FastPlay = false;
     OpenVibeController.NoGUI    = true;
     OpenVibeController.Start(true);
 }
Exemplo n.º 3
0
        void asyncWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker bwAsync = sender as BackgroundWorker;

            while (!bwAsync.CancellationPending)
            {
                analog.Update();
            }

            if (bwAsync.CancellationPending)
            {
                OpenVibeController.Stop();
                e.Cancel = true;
            }
        }
Exemplo n.º 4
0
        private void buttonEditScenario_Click(object sender, EventArgs e)
        {
            if (OpenVibeController.IsRunning)
            {
                if (MessageBox.Show("Only one instance of OpenVibe can run at the same time. Do you wish to continue?", "Confirm edit", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    return;
                }
            }

            OpenVibeController.OpenVibeDesignerWorkingFolder = this.textBoxOpenVibeWorkingFolder.Text;
            OpenVibeController.Scenario = this.textBoxScenario.Text;
            OpenVibeController.NoGUI    = false;
            OpenVibeController.Start(false);
        }
Exemplo n.º 5
0
        public MainForm()
        {
            InitializeComponent();

            textBoxOpenVibeWorkingFolder.Text = OpenVibeController.DetectOpenVibeInstallFolder();
            textBoxScenario.Text = AdastraConfig.GetOpenVibeScenarioFolder();

            rbuttonOpenVibe.Checked = true;
            //rbuttonFieldTrip.Checked = true;

            if (comboBoxScenarioType.Items.Count > 0)
            {
                comboBoxScenarioType.SelectedIndex = 0;
            }

            InitOpenVibeWorker();

            textBoxEmotivFile.Text = AdastraConfig.GetRecordsFolder() + "mitko-small.csv";

            cbEmotivDspMethod.SelectedIndex    = 0;
            cbFieldTripDspMethod.SelectedIndex = 0;
        }
Exemplo n.º 6
0
        void Clear()
        {
            if (OpenVibeController.IsRunning)
            {
                OpenVibeController.Stop();
            }

            openVibeWorker.CancelAsync();
            //InitOpenVibeWorker();

            buttonStart.Text    = "Start";
            buttonStart.Enabled = true;

            of = null;
            tf = null;
            cf = null;

            ow = null;
            ew = null;
            cw = null;

            currentForm   = null;
            currentWindow = null;
        }
Exemplo n.º 7
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     OpenVibeController.Stop();
 }
Exemplo n.º 8
0
 private void buttonExit_Click(object sender, EventArgs e)
 {
     OpenVibeController.Stop();
     Application.Exit();
 }
Exemplo n.º 9
0
 private void exitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OpenVibeController.Stop();
     Application.Exit();
 }