Ejemplo n.º 1
0
        private void bAddSource_Click(object sender, EventArgs e)
        {
            var result = System.Windows.Forms.MessageBox.Show("Adding a data source will save the device information. Proceed with adding a data source?", "Save and Continue?",
               MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                bSave.PerformClick();
                AddCommunicator ai = new AddCommunicator(_device,true);
                ai.ShowDialog();

                var counter = _controller.GetCommunicatorsForDevice(_device.Id).Count(comm => comm.Inbound);
                lSource.Text = "(" + counter + ")";
            }
        }
Ejemplo n.º 2
0
        private void button7_Click(object sender, EventArgs e)
        {
            var controller = new DeviceController();
            Device testDev = controller.GetAllDevices().Last();

            AddCommunicator ai = new AddCommunicator(testDev,true);
            ai.ShowDialog();
        }