示例#1
0
        //handlers
        private void AddCommandHandler()
        {
            MessageHandlerConfirmation _confirmation = new MessageHandlerConfirmation(m_AssociationServices.GetAssociationCouplerViewModelEnumerator)
            {
                Title = "New Message Handler"
            };
            bool _confirmed = false;

            b_AddRequest.Raise(_confirmation, x => _confirmed = x.Confirmed);
            if (_confirmed)
            {
                m_MessageHandlerServices.AddMessageHandler(_confirmation.MessageHandlerConfigurationWrapper);
                _confirmation.ApplyChanges();
            }
        }
示例#2
0
        private void EditCommandHandler()
        {
            if (CurrentMessageHandler == null) //double check
            {
                return;
            }
            MessageHandlerConfirmation _confirmation = new MessageHandlerConfirmation(CurrentMessageHandler, m_AssociationServices.GetAssociationCouplerViewModelEnumerator, false)
            {
                Title = "Edit Message Handler"
            };
            bool _confirmed = false;

            b_AddRequest.Raise(_confirmation, x => _confirmed = x.Confirmed);
            if (_confirmed)
            {
                _confirmation.ApplyChanges();
            }
        }