コード例 #1
0
 private async void ShowAgainComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         UpdateShowAgainUI();
         await VSTipHistoryManager.GetInstance().SetCadenceAsync(DisplayCadence.FromName(ShowAgainComboBox.SelectedValue.ToString()));
     }
     catch
     { }
 }
コード例 #2
0
        private void UpdateShowAgainUI()
        {
            var newCadence = DisplayCadence.FromName(ShowAgainComboBox.SelectedValue.ToString());

            if (newCadence.ShowEstimate)
            {
                ShowAgainTextBlock.Text   = LastDisplayTime.Add(newCadence.Delay).ToLocalTime().ToString("d");
                ShowAgainPanel.Visibility = Visibility.Visible;
            }
            else
            {
                ShowAgainPanel.Visibility = Visibility.Collapsed;
            }
        }
コード例 #3
0
        public DisplayCadence GetCadence()
        {
            var cadenceString = SettingsManager.GetValueOrDefault(TIP_CADENCE, string.Empty);

            return(string.IsNullOrEmpty(cadenceString) ? DisplayCadence.Startup : DisplayCadence.FromName(cadenceString));
        }