summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-09-19 12:17:07 +0000
committersr55 <[email protected]>2010-09-19 12:17:07 +0000
commit1d3a178d671af6d09b3e3be35562fe5070ace809 (patch)
tree288f38ac3e39cf5300fb7d3ddffff5e3604b1565 /win/C#
parent8cac9d8c62ce452ff27a6b70f005056f44b55581 (diff)
WinGui:
- Moved some non-specific HandBrake code (Exception Window, Update Information Window, Update Download Window) out into a separate framework library. Hoping to make this more reusable at a later point. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3543 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/Controls/Subtitles.cs10
-rw-r--r--win/C#/Functions/Main.cs87
-rw-r--r--win/C#/HandBrake.ApplicationServices/Functions/Main.cs2
-rw-r--r--win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj28
-rw-r--r--win/C#/HandBrake.ApplicationServices/Properties/Resources.Designer.cs22
-rw-r--r--win/C#/HandBrake.ApplicationServices/Properties/Resources.resx6
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Encode.cs3
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Queue.cs1
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Scan.cs2
-rw-r--r--win/C#/HandBrake.Framework/HandBrake.Framework.csproj110
-rw-r--r--win/C#/HandBrake.Framework/Helpers/AppcastReader.cs (renamed from win/C#/Functions/AppcastReader.cs)4
-rw-r--r--win/C#/HandBrake.Framework/Model/UpdateCheckInformation.cs39
-rw-r--r--win/C#/HandBrake.Framework/Model/UpdateCheckResult.cs (renamed from win/C#/Functions/UpdateCheckInformation.cs)35
-rw-r--r--win/C#/HandBrake.Framework/Properties/AssemblyInfo.cs36
-rw-r--r--win/C#/HandBrake.Framework/Properties/Resources.Designer.cs84
-rw-r--r--win/C#/HandBrake.Framework/Properties/Resources.resx130
-rw-r--r--win/C#/HandBrake.Framework/Resources/copy.png (renamed from win/C#/HandBrake.ApplicationServices/Resources/copy.png)bin3291 -> 3291 bytes
-rw-r--r--win/C#/HandBrake.Framework/Resources/errorx.png (renamed from win/C#/HandBrake.ApplicationServices/Resources/ErrorX.png)bin10369 -> 10369 bytes
-rw-r--r--win/C#/HandBrake.Framework/Resources/logo64.pngbin0 -> 11967 bytes
-rw-r--r--win/C#/HandBrake.Framework/Services/ErrorService.cs (renamed from win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs)6
-rw-r--r--win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs (renamed from win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs)2
-rw-r--r--win/C#/HandBrake.Framework/Services/UpdateService.cs101
-rw-r--r--win/C#/HandBrake.Framework/Views/DownloadUpdate.Designer.cs (renamed from win/C#/frmDownload.Designer.cs)10
-rw-r--r--win/C#/HandBrake.Framework/Views/DownloadUpdate.cs (renamed from win/C#/frmDownload.cs)8
-rw-r--r--win/C#/HandBrake.Framework/Views/DownloadUpdate.resx (renamed from win/C#/frmDownload.resx)0
-rw-r--r--win/C#/HandBrake.Framework/Views/ExceptionWindow.cs (renamed from win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.cs)4
-rw-r--r--win/C#/HandBrake.Framework/Views/ExceptionWindow.designer.cs (renamed from win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.designer.cs)8
-rw-r--r--win/C#/HandBrake.Framework/Views/ExceptionWindow.resx (renamed from win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.resx)0
-rw-r--r--win/C#/HandBrake.Framework/Views/UpdateInfo.Designer.cs (renamed from win/C#/frmUpdater.Designer.cs)36
-rw-r--r--win/C#/HandBrake.Framework/Views/UpdateInfo.cs (renamed from win/C#/frmUpdater.cs)52
-rw-r--r--win/C#/HandBrake.Framework/Views/UpdateInfo.resx (renamed from win/C#/frmUpdater.resx)0
-rw-r--r--win/C#/HandBrake10.sln14
-rw-r--r--win/C#/HandBrakeCS.csproj26
-rw-r--r--win/C#/frmActivityWindow.cs3
-rw-r--r--win/C#/frmMain.cs32
-rw-r--r--win/C#/frmMain.resx21
36 files changed, 659 insertions, 263 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index 0583aa802..dec3ec11a 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -690,6 +690,14 @@ namespace Handbrake.Controls
drp_subtitleTracks.SelectedIndex = 0;
Clear();
+ this.AutomaticSubtitleSelection();
+ }
+
+ /// <summary>
+ /// Automatic Subtitle Selection based on user preferences.
+ /// </summary>
+ public void AutomaticSubtitleSelection()
+ {
// Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
if (Properties.Settings.Default.NativeLanguage != "Any")
{
@@ -714,7 +722,7 @@ namespace Handbrake.Controls
BtnAddSubTrackClick(this, new EventArgs());
}
}
- }
+ }
}
}
}
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 78da9ca3c..385671355 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -16,6 +16,9 @@ namespace Handbrake.Functions
using System.Threading;
using System.Windows.Forms;
using System.Xml.Serialization;
+
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Services.Interfaces;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -486,90 +489,6 @@ namespace Handbrake.Functions
}
/// <summary>
- /// Begins checking for an update to HandBrake.
- /// </summary>
- /// <param name="callback">The method that will be called when the check is finished.</param>
- /// <param name="debug">Whether or not to execute this in debug mode.</param>
- public static void BeginCheckForUpdates(AsyncCallback callback, bool debug)
- {
- ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
- {
- try
- {
- // Is this a stable or unstable build?
- string url =
- Properties.Settings.Default.hb_build.ToString()
- .EndsWith("1")
- ? Properties.Settings.Default.
- appcast_unstable
- : Properties.Settings.Default.appcast;
-
- // Initialize variables
- WebRequest request = WebRequest.Create(url);
- WebResponse response = request.GetResponse();
- AppcastReader reader = new AppcastReader();
-
- // Get the data, convert it to a string, and parse it into the AppcastReader
- reader.GetInfo(
- new StreamReader(response.GetResponseStream())
- .ReadToEnd());
-
- // Further parse the information
- string build = reader.Build;
-
- int latest = int.Parse(build);
- int current = Properties.Settings.Default.hb_build;
- int skip = Properties.Settings.Default.skipversion;
-
- // If the user wanted to skip this version, don't report the update
- if (latest == skip)
- {
- UpdateCheckInformation info =
- new UpdateCheckInformation
- {
- NewVersionAvailable = false,
- BuildInformation = null
- };
- callback(new UpdateCheckResult(debug, info));
- return;
- }
-
- // Set when the last update was
- Properties.Settings.Default.lastUpdateCheckDate =
- DateTime.Now;
- Properties.Settings.Default.Save();
-
- UpdateCheckInformation info2 =
- new UpdateCheckInformation
- {
- NewVersionAvailable = latest > current,
- BuildInformation = reader
- };
- callback(new UpdateCheckResult(debug, info2));
- }
- catch (Exception exc)
- {
- callback(new UpdateCheckResult(debug, new UpdateCheckInformation { Error = exc }));
- }
- }));
- }
-
- /// <summary>
- /// End Check for Updates
- /// </summary>
- /// <param name="result">
- /// The result.
- /// </param>
- /// <returns>
- /// Update Check information
- /// </returns>
- public static UpdateCheckInformation EndCheckForUpdates(IAsyncResult result)
- {
- UpdateCheckResult checkResult = (UpdateCheckResult)result;
- return checkResult.Result;
- }
-
- /// <summary>
/// Map languages and their iso639_2 value into a IDictionary
/// </summary>
/// <returns>A Dictionary containing the language and iso code</returns>
diff --git a/win/C#/HandBrake.ApplicationServices/Functions/Main.cs b/win/C#/HandBrake.ApplicationServices/Functions/Main.cs
index a8ebee394..368065dca 100644
--- a/win/C#/HandBrake.ApplicationServices/Functions/Main.cs
+++ b/win/C#/HandBrake.ApplicationServices/Functions/Main.cs
@@ -7,8 +7,6 @@ namespace HandBrake.ApplicationServices.Functions
{
using System.Diagnostics;
- using HandBrake.ApplicationServices.Views;
-
/// <summary>
/// Useful functions which various screens can use.
/// </summary>
diff --git a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index 50fe295ae..5e06e87cd 100644
--- a/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -99,42 +99,32 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Services\Encode.cs" />
- <Compile Include="Services\ErrorService.cs" />
<Compile Include="Services\Interfaces\IEncode.cs" />
- <Compile Include="Services\Interfaces\IErrorService.cs" />
<Compile Include="Services\Interfaces\IQueue.cs" />
<Compile Include="Services\Interfaces\IScan.cs" />
<Compile Include="Services\Queue.cs" />
<Compile Include="Services\Scan.cs" />
- <Compile Include="Views\ExceptionWindow.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Views\ExceptionWindow.designer.cs">
- <DependentUpon>ExceptionWindow.cs</DependentUpon>
- </Compile>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
+ <None Include="Properties\AssemblyInfo.cs.tmpl" />
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
- <Generator>PublicResXFileCodeGenerator</Generator>
+ <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="Views\ExceptionWindow.resx">
- <DependentUpon>ExceptionWindow.cs</DependentUpon>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\logo64.png" />
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Resources\ErrorX.png" />
+ <None Include="Resources\logo64.png" />
</ItemGroup>
<ItemGroup>
- <None Include="Properties\AssemblyInfo.cs.tmpl" />
- <EmbeddedResource Include="Resources\copy.png" />
+ <ProjectReference Include="..\HandBrake.Framework\HandBrake.Framework.csproj">
+ <Project>{49AD42C1-BF9B-4D78-A644-020878FAADE6}</Project>
+ <Name>HandBrake.Framework</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />
diff --git a/win/C#/HandBrake.ApplicationServices/Properties/Resources.Designer.cs b/win/C#/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
index bdebc7bd2..c1dd66e55 100644
--- a/win/C#/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
+++ b/win/C#/HandBrake.ApplicationServices/Properties/Resources.Designer.cs
@@ -22,7 +22,7 @@ namespace HandBrake.ApplicationServices.Properties {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- public class Resources {
+ internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
@@ -36,7 +36,7 @@ namespace HandBrake.ApplicationServices.Properties {
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Resources.ResourceManager ResourceManager {
+ internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandBrake.ApplicationServices.Properties.Resources", typeof(Resources).Assembly);
@@ -51,7 +51,7 @@ namespace HandBrake.ApplicationServices.Properties {
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- public static global::System.Globalization.CultureInfo Culture {
+ internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -60,21 +60,7 @@ namespace HandBrake.ApplicationServices.Properties {
}
}
- public static System.Drawing.Bitmap copy {
- get {
- object obj = ResourceManager.GetObject("copy", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- public static System.Drawing.Bitmap ErrorX {
- get {
- object obj = ResourceManager.GetObject("ErrorX", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- public static System.Drawing.Bitmap logo64 {
+ internal static System.Drawing.Bitmap logo64 {
get {
object obj = ResourceManager.GetObject("logo64", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
diff --git a/win/C#/HandBrake.ApplicationServices/Properties/Resources.resx b/win/C#/HandBrake.ApplicationServices/Properties/Resources.resx
index 9971f5d8c..2e1c2842b 100644
--- a/win/C#/HandBrake.ApplicationServices/Properties/Resources.resx
+++ b/win/C#/HandBrake.ApplicationServices/Properties/Resources.resx
@@ -118,12 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
- <data name="ErrorX" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>..\Resources\ErrorX.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
<data name="logo64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
index 42d2822ea..855f517b2 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
@@ -12,10 +12,11 @@ namespace HandBrake.ApplicationServices.Services
using System.Threading;
using System.Windows.Forms;
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Services.Interfaces;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Properties;
using HandBrake.ApplicationServices.Services.Interfaces;
/// <summary>
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Queue.cs b/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
index 4c4beda08..ae5c437ad 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
@@ -17,7 +17,6 @@ namespace HandBrake.ApplicationServices.Services
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Properties;
using HandBrake.ApplicationServices.Services.Interfaces;
/// <summary>
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
index be150989b..45bd37a90 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs
@@ -12,6 +12,8 @@ namespace HandBrake.ApplicationServices.Services
using System.Threading;
using System.Windows.Forms;
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Services.Interfaces;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
diff --git a/win/C#/HandBrake.Framework/HandBrake.Framework.csproj b/win/C#/HandBrake.Framework/HandBrake.Framework.csproj
new file mode 100644
index 000000000..861b79b42
--- /dev/null
+++ b/win/C#/HandBrake.Framework/HandBrake.Framework.csproj
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{49AD42C1-BF9B-4D78-A644-020878FAADE6}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>HandBrake.Framework</RootNamespace>
+ <AssemblyName>HandBrake.Framework</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Helpers\AppcastReader.cs" />
+ <Compile Include="Model\UpdateCheckResult.cs" />
+ <Compile Include="Model\UpdateCheckInformation.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Services\ErrorService.cs" />
+ <Compile Include="Services\Interfaces\IErrorService.cs" />
+ <Compile Include="Services\UpdateService.cs" />
+ <Compile Include="Views\ExceptionWindow.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Views\ExceptionWindow.designer.cs">
+ <DependentUpon>ExceptionWindow.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Views\DownloadUpdate.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Views\DownloadUpdate.Designer.cs">
+ <DependentUpon>DownloadUpdate.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Views\UpdateInfo.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Views\UpdateInfo.Designer.cs">
+ <DependentUpon>UpdateInfo.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Views\ExceptionWindow.resx">
+ <DependentUpon>ExceptionWindow.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Views\DownloadUpdate.resx">
+ <DependentUpon>DownloadUpdate.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Views\UpdateInfo.resx">
+ <DependentUpon>UpdateInfo.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\copy.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\errorx.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\logo64.png" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/HandBrake.Framework/Helpers/AppcastReader.cs
index 6b4a48470..cba2e18d1 100644
--- a/win/C#/Functions/AppcastReader.cs
+++ b/win/C#/HandBrake.Framework/Helpers/AppcastReader.cs
@@ -1,9 +1,9 @@
-/* RssReader.cs $
+/* AppcastReader.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.Functions
+namespace HandBrake.Framework.Helpers
{
using System;
using System.IO;
diff --git a/win/C#/HandBrake.Framework/Model/UpdateCheckInformation.cs b/win/C#/HandBrake.Framework/Model/UpdateCheckInformation.cs
new file mode 100644
index 000000000..6c1fd12d5
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Model/UpdateCheckInformation.cs
@@ -0,0 +1,39 @@
+/* UpdateCheckInformation.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.Framework.Model
+{
+ using System;
+ using HandBrake.Framework.Helpers;
+
+ /// <summary>
+ /// Provides information about an update check.
+ /// </summary>
+ public struct UpdateCheckInformation
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether a New Version is Available.
+ /// </summary>
+ public bool NewVersionAvailable { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether an Error Occured.
+ /// </summary>
+ public bool ErrorOccured
+ {
+ get { return this.Error != null; }
+ }
+
+ /// <summary>
+ /// Gets or sets information about the new build, if any. This will be null if there is no new verison.
+ /// </summary>
+ public AppcastReader BuildInformation { get; set; }
+
+ /// <summary>
+ /// Gets or sets the error that occurred, if any. This will be null if no error occured.
+ /// </summary>
+ public Exception Error { get; set; }
+ }
+}
diff --git a/win/C#/Functions/UpdateCheckInformation.cs b/win/C#/HandBrake.Framework/Model/UpdateCheckResult.cs
index b3ed02b88..ba04100ca 100644
--- a/win/C#/Functions/UpdateCheckInformation.cs
+++ b/win/C#/HandBrake.Framework/Model/UpdateCheckResult.cs
@@ -1,49 +1,20 @@
-/* UpdateCheckInformation.cs $
+/* UpdateCheckResult.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.Functions
+namespace HandBrake.Framework.Model
{
using System;
using System.Threading;
/// <summary>
- /// Provides information about an update check.
- /// </summary>
- public struct UpdateCheckInformation
- {
- /// <summary>
- /// Gets or sets a value indicating whether a New Version is Available.
- /// </summary>
- public bool NewVersionAvailable { get; set; }
-
- /// <summary>
- /// Gets a value indicating whether an Error Occured.
- /// </summary>
- public bool ErrorOccured
- {
- get { return this.Error != null; }
- }
-
- /// <summary>
- /// Gets or sets information about the new build, if any. This will be null if there is no new verison.
- /// </summary>
- public AppcastReader BuildInformation { get; set; }
-
- /// <summary>
- /// Gets or sets the error that occurred, if any. This will be null if no error occured.
- /// </summary>
- public Exception Error { get; set; }
- }
-
- /// <summary>
/// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
/// </summary>
public class UpdateCheckResult : IAsyncResult
{
/// <summary>
- /// Initializes a new instance of the <see cref="UpdateCheckResult"/> class.
+ /// Initializes a new instance of the <see cref="HandBrake.Framework.Model.UpdateCheckResult"/> class.
/// </summary>
/// <param name="asyncState">
/// The async state.
diff --git a/win/C#/HandBrake.Framework/Properties/AssemblyInfo.cs b/win/C#/HandBrake.Framework/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..d6b958c94
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HandBrake.Framework")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HandBrake Team")]
+[assembly: AssemblyProduct("HandBrake.Framework")]
+[assembly: AssemblyCopyright("Copyright © HandBrake Team")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("85248e69-53e0-4a37-a1a6-95c2e99fc750")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("0.9.5.0")]
+[assembly: AssemblyFileVersion("0.9.5.0")]
diff --git a/win/C#/HandBrake.Framework/Properties/Resources.Designer.cs b/win/C#/HandBrake.Framework/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..0a0ed63cd
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Properties/Resources.Designer.cs
@@ -0,0 +1,84 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HandBrake.Framework.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandBrake.Framework.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Bitmap copy {
+ get {
+ object obj = ResourceManager.GetObject("copy", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ErrorX {
+ get {
+ object obj = ResourceManager.GetObject("ErrorX", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap logo64 {
+ get {
+ object obj = ResourceManager.GetObject("logo64", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/win/C#/HandBrake.Framework/Properties/Resources.resx b/win/C#/HandBrake.Framework/Properties/Resources.resx
new file mode 100644
index 000000000..347b5fec4
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Properties/Resources.resx
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="ErrorX" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\errorx.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="logo64" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\logo64.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/win/C#/HandBrake.ApplicationServices/Resources/copy.png b/win/C#/HandBrake.Framework/Resources/copy.png
index c11c6a753..c11c6a753 100644
--- a/win/C#/HandBrake.ApplicationServices/Resources/copy.png
+++ b/win/C#/HandBrake.Framework/Resources/copy.png
Binary files differ
diff --git a/win/C#/HandBrake.ApplicationServices/Resources/ErrorX.png b/win/C#/HandBrake.Framework/Resources/errorx.png
index 75c63c08a..75c63c08a 100644
--- a/win/C#/HandBrake.ApplicationServices/Resources/ErrorX.png
+++ b/win/C#/HandBrake.Framework/Resources/errorx.png
Binary files differ
diff --git a/win/C#/HandBrake.Framework/Resources/logo64.png b/win/C#/HandBrake.Framework/Resources/logo64.png
new file mode 100644
index 000000000..12808f636
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Resources/logo64.png
Binary files differ
diff --git a/win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs b/win/C#/HandBrake.Framework/Services/ErrorService.cs
index 7b75ce893..5444ea7bc 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/ErrorService.cs
+++ b/win/C#/HandBrake.Framework/Services/ErrorService.cs
@@ -3,14 +3,14 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace HandBrake.ApplicationServices.Services
+namespace HandBrake.Framework.Services
{
using System;
using System.IO;
using System.Threading;
- using Interfaces;
- using Views;
+ using HandBrake.Framework.Services.Interfaces;
+ using HandBrake.Framework.Views;
/// <summary>
/// The Error Service
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs b/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs
index 2c61f0ff4..86d6f02d7 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IErrorService.cs
+++ b/win/C#/HandBrake.Framework/Services/Interfaces/IErrorService.cs
@@ -3,7 +3,7 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace HandBrake.ApplicationServices.Services.Interfaces
+namespace HandBrake.Framework.Services.Interfaces
{
/// <summary>
/// The Error service for showing the exception window.
diff --git a/win/C#/HandBrake.Framework/Services/UpdateService.cs b/win/C#/HandBrake.Framework/Services/UpdateService.cs
new file mode 100644
index 000000000..21688e0a5
--- /dev/null
+++ b/win/C#/HandBrake.Framework/Services/UpdateService.cs
@@ -0,0 +1,101 @@
+/* UpdateService.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.Framework.Services
+{
+ using System;
+ using System.IO;
+ using System.Net;
+ using System.Threading;
+
+ using HandBrake.Framework.Helpers;
+ using HandBrake.Framework.Model;
+
+ public class UpdateService
+ {
+ /// <summary>
+ /// Begins checking for an update to HandBrake.
+ /// </summary>
+ /// <param name="callback">
+ /// The method that will be called when the check is finished.
+ /// </param>
+ /// <param name="debug">
+ /// Whether or not to execute this in debug mode.
+ /// </param>
+ /// <param name="url">
+ /// The url.
+ /// </param>
+ /// <param name="currentBuild">
+ /// The current Build.
+ /// </param>
+ /// <param name="skipBuild">
+ /// The skip Build.
+ /// </param>
+ /// <param name="currentVersion">
+ /// The current Version.
+ /// </param>
+ public static void BeginCheckForUpdates(AsyncCallback callback, bool debug, string url, int currentBuild, int skipBuild, string currentVersion)
+ {
+ ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
+ {
+ try
+ {
+ // Initialize variables
+ WebRequest request = WebRequest.Create(url);
+ WebResponse response = request.GetResponse();
+ AppcastReader reader = new AppcastReader();
+
+ // Get the data, convert it to a string, and parse it into the AppcastReader
+ reader.GetInfo(new StreamReader(response.GetResponseStream()).ReadToEnd());
+
+ // Further parse the information
+ string build = reader.Build;
+
+ int latest = int.Parse(build);
+ int current = currentBuild;
+ int skip = skipBuild;
+
+ // If the user wanted to skip this version, don't report the update
+ if (latest == skip)
+ {
+ UpdateCheckInformation info =
+ new UpdateCheckInformation
+ {
+ NewVersionAvailable = false,
+ BuildInformation = null
+ };
+ callback(new UpdateCheckResult(debug, info));
+ return;
+ }
+
+ UpdateCheckInformation info2 = new UpdateCheckInformation
+ {
+ NewVersionAvailable = latest > current,
+ BuildInformation = reader
+ };
+ callback(new UpdateCheckResult(debug, info2));
+ }
+ catch (Exception exc)
+ {
+ callback(new UpdateCheckResult(debug, new UpdateCheckInformation { Error = exc }));
+ }
+ }));
+ }
+
+ /// <summary>
+ /// End Check for Updates
+ /// </summary>
+ /// <param name="result">
+ /// The result.
+ /// </param>
+ /// <returns>
+ /// Update Check information
+ /// </returns>
+ public static UpdateCheckInformation EndCheckForUpdates(IAsyncResult result)
+ {
+ return ((UpdateCheckResult)result).Result;
+ }
+ }
+}
diff --git a/win/C#/frmDownload.Designer.cs b/win/C#/HandBrake.Framework/Views/DownloadUpdate.Designer.cs
index 9fd186f82..1311fa2c4 100644
--- a/win/C#/frmDownload.Designer.cs
+++ b/win/C#/HandBrake.Framework/Views/DownloadUpdate.Designer.cs
@@ -4,9 +4,9 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace Handbrake
+namespace HandBrake.Framework.Views
{
- partial class frmDownload
+ partial class DownloadUpdate
{
/// <summary>
/// Required designer variable.
@@ -34,7 +34,7 @@ namespace Handbrake
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDownload));
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DownloadUpdate));
this.lblProgress = new System.Windows.Forms.Label();
this.progress_download = new System.Windows.Forms.ProgressBar();
this.btn_cancel = new System.Windows.Forms.Button();
@@ -98,7 +98,7 @@ namespace Handbrake
//
// PictureBox1
//
- this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo64;
+ this.PictureBox1.Image = global::HandBrake.Framework.Properties.Resources.logo64;
this.PictureBox1.InitialImage = null;
this.PictureBox1.Location = new System.Drawing.Point(3, 3);
this.PictureBox1.Name = "PictureBox1";
@@ -119,7 +119,7 @@ namespace Handbrake
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.Name = "frmDownload";
+ this.Name = "DownloadUpdate";
this.Padding = new System.Windows.Forms.Padding(9);
this.ShowIcon = false;
this.ShowInTaskbar = false;
diff --git a/win/C#/frmDownload.cs b/win/C#/HandBrake.Framework/Views/DownloadUpdate.cs
index e7f06f6ea..dc4aef154 100644
--- a/win/C#/frmDownload.cs
+++ b/win/C#/HandBrake.Framework/Views/DownloadUpdate.cs
@@ -1,9 +1,9 @@
-/* frmDownload.cs $
+/* DownloadUpdate.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
+namespace HandBrake.Framework.Views
{
using System;
using System.Diagnostics;
@@ -15,7 +15,7 @@ namespace Handbrake
/// <summary>
/// The Download Window
/// </summary>
- public partial class frmDownload : Form
+ public partial class DownloadUpdate : Form
{
private readonly Thread downloadThread;
private Stream responceStream;
@@ -31,7 +31,7 @@ namespace Handbrake
private delegate void DownloadFailedCallback();
- public frmDownload(string filename)
+ public DownloadUpdate(string filename)
{
InitializeComponent();
diff --git a/win/C#/frmDownload.resx b/win/C#/HandBrake.Framework/Views/DownloadUpdate.resx
index 37f92905a..37f92905a 100644
--- a/win/C#/frmDownload.resx
+++ b/win/C#/HandBrake.Framework/Views/DownloadUpdate.resx
diff --git a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.cs b/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs
index 7d18fc1a3..25dc6fd3e 100644
--- a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.cs
+++ b/win/C#/HandBrake.Framework/Views/ExceptionWindow.cs
@@ -1,9 +1,9 @@
-/* frmExceptionWindow.cs $
+/* ExceptionWindow.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.Views
+namespace HandBrake.Framework.Views
{
using System;
using System.Windows.Forms;
diff --git a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.designer.cs b/win/C#/HandBrake.Framework/Views/ExceptionWindow.designer.cs
index 697d75c78..3a0abf660 100644
--- a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.designer.cs
+++ b/win/C#/HandBrake.Framework/Views/ExceptionWindow.designer.cs
@@ -1,4 +1,4 @@
-namespace HandBrake.ApplicationServices.Views
+namespace HandBrake.Framework.Views
{
partial class ExceptionWindow
{
@@ -76,7 +76,7 @@
//
// PictureBox1
//
- this.PictureBox1.Image = global::HandBrake.ApplicationServices.Properties.Resources.ErrorX;
+ this.PictureBox1.Image = global::HandBrake.Framework.Properties.Resources.ErrorX;
this.PictureBox1.InitialImage = null;
this.PictureBox1.Location = new System.Drawing.Point(12, 12);
this.PictureBox1.Name = "PictureBox1";
@@ -167,7 +167,7 @@
this.btn_copy.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btn_copy.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_copy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_copy.Image = global::HandBrake.ApplicationServices.Properties.Resources.copy;
+ this.btn_copy.Image = global::HandBrake.Framework.Properties.Resources.copy;
this.btn_copy.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_copy.Location = new System.Drawing.Point(14, 8);
this.btn_copy.Name = "btn_copy";
@@ -188,7 +188,7 @@
//
// mnu_copy_log
//
- this.mnu_copy_log.Image = global::HandBrake.ApplicationServices.Properties.Resources.copy;
+ this.mnu_copy_log.Image = global::HandBrake.Framework.Properties.Resources.copy;
this.mnu_copy_log.Name = "mnu_copy_log";
this.mnu_copy_log.Size = new System.Drawing.Size(152, 22);
this.mnu_copy_log.Text = "Copy";
diff --git a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.resx b/win/C#/HandBrake.Framework/Views/ExceptionWindow.resx
index ff217dc4f..ff217dc4f 100644
--- a/win/C#/HandBrake.ApplicationServices/Views/ExceptionWindow.resx
+++ b/win/C#/HandBrake.Framework/Views/ExceptionWindow.resx
diff --git a/win/C#/frmUpdater.Designer.cs b/win/C#/HandBrake.Framework/Views/UpdateInfo.Designer.cs
index 7e377b4a4..986af5c78 100644
--- a/win/C#/frmUpdater.Designer.cs
+++ b/win/C#/HandBrake.Framework/Views/UpdateInfo.Designer.cs
@@ -3,9 +3,9 @@
Homepage: <http://handbrake.fr>.
It may be used under the terms of the GNU General Public License. */
-namespace Handbrake
+namespace HandBrake.Framework.Views
{
- partial class frmUpdater
+ partial class UpdateInfo
{
/// <summary>
/// Required designer variable.
@@ -33,7 +33,7 @@ namespace Handbrake
/// </summary>
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmUpdater));
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateInfo));
this.label1 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.btn_skip = new System.Windows.Forms.Button();
@@ -43,21 +43,21 @@ namespace Handbrake
this.lbl_update_text = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
+ this.PictureBox1 = new System.Windows.Forms.PictureBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.panel3 = new System.Windows.Forms.Panel();
this.panel5 = new System.Windows.Forms.Panel();
this.wBrowser = new System.Windows.Forms.WebBrowser();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.button_container = new System.Windows.Forms.SplitContainer();
- this.PictureBox1 = new System.Windows.Forms.PictureBox();
this.panel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.button_container.Panel1.SuspendLayout();
this.button_container.Panel2.SuspendLayout();
this.button_container.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
this.SuspendLayout();
//
// label1
@@ -172,6 +172,16 @@ namespace Handbrake
this.panel2.Size = new System.Drawing.Size(710, 10);
this.panel2.TabIndex = 59;
//
+ // PictureBox1
+ //
+ this.PictureBox1.Image = global::HandBrake.Framework.Properties.Resources.logo64;
+ this.PictureBox1.InitialImage = null;
+ this.PictureBox1.Location = new System.Drawing.Point(12, 12);
+ this.PictureBox1.Name = "PictureBox1";
+ this.PictureBox1.Size = new System.Drawing.Size(64, 64);
+ this.PictureBox1.TabIndex = 24;
+ this.PictureBox1.TabStop = false;
+ //
// statusStrip1
//
this.statusStrip1.Location = new System.Drawing.Point(0, 346);
@@ -244,17 +254,7 @@ namespace Handbrake
this.button_container.SplitterDistance = 318;
this.button_container.TabIndex = 0;
//
- // PictureBox1
- //
- this.PictureBox1.Image = global::Handbrake.Properties.Resources.logo64;
- this.PictureBox1.InitialImage = null;
- this.PictureBox1.Location = new System.Drawing.Point(12, 12);
- this.PictureBox1.Name = "PictureBox1";
- this.PictureBox1.Size = new System.Drawing.Size(64, 64);
- this.PictureBox1.TabIndex = 24;
- this.PictureBox1.TabStop = false;
- //
- // frmUpdater
+ // UpdateInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
@@ -268,11 +268,12 @@ namespace Handbrake
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimumSize = new System.Drawing.Size(540, 300);
- this.Name = "frmUpdater";
+ this.Name = "UpdateInfo";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Update";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
@@ -281,7 +282,6 @@ namespace Handbrake
this.button_container.Panel2.ResumeLayout(false);
this.button_container.Panel2.PerformLayout();
this.button_container.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/win/C#/frmUpdater.cs b/win/C#/HandBrake.Framework/Views/UpdateInfo.cs
index 7d56c587e..abeb9c37a 100644
--- a/win/C#/frmUpdater.cs
+++ b/win/C#/HandBrake.Framework/Views/UpdateInfo.cs
@@ -1,18 +1,19 @@
-/* frmUpdater.cs $
+/* UpdateInfo.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
+namespace HandBrake.Framework.Views
{
using System;
using System.Windows.Forms;
- using Functions;
+
+ using HandBrake.Framework.Helpers;
/// <summary>
/// A window to display update information.
/// </summary>
- public partial class frmUpdater : Form
+ public partial class UpdateInfo : Form
{
/// <summary>
/// An instance of the Appcast Reader
@@ -20,19 +21,43 @@ namespace Handbrake
private readonly AppcastReader appcast;
/// <summary>
- /// Initializes a new instance of the <see cref="frmUpdater"/> class.
+ /// The Current Version
+ /// </summary>
+ private readonly string currentVersion;
+
+ /// <summary>
+ /// The Current Build
+ /// </summary>
+ private readonly string currentBuild;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UpdateInfo"/> class.
/// </summary>
/// <param name="reader">
/// The appcast reader.
/// </param>
- public frmUpdater(AppcastReader reader)
+ /// <param name="currentVersion">
+ /// The current Version.
+ /// </param>
+ /// <param name="currentBuild">
+ /// The current Build.
+ /// </param>
+ public UpdateInfo(AppcastReader reader, string currentVersion, string currentBuild)
{
InitializeComponent();
appcast = reader;
+ this.currentVersion = currentVersion;
+ this.currentBuild = currentBuild;
GetRss();
SetVersions();
}
+
+ /// <summary>
+ /// Gets the SkipVersion number
+ /// </summary>
+ public int SkipVersion { get; private set; }
+
/// <summary>
/// Get the RSS feed
@@ -47,8 +72,7 @@ namespace Handbrake
/// </summary>
private void SetVersions()
{
- string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " +
- Properties.Settings.Default.hb_build.ToString().Trim() + ")";
+ string old = "(You have: " + currentVersion + " / " + currentBuild + ")";
string newBuild = appcast.Version.Trim() + " (" + appcast.Build + ")";
lbl_update_text.Text = "HandBrake " + newBuild + " is now available. " + old;
}
@@ -64,9 +88,9 @@ namespace Handbrake
/// </param>
private void BtnInstallUpdateClick(object sender, EventArgs e)
{
- frmDownload download = new frmDownload(appcast.DownloadFile);
+ DownloadUpdate download = new DownloadUpdate(appcast.DownloadFile);
download.ShowDialog();
- this.Close();
+ this.DialogResult = DialogResult.OK;
}
/// <summary>
@@ -80,7 +104,7 @@ namespace Handbrake
/// </param>
private void BtnRemindLaterClick(object sender, EventArgs e)
{
- this.Close();
+ this.DialogResult = DialogResult.Cancel;
}
/// <summary>
@@ -94,10 +118,8 @@ namespace Handbrake
/// </param>
private void BtnSkipClick(object sender, EventArgs e)
{
- Properties.Settings.Default.skipversion = int.Parse(appcast.Build);
- Properties.Settings.Default.Save();
-
- this.Close();
+ this.SkipVersion = int.Parse(appcast.Build);
+ this.DialogResult = DialogResult.OK;
}
}
} \ No newline at end of file
diff --git a/win/C#/frmUpdater.resx b/win/C#/HandBrake.Framework/Views/UpdateInfo.resx
index 99dc4ae42..99dc4ae42 100644
--- a/win/C#/frmUpdater.resx
+++ b/win/C#/HandBrake.Framework/Views/UpdateInfo.resx
diff --git a/win/C#/HandBrake10.sln b/win/C#/HandBrake10.sln
index 9b4e35b06..84de6f542 100644
--- a/win/C#/HandBrake10.sln
+++ b/win/C#/HandBrake10.sln
@@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeCS", "HandBrakeCS.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.ApplicationServices", "HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.Framework", "HandBrake.Framework\HandBrake.Framework.csproj", "{49AD42C1-BF9B-4D78-A644-020878FAADE6}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,18 @@ Global
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.ActiveCfg = Release|Any CPU
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.Build.0 = Release|Any CPU
{087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|x86.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|Any CPU.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|Any CPU.Build.0 = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|x86.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|Any CPU.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|Any CPU.Build.0 = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|x86.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 5275cf840..407c4656d 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -232,12 +232,6 @@
<Compile Include="frmAddPreset.Designer.cs">
<DependentUpon>frmAddPreset.cs</DependentUpon>
</Compile>
- <Compile Include="frmDownload.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="frmDownload.Designer.cs">
- <DependentUpon>frmDownload.cs</DependentUpon>
- </Compile>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
@@ -256,16 +250,9 @@
<Compile Include="frmQueue.Designer.cs">
<DependentUpon>frmQueue.cs</DependentUpon>
</Compile>
- <Compile Include="frmUpdater.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="frmUpdater.designer.cs">
- <DependentUpon>frmUpdater.cs</DependentUpon>
- </Compile>
<Compile Include="Functions\PresetLoader.cs" />
<Compile Include="Functions\QueryGenerator.cs" />
<Compile Include="Functions\Main.cs" />
- <Compile Include="Functions\UpdateCheckInformation.cs" />
<Compile Include="frmActivityWindow.cs">
<SubType>Form</SubType>
</Compile>
@@ -279,7 +266,6 @@
<Compile Include="Presets\PlistPresetHandler.cs" />
<Compile Include="Presets\Preset.cs" />
<Compile Include="Presets\PresetsHandler.cs" />
- <Compile Include="Functions\AppcastReader.cs" />
<Compile Include="Functions\QueryParser.cs" />
<Compile Include="Program.cs" />
<Compile Include="ToolWindows\TitleSpecificScan.cs">
@@ -320,10 +306,6 @@
<DependentUpon>frmAddPreset.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="frmDownload.resx">
- <SubType>Designer</SubType>
- <DependentUpon>frmDownload.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
@@ -336,10 +318,6 @@
<SubType>Designer</SubType>
<DependentUpon>frmQueue.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="frmUpdater.resx">
- <DependentUpon>frmUpdater.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
<EmbeddedResource Include="frmActivityWindow.resx">
<DependentUpon>frmActivityWindow.cs</DependentUpon>
<SubType>Designer</SubType>
@@ -474,6 +452,10 @@
<Project>{087A2BA8-BAC2-4577-A46F-07FF9D420016}</Project>
<Name>HandBrake.ApplicationServices</Name>
</ProjectReference>
+ <ProjectReference Include="HandBrake.Framework\HandBrake.Framework.csproj">
+ <Project>{49AD42C1-BF9B-4D78-A644-020878FAADE6}</Project>
+ <Name>HandBrake.Framework</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 6c0b4f2e4..c09ceb382 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -13,7 +13,8 @@ namespace Handbrake
using System.Threading;
using System.Windows.Forms;
- using HandBrake.ApplicationServices.Services;
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Services.Interfaces;
using HandBrake.ApplicationServices.Services.Interfaces;
using Model;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index ba06ede79..2c72afafd 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -16,6 +16,9 @@ namespace Handbrake
using System.Windows.Forms;
using Functions;
+ using HandBrake.Framework.Model;
+ using HandBrake.Framework.Services;
+ using HandBrake.Framework.Views;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
@@ -108,7 +111,13 @@ namespace Handbrake
{
if (DateTime.Now.Subtract(Settings.Default.lastUpdateCheckDate).TotalDays > Properties.Settings.Default.daysBetweenUpdateCheck)
{
- Main.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false);
+ // Set when the last update was
+ Settings.Default.lastUpdateCheckDate = DateTime.Now;
+ Settings.Default.Save();
+ string url = Settings.Default.hb_build.ToString().EndsWith("1")
+ ? Settings.Default.appcast_unstable
+ : Settings.Default.appcast;
+ UpdateService.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false, url, Settings.Default.hb_build, Settings.Default.skipversion, Settings.Default.hb_version);
}
}
@@ -174,15 +183,13 @@ namespace Handbrake
return;
}
- UpdateCheckInformation info;
-
try
{
- info = Main.EndCheckForUpdates(result);
+ UpdateCheckInformation info = UpdateService.EndCheckForUpdates(result);
if (info.NewVersionAvailable)
{
- frmUpdater updateWindow = new frmUpdater(info.BuildInformation);
+ UpdateInfo updateWindow = new UpdateInfo(info.BuildInformation, Settings.Default.hb_version, Settings.Default.hb_build.ToString());
updateWindow.ShowDialog();
}
}
@@ -532,7 +539,12 @@ namespace Handbrake
private void mnu_UpdateCheck_Click(object sender, EventArgs e)
{
lbl_updateCheck.Visible = true;
- Main.BeginCheckForUpdates(new AsyncCallback(this.UpdateCheckDoneMenu), false);
+ Settings.Default.lastUpdateCheckDate = DateTime.Now;
+ Settings.Default.Save();
+ string url = Settings.Default.hb_build.ToString().EndsWith("1")
+ ? Settings.Default.appcast_unstable
+ : Settings.Default.appcast;
+ UpdateService.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDoneMenu), false, url, Settings.Default.hb_build, Settings.Default.skipversion, Settings.Default.hb_version);
}
/// <summary>
@@ -1317,7 +1329,7 @@ namespace Handbrake
{
sourceTitle = title.Title;
SelectSource(ISO_Open.FileName, sourceTitle);
- }
+ }
}
else
UpdateSourceLabel();
@@ -1420,7 +1432,7 @@ namespace Handbrake
drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();
// Populate the Audio Channels Dropdown
- AudioSettings.SetTrackList(selectedTitle, this.currentlySelectedPreset);
+ AudioSettings.SetTrackListFromPreset(selectedTitle, this.currentlySelectedPreset);
// Populate the Subtitles dropdown
Subtitles.SetSubtitleTrackAuto(selectedTitle.Subtitles.ToArray());
@@ -2408,11 +2420,11 @@ namespace Handbrake
try
{
// Get the information about the new build, if any, and close the window
- info = Main.EndCheckForUpdates(result);
+ info = UpdateService.EndCheckForUpdates(result);
if (info.NewVersionAvailable && info.BuildInformation != null)
{
- frmUpdater updateWindow = new frmUpdater(info.BuildInformation);
+ UpdateInfo updateWindow = new UpdateInfo(info.BuildInformation, Settings.Default.hb_version, Settings.Default.hb_build.ToString());
updateWindow.ShowDialog();
}
else
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index dc017b2cd..ef0cad28a 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -583,18 +583,6 @@ Clear the text box below to return to the internal query generation.</value>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>98</value>
</metadata>
- <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>664, 15</value>
- </metadata>
- <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>680, 54</value>
- </metadata>
- <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>787, 54</value>
- </metadata>
- <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>98</value>
- </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA
@@ -974,4 +962,13 @@ Clear the text box below to return to the internal query generation.</value>
AAD6AQAA4AEAAMABAACAAQAAgAEAAMBBAADAYQAAjGEAAIRhAADc+wAA3/8AAA==
</value>
</data>
+ <metadata name="File_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>664, 15</value>
+ </metadata>
+ <metadata name="openPreset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>680, 54</value>
+ </metadata>
+ <metadata name="File_ChapterImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>787, 54</value>
+ </metadata>
</root> \ No newline at end of file