diff options
author | sr55 <[email protected]> | 2013-02-12 20:37:59 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-02-12 20:37:59 +0000 |
commit | d72b432378105f191bc7bf6f756bb7a7533dc79a (patch) | |
tree | c76b29f4e7248918f0011e9340d51bb3f9a7bfed /win/CS/HandBrake.Interop/HandBrakeInterop/Model | |
parent | 3a5365f662fdd94d12733e9c7b1e09745697b532 (diff) |
WinGui: A Stylecop cleanup pass on Interop Library. Note, moved the Eventargs into their own package.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5248 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/Model')
10 files changed, 460 insertions, 188 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs index 8e6a49582..ed9905960 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/BitrateLimits.cs @@ -1,15 +1,27 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="BitrateLimits.cs" company="HandBrake Project (http://handbrake.fr)"> -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// </copyright> +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="BitrateLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the BitrateLimits type.
+// </summary>
// -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.Interop.Model -{ - public class BitrateLimits - { - public int Low { get; set; } - - public int High { get; set; } +{
+ /// <summary>
+ /// The bitrate limits.
+ /// </summary>
+ public class BitrateLimits + {
+ /// <summary>
+ /// Gets or sets the low.
+ /// </summary>
+ public int Low { get; set; }
+
+ /// <summary>
+ /// Gets or sets the high.
+ /// </summary>
+ public int High { get; set; } } } diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs index 80c28c383..9b6ed825e 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/EncodeJob.cs @@ -9,84 +9,162 @@ namespace HandBrake.Interop.Model
{
- using System;
- using System.Collections.Generic;
- using System.Xml.Serialization;
-
- using HandBrake.Interop.Model.Encoding;
-
- public class EncodeJob
- {
- public SourceType SourceType { get; set; }
- public string SourcePath { get; set; }
-
- /// <summary>
- /// Gets or sets the 1-based index of the title to encode.
- /// </summary>
- public int Title { get; set; }
-
- /// <summary>
- /// Gets or sets the angle to encode. 0 for default, 1+ for specified angle.
- /// </summary>
- public int Angle { get; set; }
-
- public VideoRangeType RangeType { get; set; }
- public int ChapterStart { get; set; }
- public int ChapterEnd { get; set; }
-
- public double SecondsStart { get; set; }
- public double SecondsEnd { get; set; }
-
- public int FramesStart { get; set; }
- public int FramesEnd { get; set; }
-
- /// <summary>
- /// Gets or sets the list of chosen audio tracks (1-based)
- /// </summary>
- public List<int> ChosenAudioTracks { get; set; }
- public Subtitles Subtitles { get; set; }
- public bool UseDefaultChapterNames { get; set; }
- public List<string> CustomChapterNames { get; set; }
-
- public string OutputPath { get; set; }
-
- public EncodingProfile EncodingProfile { get; set; }
-
- // The length of video to encode.
- [XmlIgnore]
- public TimeSpan Length { get; set; }
-
- [XmlElement("Length")]
- public string XmlLength
- {
- get { return this.Length.ToString(); }
- set { this.Length = TimeSpan.Parse(value); }
- }
-
- public EncodeJob Clone()
- {
- EncodeJob clone = new EncodeJob
- {
- SourceType = this.SourceType,
- SourcePath = this.SourcePath,
- Title = this.Title,
- Angle = this.Angle,
- RangeType = this.RangeType,
- ChapterStart = this.ChapterStart,
- ChapterEnd = this.ChapterEnd,
- SecondsStart = this.SecondsStart,
- SecondsEnd = this.SecondsEnd,
- FramesStart = this.FramesStart,
- FramesEnd = this.FramesEnd,
- ChosenAudioTracks = new List<int>(this.ChosenAudioTracks),
- Subtitles = this.Subtitles,
- UseDefaultChapterNames = this.UseDefaultChapterNames,
- OutputPath = this.OutputPath,
- EncodingProfile = this.EncodingProfile,
- Length = this.Length
- };
-
- return clone;
- }
- }
-}
+ using System;
+ using System.Collections.Generic;
+ using System.Xml.Serialization;
+
+ using HandBrake.Interop.Model.Encoding;
+
+ /// <summary>
+ /// The encode job.
+ /// </summary>
+ public class EncodeJob
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the angle to encode. 0 for default, 1+ for specified angle.
+ /// </summary>
+ public int Angle { get; set; }
+
+ /// <summary>
+ /// Gets or sets the chapter end.
+ /// </summary>
+ public int ChapterEnd { get; set; }
+
+ /// <summary>
+ /// Gets or sets the chapter start.
+ /// </summary>
+ public int ChapterStart { get; set; }
+
+ /// <summary>
+ /// Gets or sets the list of chosen audio tracks (1-based)
+ /// </summary>
+ public List<int> ChosenAudioTracks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the custom chapter names.
+ /// </summary>
+ public List<string> CustomChapterNames { get; set; }
+
+ /// <summary>
+ /// Gets or sets the encoding profile.
+ /// </summary>
+ public EncodingProfile EncodingProfile { get; set; }
+
+ /// <summary>
+ /// Gets or sets the frames end.
+ /// </summary>
+ public int FramesEnd { get; set; }
+
+ /// <summary>
+ /// Gets or sets the frames start.
+ /// </summary>
+ public int FramesStart { get; set; }
+
+ /// <summary>
+ /// Gets or sets the length. The length of video to encode.
+ /// </summary>
+ [XmlIgnore]
+ public TimeSpan Length { get; set; }
+
+ /// <summary>
+ /// Gets or sets the output path.
+ /// </summary>
+ public string OutputPath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the range type.
+ /// </summary>
+ public VideoRangeType RangeType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the seconds end.
+ /// </summary>
+ public double SecondsEnd { get; set; }
+
+ /// <summary>
+ /// Gets or sets the seconds start.
+ /// </summary>
+ public double SecondsStart { get; set; }
+
+ /// <summary>
+ /// Gets or sets the source path.
+ /// </summary>
+ public string SourcePath { get; set; }
+
+ /// <summary>
+ /// Gets or sets the source type.
+ /// </summary>
+ public SourceType SourceType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the subtitles.
+ /// </summary>
+ public Subtitles Subtitles { get; set; }
+
+ /// <summary>
+ /// Gets or sets the 1-based index of the title to encode.
+ /// </summary>
+ public int Title { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether use default chapter names.
+ /// </summary>
+ public bool UseDefaultChapterNames { get; set; }
+
+ /// <summary>
+ /// Gets or sets the xml length.
+ /// </summary>
+ [XmlElement("Length")]
+ public string XmlLength
+ {
+ get
+ {
+ return this.Length.ToString();
+ }
+ set
+ {
+ this.Length = TimeSpan.Parse(value);
+ }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// The clone.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="EncodeJob"/>.
+ /// </returns>
+ public EncodeJob Clone()
+ {
+ var clone = new EncodeJob
+ {
+ SourceType = this.SourceType,
+ SourcePath = this.SourcePath,
+ Title = this.Title,
+ Angle = this.Angle,
+ RangeType = this.RangeType,
+ ChapterStart = this.ChapterStart,
+ ChapterEnd = this.ChapterEnd,
+ SecondsStart = this.SecondsStart,
+ SecondsEnd = this.SecondsEnd,
+ FramesStart = this.FramesStart,
+ FramesEnd = this.FramesEnd,
+ ChosenAudioTracks = new List<int>(this.ChosenAudioTracks),
+ Subtitles = this.Subtitles,
+ UseDefaultChapterNames = this.UseDefaultChapterNames,
+ OutputPath = this.OutputPath,
+ EncodingProfile = this.EncodingProfile,
+ Length = this.Length
+ };
+
+ return clone;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs index a5406a70a..9f877cd9b 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoders.cs @@ -2,6 +2,9 @@ // <copyright file="Encoders.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
+// <summary>
+// The encoders.
+// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Model
@@ -9,17 +12,35 @@ namespace HandBrake.Interop.Model using System;
using System.Collections.Generic;
using System.Linq;
- using System.Runtime.InteropServices;
+
using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model.Encoding;
using HandBrake.Interop.SourceData;
- public static class Encoders
+ /// <summary>
+ /// The encoders.
+ /// </summary>
+ public static class Encoders
{
- private static List<HBAudioEncoder> audioEncoders;
- private static List<HBVideoEncoder> videoEncoders;
- private static List<HBMixdown> mixdowns;
- private static List<int> audioBitrates;
+ /// <summary>
+ /// The audio encoders.
+ /// </summary>
+ private static List<HBAudioEncoder> audioEncoders;
+
+ /// <summary>
+ /// The video encoders.
+ /// </summary>
+ private static List<HBVideoEncoder> videoEncoders;
+
+ /// <summary>
+ /// The mixdowns.
+ /// </summary>
+ private static List<HBMixdown> mixdowns;
+
+ /// <summary>
+ /// The audio bitrates.
+ /// </summary>
+ private static List<int> audioBitrates;
/// <summary>
/// Gets a list of supported audio encoders.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs index 6055e8eed..2c30b2b44 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/RangeLimits.cs @@ -1,16 +1,41 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="RangeLimits.cs" company="HandBrake Project (http://handbrake.fr)"> -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// </copyright> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrake.Interop.Model -{ - public class RangeLimits - { - public float Low { get; set; } - public float High { get; set; } - public float Granularity { get; set; } - public bool Ascending { get; set; } - } -} +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="RangeLimits.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The range limits.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.Interop.Model
+{
+ /// <summary>
+ /// The range limits.
+ /// </summary>
+ public class RangeLimits
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ascending.
+ /// </summary>
+ public bool Ascending { get; set; }
+
+ /// <summary>
+ /// Gets or sets the granularity.
+ /// </summary>
+ public float Granularity { get; set; }
+
+ /// <summary>
+ /// Gets or sets the high.
+ /// </summary>
+ public float High { get; set; }
+
+ /// <summary>
+ /// Gets or sets the low.
+ /// </summary>
+ public float Low { get; set; }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Size.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Size.cs index a06894cc5..dcc58e0e3 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Size.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Size.cs @@ -9,15 +9,42 @@ namespace HandBrake.Interop.Model
{
- public class Size
- {
- public Size(int width, int height)
- {
- this.Width = width;
- this.Height = height;
- }
+ /// <summary>
+ /// The size.
+ /// </summary>
+ public class Size
+ {
+ #region Constructors and Destructors
- public int Width { get; set; }
- public int Height { get; set; }
- }
-}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Size"/> class.
+ /// </summary>
+ /// <param name="width">
+ /// The width.
+ /// </param>
+ /// <param name="height">
+ /// The height.
+ /// </param>
+ public Size(int width, int height)
+ {
+ this.Width = width;
+ this.Height = height;
+ }
+
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the height.
+ /// </summary>
+ public int Height { get; set; }
+
+ /// <summary>
+ /// Gets or sets the width.
+ /// </summary>
+ public int Width { get; set; }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceSubtitle.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceSubtitle.cs index 13344dd58..2912dec1e 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceSubtitle.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceSubtitle.cs @@ -9,25 +9,54 @@ namespace HandBrake.Interop.Model
{
- public class SourceSubtitle
- {
- /// <summary>
- /// Gets or sets the 1-based subtitle track number. 0 means foreign audio search.
- /// </summary>
- public int TrackNumber { get; set; }
- public bool Default { get; set; }
- public bool Forced { get; set; }
- public bool BurnedIn { get; set; }
-
- public SourceSubtitle Clone()
- {
- return new SourceSubtitle
- {
- TrackNumber = this.TrackNumber,
- Default = this.Default,
- Forced = this.Forced,
- BurnedIn = this.BurnedIn
- };
- }
- }
-}
+ /// <summary>
+ /// The source subtitle.
+ /// </summary>
+ public class SourceSubtitle
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets a value indicating whether burned in.
+ /// </summary>
+ public bool BurnedIn { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether default.
+ /// </summary>
+ public bool Default { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether forced.
+ /// </summary>
+ public bool Forced { get; set; }
+
+ /// <summary>
+ /// Gets or sets the 1-based subtitle track number. 0 means foreign audio search.
+ /// </summary>
+ public int TrackNumber { get; set; }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// The clone.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="SourceSubtitle"/>.
+ /// </returns>
+ public SourceSubtitle Clone()
+ {
+ return new SourceSubtitle
+ {
+ TrackNumber = this.TrackNumber,
+ Default = this.Default,
+ Forced = this.Forced,
+ BurnedIn = this.BurnedIn
+ };
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceType.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceType.cs index 9ea7a07af..e5a49bcd1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceType.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SourceType.cs @@ -9,11 +9,29 @@ namespace HandBrake.Interop.Model
{
- public enum SourceType
- {
- None = 0,
- File,
- VideoFolder,
- Dvd
- }
+ /// <summary>
+ /// The source type.
+ /// </summary>
+ public enum SourceType
+ {
+ /// <summary>
+ /// The none.
+ /// </summary>
+ None = 0,
+
+ /// <summary>
+ /// The file.
+ /// </summary>
+ File,
+
+ /// <summary>
+ /// The video folder.
+ /// </summary>
+ VideoFolder,
+
+ /// <summary>
+ /// The dvd.
+ /// </summary>
+ Dvd
+ }
}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SrtSubtitle.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SrtSubtitle.cs index 945cc236a..46cc45f57 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SrtSubtitle.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/SrtSubtitle.cs @@ -9,24 +9,60 @@ namespace HandBrake.Interop.Model
{
- public class SrtSubtitle
- {
- public bool Default { get; set; }
- public string FileName { get; set; }
- public string LanguageCode { get; set; }
- public string CharacterCode { get; set; }
- public int Offset { get; set; }
-
- public SrtSubtitle Clone()
- {
- return new SrtSubtitle
- {
- Default = this.Default,
- FileName = this.FileName,
- LanguageCode = this.LanguageCode,
- CharacterCode = this.CharacterCode,
- Offset = this.Offset
- };
- }
- }
-}
+ /// <summary>
+ /// The srt subtitle.
+ /// </summary>
+ public class SrtSubtitle
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the character code.
+ /// </summary>
+ public string CharacterCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether default.
+ /// </summary>
+ public bool Default { get; set; }
+
+ /// <summary>
+ /// Gets or sets the file name.
+ /// </summary>
+ public string FileName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the language code.
+ /// </summary>
+ public string LanguageCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the offset.
+ /// </summary>
+ public int Offset { get; set; }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// The clone.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="SrtSubtitle"/>.
+ /// </returns>
+ public SrtSubtitle Clone()
+ {
+ return new SrtSubtitle
+ {
+ Default = this.Default,
+ FileName = this.FileName,
+ LanguageCode = this.LanguageCode,
+ CharacterCode = this.CharacterCode,
+ Offset = this.Offset
+ };
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Subtitles.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Subtitles.cs index 4289375c0..843d0d442 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Subtitles.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Subtitles.cs @@ -11,9 +11,23 @@ namespace HandBrake.Interop.Model {
using System.Collections.Generic;
+ /// <summary>
+ /// The subtitles.
+ /// </summary>
public class Subtitles
- {
- public List<SrtSubtitle> SrtSubtitles { get; set; }
- public List<SourceSubtitle> SourceSubtitles { get; set; }
- }
-}
+ {
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the source subtitles.
+ /// </summary>
+ public List<SourceSubtitle> SourceSubtitles { get; set; }
+
+ /// <summary>
+ /// Gets or sets the srt subtitles.
+ /// </summary>
+ public List<SrtSubtitle> SrtSubtitles { get; set; }
+
+ #endregion
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/VideoRangeType.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/VideoRangeType.cs index 2a42928a5..a99005e77 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/VideoRangeType.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/VideoRangeType.cs @@ -11,15 +11,27 @@ namespace HandBrake.Interop.Model {
using System.ComponentModel.DataAnnotations;
+ /// <summary>
+ /// The video range type.
+ /// </summary>
public enum VideoRangeType
- {
- [Display(Name = "Chapters")]
- Chapters,
+ {
+ /// <summary>
+ /// The chapters.
+ /// </summary>
+ [Display(Name = "Chapters")]
+ Chapters,
- [Display(Name = "Seconds")]
- Seconds,
+ /// <summary>
+ /// The seconds.
+ /// </summary>
+ [Display(Name = "Seconds")]
+ Seconds,
- [Display(Name = "Frames")]
- Frames
- }
-}
+ /// <summary>
+ /// The frames.
+ /// </summary>
+ [Display(Name = "Frames")]
+ Frames
+ }
+}
\ No newline at end of file |