private void GetData(SecondClass m, EventArgs e) { this.Invoke((MethodInvoker)delegate() { RT_display.AppendText("Data ready"); }); }
private void button1_Click(object sender, EventArgs e) { Byte[] bArray = new Byte[3] { 1, 2, 3 }; SecondClass sc = new SecondClass(); RT_display.AppendText("object created"); //m.Tick += new Metronome.TickHandler(HeardIt); sc.DP += new SecondClass.DataProcessed( GetData ); //sc.SerialPortDataReceived(); sc.HandleData(bArray); }