diff options
author | sr55 <[email protected]> | 2010-01-24 17:39:17 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-01-24 17:39:17 +0000 |
commit | f6357dbdf13e7f9712d51317d2d7b5f97ff7a6ea (patch) | |
tree | ceb746ab1bbe70c044d0f178e14da12983bdf19c | |
parent | 2cc277f8e32994705a42e8846f17882bb63624b4 (diff) |
WinGui:
- Quick patch to allow "," to be used in CSV files when importing into the gui.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3085 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/C#/Functions/Main.cs | 32 | ||||
-rw-r--r-- | win/C#/Functions/QueryGenerator.cs | 2 | ||||
-rw-r--r-- | win/C#/Functions/UpdateCheckInformation.cs | 27 |
3 files changed, 31 insertions, 30 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index e9c4442b0..8c92d7668 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -97,10 +97,11 @@ namespace Handbrake.Functions {
if (csv.Trim() != "")
{
+ csv = csv.Replace("\\,", "<!comma!>");
string[] contents = csv.Split(',');
int chapter;
int.TryParse(contents[0], out chapter);
- chapterMap.Add(chapter, contents[1]);
+ chapterMap.Add(chapter, contents[1].Replace("<!comma!>", ","));
}
csv = sr.ReadLine();
}
@@ -436,32 +437,6 @@ namespace Handbrake.Functions }
/// <summary>
- /// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
- /// </summary>
- private class UpdateCheckResult : IAsyncResult
- {
- public UpdateCheckResult(object asyncState, UpdateCheckInformation info)
- {
- AsyncState = asyncState;
- Result = info;
- }
-
- /// <summary>
- /// Gets whether the check was executed in debug mode.
- /// </summary>
- public object AsyncState { get; private set; }
-
- /// <summary>
- /// Gets the result of the update check.
- /// </summary>
- public UpdateCheckInformation Result { get; private set; }
-
- public WaitHandle AsyncWaitHandle { get { throw new NotImplementedException(); } }
- public bool CompletedSynchronously { get { throw new NotImplementedException(); } }
- public bool IsCompleted { get { throw new NotImplementedException(); } }
- }
-
- /// <summary>
/// Map languages and their iso639_2 value into a IDictionary
/// </summary>
/// <returns></returns>
@@ -658,6 +633,5 @@ namespace Handbrake.Functions };
return languageMap;
}
-
}
-}
+}
\ No newline at end of file diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index 37e5b66be..3c15f7352 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -590,7 +590,7 @@ namespace Handbrake.Functions {
csv += row.Cells[0].Value.ToString();
csv += ",";
- csv += row.Cells[1].Value.ToString();
+ csv += row.Cells[1].Value.ToString().Replace(",","\\,");
csv += Environment.NewLine;
}
StreamWriter file = new StreamWriter(filePathName);
diff --git a/win/C#/Functions/UpdateCheckInformation.cs b/win/C#/Functions/UpdateCheckInformation.cs index 253817866..c157f8a68 100644 --- a/win/C#/Functions/UpdateCheckInformation.cs +++ b/win/C#/Functions/UpdateCheckInformation.cs @@ -1,4 +1,5 @@ using System;
+using System.Threading;
namespace Handbrake.Functions
{
@@ -20,4 +21,30 @@ namespace Handbrake.Functions /// </summary>
public Exception Error { get; set; }
}
+
+ /// <summary>
+ /// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
+ /// </summary>
+ public class UpdateCheckResult : IAsyncResult
+ {
+ public UpdateCheckResult(object asyncState, UpdateCheckInformation info)
+ {
+ AsyncState = asyncState;
+ Result = info;
+ }
+
+ /// <summary>
+ /// Gets whether the check was executed in debug mode.
+ /// </summary>
+ public object AsyncState { get; private set; }
+
+ /// <summary>
+ /// Gets the result of the update check.
+ /// </summary>
+ public UpdateCheckInformation Result { get; private set; }
+
+ public WaitHandle AsyncWaitHandle { get { throw new NotImplementedException(); } }
+ public bool CompletedSynchronously { get { throw new NotImplementedException(); } }
+ public bool IsCompleted { get { throw new NotImplementedException(); } }
+ }
}
|