예제 #1
0
        /// <summary>
        ///  This executes a payload that it is coming from the toolbar.
        /// </summary>
        /// <param name="parameter"></param>
        public override void Execute(object parameter)
        {
            if (!(parameter is DataPayLoad))
            {
                return;
            }
            var payLoad = (DataPayLoad)parameter;

            if (PayLoadHandlers.ContainsKey(payLoad.Subsystem))
            {
                var handler = PayLoadHandlers[payLoad.Subsystem];
                handler.ExecutePayload(_dataServices, _eventManager, ref payLoad);
            }
            else
            {
                // MessageBox.Show("Error unknwon subsystem");
                throw new ToolbarException("Payload invalid. Unsupported subsystem:" + payLoad.Subsystem);
            }
        }
예제 #2
0
        public override void Execute(object parameter)
        {
            DataPayLoad payLoad = (DataPayLoad)parameter;

            if (payLoad == null)
            {
                return;
            }

            if (PayLoadHandlers.ContainsKey(payLoad.Subsystem))
            {
                IDataPayLoadHandler handler = PayLoadHandlers[payLoad.Subsystem];
                handler.ExecutePayload(_dataServices, _eventManager, ref payLoad);
            }
            else
            {
                MessageBox.Show("Error selecting the insert action handler. Subsystem not known");
            }
        }