Beispiel #1
0
 private void ButtonRestore_Click(object sender, RoutedEventArgs e)
 {
     m_dataContext.Stop();
     IsolatedStorageManager.InitializeStorageForStreamStatistics(true);
     int.TryParse(IsolatedStorageManager.ReadFromIsolatedStorage("StreamStatisticsDataRefreshInterval").ToString(), out m_statisticDataRefreshInterval);
     TextBlockMeasurementRefreshInterval.Text = m_statisticDataRefreshInterval.ToString();
     TextBoxRefreshInterval.Text = m_statisticDataRefreshInterval.ToString();
     PopupSettings.IsOpen        = false;
     CommonFunctions.LoadUserControl(CommonFunctions.GetHeaderText("Stream Statistics"), typeof(RealTimeStatisticUserControl));
 }
Beispiel #2
0
        private void RealTimeStatisticUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            int.TryParse(IsolatedStorageManager.ReadFromIsolatedStorage("StreamStatisticsDataRefreshInterval").ToString(), out m_statisticDataRefreshInterval);

            if (m_statisticDataRefreshInterval == 0)
            {
                m_statisticDataRefreshInterval = 5;
                IsolatedStorageManager.InitializeStorageForStreamStatistics(true);
            }

            TextBlockMeasurementRefreshInterval.Text = m_statisticDataRefreshInterval.ToString() + " sec";
            TextBoxRefreshInterval.Text = m_statisticDataRefreshInterval.ToString();
            m_dataContext = CreateDataContext();
            DataContext   = m_dataContext;
            KeyUp        += RealTimeStatisticUserControl_KeyUp;
        }