Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 2
0
        public override IModuleDataModel Clone()
        {
            OpenDMXData newInstance = new OpenDMXData()
            {
                Device = Device
            };

            return(newInstance);
        }
Ejemplo n.º 3
0
 public VixenOpenDMXInstance()
 {
     _moduleData       = new OpenDMXData();
     DataPolicyFactory = new DataPolicyFactory();
 }
Ejemplo n.º 4
0
 public OpenDmx(OpenDMXData data)
 {
     _data = data;
 }