diff options
author | sr55 <[email protected]> | 2010-08-29 20:41:07 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-08-29 20:41:07 +0000 |
commit | 466ea9a1a522e58dc972ffbba9deba3f615394a2 (patch) | |
tree | cf7b1ab9b3144d05b47c44967273c3f19cf74dd8 /win/C#/HandBrake.ApplicationServices/Services | |
parent | c9973fa6ab5ed42b2219faa9a0c12e06ef74139e (diff) |
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
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services')
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs | 47 | ||||
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs | 32 |
2 files changed, 79 insertions, 0 deletions
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: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Services
+{
+ using System;
+ using Interfaces;
+ using Views;
+
+ /// <summary>
+ /// The Error Service
+ /// </summary>
+ public class ErrorService : IErrorService
+ {
+ /// <summary>
+ /// Show an Error Window
+ /// </summary>
+ /// <param name="shortError">
+ /// The short error message for the user to read
+ /// </param>
+ /// <param name="longError">
+ /// Exception string or advanced details
+ /// </param>
+ public void ShowError(string shortError, string longError)
+ {
+ ExceptionWindow window = new ExceptionWindow();
+ window.Setup(shortError, longError);
+ window.Show();
+ }
+
+ /// <summary>
+ /// Show a Notice or Warning Message.
+ /// </summary>
+ /// <param name="notice">
+ /// The text to display to the user
+ /// </param>
+ /// <param name="isWarning">
+ /// Is a warning window, show the warning icon instead of the notice
+ /// </param>
+ 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: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
+
+namespace HandBrake.ApplicationServices.Services.Interfaces
+{
+ public interface IErrorService
+ {
+ /// <summary>
+ /// Show an Error Window
+ /// </summary>
+ /// <param name="shortError">
+ /// The short error message for the user to read
+ /// </param>
+ /// <param name="longError">
+ /// Exception string or advanced details
+ /// </param>
+ void ShowError(string shortError, string longError);
+
+ /// <summary>
+ /// Show a Notice or Warning Message.
+ /// </summary>
+ /// <param name="notice">
+ /// The text to display to the user
+ /// </param>
+ /// <param name="isWarning">
+ /// Is a warning window, show the warning icon instead of the notice
+ /// </param>
+ void ShowNotice(string notice, bool isWarning);
+ }
+}
\ No newline at end of file |