Esempio n. 1
0
 private void StopItem()
 {
     try {
         if (this.lvWatchList.SelectedItem != null)
         {
             WatchThreadViewItem selectedItem = (WatchThreadViewItem)this.lvWatchList.SelectedItem;
             selectedItem.watchThread.StopRunning(true);
             this.RefreshWatchThreadsListView();
         }
     } catch (Exception exception) {
         System.Windows.MessageBox.Show("Error Stopping Item.\r\n" + exception.Message);
     }
 }
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 contextBrowse(object sender, RoutedEventArgs e)
 {
     try {
         if (this.lvWatchList.SelectedItems.Count != 0)
         {
             WatchThreadViewItem selectedItem = (WatchThreadViewItem)this.lvWatchList.SelectedItem;
             string destFolder          = selectedItem.watchThread.destFolder;
             string environmentVariable = Environment.GetEnvironmentVariable("WINDIR");
             new Process {
                 StartInfo = { FileName = environmentVariable + @"\explorer.exe", Arguments = destFolder }
             }.Start();
         }
     } catch (Exception exception) {
         System.Windows.MessageBox.Show("Error Browsing Item Folder.\r\n" + exception.Message);
     }
 }
Esempio n. 4
0
 public void SetupViewItem()
 {
     try {
         WatchThreadViewItem item2 = new WatchThreadViewItem
         {
             Downloaded = "0",
             URL        = this.threadURL,
             Status     = "Running",
             Total      = "0"
         };
         WatchThreadViewItem item = item2;
         item.watchThread = this;
         this.watchThreadManager.watchThreadViewCollection.Add(item);
         this.watchThreadViewItem = item;
     } catch (Exception exception) {
         MessageBox.Show("Error in SetupViewItem.\r\n" + exception.Message);
     }
 }
Esempio n. 5
0
 public void SetupViewItem()
 {
     try {
     WatchThreadViewItem item2 = new WatchThreadViewItem
     {
       Downloaded = "0",
       URL = this.threadURL,
       Status = "Running",
       Total = "0"
     };
     WatchThreadViewItem item = item2;
     item.watchThread = this;
     this.watchThreadManager.watchThreadViewCollection.Add(item);
     this.watchThreadViewItem = item;
       } catch (Exception exception) {
     MessageBox.Show("Error in SetupViewItem.\r\n" + exception.Message);
       }
 }