Esempio n. 1
0
 private void btnAddClicked(object sender, RoutedEventArgs e)
 {
     try {
     Uri argUri = new Uri(this.txtURL.Text);
     if (argUri.IsWellFormedOriginalString()) {
       if (!this.theWatchManager.AddURL(argUri)) {
     this.winAddAdvanced = new windowAddAdvanced(argUri);
     this.winAddAdvanced.RegisterWatchThreadManager(ref this.theWatchManager);
     this.winAddAdvanced.Show();
       }
       if (Properties.Settings.Default.AutoSaveOnAdd) {
     this.wts.Serialize(this.theWatchManager, this.theDownloadManager);
       }
     } else {
       BrushConverter converter = new BrushConverter();
       this.txtURL.Background = converter.ConvertFromString("RED") as SolidColorBrush;
     }
       } catch (Exception) {
     BrushConverter converter2 = new BrushConverter();
     this.txtURL.Background = converter2.ConvertFromString("RED") as SolidColorBrush;
       }
 }
Esempio n. 2
0
 private void contextProperties(object sender, RoutedEventArgs e)
 {
     try {
     if (this.lvWatchList.SelectedItems.Count != 0) {
       WatchThreadViewItem selectedItem = (WatchThreadViewItem)this.lvWatchList.SelectedItem;
       this.winAddAdvanced = new windowAddAdvanced(selectedItem.watchThread);
       this.winAddAdvanced.RegisterWatchThreadManager(ref this.theWatchManager);
       this.winAddAdvanced.watchThreadSerializer = this.wts;
       this.winAddAdvanced.Show();
     }
       } catch (Exception exception) {
     System.Windows.MessageBox.Show("Error Opening Properties Window.\r\n" + exception.Message);
       }
 }
Esempio n. 3
0
 private void AddAdvanced_Click(object sender, RoutedEventArgs e)
 {
     try {
     this.winAddAdvanced = new windowAddAdvanced();
     this.winAddAdvanced.RegisterWatchThreadManager(ref this.theWatchManager);
     this.winAddAdvanced.watchThreadSerializer = this.wts;
     this.winAddAdvanced.Show();
       } catch {
     System.Windows.MessageBox.Show("Error Loading Advanced Watch Window.");
       }
 }