Exemple #1
0
 public arduinoComboBox(arduinoSerial a, ComboBox write, ComboBox read, Button connect)
 {
     _cbWrite                       = write;
     _cbRead                        = read;
     _btnConnect                    = connect;
     arduino                        = a;
     a.OpenEvent                   += updateButtonOpen;
     a.CloseEvent                  += updateButtonClose;
     _btnConnect.Click             += btnConnect_Click;
     _cbRead.DropDown              += cbRead_DropDown;
     _cbRead.SelectedValueChanged  += updateRead;
     _cbWrite.DropDown             += cbWrite_DropDown;
     _cbWrite.SelectedValueChanged += updateWrite;
 }
Exemple #2
0
 public arduinoResponseStatusStrip(arduinoSerial a, ToolStripStatusLabel connect, ToolStripStatusLabel message)
 {
     Connect      = connect;
     Connect.Text = "";
     if (a.isConnected)
     {
         Connect.Image = Properties.Resources.lime_connected_64;
     }
     else
     {
         Connect.Image = Properties.Resources.salmon_disconnected_64;
     }
     Message       = message;
     Message.Text  = "";
     a.CloseEvent += close;
     a.OpenEvent  += open;
     a.DropEvent  += drop;
 }
Exemple #3
0
 public arduinoMenu(arduinoSerial a, ToolStripMenuItem c)
 {
     arduino    = a;
     _menu      = c;
     _mW        = new ToolStripMenuItem("Port", null, null, "Port");
     _mR        = new ToolStripMenuItem("Read Port", null, null, "ReadPort");
     _mSame     = new ToolStripMenuItem("Shared", null, toggleShared, "Shared");
     _mBaud     = new ToolStripMenuItem("Baud Rate", null, null, "Baud Rate");
     _mLeonardo = new ToolStripMenuItem("Leonardo", null, toggleLeonardo, "Leonardo");
     _mConnect  = new ToolStripMenuItem("Connect", null, openClose, "Connect");
     _menu.DropDownItems.Add(_mW);
     _menu.DropDownItems.Add(_mR);
     _menu.DropDownItems.Add(_mSame);
     _menu.DropDownItems.Add(_mBaud);
     menuAddBaudRates();
     _menu.DropDownItems.Add(_mLeonardo);
     _menu.DropDownItems.Add(_mConnect);
     _menu.DropDownOpening += updateMenus;
 }
Exemple #4
0
 public arduinoResponseMessageBox(arduinoSerial a)
 {
     a.DropEvent += response;
 }
Exemple #5
0
 public arduinoDataReceivedRichText(arduinoSerial a, RichTextBox r)
 {
     rtb             = r;
     a.ReceiveEvent += DataReceived;
 }
Exemple #6
0
 public Arduino()
 {
     serial = new arduinoSerial();
 }