void ClientObjectReceivedEvent(object o, RIOXClient.ObjectReceivedEventArgs e) { _data = (RIOXData) e.DataObject; Console.WriteLine("Object received: " + _data); // Console.WriteLine("Preamp: " + _radio.Custom["preamp"]); UpdateForm(); }
private void button1_Click(object sender, EventArgs e) { _data = new RIOXData(); _client = new RIOXClient(typeof(RIOXData),"localhost", 1234); _client.ObjectReceivedEvent += ClientObjectReceivedEvent; _client.ServerDisconnectedEvent += new EventHandler(_client_ServerDisconnectedEvent); }
void c_ObjectReceivedEvent(object o, RIOX.RIOXClient.ObjectReceivedEventArgs e) { //DDUtilState.RadioData r = (DDUtilState.RadioData)e.DataObject; RIOX.RIOXData r = (RIOX.RIOXData)e.DataObject; Console.WriteLine("R: " + r.ToString()); foreach (DictionaryEntry de in r) { Console.WriteLine("Key: {0} Value {1}", de.Key, de.Value); } MessageBox.Show("Success: Received Frequency: " + r["ZZFA"]); _c.Close(); }
public ServerForm() { InitializeComponent(); _data = new RIOXData(); _data.Add("vfoa", "14.200"); _data.Add("vfob", "7.000"); _data.Add("mode", "USB"); _data.Add("mox", false); _t = new Timer {Interval = 250}; _t.Tick += TTick; //_t.Start(); }
private void btnRIOXTest_Click(object sender, EventArgs e) { try { //DDUtilState.RadioData r = new DDUtilState.RadioData(); RIOX.RIOXData r = new RIOX.RIOXData(); _c = new RIOX.RIOXClient(r.GetType(), txtRIOXIP.Text, int.Parse(txtRIOXport.Text)); _c.SendCommand(new RIOX.RIOXCommand("UpDateType", "PSH:500")); _c.SendCommand(new RIOX.RIOXCommand("Sub", "ZZFA;")); _c.ObjectReceivedEvent += new RIOX.RIOXClient.ObjectReceivedEventHandler(c_ObjectReceivedEvent); } catch (Exception ex) { MessageBox.Show("Failure: " + ex.Message); } }