/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The EncodeCompletedEventArgs. /// </param> private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e) { if (EncodeCompleted != null) { this.EncodeCompleted(sender, e); } }
/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The EncodeCompletedEventArgs. /// </param> private void EncodeServiceEncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e) { if (userSettingService.GetUserSetting <bool>(UserSettingConstants.GrowlEncode)) { // GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done."); } }
/// <summary> /// Handle the Encode Completed Event /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The EncodeCompletedEventArgs. /// </param> private void encodeService_EncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e) { this.Percentage = "0.00%"; this.PercentageValue = 0; this.encodeService.EncodeCompleted -= this.encodeService_EncodeCompleted; this.encodeService.EncodeStatusChanged -= this.encodeService_EncodeStatusChanged; this.PlayFile(); }
/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The EncodeCompletedEventArgs. /// </param> private void EncodeService_EncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e) { // Send the file to the users requested applicaiton if (e.Successful) { this.SendToApplication(e.FileName); } // Allow the system to sleep again. Execute.OnUIThread(() => { if (this.userSettingService.GetUserSetting <bool>(UserSettingConstants.PreventSleep)) { Win32.AllowSleep(); } }); }
/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e) { encodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted; encodeService.EncodeStarted -= this.encodeService_EncodeStarted; encodeService.EncodeStatusChanged -= this.encodeService_EncodeStatusChanged; Subscribers.ForEach( delegate(IHbServiceCallback callback) { if (((ICommunicationObject)callback).State == CommunicationState.Opened) { Console.WriteLine("Encode Completed Callback"); callback.EncodeCompletedCallback(e); } else { Subscribers.Remove(callback); } }); }
/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The EncodeCompletedEventArgs. /// </param> private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e) { if (EncodeCompleted != null) { this.EncodeCompleted(sender, e); } }
/// <summary> /// The encode service_ encode completed. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e) { encodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted; encodeService.EncodeStarted -= this.encodeService_EncodeStarted; encodeService.EncodeStatusChanged -= this.encodeService_EncodeStatusChanged; Subscribers.ForEach( delegate(IHbServiceCallback callback) { if (((ICommunicationObject)callback).State == CommunicationState.Opened) { Console.WriteLine("Encode Completed Callback"); callback.EncodeCompletedCallback(e); } else { Subscribers.Remove(callback); } }); }