Beispiel #1
0
 // Menu: update youtube-dl
 private void MenuItem_Click_1(object sender, RoutedEventArgs e)     //raised when clicked Update youtube-dl in menu
 {
     YTDLInteract.UpdateYAYD upd = new YTDLInteract.UpdateYAYD();    // create new instance
     jts = new AuxWindows.JointTextShow();                           // create new console window
     upd.TrimmedErrorDataReceived  += Upd_TrimmedErrorDataReceived;  // send output to console
     upd.TrimmedOutputDataReceived += Upd_TrimmedOutputDataReceived; // send error to console
     upd.Finished += Upd_Finished;                                   // cleanup after finishing with the command
     jts.Show();                                                     // show the console window
     upd.Ready();
     upd.Start();                                                    // start the update
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new control, and its corresponding <c>Orchestrators.AdHocDownLoadAndConvertMP3</c>.
 /// </summary>
 /// <param name="URL">The URL to download.</param>
 /// <param name="loc">Location of final file.</param>
 public SingleLinkInMultiWindow(string URL, string loc = "")
 {
     jointLog = new AuxWindows.JointTextShow()
     {
         HideInsteadOfClose = true
     };
     InitializeComponent();
     if (string.IsNullOrWhiteSpace(loc))
     {
         loc = "default.mp3";
     }
     AdHocDownLoadAndConvertMP3 = new Orchestrators.AdHocDownLoadAndConvertMP3(URL, loc, this.Dispatcher);
     AdHocDownLoadAndConvertMP3.TrimmedOutputDataReceived += AdHocDownLoadAndConvertMP3_TrimmedOutputDataReceived;
     AdHocDownLoadAndConvertMP3.TrimmedErrorDataReceived  += AdHocDownLoadAndConvertMP3_TrimmedErrorDataReceived;
     AdHocDownLoadAndConvertMP3.Finished                  += AdHocDownLoadAndConvertMP3_Finished;
     AdHocDownLoadAndConvertMP3.GetMetaFinished           += AdHocDownLoadAndConvertMP3_GetMetaFinished;
     AdHocDownLoadAndConvertMP3.DownloadFinished          += AdHocDownLoadAndConvertMP3_DownloadFinished;
     AdHocDownLoadAndConvertMP3.DownloadThumbNailFinished += AdHocDownLoadAndConvertMP3_DownloadThumbNailFinished;
     AdHocDownLoadAndConvertMP3.ConvertFinished           += AdHocDownLoadAndConvertMP3_ConvertFinished;
     AdHocDownLoadAndConvertMP3.StatusChanged             += AdHocDownLoadAndConvertMP3_StatusChanged;
     AdHocDownLoadAndConvertMP3.ProgressReported          += AdHocDownLoadAndConvertMP3_ProgressReported;
     Ready();
 }