summaryrefslogtreecommitdiffstats
path: root/win/C#/HandBrake.ApplicationServices/Services
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services')
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs47
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs32
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