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#/Functions/Main.cs | |
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#/Functions/Main.cs')
-rw-r--r-- | win/C#/Functions/Main.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index b8b689ce1..02cf67b34 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -3,7 +3,7 @@ Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-using System.Linq;
+using HandBrake.ApplicationServices.Services;
namespace Handbrake.Functions
{
@@ -11,18 +11,16 @@ namespace Handbrake.Functions using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+ using System.Linq;
using System.Net;
- using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml.Serialization;
-
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
-
using Model;
/// <summary>
@@ -31,6 +29,11 @@ namespace Handbrake.Functions public static class Main
{
/// <summary>
+ /// The Error Service
+ /// </summary>
+ private static readonly IErrorService errorService = new ErrorService();
+
+ /// <summary>
/// The XML Serializer
/// </summary>
private static readonly XmlSerializer Ser = new XmlSerializer(typeof(List<Job>));
@@ -168,9 +171,7 @@ namespace Handbrake.Functions }
catch (Exception exc)
{
- frmExceptionWindow exceptionWindow = new frmExceptionWindow();
- exceptionWindow.Setup("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode", exc.ToString());
- exceptionWindow.ShowDialog();
+ ShowExceptiowWindow("Unable to save Chapter Makrers file! \nChapter marker names will NOT be saved in your encode", exc.ToString());
return false;
}
}
@@ -343,9 +344,7 @@ namespace Handbrake.Functions Properties.Settings.Default.hb_build = 0;
Properties.Settings.Default.Save();
- frmExceptionWindow exceptionWindow = new frmExceptionWindow();
- exceptionWindow.Setup("Unable to retrieve version information from the CLI.", e.ToString());
- exceptionWindow.ShowDialog();
+ ShowExceptiowWindow("Unable to retrieve version information from the CLI.", e.ToString());
}
}
@@ -829,9 +828,7 @@ namespace Handbrake.Functions /// </param>
public static void ShowExceptiowWindow(string shortError, string longError)
{
- frmExceptionWindow exceptionWindow = new frmExceptionWindow();
- exceptionWindow.Setup(shortError, longError);
- exceptionWindow.Show();
+ errorService.ShowError(shortError, longError);
}
/// <summary>
|