Пример #1
0
 void ClientObjectReceivedEvent(object o, RIOXClient.ObjectReceivedEventArgs e)
 {
     _data = (RIOXData) e.DataObject;
     Console.WriteLine("Object received: " + _data);
     // Console.WriteLine("Preamp: " + _radio.Custom["preamp"]);
     UpdateForm();
 }
Пример #2
0
 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);
 }
Пример #3
0
 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();
 }
Пример #4
0
        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();
        }
Пример #5
0
 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);
     }
 }
Пример #6
0
 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);
     }
 }