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";
            }
        }
Ejemplo n.º 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 DialPlanAddControl(
            string owner,
            ControlClosedDelegate closed,
            Action<SIPDialPlan> addAction)
        {
            InitializeComponent();

            m_owner = owner;
            ControlClosed_External = closed;
            m_addAction = addAction;
        }
Ejemplo n.º 4
0
        public DialPlanAddControl(
            string owner,
            ControlClosedDelegate closed,
            Action <SIPDialPlan> addAction)
        {
            InitializeComponent();

            m_owner = owner;
            ControlClosed_External = closed;
            m_addAction            = addAction;
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 7
0
        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);
        }
        public SIPProviderDetailsControl(
            DetailsControlModesEnum mode,
            SIPProvider sipProvider,
            string owner,
            SIPProviderUpdateDelegate sipProviderAdd,
            SIPProviderUpdateDelegate sipProviderUpdate,
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_advancedProviderSettings.Visibility = Visibility.Collapsed;
            m_detailsMode              = mode;
            m_sipProvider              = sipProvider;
            m_owner                    = owner;
            SIPProviderAdd_External    = sipProviderAdd;
            SIPProviderUpdate_External = sipProviderUpdate;
            ControlClosed_External     = closed;

            //if (m_disableProviderRegistrations)
            //{
            //    m_providerRegister.IsEnabled = false;
            //    m_providerRegisterContact.IsEnabled = false;
            //    m_providerRegisterExpiry.IsEnabled = false;
            //    m_providerRegisterServer.IsEnabled = false;
            //}

            if (mode == DetailsControlModesEnum.Edit)
            {
                m_providerTypeCanvas.Visibility = Visibility.Collapsed;
                m_gvSettingsPanel.Visibility    = System.Windows.Visibility.Collapsed;
                m_applyButton.Content           = "Update";
                PopulateDataFields(m_sipProvider);
            }
            else
            {
                m_providerIdCanvas.Visibility       = Visibility.Collapsed;
                m_providerTypeNameCanvas.Visibility = Visibility.Collapsed;
                m_gvSettingsPanel.Visibility        = System.Windows.Visibility.Collapsed;
                m_applyButton.Content = "Add";
            }
        }
        public SIPProviderDetailsControl(
            DetailsControlModesEnum mode,
            SIPProvider sipProvider,
            string owner,
            SIPProviderUpdateDelegate sipProviderAdd,
            SIPProviderUpdateDelegate sipProviderUpdate,
            ControlClosedDelegate closed)
        {
            InitializeComponent();

            m_advancedProviderSettings.Visibility = Visibility.Collapsed;
            m_detailsMode = mode;
            m_sipProvider = sipProvider;
            m_owner = owner;
            SIPProviderAdd_External = sipProviderAdd;
            SIPProviderUpdate_External = sipProviderUpdate;
            ControlClosed_External = closed;

            if (m_disableProviderRegistrations)
            {
                m_providerRegister.IsEnabled = false;
                m_providerRegisterContact.IsEnabled = false;
                m_providerRegisterExpiry.IsEnabled = false;
                m_providerRegisterServer.IsEnabled = false;
            }

            if (mode == DetailsControlModesEnum.Edit)
            {
                m_providerTypeCanvas.Visibility = Visibility.Collapsed;
                m_gvSettingsPanel.Visibility = System.Windows.Visibility.Collapsed;
                m_applyButton.Content = "Update";
                PopulateDataFields(m_sipProvider);
            }
            else
            {
                m_providerIdCanvas.Visibility = Visibility.Collapsed;
                m_providerTypeNameCanvas.Visibility = Visibility.Collapsed;
                m_gvSettingsPanel.Visibility = System.Windows.Visibility.Collapsed;
                m_applyButton.Content = "Add";
            }
        }
Ejemplo n.º 11
0
        public SIPAccountDetailsControl(
            DetailsControlModesEnum mode,
            SIPAccount sipAccount,
            string owner,
            SIPAccountUpdateDelegate add,
            SIPAccountUpdateDelegate update,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext
            //GetDialPlanNamesDelegate getDialPlanNames,
            //GetSIPDomainsDelegate getSIPDomains
            )
        {
            InitializeComponent();

            m_detailsMode             = mode;
            m_owner                   = owner;
            m_sipAccount              = sipAccount;
            AddSIPAccount_External    = add;
            UpdateSIPAccount_External = update;
            Closed_External           = closed;
            m_riaContext              = riaContext;
            //GetDialPlanNames_External = getDialPlanNames;
            //GetSIPDomains_External = getSIPDomains;

            if (m_detailsMode == DetailsControlModesEnum.Edit)
            {
                PopulateDataFields(m_sipAccount);
            }
            else
            {
                m_sipAccountUpdateButton.Content      = "Add";
                m_sipAccountIdCanvas.Visibility       = Visibility.Collapsed;
                m_statusDisabledRadio.Visibility      = Visibility.Collapsed;
                m_statusAdminDisabledRadio.Visibility = Visibility.Collapsed;
                UIHelper.SetText(m_sipAccountOwner, m_owner);
                SetDomainNames(null);
                SetDialPlanNames(null);
            }
        }
        public SIPAccountDetailsControl(
            DetailsControlModesEnum mode,
            SIPAccount sipAccount,
            string owner,
            SIPAccountUpdateDelegate add,
            SIPAccountUpdateDelegate update,
            ControlClosedDelegate closed,
            SIPEntitiesDomainContext riaContext
            //GetDialPlanNamesDelegate getDialPlanNames,
            //GetSIPDomainsDelegate getSIPDomains
            )
        {
            InitializeComponent();

            m_detailsMode = mode;
            m_owner = owner;
            m_sipAccount = sipAccount;
            AddSIPAccount_External = add;
            UpdateSIPAccount_External = update;
            Closed_External = closed;
            m_riaContext = riaContext;
            //GetDialPlanNames_External = getDialPlanNames;
            //GetSIPDomains_External = getSIPDomains;

            if (m_detailsMode == DetailsControlModesEnum.Edit)
            {
                PopulateDataFields(m_sipAccount);
            }
            else
            {
                m_sipAccountUpdateButton.Content = "Add";
                m_sipAccountIdCanvas.Visibility = Visibility.Collapsed;
                m_statusDisabledRadio.Visibility = Visibility.Collapsed;
                m_statusAdminDisabledRadio.Visibility = Visibility.Collapsed;
                UIHelper.SetText(m_sipAccountOwner, m_owner);
                SetDomainNames(null);
                SetDialPlanNames(null);
            }
        }
Ejemplo n.º 13
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();
        }
Ejemplo n.º 14
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();
        }