diff options
-rw-r--r-- | win/C#/Controls/Subtitles.cs | 355 | ||||
-rw-r--r-- | win/C#/HandBrake.5.0.ReSharper | 379 | ||||
-rw-r--r-- | win/C#/libraries/Growl license.txt | 25 |
3 files changed, 595 insertions, 164 deletions
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs index fc9315757..d3f879590 100644 --- a/win/C#/Controls/Subtitles.cs +++ b/win/C#/Controls/Subtitles.cs @@ -13,12 +13,34 @@ namespace Handbrake.Controls using Functions;
using Model;
+ /// <summary>
+ /// The Subtitles Tab
+ /// </summary>
public partial class Subtitles : UserControl
{
+ /// <summary>
+ /// Map of languages to language codes
+ /// </summary>
private readonly IDictionary<string, string> langMap = new Dictionary<string, string>();
+
+ /// <summary>
+ /// A List of SRT Files
+ /// </summary>
+ private readonly IDictionary<string, string> srtFiles = new Dictionary<string, string>();
+
+ /// <summary>
+ /// The Subtitle List
+ /// </summary>
private readonly List<SubtitleInfo> subList = new List<SubtitleInfo>();
+
+ /// <summary>
+ /// The File Container
+ /// </summary>
private int fileContainer;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="Subtitles"/> class.
+ /// </summary>
public Subtitles()
{
InitializeComponent();
@@ -31,7 +53,133 @@ namespace Handbrake.Controls srt_lang.SelectedIndex = 40;
}
- // Primary Controls
+ /// <summary>
+ /// Gets the CLI Query for this panel
+ /// </summary>
+ /// <returns>A CliQuery string</returns>
+ public string GetCliQuery
+ {
+ get
+ {
+ string query = string.Empty;
+ if (lv_subList.Items.Count != 0) // If we have subtitle tracks
+ {
+ // BitMap and CC's
+ string subtitleTracks = String.Empty;
+ string subtitleForced = String.Empty;
+ string subtitleBurn = String.Empty;
+ string subtitleDefault = String.Empty;
+
+ // SRT
+ string srtFile = String.Empty;
+ string srtCodeset = String.Empty;
+ string srtOffset = String.Empty;
+ string srtLang = String.Empty;
+ string srtDefault = String.Empty;
+ int srtCount = 0;
+
+ foreach (SubtitleInfo item in subList)
+ {
+ string itemToAdd, trackId;
+
+ if (item.IsSrtSubtitle) // We have an SRT file
+ {
+ srtCount++; // SRT track id.
+
+ srtLang += srtLang == string.Empty ? langMap[item.SrtLang] : "," + langMap[item.SrtLang];
+ srtCodeset += srtCodeset == string.Empty ? item.SrtCharCode : "," + item.SrtCharCode;
+
+ if (item.Default == "Yes")
+ srtDefault = srtCount.ToString();
+
+ itemToAdd = item.SrtPath;
+ srtFile += srtFile == string.Empty ? itemToAdd : "," + itemToAdd;
+
+ itemToAdd = item.SrtOffset.ToString();
+ srtOffset += srtOffset == string.Empty ? itemToAdd : "," + itemToAdd;
+ }
+ else // We have Bitmap or CC
+ {
+ string[] tempSub;
+
+ // Find --subtitle <string>
+ if (item.Track.Contains("Foreign Audio Search"))
+ itemToAdd = "scan";
+ else
+ {
+ tempSub = item.Track.Split(' ');
+ itemToAdd = tempSub[0];
+ }
+
+ subtitleTracks += subtitleTracks == string.Empty ? itemToAdd : "," + itemToAdd;
+
+ // Find --subtitle-forced
+ itemToAdd = string.Empty;
+ tempSub = item.Track.Split(' ');
+ trackId = tempSub[0];
+
+ if (item.Forced == "Yes")
+ itemToAdd = "scan";
+
+ if (itemToAdd != string.Empty)
+ subtitleForced += subtitleForced == string.Empty ? itemToAdd : "," + itemToAdd;
+
+ // Find --subtitle-burn and --subtitle-default
+ trackId = tempSub[0];
+
+ if (trackId.Trim() == "Foreign") // foreign audio search
+ trackId = "scan";
+
+ if (item.Burned == "Yes") // burn
+ subtitleBurn = trackId;
+
+ if (item.Default == "Yes") // default
+ subtitleDefault = trackId;
+ }
+ }
+
+ // Build The CLI Subtitles Query
+ if (subtitleTracks != string.Empty)
+ {
+ query += " --subtitle " + subtitleTracks;
+
+ if (subtitleForced != string.Empty)
+ query += " --subtitle-forced=" + subtitleForced;
+ if (subtitleBurn != string.Empty)
+ query += " --subtitle-burn=" + subtitleBurn;
+ if (subtitleDefault != string.Empty)
+ query += " --subtitle-default=" + subtitleDefault;
+ }
+
+ if (srtFile != string.Empty) // SRTs
+ {
+ query += " --srt-file " + "\"" + srtFile + "\"";
+
+ if (srtCodeset != string.Empty)
+ query += " --srt-codeset " + srtCodeset;
+ if (srtOffset != string.Empty)
+ query += " --srt-offset " + srtOffset;
+ if (srtLang != string.Empty)
+ query += " --srt-lang " + srtLang;
+ if (srtDefault != string.Empty)
+ query += " --srt-default=" + srtDefault;
+ }
+ }
+ return query;
+ }
+ }
+
+ /* Primary Controls */
+
+ /// <summary>
+ /// Add a Subtitle track.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void BtnAddSubTrackClick(object sender, EventArgs e)
{
// Logic
@@ -48,8 +196,8 @@ namespace Handbrake.Controls {
burnedVal = "No";
forcedVal = "No";
- srtPath = openFileDialog.FileName;
- srtFile = Path.GetFileName(openFileDialog.FileName);
+ srtFiles.TryGetValue(drp_subtitleTracks.SelectedItem.ToString(), out srtPath);
+ srtFile = drp_subtitleTracks.SelectedItem.ToString();
srtLangVal = srt_lang.SelectedItem.ToString();
srtCode = srt_charcode.SelectedItem.ToString();
srtOffsetMs = (int) srt_offset.Value;
@@ -59,25 +207,6 @@ namespace Handbrake.Controls {
if (defaultSub == "Yes") SetNoDefault();
if (burnedVal == "Yes") SetNoBurned();
-
- if (fileContainer == 0)
- burnedVal = "Yes"; // MP4 must have bitmap subs burned in.
- }
-
- if (fileContainer == 0) // MP4 and M4V file extension
- {
- // Make sure we only have 1 bitmap track.
- if (drp_subtitleTracks.SelectedItem != null &&
- drp_subtitleTracks.SelectedItem.ToString().Contains("Bitmap"))
- {
- if (lv_subList.Items.Cast<ListViewItem>().Any(item => item.SubItems[0].Text.Contains("Bitmap")))
- {
- MessageBox.Show(this,
- "More than one vobsub is not supported in mp4... Your first vobsub track will now be used.",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- }
}
string trackName = (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
@@ -101,12 +230,33 @@ namespace Handbrake.Controls subList.Add(track);
}
+ /// <summary>
+ /// Import an SRT Subtitle Track
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void BtnSrtAddClick(object sender, EventArgs e)
{
if (openFileDialog.ShowDialog() != DialogResult.OK)
return;
+
+ if (srtFiles.ContainsKey(Path.GetFileName(openFileDialog.FileName)))
+ {
+ MessageBox.Show(
+ "A Subtitle track with the same name has already been imported.",
+ "Warning",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Warning);
+ return;
+ }
+
drp_subtitleTracks.Items.Add(Path.GetFileName(openFileDialog.FileName));
drp_subtitleTracks.SelectedItem = Path.GetFileName(openFileDialog.FileName);
+ srtFiles.Add(Path.GetFileName(openFileDialog.FileName), openFileDialog.FileName);
}
private void BtnRemoveSubTrackClick(object sender, EventArgs e)
@@ -114,7 +264,6 @@ namespace Handbrake.Controls RemoveTrack();
}
- // Secondary Controls
private void LbSubListSelectedIndexChanged(object sender, EventArgs e)
{
// Set the dropdown controls based on the selected item in the List.
@@ -157,7 +306,8 @@ namespace Handbrake.Controls SubGroupBox.Text = "Selected Track: None (Click \"Add\" to add another track to the list)";
}
- // Bitmap / CC / SRT Controls
+ /* Bitmap / CC / SRT Controls */
+
private void DrpSubtitleTracksSelectedIndexChanged(object sender, EventArgs e)
{
if (drp_subtitleTracks.SelectedItem.ToString().Contains(".srt"))
@@ -184,6 +334,10 @@ namespace Handbrake.Controls lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text = srt_lang.SelectedItem + "(" +
drp_subtitleTracks.SelectedItem + ")";
lv_subList.Select();
+
+ string srtPath;
+ srtFiles.TryGetValue(drp_subtitleTracks.SelectedItem.ToString(), out srtPath);
+ subList[lv_subList.SelectedIndices[0]].SrtPath = srtPath;
}
else
{
@@ -193,7 +347,6 @@ namespace Handbrake.Controls }
subList[lv_subList.SelectedIndices[0]].Track = drp_subtitleTracks.SelectedItem.ToString();
- // Update SubList List<SubtitleInfo>
}
private void CheckForcedCheckedChanged(object sender, EventArgs e)
@@ -273,7 +426,8 @@ namespace Handbrake.Controls // Update SubList List<SubtitleInfo>
}
- // Right Click Menu
+ /* Right Click Menu */
+
private void MnuMoveupClick(object sender, EventArgs e)
{
if (lv_subList.SelectedIndices.Count != 0)
@@ -315,7 +469,11 @@ namespace Handbrake.Controls RemoveTrack();
}
- // Functions
+ /* Functions */
+
+ /// <summary>
+ /// Set all Non SRT tracks to Default = NO
+ /// </summary>
private void SetNoDefault()
{
int c = 0;
@@ -353,6 +511,9 @@ namespace Handbrake.Controls }
}
+ /// <summary>
+ /// Set all tracks to Burned = No
+ /// </summary>
private void SetNoBurned()
{
int c = 0;
@@ -367,6 +528,9 @@ namespace Handbrake.Controls }
}
+ /// <summary>
+ /// Remove a selected track
+ /// </summary>
private void RemoveTrack()
{
// Remove the Item and reselect the control if the following conditions are met.
@@ -402,16 +566,6 @@ namespace Handbrake.Controls }
/// <summary>
- /// Cleverly Clear the subtitle list. Only remove tracks that are not available for the current source.
- /// </summary>
- public void SmartClear()
- {
- /* Smart clear will only remove subtitle tracks that do not have an equivlent
- for the new source / title which the user has selected. */
- throw new NotImplementedException();
- }
-
- /// <summary>
/// Checks of the current settings will require the m4v file extension
/// </summary>
/// <returns>True if Yes</returns>
@@ -467,17 +621,6 @@ namespace Handbrake.Controls public void SetContainer(int value)
{
fileContainer = value;
- bool trigger = false;
- if (fileContainer != 1)
- foreach (ListViewItem item in lv_subList.Items)
- {
- if (item.SubItems[1].Text.Contains("Bitmap"))
- {
- if (trigger)
- lv_subList.Items.Remove(item);
- trigger = true;
- }
- }
}
/// <summary>
@@ -488,121 +631,5 @@ namespace Handbrake.Controls {
return subList;
}
-
- /// <summary>
- /// Gets the CLI Query for this panel
- /// </summary>
- /// <returns>A CliQuery string</returns>
- public string GetCliQuery
- {
- get
- {
- string query = string.Empty;
- if (lv_subList.Items.Count != 0) // If we have subtitle tracks
- {
- // BitMap and CC's
- string subtitleTracks = String.Empty;
- string subtitleForced = String.Empty;
- string subtitleBurn = String.Empty;
- string subtitleDefault = String.Empty;
-
- // SRT
- string srtFile = String.Empty;
- string srtCodeset = String.Empty;
- string srtOffset = String.Empty;
- string srtLang = String.Empty;
- string srtDefault = String.Empty;
- int srtCount = 0;
-
- foreach (SubtitleInfo item in subList)
- {
- string itemToAdd, trackId;
-
- if (item.IsSrtSubtitle) // We have an SRT file
- {
- srtCount++; // SRT track id.
-
- srtLang += srtLang == string.Empty ? langMap[item.SrtLang] : "," + langMap[item.SrtLang];
- srtCodeset += srtCodeset == string.Empty ? item.SrtCharCode : "," + item.SrtCharCode;
-
- if (item.Default == "Yes")
- srtDefault = srtCount.ToString();
-
- itemToAdd = item.SrtPath;
- srtFile += srtFile == string.Empty ? itemToAdd : "," + itemToAdd;
-
- itemToAdd = item.SrtOffset.ToString();
- srtOffset += srtOffset == string.Empty ? itemToAdd : "," + itemToAdd;
- }
- else // We have Bitmap or CC
- {
- string[] tempSub;
-
- // Find --subtitle <string>
- if (item.Track.Contains("Foreign Audio Search"))
- itemToAdd = "scan";
- else
- {
- tempSub = item.Track.Split(' ');
- itemToAdd = tempSub[0];
- }
-
- subtitleTracks += subtitleTracks == string.Empty ? itemToAdd : "," + itemToAdd;
-
- // Find --subtitle-forced
- itemToAdd = string.Empty;
- tempSub = item.Track.Split(' ');
- trackId = tempSub[0];
-
- if (item.Forced == "Yes")
- itemToAdd = "scan";
-
- if (itemToAdd != string.Empty)
- subtitleForced += subtitleForced == string.Empty ? itemToAdd : "," + itemToAdd;
-
- // Find --subtitle-burn and --subtitle-default
- trackId = tempSub[0];
-
- if (trackId.Trim() == "Foreign") // foreign audio search
- trackId = "scan";
-
- if (item.Burned == "Yes") // burn
- subtitleBurn = trackId;
-
- if (item.Default == "Yes") // default
- subtitleDefault = trackId;
- }
- }
-
- // Build The CLI Subtitles Query
- if (subtitleTracks != string.Empty)
- {
- query += " --subtitle " + subtitleTracks;
-
- if (subtitleForced != string.Empty)
- query += " --subtitle-forced=" + subtitleForced;
- if (subtitleBurn != string.Empty)
- query += " --subtitle-burn=" + subtitleBurn;
- if (subtitleDefault != string.Empty)
- query += " --subtitle-default=" + subtitleDefault;
- }
-
- if (srtFile != string.Empty) // SRTs
- {
- query += " --srt-file " + "\"" + srtFile + "\"";
-
- if (srtCodeset != string.Empty)
- query += " --srt-codeset " + srtCodeset;
- if (srtOffset != string.Empty)
- query += " --srt-offset " + srtOffset;
- if (srtLang != string.Empty)
- query += " --srt-lang " + srtLang;
- if (srtDefault != string.Empty)
- query += " --srt-default=" + srtDefault;
- }
- }
- return query;
- }
- }
}
}
\ No newline at end of file diff --git a/win/C#/HandBrake.5.0.ReSharper b/win/C#/HandBrake.5.0.ReSharper new file mode 100644 index 000000000..22ca79976 --- /dev/null +++ b/win/C#/HandBrake.5.0.ReSharper @@ -0,0 +1,379 @@ +<Configuration>
+ <CodeStyleSettings>
+ <ExternalPath IsNull="False">
+ </ExternalPath>
+ <Sharing>SOLUTION</Sharing>
+ <CSharp>
+ <FormatSettings>
+ <ALIGN_MULTILINE_ARGUMENT>False</ALIGN_MULTILINE_ARGUMENT>
+ <BLANK_LINES_AROUND_SINGLE_LINE_FIELD>1</BLANK_LINES_AROUND_SINGLE_LINE_FIELD>
+ <BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>1</BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>
+ <BLANK_LINES_BETWEEN_USING_GROUPS>1</BLANK_LINES_BETWEEN_USING_GROUPS>
+ <FORCE_ATTRIBUTE_STYLE>SEPARATE</FORCE_ATTRIBUTE_STYLE>
+ <FORCE_FOR_BRACES_STYLE>ALWAYS_ADD</FORCE_FOR_BRACES_STYLE>
+ <FORCE_FOREACH_BRACES_STYLE>ALWAYS_ADD</FORCE_FOREACH_BRACES_STYLE>
+ <FORCE_IFELSE_BRACES_STYLE>ALWAYS_ADD</FORCE_IFELSE_BRACES_STYLE>
+ <FORCE_WHILE_BRACES_STYLE>ALWAYS_ADD</FORCE_WHILE_BRACES_STYLE>
+ <INDENT_ANONYMOUS_METHOD_BLOCK>False</INDENT_ANONYMOUS_METHOD_BLOCK>
+ <INDENT_EMBRACED_INITIALIZER_BLOCK>False</INDENT_EMBRACED_INITIALIZER_BLOCK>
+ <KEEP_BLANK_LINES_IN_CODE>1</KEEP_BLANK_LINES_IN_CODE>
+ <KEEP_BLANK_LINES_IN_DECLARATIONS>1</KEEP_BLANK_LINES_IN_DECLARATIONS>
+ <KEEP_USER_LINEBREAKS>False</KEEP_USER_LINEBREAKS>
+ <MODIFIERS_ORDER IsNull="False">
+ <Item>public</Item>
+ <Item>protected</Item>
+ <Item>internal</Item>
+ <Item>private</Item>
+ <Item>new</Item>
+ <Item>abstract</Item>
+ <Item>virtual</Item>
+ <Item>override</Item>
+ <Item>sealed</Item>
+ <Item>static</Item>
+ <Item>readonly</Item>
+ <Item>extern</Item>
+ <Item>unsafe</Item>
+ <Item>volatile</Item>
+ </MODIFIERS_ORDER>
+ <PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>False</PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>
+ <PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>False</PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>
+ <PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>False</PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>
+ <PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>False</PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>
+ <PLACE_WHILE_ON_NEW_LINE>True</PLACE_WHILE_ON_NEW_LINE>
+ <REDUNDANT_THIS_QUALIFIER_STYLE>ALWAYS_USE</REDUNDANT_THIS_QUALIFIER_STYLE>
+ <SIMPLE_EMBEDDED_STATEMENT_STYLE>ON_SINGLE_LINE</SIMPLE_EMBEDDED_STATEMENT_STYLE>
+ <SPACE_AFTER_TYPECAST_PARENTHESES>False</SPACE_AFTER_TYPECAST_PARENTHESES>
+ <SPACE_AROUND_MULTIPLICATIVE_OP>True</SPACE_AROUND_MULTIPLICATIVE_OP>
+ <SPACE_BEFORE_SIZEOF_PARENTHESES>False</SPACE_BEFORE_SIZEOF_PARENTHESES>
+ <SPACE_BEFORE_TYPEOF_PARENTHESES>False</SPACE_BEFORE_TYPEOF_PARENTHESES>
+ <SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>True</SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>
+ <STICK_COMMENT>False</STICK_COMMENT>
+ <WRAP_AFTER_DECLARATION_LPAR>True</WRAP_AFTER_DECLARATION_LPAR>
+ <WRAP_AFTER_INVOCATION_LPAR>True</WRAP_AFTER_INVOCATION_LPAR>
+ <WRAP_ARGUMENTS_STYLE>CHOP_IF_LONG</WRAP_ARGUMENTS_STYLE>
+ <WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>True</WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>
+ <WRAP_EXTENDS_LIST_STYLE>CHOP_IF_LONG</WRAP_EXTENDS_LIST_STYLE>
+ <WRAP_PARAMETERS_STYLE>CHOP_IF_LONG</WRAP_PARAMETERS_STYLE>
+ </FormatSettings>
+ <UsingsSettings>
+ <AddImportsToDeepestScope>True</AddImportsToDeepestScope>
+ <QualifiedUsingAtNestedScope>True</QualifiedUsingAtNestedScope>
+ </UsingsSettings>
+ <Naming2>
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
+ <ExceptionName IsNull="False">
+ </ExceptionName>
+ <OverrideDefaultSettings>True</OverrideDefaultSettings>
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
+ <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
+ <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
+ </Naming2>
+ <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">
+
+ <!-- Do not reorder COM interfaces -->
+ <Pattern>
+ <Match>
+ <And Weight="2000">
+ <Kind Is="interface"/>
+ <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"
+ Inherit="true"/>
+ </And>
+ </Match>
+ </Pattern>
+
+ <!-- Do not reorder P/Invoke structs -->
+ <Pattern>
+ <Match>
+ <And Weight="2000">
+ <Or>
+ <Kind Is="struct"/>
+ <Kind Is="class"/>
+ </Or>
+ <HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"
+ Inherit="true"/>
+ </And>
+ </Match>
+ </Pattern>
+
+ <!-- Do not reorder P/Invoke classes (called xxxNativeMethods) -->
+ <Pattern>
+ <Match>
+ <And Weight="2000">
+ <Kind Is="class"/>
+ <Name Is=".*NativeMethods" />
+ </And>
+ </Match>
+ </Pattern>
+
+ <!-- StyleCop pattern -->
+ <Pattern RemoveAllRegions="true">
+ <Match>
+ <Or Weight="1000" >
+ <Kind Is="class" />
+ <Kind Is="struct" />
+ <Kind Is="interface"/>
+ </Or>
+ </Match>
+
+ <!-- constants and fields -->
+ <Entry>
+ <Match>
+ <Or>
+ <Kind Is="constant"/>
+ <Kind Is="field"/>
+ </Or>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private"/>
+ <Kind Order="constant field"/>
+ <Readonly/>
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Constants and Fields"/>
+ </Entry>
+
+ <!-- constructors -->
+ <Entry>
+ <Match>
+ <Or Weight="200">
+ <Kind Is="constructor"/>
+ <Kind Is="destructor"/>
+ </Or>
+ </Match>
+ <Sort>
+ <Static/>
+ <Kind Order="constructor destructor"/>
+ <Access Order="public internal protected-internal protected private"/>
+ </Sort>
+ <Group Region="Constructors and Destructors"/>
+ </Entry>
+
+ <!-- delegates -->
+ <Entry>
+ <Match>
+ <Kind Is="delegate"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Static />
+ <Name/>
+ </Sort>
+ <Group Region="Delegates"/>
+ </Entry>
+
+ <!-- events -->
+ <Entry>
+ <Match>
+ <Kind Is="event"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Static />
+ <Name/>
+ </Sort>
+ <Group Region="Events"/>
+ </Entry>
+
+ <!-- enum -->
+ <Entry>
+ <Match>
+ <Kind Is="enum"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Name/>
+ </Sort>
+ <Group Region="Enums"/>
+ </Entry>
+
+ <!-- interfaces -->
+ <Entry>
+ <Match>
+ <Kind Is="interface" />
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Name/>
+ </Sort>
+ <Group Region="Interfaces"/>
+ </Entry>
+
+ <!-- properties -->
+ <Entry>
+ <Match>
+ <Kind Is="property"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private"/>
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Properties"/>
+ </Entry>
+
+ <!-- indexers -->
+ <Entry>
+ <Match>
+ <Kind Is="indexer"
+ Weight="300" />
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Indexers"/>
+ </Entry>
+
+ <!-- operator -->
+ <Entry>
+ <Match>
+ <Kind Is="operator"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private" />
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Operators"/>
+ </Entry>
+
+ <!-- public methods -->
+ <Entry>
+ <Match>
+ <And>
+ <Kind Is="method"/>
+ <Access Is="public"/>
+ </And>
+ </Match>
+ <Sort>
+ <Access Order="public"/>
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Public Methods"/>
+ </Entry>
+
+ <!-- Implemented Interfaces -->
+ <Entry>
+ <Match>
+ <And Weight="500">
+ <Kind Is="method"/>
+ <ImplementsInterface CLRName=".*"/>
+ </And>
+ </Match>
+ <Sort>
+ <ImplementsInterface />
+ <Access Order="public internal protected-internal protected private"/>
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Implemented Interfaces">
+ <ImplementsInterface Region="${ImplementsInterface}" />
+ </Group>
+ </Entry>
+
+ <!-- other methods -->
+ <Entry>
+ <Match>
+ <Kind Is="method"/>
+ </Match>
+ <Sort>
+ <Access Order="public internal protected-internal protected private"/>
+ <Static/>
+ <Name/>
+ </Sort>
+ <Group Region="Methods"/>
+ </Entry>
+
+ <!-- Nested structs -->
+ <Entry>
+ <Match>
+ <Kind Is="struct"
+ Weight="600" />
+ </Match>
+ <Sort>
+ <Static />
+ <Access Order="public internal protected-internal protected private" />
+ <Name/>
+ </Sort>
+ </Entry>
+
+ <!-- Nested classes -->
+ <Entry>
+ <Match>
+ <Kind Is="class"
+ Weight="700" />
+ </Match>
+ <Sort>
+ <Static />
+ <Access Order="public internal protected-internal protected private" />
+ <Name/>
+ </Sort>
+ </Entry>
+
+ <!-- all other members -->
+ <Entry/>
+
+ </Pattern>
+</Patterns>
+]]></CustomMemberReorderingPatterns>
+ </CSharp>
+ <VB>
+ <FormatSettings />
+ <ImportsSettings />
+ <Naming2>
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
+ </Naming2>
+ </VB>
+ <Web>
+ <Naming2 />
+ </Web>
+ <Xaml>
+ <Naming2 />
+ </Xaml>
+ <XML>
+ <FormatSettings />
+ </XML>
+ <GenerateMemberBody />
+ <Naming2>
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
+ <ExceptionName IsNull="False">
+ </ExceptionName>
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
+ <PredefinedRule Inspect="False" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
+ <PredefinedRule Inspect="False" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
+ </Naming2>
+ </CodeStyleSettings>
+</Configuration>
\ No newline at end of file diff --git a/win/C#/libraries/Growl license.txt b/win/C#/libraries/Growl license.txt new file mode 100644 index 000000000..397816435 --- /dev/null +++ b/win/C#/libraries/Growl license.txt @@ -0,0 +1,25 @@ +Growl.NET GNTP Connector Library
+-----------------------------------------------
+Copyright (c) 2008 - Growl for Windows
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
|