public DialPlanDetailsControl(
            DetailsControlModesEnum mode, 
            SIPDialPlan dialPlan, 
            string owner,
            DialPlanUpdateDelegate dialPlanAdd, 
            DialPlanUpdateDelegate dialPlanUpdate, 
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_detailsMode = mode;
            m_owner = owner;
            m_dialPlan = dialPlan;

            DialPlanAdd_External = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External = closed;

            if (mode == DetailsControlModesEnum.Edit)
            {
                m_applyButton.Content = "Update";
                PopulateDataFields(m_dialPlan);
            }
            else
            {
                m_dialPlanIdCanvas.Visibility = Visibility.Collapsed;
                m_applyButton.Content = "Add";
            }
        }
Example #2
0
        public DialPlanDetailsControl(
            DetailsControlModesEnum mode,
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanAdd,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_detailsMode = mode;
            m_owner       = owner;
            m_dialPlan    = dialPlan;

            DialPlanAdd_External    = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External  = closed;

            if (mode == DetailsControlModesEnum.Edit)
            {
                m_applyButton.Content = "Update";
                PopulateDataFields(m_dialPlan);
            }
            else
            {
                m_dialPlanIdCanvas.Visibility = Visibility.Collapsed;
                m_applyButton.Content         = "Add";
            }
        }
        public SimpleWizardManager(
            ActivityMessageDelegate logActivityMessage,
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanAdd,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext)
        {
            InitializeComponent();

            LogActivityMessage_External = logActivityMessage;
            m_dialPlan              = dialPlan;
            m_owner                 = owner;
            DialPlanAdd_External    = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External  = closed;
            m_riaContext            = riaContext;

            m_riaContext.RejectChanges();

            m_dialPlanName.Text       = m_dialPlan.DialPlanName;
            _dialPlanNameTextBox.Text = m_dialPlan.DialPlanName;

            // Set up the outgoing rules grid.
            m_outgoingRulesUpdateControl.SetStatusMessage(SimpleWizardOutRuleControl.ADD_TEXT, false);
            m_outgoingRulesUpdateControl.SIPProviders = m_riaContext.SIPProviders.ToList();
            m_outgoingRulesUpdateControl.Add         += AddRule;
            m_outgoingRulesUpdateControl.Update      += UpdateRule;
            m_outgoingRulesPanel.SetTitle("Outgoing Call Rules");
            m_outgoingRulesPanel.MenuEnableFilter(false);
            m_outgoingRulesPanel.MenuEnableHelp(false);
            m_outgoingRulesPanel.MenuEnableAdd(false);
            m_outgoingRulesPanel.GetAssetList = GetOutgoingRules;
            //m_outgoingRulesPanel.Add += () => { m_outgoingRulesUpdateControl.SetRuleToUpdate(null); };

            // Set up the incoming rules grid.
            m_incomingRulesUpdateControl.SetStatusMessage(SimpleWizardInRuleControl.ADD_TEXT, false);
            m_incomingRulesUpdateControl.SIPProviders = m_riaContext.SIPProviders.ToList();
            m_incomingRulesUpdateControl.Add         += AddRule;
            m_incomingRulesUpdateControl.Update      += UpdateRule;
            m_incomingRulesUpdateControl.PopulateToSIPAccounts(m_riaContext.SIPAccounts);
            m_incomingRulesPanel.SetTitle("Incoming Call Rules");
            m_incomingRulesPanel.MenuEnableFilter(false);
            m_incomingRulesPanel.MenuEnableHelp(false);
            m_incomingRulesPanel.MenuEnableAdd(false);
            m_incomingRulesPanel.GetAssetList = GetIncomingRules;
            //m_incomingRulesPanel.Add += () => { m_incomingRulesUpdateControl.SetRuleToUpdate(null); };

            m_intialised  = true;
            m_currentGrid = m_outgoingRulesDataGrid;

            m_outgoingRulesPanel.RefreshAsync();
        }
        public SimpleWizardManager(
            ActivityMessageDelegate logActivityMessage,
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanAdd,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext)
        {
            InitializeComponent();

            LogActivityMessage_External = logActivityMessage;
            m_dialPlan = dialPlan;
            m_owner = owner;
            DialPlanAdd_External = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External = closed;
            m_riaContext = riaContext;

            m_riaContext.RejectChanges();

            m_dialPlanName.Text = m_dialPlan.DialPlanName;
            _dialPlanNameTextBox.Text = m_dialPlan.DialPlanName;

            // Set up the outgoing rules grid.
            m_outgoingRulesUpdateControl.SetStatusMessage(SimpleWizardOutRuleControl.ADD_TEXT, false);
            m_outgoingRulesUpdateControl.SIPProviders = m_riaContext.SIPProviders.ToList();
            m_outgoingRulesUpdateControl.Add += AddRule;
            m_outgoingRulesUpdateControl.Update += UpdateRule;
            m_outgoingRulesPanel.SetTitle("Outgoing Call Rules");
            m_outgoingRulesPanel.MenuEnableFilter(false);
            m_outgoingRulesPanel.MenuEnableHelp(false);
            m_outgoingRulesPanel.MenuEnableAdd(false);
            m_outgoingRulesPanel.GetAssetList = GetOutgoingRules;
            //m_outgoingRulesPanel.Add += () => { m_outgoingRulesUpdateControl.SetRuleToUpdate(null); };

            // Set up the incoming rules grid.
            m_incomingRulesUpdateControl.SetStatusMessage(SimpleWizardInRuleControl.ADD_TEXT, false);
            m_incomingRulesUpdateControl.SIPProviders = m_riaContext.SIPProviders.ToList();
            m_incomingRulesUpdateControl.Add += AddRule;
            m_incomingRulesUpdateControl.Update += UpdateRule;
            m_incomingRulesUpdateControl.PopulateToSIPAccounts(m_riaContext.SIPAccounts);
            m_incomingRulesPanel.SetTitle("Incoming Call Rules");
            m_incomingRulesPanel.MenuEnableFilter(false);
            m_incomingRulesPanel.MenuEnableHelp(false);
            m_incomingRulesPanel.MenuEnableAdd(false);
            m_incomingRulesPanel.GetAssetList = GetIncomingRules;
            //m_incomingRulesPanel.Add += () => { m_incomingRulesUpdateControl.SetRuleToUpdate(null); };

            m_intialised = true;
            m_currentGrid = m_outgoingRulesDataGrid;

            m_outgoingRulesPanel.RefreshAsync();
        }
        public DialPlanUpdateControl(
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_owner    = owner;
            m_dialPlan = dialPlan;

            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External  = closed;

            PopulateDataFields(m_dialPlan);
        }
        public DialPlanUpdateControl(
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_owner = owner;
            m_dialPlan = dialPlan;

            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External = closed;

            PopulateDataFields(m_dialPlan);
        }
Example #7
0
        public DialPlanWizard(
            ActivityMessageDelegate logActivityMessage,
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanAdd,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext)
        {
            InitializeComponent();

            LogActivityMessage_External = logActivityMessage;
            m_dialPlan              = dialPlan;
            m_owner                 = owner;
            DialPlanAdd_External    = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External  = closed;
            m_riaContext            = riaContext;

            m_riaContext.RejectChanges();

            m_speedDialsPanel.SetTitle("Speed Dials");
            m_speedDialsPanel.MenuEnableFilter(false);
            m_speedDialsPanel.MenuEnableHelp(true);
            m_speedDialsPanel.MenuEnableAdd(false);
            m_speedDialsPanel.GetAssetList = GetSpeedDials;
            m_speedDialsPanel.Help        += () => { ToggleSpeedDialsHelp(true); };
            ToggleSpeedDialsHelp(false);

            m_enumsPanel.SetTitle("ENUMs");
            m_enumsPanel.MenuEnableFilter(false);
            m_enumsPanel.MenuEnableHelp(true);
            m_enumsPanel.MenuEnableAdd(false);
            m_enumsPanel.GetAssetList = GetENUMs;
            m_enumsPanel.Help        += () => { ToggleENUMHelp(true); };
            ToggleENUMHelp(false);

            m_cnamPanel.SetTitle("CNAMs");
            m_cnamPanel.MenuEnableFilter(false);
            m_cnamPanel.MenuEnableHelp(true);
            m_cnamPanel.MenuEnableAdd(false);
            m_cnamPanel.GetAssetList = GetCNAMs;
            m_cnamPanel.Help        += () => { ToggleCNAMHelp(true); };
            ToggleCNAMHelp(false);

            m_providersPanel.SetTitle("Dial Plan Providers");
            m_providersPanel.MenuEnableFilter(false);
            m_providersPanel.MenuEnableHelp(true);
            m_providersPanel.MenuEnableAdd(false);
            m_providersPanel.GetAssetList = GetDialPlanProviders;
            m_providersPanel.Help        += () => { ToggleDialPlanProvidersHelp(true); };
            ToggleDialPlanProvidersHelp(false);

            m_routesPanel.SetTitle("Routes");
            m_routesPanel.MenuEnableFilter(false);
            m_routesPanel.MenuEnableHelp(true);
            m_routesPanel.MenuEnableAdd(false);
            m_routesPanel.GetAssetList = GetRoutes;
            m_routesPanel.Help        += () => { ToggleRoutesHelp(true); };
            ToggleRoutesHelp(false);

            m_intialised = true;

            m_speedDialsPanel.RefreshAsync();
        }
        public DialPlanWizard(
            ActivityMessageDelegate logActivityMessage,
            SIPDialPlan dialPlan,
            string owner,
            DialPlanUpdateDelegate dialPlanAdd,
            DialPlanUpdateDelegate dialPlanUpdate,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext)
        {
            InitializeComponent();

            LogActivityMessage_External = logActivityMessage;
            m_dialPlan = dialPlan;
            m_owner = owner;
            DialPlanAdd_External = dialPlanAdd;
            DialPlanUpdate_External = dialPlanUpdate;
            ControlClosed_External = closed;
            m_riaContext = riaContext;

            m_riaContext.RejectChanges();

            m_speedDialsPanel.SetTitle("Speed Dials");
            m_speedDialsPanel.MenuEnableFilter(false);
            m_speedDialsPanel.MenuEnableHelp(true);
            m_speedDialsPanel.MenuEnableAdd(false);
            m_speedDialsPanel.GetAssetList = GetSpeedDials;
            m_speedDialsPanel.Help += () => { ToggleSpeedDialsHelp(true); };
            ToggleSpeedDialsHelp(false);

            m_enumsPanel.SetTitle("ENUMs");
            m_enumsPanel.MenuEnableFilter(false);
            m_enumsPanel.MenuEnableHelp(true);
            m_enumsPanel.MenuEnableAdd(false);
            m_enumsPanel.GetAssetList = GetENUMs;
            m_enumsPanel.Help += () => { ToggleENUMHelp(true); };
            ToggleENUMHelp(false);

            m_cnamPanel.SetTitle("CNAMs");
            m_cnamPanel.MenuEnableFilter(false);
            m_cnamPanel.MenuEnableHelp(true);
            m_cnamPanel.MenuEnableAdd(false);
            m_cnamPanel.GetAssetList = GetCNAMs;
            m_cnamPanel.Help += () => { ToggleCNAMHelp(true); };
            ToggleCNAMHelp(false);

            m_providersPanel.SetTitle("Dial Plan Providers");
            m_providersPanel.MenuEnableFilter(false);
            m_providersPanel.MenuEnableHelp(true);
            m_providersPanel.MenuEnableAdd(false);
            m_providersPanel.GetAssetList = GetDialPlanProviders;
            m_providersPanel.Help += () => { ToggleDialPlanProvidersHelp(true); };
            ToggleDialPlanProvidersHelp(false);

            m_routesPanel.SetTitle("Routes");
            m_routesPanel.MenuEnableFilter(false);
            m_routesPanel.MenuEnableHelp(true);
            m_routesPanel.MenuEnableAdd(false);
            m_routesPanel.GetAssetList = GetRoutes;
            m_routesPanel.Help += () => { ToggleRoutesHelp(true); };
            ToggleRoutesHelp(false);

            m_intialised = true;

            m_speedDialsPanel.RefreshAsync();
        }