SIPSorcery.CustomerSettingsControl.Load C# (CSharp) Method

Load() public method

public Load ( ) : void
return void
        public void Load()
        {
            SetUpdateButtonsEnabled(false);
            UIHelper.SetText(m_statusTextBlock, "Loading details, please wait...");

            m_riaContext.Customers.Clear();
            var query = m_riaContext.GetCustomerQuery();

            // Make sure the timezons are loaded first.
            if (Page.TimeZones == null)
            {
                m_riaContext.GetTimeZones(Page.GetTimeZonesCompleted, new Action(() => {
                    m_timezoneListBox.ItemsSource = Page.TimeZones;
                    m_riaContext.Load(query, LoadBehavior.RefreshCurrent, GetCustomerCompleted, null);
                }));
            }
            else
            {
                m_timezoneListBox.ItemsSource = Page.TimeZones;
                m_riaContext.Load(query, LoadBehavior.RefreshCurrent, GetCustomerCompleted, null);
            }
        }

Usage Example

Example #1
0
 private void SettingsLink_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     SetActive(m_customerSettings);
     SetSelectedTextBlock(m_settingsLink);
     m_customerSettings.Load();
 }