Beispiel #1
0
        public SetupDialog(OpenDMXData data)
        {
            InitializeComponent();
            ThemeUpdateControls.UpdateControls(this);
            _data = data;
            var devices = OpenDmx.GetDeviceList();

            if (devices.Any())
            {
                foreach (var device in devices)
                {
                    ComboBoxItem item = new ComboBoxItem($"{device.Description} - {device.SerialNumber} - {device.Id}", device);
                    cmbDeviceList.Items.Add(item);
                }

                if (_data.Device != null)
                {
                    var deviceIndex = devices.FindIndex(x => x.SerialNumber == _data.Device.SerialNumber &&
                                                        x.Id == _data.Device.Id &&
                                                        x.Description == _data.Device.Description);
                    if (deviceIndex >= 0)
                    {
                        cmbDeviceList.SelectedIndex = deviceIndex;
                    }
                    else
                    {
                        cmbDeviceList.SelectedIndex = 0;
                    }
                }
                else
                {
                    cmbDeviceList.SelectedIndex = 0;
                }
            }
        }
Beispiel #2
0
        public override IModuleDataModel Clone()
        {
            OpenDMXData newInstance = new OpenDMXData()
            {
                Device = Device
            };

            return(newInstance);
        }
Beispiel #3
0
 public VixenOpenDMXInstance()
 {
     _moduleData       = new OpenDMXData();
     DataPolicyFactory = new DataPolicyFactory();
 }
Beispiel #4
0
 public OpenDmx(OpenDMXData data)
 {
     _data = data;
 }