コード例 #1
0
ファイル: ClientForm.cs プロジェクト: krisp/RIOX
 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
ファイル: ClientForm.cs プロジェクト: krisp/RIOX
 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
ファイル: ServerForm.cs プロジェクト: krisp/RIOX
        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
ファイル: MiniDeluxeForm.cs プロジェクト: krisp/MiniDeluxe
 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);
     }
 }