From 466ea9a1a522e58dc972ffbba9deba3f615394a2 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 29 Aug 2010 20:41:07 +0000 Subject: WinGui: - Created an error service, renamed the frmExceptionWindow to ExceptionWindow and removed it's duplicate from the main project. It's all in the AppServices library. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3503 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/ErrorService.cs | 47 ++++++++++++++++++++++ .../Services/Interfaces/IErrorService.cs | 32 +++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs create mode 100644 win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs (limited to 'win/C#/HandBrake.ApplicationServices/Services') diff --git a/win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs b/win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs new file mode 100644 index 000000000..039cae727 --- /dev/null +++ b/win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs @@ -0,0 +1,47 @@ +/* ErrorService.cs $ + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ + +namespace HandBrake.ApplicationServices.Services +{ + using System; + using Interfaces; + using Views; + + /// + /// The Error Service + /// + public class ErrorService : IErrorService + { + /// + /// Show an Error Window + /// + /// + /// The short error message for the user to read + /// + /// + /// Exception string or advanced details + /// + public void ShowError(string shortError, string longError) + { + ExceptionWindow window = new ExceptionWindow(); + window.Setup(shortError, longError); + window.Show(); + } + + /// + /// Show a Notice or Warning Message. + /// + /// + /// The text to display to the user + /// + /// + /// Is a warning window, show the warning icon instead of the notice + /// + public void ShowNotice(string notice, bool isWarning) + { + throw new NotImplementedException(); + } + } +} diff --git a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs new file mode 100644 index 000000000..385f67f09 --- /dev/null +++ b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs @@ -0,0 +1,32 @@ +/* IErrorService.cs $ + This file is part of the HandBrake source code. + Homepage: . + It may be used under the terms of the GNU General Public License. */ + +namespace HandBrake.ApplicationServices.Services.Interfaces +{ + public interface IErrorService + { + /// + /// Show an Error Window + /// + /// + /// The short error message for the user to read + /// + /// + /// Exception string or advanced details + /// + void ShowError(string shortError, string longError); + + /// + /// Show a Notice or Warning Message. + /// + /// + /// The text to display to the user + /// + /// + /// Is a warning window, show the warning icon instead of the notice + /// + void ShowNotice(string notice, bool isWarning); + } +} \ No newline at end of file -- cgit v1.2.3