diff options
author | sr55 <[email protected]> | 2018-12-08 15:28:38 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2018-12-08 15:28:38 +0000 |
commit | 14058f3ca4f1f31a65f96344426305a659eaa3eb (patch) | |
tree | c3ca42688e2d68d16997d85c5108a8b75990714f | |
parent | 5ed3665f950aa4370b5dcf039aff75236070f9b3 (diff) |
WinGui: Fix a number of build warnings. Fixes #1720 and #1721 and a few other warnings in the code.
11 files changed, 45 insertions, 31 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj index 6be0b8500..3571728ea 100644 --- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj +++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj @@ -23,6 +23,7 @@ <UseVSHostingProcess>true</UseVSHostingProcess> <Prefer32Bit>false</Prefer32Bit> <CodeAnalysisRuleSet>..\HandBrake.ruleset</CodeAnalysisRuleSet> + <NoWarn>0649</NoWarn> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <PlatformTarget>x64</PlatformTarget> @@ -182,6 +183,9 @@ </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory> + </PropertyGroup> <!-- 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"> diff --git a/win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs b/win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs index 2d2632622..4f1681662 100644 --- a/win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs +++ b/win/CS/HandBrake.Interop/Interop/HbLib/hb_image_s.cs @@ -7,6 +7,8 @@ // </summary> // -------------------------------------------------------------------------------------------------------------------- +// ReSharper disable InconsistentNaming +// ReSharper disable UnusedMember.Global namespace HandBrake.Interop.Interop.HbLib { using System; diff --git a/win/CS/HandBrakeWPF/Commands/Menu/QueueCommands.cs b/win/CS/HandBrakeWPF/Commands/Menu/QueueCommands.cs index 2f0bb009d..c9e0d9fef 100644 --- a/win/CS/HandBrakeWPF/Commands/Menu/QueueCommands.cs +++ b/win/CS/HandBrakeWPF/Commands/Menu/QueueCommands.cs @@ -76,6 +76,6 @@ namespace HandBrakeWPF.Commands.Menu /// <summary> /// The can execute changed. /// </summary> - public event EventHandler CanExecuteChanged; + public event EventHandler CanExecuteChanged { add { } remove { } } } } diff --git a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs index 238e6655f..fd3a5f5f7 100644 --- a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs @@ -25,7 +25,7 @@ namespace HandBrakeWPF.Commands /// <summary>
/// The can execute changed.
/// </summary>
- public event EventHandler CanExecuteChanged;
+ public event EventHandler CanExecuteChanged { add { } remove { } }
/// <summary>
/// The can execute.
diff --git a/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs b/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs index 25a8e7404..84dc135a3 100644 --- a/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs @@ -54,6 +54,6 @@ namespace HandBrakeWPF.Commands /// <summary> /// The can execute changed. /// </summary> - public event EventHandler CanExecuteChanged; + public event EventHandler CanExecuteChanged { add { } remove { } } } } diff --git a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs index dfa0830a4..5e014edbd 100644 --- a/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/ProcessShortcutCommand.cs @@ -179,6 +179,6 @@ namespace HandBrakeWPF.Commands /// <summary>
/// Can Execute Changed
/// </summary>
- public event EventHandler CanExecuteChanged;
+ public event EventHandler CanExecuteChanged { add { } remove { } }
}
}
diff --git a/win/CS/HandBrakeWPF/Commands/SourceMenuCommand.cs b/win/CS/HandBrakeWPF/Commands/SourceMenuCommand.cs index 8edc537fc..05e6056b7 100644 --- a/win/CS/HandBrakeWPF/Commands/SourceMenuCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/SourceMenuCommand.cs @@ -46,7 +46,7 @@ namespace HandBrakeWPF.Commands /// <summary>
/// The can execute changed.
/// </summary>
- public event EventHandler CanExecuteChanged;
+ public event EventHandler CanExecuteChanged { add { } remove { } }
#endregion
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index db9dd3c32..d241ecaa0 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -483,9 +483,6 @@ <SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
- <AdditionalFiles Include="..\stylecop.json">
- <Link>stylecop.json</Link>
- </AdditionalFiles>
<None Include="app.config" />
<None Include="app.manifest" />
<None Include="Installer\Installer64.nsi" />
@@ -738,6 +735,11 @@ </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+
+ <PropertyGroup>
+ <TargetFrameworkSDKToolsDirectory Condition=" '$(Platform)' == 'x64'">$(TargetFrameworkSDKToolsDirectory)$(Platform)\</TargetFrameworkSDKToolsDirectory>
+ </PropertyGroup>
+
<!-- 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">
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.de.resx b/win/CS/HandBrakeWPF/Properties/Resources.de.resx index 54d004406..10c428476 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.de.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.de.resx @@ -59,46 +59,46 @@ : 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:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root"> + <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: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: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: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: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: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:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="name" type="xsd:string" use="required"/> </xsd:complexType> </xsd:element> </xsd:choice> @@ -341,7 +341,7 @@ Möchten Sie fortfahren?</value> <value>Anstehende Aufgaben {0}</value> </data> <data name="Main_NewDefaultPreset" xml:space="preserve"> - <value>Neue Standardvoreinstellungen: {0}</value> + <value>Neue Standardvoreinstellung: {0}</value> </data> <data name="Main_NewUpdate" xml:space="preserve"> <value>Ein neues Update ist verfügbar. Bitte zum Menü Extras > Einstellungen gehen um es zu installieren.</value> @@ -1997,9 +1997,15 @@ Dies beeinflusst nicht die momentanen Einstellungen im Untertitel-Tab. </value> <value>'Wählen' auswählen um den Standardspeicherort festzulegen</value> </data> <data name="MainView_Hide" xml:space="preserve"> - <value /> + <value>Ausblenden</value> </data> <data name="MainView_Show" xml:space="preserve"> - <value /> + <value>Zeigen</value> + </data> + <data name="MainView_ShowAddAllToQueue" xml:space="preserve"> + <value>Alles zur Warteschlange hinzufügen</value> + </data> + <data name="MainView_ShowAddSelectionToQueue" xml:space="preserve"> + <value>Auswahl zur Warteschlange hinzufügen</value> </data> -</root>
\ No newline at end of file +</root> diff --git a/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs b/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs index 193fc35bd..d71be495b 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs @@ -187,7 +187,7 @@ namespace HandBrakeWPF.Services.Scan.Model int result = this.TrackNumber; result = (result * 397) ^ (this.Language != null ? this.Language.GetHashCode() : 0); result = (result * 397) ^ (this.LanguageCode != null ? this.LanguageCode.GetHashCode() : 0); - result = (result * 397) ^ (this.Codec != null ? this.Codec.GetHashCode() : 0); + result = (result * 397) ^ (this.Codec.GetHashCode()); return result; } } diff --git a/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs index e6f3b17fc..6adde6b6e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs @@ -42,7 +42,7 @@ namespace HandBrakeWPF.ViewModels this.task = new EncodeTask(); } - public event EventHandler<TabStatusEventArgs> TabStatusChanged; + public event EventHandler<TabStatusEventArgs> TabStatusChanged { add { } remove { } } /// <summary> /// Gets or sets the meta data. |