public override void EnablePlugin() { ConfigurationDialog = new PluginConfigurationDialog <WS281XConfigurationViewModel>(); PluginSetting <List <DeviceDefinition> > definitions = _settings.GetSetting <List <DeviceDefinition> >("DeviceDefinitions"); if (definitions.Value == null) { definitions.Value = new List <DeviceDefinition>(); } foreach (DeviceDefinition deviceDefinition in definitions.Value) { switch (deviceDefinition.Type) { case DeviceDefinitionType.Arduino: RGB.NET.Devices.WS281X.WS281XDeviceProvider.Instance.AddDeviceDefinition(new ArduinoWS281XDeviceDefinition(deviceDefinition.Port)); break; case DeviceDefinitionType.Bitwizard: RGB.NET.Devices.WS281X.WS281XDeviceProvider.Instance.AddDeviceDefinition(new BitwizardWS281XDeviceDefinition(deviceDefinition.Port)); break; default: throw new ArgumentOutOfRangeException(); } } _rgbService.AddDeviceProvider(RgbDeviceProvider); }
public override void EnablePlugin() { ConfigurationDialog = new PluginConfigurationDialog <DebugConfigurationViewModel>(); PathHelper.ResolvingAbsolutePath += PathHelperOnResolvingAbsolutePath; PluginSetting <List <DeviceDefinition> > definitions = _settings.GetSetting("DeviceDefinitions", new List <DeviceDefinition>()); if (definitions.Value == null) { definitions.Value = new List <DeviceDefinition>(); } foreach (DeviceDefinition deviceDefinition in definitions.Value) { RGB.NET.Devices.Debug.DebugDeviceProvider.Instance.AddFakeDeviceDefinition(deviceDefinition.Layout, deviceDefinition.ImageLayout); } try { _rgbService.AddDeviceProvider(RgbDeviceProvider); } catch (Exception e) { _logger.Warning(e, "Debug device provided failed to initialize, check paths"); } }
public override void EnablePlugin() { ConfigurationDialog = new PluginConfigurationDialog <DMXConfigurationViewModel>(); // TODO: Load from configuration // RGB.NET.Devices.DMX.DMXDeviceProvider.Instance.AddDeviceDefinition(); _rgbService.AddDeviceProvider(RgbDeviceProvider); }
private void mnuConfigurePlugins_Click(object sender, EventArgs e) { PluginConfigurationDialog dlg = new PluginConfigurationDialog(); dlg.ShowDialog(this); }