Example #1
0
        public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment)
        {
            _activityData = configuration.GetMetadata <ControlPanelActivityData>();

            controlpanel_assetSelectionControl.Initialize(configuration.Assets, AssetAttributes.ControlPanel);

            if (string.IsNullOrEmpty(_activityData.ControlPanelType))
            {
                try
                {
                    var deviceInfo = (DeviceInfo)ConfigurationServices.AssetInventory.GetAsset(configuration.Assets.SelectedAssets.First());
                    var device     = DeviceConstructor.Create(deviceInfo);

                    if (device is JediWindjammerDevice)
                    {
                        controlpaneltypes_comboBox.SelectedItem = "Jedi";
                    }
                    else if (device is JediOmniDevice)
                    {
                        controlpaneltypes_comboBox.SelectedItem = "Omni";
                    }
                    else if (device is SiriusUIv2Device)
                    {
                        controlpaneltypes_comboBox.SelectedItem = "SiriusPentane";
                    }
                    else if (device is SiriusUIv3Device)
                    {
                        controlpaneltypes_comboBox.SelectedItem = "SiriusTriptane";
                    }
                    else
                    {
                        controlpaneltypes_comboBox.SelectedItem = "Phoenix";
                    }
                }
                catch (DeviceCommunicationException)
                {
                    controlpaneltypes_comboBox.SelectedIndex = -1;
                }
            }
            else
            {
                controlpaneltypes_comboBox.SelectedItem = _activityData.ControlPanelType;
            }
            controlPanelOptions_comboBox.Text = _activityData.ControlPanelAction;
        }
Example #2
0
 public void Initialize(PluginEnvironment environment)
 {
     _activityData = new ControlPanelActivityData();
     controlpanel_assetSelectionControl.Initialize(AssetAttributes.ControlPanel);
 }