Пример #1
0
        // Restores original setting based on what is stored in the isolated storage manager.
        private void ButtonRestore_Click(object sender, RoutedEventArgs e)
        {
            int refreshInterval;

            IsolatedStorageManager.InitializeStorageForAlarmStatus(true);

            if (!int.TryParse(IsolatedStorageManager.ReadFromIsolatedStorage("AlarmStatusRefreshInterval").ToString(), out refreshInterval) || refreshInterval < 0)
            {
                refreshInterval = AlarmMonitor.DefaultRefreshInterval;
            }

            TextBlockAlarmRefreshInterval.Text    = refreshInterval.ToString();
            TextBoxRefreshInterval.Text           = refreshInterval.ToString();
            m_dataContext.Monitor.RefreshInterval = refreshInterval;
            PopupSettings.IsOpen = false;
        }