summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-08-24 21:10:32 +0000
committersr55 <[email protected]>2007-08-24 21:10:32 +0000
commit2548077aee301044b45aca605f6949fec78903a9 (patch)
tree53473ca73979892b2118cbf57c93dd704ab67bcf /win
parent056b3e7f595b417c956b633ab20e79f6747aa70e (diff)
WinGui:
- Fixed View DVD Information window not loading the dvdinfo.dat file every time the window is launched. - Fixed a small file path issue with frmReadDVD git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@865 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Properties/Settings.Designer.cs2
-rw-r--r--win/C#/Properties/Settings.settings2
-rw-r--r--win/C#/app.config2
-rw-r--r--win/C#/frmDvdInfo.Designer.cs1
-rw-r--r--win/C#/frmDvdInfo.cs42
-rw-r--r--win/C#/frmMain.cs14
-rw-r--r--win/C#/frmReadDVD.cs6
7 files changed, 39 insertions, 30 deletions
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index 50df43d06..c85849e3f 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -528,7 +528,7 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0.9.1")]
+ [global::System.Configuration.DefaultSettingValueAttribute("0.9.0")]
public string CliVersion {
get {
return ((string)(this["CliVersion"]));
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index f0356a9bf..4c573b0ec 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -129,7 +129,7 @@
<Value Profile="(Default)" />
</Setting>
<Setting Name="CliVersion" Type="System.String" Scope="User">
- <Value Profile="(Default)">0.9.1</Value>
+ <Value Profile="(Default)">0.9.0</Value>
</Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/win/C#/app.config b/win/C#/app.config
index de5b44500..cbddc2c98 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -131,7 +131,7 @@
<value />
</setting>
<setting name="CliVersion" serializeAs="String">
- <value>0.9.1</value>
+ <value>0.9.0</value>
</setting>
</Handbrake.Properties.Settings>
</userSettings>
diff --git a/win/C#/frmDvdInfo.Designer.cs b/win/C#/frmDvdInfo.Designer.cs
index 3db856d1d..6777d1666 100644
--- a/win/C#/frmDvdInfo.Designer.cs
+++ b/win/C#/frmDvdInfo.Designer.cs
@@ -91,6 +91,7 @@ namespace Handbrake
this.Name = "frmDvdInfo";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Read DVD";
+ this.Load += new System.EventHandler(this.frmDvdInfo_Load);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/win/C#/frmDvdInfo.cs b/win/C#/frmDvdInfo.cs
index 3b2cfd87d..b4160200c 100644
--- a/win/C#/frmDvdInfo.cs
+++ b/win/C#/frmDvdInfo.cs
@@ -19,7 +19,32 @@ namespace Handbrake
{
InitializeComponent();
this.rtf_dvdInfo.Text = string.Empty;
+
+ }
+
+ /*public void HandleParsedData(object Sender, string Data)
+ {
+ if (this.InvokeRequired)
+ {
+ this.BeginInvoke(new Parsing.DataReadEventHandler(HandleParsedData), new object[] { Sender, Data });
+ return;
+ }
+ this.rtf_dvdInfo.AppendText(Data + System.Environment.NewLine);
+ }*/
+ private void btn_close_Click(object sender, EventArgs e)
+ {
+ this.Hide();
+ }
+
+ private void frmDvdInfo_Load(object sender, EventArgs e)
+ {
+ this.rtf_dvdInfo.Text = string.Empty;
+ readFile();
+ }
+
+ private void readFile()
+ {
try
{
string appPath = Application.StartupPath.ToString();
@@ -36,24 +61,9 @@ namespace Handbrake
sr.Close();
}
catch (Exception)
- {
- // Don't do anything
- }
- }
-
- /*public void HandleParsedData(object Sender, string Data)
- {
- if (this.InvokeRequired)
{
- this.BeginInvoke(new Parsing.DataReadEventHandler(HandleParsedData), new object[] { Sender, Data });
- return;
+ // Don't do anything
}
- this.rtf_dvdInfo.AppendText(Data + System.Environment.NewLine);
- }*/
-
- private void btn_close_Click(object sender, EventArgs e)
- {
- this.Hide();
}
/*protected override void OnClosing(CancelEventArgs e)
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 72c87904f..30360a66d 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -30,7 +30,7 @@ namespace Handbrake
// - Load users default settings. (if required)
// - Do an update check (if required)
// --------------------------------------------------------------
- private frmDvdInfo dvdInfoWindow = new frmDvdInfo();
+ //private frmDvdInfo dvdInfoWindow = new frmDvdInfo();
public frmMain()
{
@@ -41,8 +41,8 @@ namespace Handbrake
InitializeComponent();
// This is a quick Hack fix for the cross-thread problem with frmDvdIndo ************************
- dvdInfoWindow.Show();
- dvdInfoWindow.Hide();
+ //dvdInfoWindow.Show();
+ //dvdInfoWindow.Hide();
// **********************************************************************************************
@@ -383,8 +383,8 @@ namespace Handbrake
{
try
{
+ frmDvdInfo dvdInfoWindow = new frmDvdInfo();
dvdInfoWindow.Show();
-
}
catch (Exception)
{
@@ -911,8 +911,8 @@ namespace Handbrake
private void btn_Browse_Click(object sender, EventArgs e)
{
String filename ="";
- text_source.Text = "";
-
+ text_source.Text = "";
+ frmDvdInfo dvdInfoWindow = new frmDvdInfo();
if (RadioDVD.Checked)
{
DVD_Open.ShowDialog();
@@ -1229,7 +1229,7 @@ namespace Handbrake
}
}
}
- catch (Exception exc)
+ catch (Exception)
{
// No need to throw an error here.
// Note on non english systems, this will throw an error because of double.Parse(lbl_Aspect.Text); not working.
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
index ad5551188..caef654cd 100644
--- a/win/C#/frmReadDVD.cs
+++ b/win/C#/frmReadDVD.cs
@@ -85,9 +85,8 @@ namespace Handbrake
*/
try
{
- string appPath = Application.StartupPath.ToString();
- appPath = appPath + "\\";
- string strCmdLine = "cmd /c " + '"' + '"' + appPath + "\\hbcli.exe" + '"' + " -i" + '"' + inputFile + '"' + " -t0 >" + '"'+ appPath + "\\dvdinfo.dat" + '"' + " 2>&1" + '"';
+ string appPath = Application.StartupPath.ToString()+ "\\";
+ string strCmdLine = "cmd /c " + '"' + '"' + appPath + "hbcli.exe" + '"' + " -i " + '"' + inputFile + '"' + " -t0 >" + '"'+ appPath + "dvdinfo.dat" + '"' + " 2>&1" + '"';
Process hbproc = Process.Start("CMD.exe", strCmdLine);
hbproc.WaitForExit();
hbproc.Dispose();
@@ -96,7 +95,6 @@ namespace Handbrake
StreamReader sr = new StreamReader(appPath + "dvdinfo.dat");
thisDvd = Parsing.DVD.Parse(sr);
-
sr.Close();
Console.ReadLine();