Example #1
0
        public MainForm()
        {
            InitializeComponent();

            SIMOC                      = new SIMOC();
            SIMOC.OnConnect           += SIMOC_OnConnect;
            SIMOC.OnDisconnect        += SIMOC_OnDisconnect;
            SIMOC.OnSensorRead        += SIMOC_OnSensorRead;
            SIMOC.OnStimulationChange += SIMOC_OnStimulationChange;
        }
Example #2
0
        private void button_Conectar_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            button_Conectar.Enabled = false;
            button_Conectar.Text    = "Aguarde...";

            if (SIMOC.Conectado)
            {
                label_Status.Text = "Desconectando...";
                SIMOC.Desconectar();
            }
            else
            {
                label_Status.Text = "Conectando...";
                SIMOC.Conectar();
            }
        }