/// <summary>
        /// Initializes this configuration control to default values.
        ///
        /// <seealso cref="PluginEnvironment"/>
        /// </summary>
        /// <param name="environment">Information about the plug-in environment.</param>
        public void Initialize(PluginEnvironment environment)
        {
            // Initialize the activity data.
            _data = new MessageCenterActivityData();

            message_assetSelectionControl.Initialize(AssetAttributes.ControlPanel);
        }
Esempio n. 2
0
        /// <summary>
        /// The Main Entry point for Execution
        /// </summary>
        /// <param name="executionData"></param>
        /// <returns></returns>
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            _activityData = executionData.GetMetadata <MessageCenterActivityData>();
            var printDeviceInfo = (PrintDeviceInfo)executionData.Assets.First();

            _device = DeviceConstructor.Create(printDeviceInfo);
            var executionResult = EvaluateMessageCenter();

            _device.Dispose();
            return(executionResult);
        }
        /// <summary>
        /// Provides plug-in configuration data for an existing activity, including plug-in
        /// specific metadata, a metadata version, and selections of assets and documents.
        ///
        /// The custom metadata can be retrieved from the configuration using one of the
        /// <c>GetMetadata</c> methods, which return either a deserialized object or the XML. This
        /// data is then used to populate the configuration control. Asset and Document information
        /// can be retrieved using <see cref="ConfigurationServices"/>. The metadata version is
        /// included for forwards compatibility.
        ///
        /// <seealso cref="ConfigurationServices"/>
        /// </summary>
        /// <param name="configuration">The configuration data.</param>
        /// <param name="environment">Information about the plug-in environment.</param>
        public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment)
        {
            // Initialize the activity data by deserializing it from an existing copy of the
            // configuration information.
            _data = configuration.GetMetadata <MessageCenterActivityData>();

            message_assetSelectionControl.Initialize(configuration.Assets, AssetAttributes.ControlPanel);
            messageType_comboBox.SelectedIndex = messageType_comboBox.Items.IndexOf(_data.Message);
            present_radioButton.Checked        = _data.Presence;
            absent_radioButton.Checked         = !_data.Presence;
            ews_radioButton.Checked            = _data.UseEws;
        }