public SIPAccountManager( ActivityMessageDelegate logActivityMessage, ActivityProgressDelegate showActivityProgress, SIPSorceryPersistor persistor, GetDialPlanNamesDelegate getDialPlanNames, string owner) { InitializeComponent(); LogActivityMessage_External = logActivityMessage; ShowActivityProgress_External = showActivityProgress; GetDialPlanNames_External = getDialPlanNames; m_persistor = persistor; m_owner = owner; m_sipAccountsPanel.SetTitle("SIP Accounts"); m_sipAccountsPanel.DisplayCount = SIPACCOUNTS_DISPLAY_COUNT; m_sipAccountsPanel.MenuEnableFilter(false); m_sipAccountsPanel.MenuEnableDelete(false); m_sipAccountsPanel.Add += new MenuButtonClickedDelegate(SIPAccountsAssetViewer_Add); m_sipAccountsPanel.GetAssetList = GetSIPAccounts; m_sipBindingsPanel.SetTitle("SIP Bindings"); m_sipBindingsPanel.DisplayCount = SIPBINDINGS_DISPLAY_COUNT; m_sipBindingsPanel.MenuEnableAdd(false); m_sipBindingsPanel.MenuEnableFilter(false); m_sipBindingsPanel.MenuEnableDelete(false); m_sipBindingsPanel.GetAssetList = GetSIPBindings; }
public SIPAccountDetailsControl( DetailsControlModesEnum mode, SIPAccount sipAccount, string owner, SIPAccountUpdateDelegate add, SIPAccountUpdateDelegate update, ControlClosedDelegate closed, GetDialPlanNamesDelegate getDialPlanNames, GetSIPDomainsDelegate getSIPDomains) { InitializeComponent(); m_detailsMode = mode; m_owner = owner; m_sipAccount = sipAccount; AddSIPAccount_External = add; UpdateSIPAccount_External = update; Closed_External = closed; 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); } }