public SerialFlow(SerialControl parent, string port) { Parent = parent; sendBuffer = new List <string>(); Console.WriteLine("STARTED SERIAL! Port: " + port); SerialConnection = new SerialPortInput(port, 115200, Parity.None, 8, StopBits.One, Handshake.None, false); SerialConnection.ConnectionStatusChanged += Handler_SerialStatus; SerialConnection.MessageReceived += Handler_SerialMessage; SerialConnection.Connect(); IsConnected = false; IsInitiated = false; IsPaused = false; lastStatus = DateTime.UtcNow; HeadLocation = new SKPoint(0, 0); }
public MainForm() { InitializeComponent(); mainBoard = new WhiteBoard(this, 1150, 790, skControl1, RatioLabel, MouseLabel); //ParseTest(); gFiles = new List <GCodeFile>(); btnLeft.Click += TranslationButton_clicked; btnRight.Click += TranslationButton_clicked; btnUp.Click += TranslationButton_clicked; btnDown.Click += TranslationButton_clicked; btnRotRight.Click += TranslationButton_clicked; btnRotLeft.Click += TranslationButton_clicked; btnScaleN.Click += TranslationButton_clicked; btnScaleP.Click += TranslationButton_clicked; serialConControl = new SerialControl(this, mainBoard); this.panelSerial.Controls.Add(serialConControl); serialConControl.Dock = DockStyle.Fill; lstDraw = lstDrawings; lblStatusBtmLeft = lblStatusMain; lstSettings.MultiSelect = false; lstSettings.MouseDoubleClick += ChangeSettings; }