diff options
author | sr55 <[email protected]> | 2012-07-20 13:24:52 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-07-20 13:24:52 +0000 |
commit | 1aadfe267e451acfbc900590a53cd9df87fe50ff (patch) | |
tree | 263d496c615073112eda88fcdef773ae01b37742 /win/CS/HandBrake.ApplicationServices | |
parent | 33c05df81676a99c1323a1a16a85eb50c1a61646 (diff) |
WinGui: Array of fixes and changes
- Change Font rendering to "Display" mode to see if folks prefer it. If not it can be reverted back.
- Fixes to Queue Edit for the Audio/Subs panel. These should now populate correctly.
- Thrown the Drive detector onto a background thread as it seems the windows drive management service can get "stuck" and block the app from starting while it waits.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4867 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs | 65 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs | 65 |
2 files changed, 130 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs index 0e65a3502..b78ca5ad8 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Audio.cs @@ -112,5 +112,70 @@ namespace HandBrake.ApplicationServices.Parsing return string.Format("{0} {1} ({2}) ({3})", this.TrackNumber, this.Language, this.Format, this.Description);
}
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="other">
+ /// The other.
+ /// </param>
+ /// <returns>
+ /// The System.Boolean.
+ /// </returns>
+ public bool Equals(Audio other)
+ {
+ if (ReferenceEquals(null, other))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, other))
+ {
+ return true;
+ }
+ return other.TrackNumber == this.TrackNumber && object.Equals(other.Language, this.Language) && object.Equals(other.LanguageCode, this.LanguageCode) && object.Equals(other.Format, this.Format);
+ }
+
+ /// <summary>
+ /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
+ /// </summary>
+ /// <returns>
+ /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
+ /// </returns>
+ /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>. </param><filterpriority>2</filterpriority>
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+ if (obj.GetType() != typeof(Audio))
+ {
+ return false;
+ }
+ return Equals((Audio)obj);
+ }
+
+ /// <summary>
+ /// Serves as a hash function for a particular type.
+ /// </summary>
+ /// <returns>
+ /// A hash code for the current <see cref="T:System.Object"/>.
+ /// </returns>
+ /// <filterpriority>2</filterpriority>
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ 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.Format != null ? this.Format.GetHashCode() : 0);
+ return result;
+ }
+ }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index 6548f3aaf..20deeae1b 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -175,5 +175,70 @@ namespace HandBrake.ApplicationServices.Parsing {
return this.SubtitleType == SubtitleType.ForeignAudioSearch ? "Foreign Audio Scan" : string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.TypeString);
}
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="other">
+ /// The other.
+ /// </param>
+ /// <returns>
+ /// The System.Boolean.
+ /// </returns>
+ public bool Equals(Subtitle other)
+ {
+ if (ReferenceEquals(null, other))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, other))
+ {
+ return true;
+ }
+ return other.TrackNumber == this.TrackNumber && object.Equals(other.Language, this.Language) && object.Equals(other.LanguageCode, this.LanguageCode) && object.Equals(other.SubtitleType, this.SubtitleType);
+ }
+
+ /// <summary>
+ /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
+ /// </summary>
+ /// <returns>
+ /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
+ /// </returns>
+ /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>. </param><filterpriority>2</filterpriority>
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+ if (obj.GetType() != typeof(Subtitle))
+ {
+ return false;
+ }
+ return Equals((Subtitle)obj);
+ }
+
+ /// <summary>
+ /// Serves as a hash function for a particular type.
+ /// </summary>
+ /// <returns>
+ /// A hash code for the current <see cref="T:System.Object"/>.
+ /// </returns>
+ /// <filterpriority>2</filterpriority>
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ 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.SubtitleType.GetHashCode();
+ return result;
+ }
+ }
}
}
\ No newline at end of file |