summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/C#/HandBrakeCS.csproj10
-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#/frmActivityWindow.Designer.cs71
-rw-r--r--win/C#/frmActivityWindow.cs26
-rw-r--r--win/C#/frmMain.cs7
-rw-r--r--win/C#/frmReadDVD.cs12
8 files changed, 31 insertions, 101 deletions
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index da343ea94..49f2ae677 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -128,12 +128,6 @@
<Compile Include="frmDownload.Designer.cs">
<DependentUpon>frmDownload.cs</DependentUpon>
</Compile>
- <Compile Include="frmDvdInfo.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="frmDvdInfo.Designer.cs">
- <DependentUpon>frmDvdInfo.cs</DependentUpon>
- </Compile>
<Compile Include="frmMain.cs">
<SubType>Form</SubType>
</Compile>
@@ -187,10 +181,6 @@
<SubType>Designer</SubType>
<DependentUpon>frmDownload.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="frmDvdInfo.resx">
- <SubType>Designer</SubType>
- <DependentUpon>frmDvdInfo.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<SubType>Designer</SubType>
<DependentUpon>frmMain.cs</DependentUpon>
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs
index e5f9dd949..41899aafe 100644
--- a/win/C#/Properties/Settings.Designer.cs
+++ b/win/C#/Properties/Settings.Designer.cs
@@ -121,7 +121,7 @@ namespace Handbrake.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("2008041701")]
+ [global::System.Configuration.DefaultSettingValueAttribute("2008043001")]
public int hb_build {
get {
return ((int)(this["hb_build"]));
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings
index ab759a13b..e36176bfb 100644
--- a/win/C#/Properties/Settings.settings
+++ b/win/C#/Properties/Settings.settings
@@ -27,7 +27,7 @@
<Value Profile="(Default)">Checked</Value>
</Setting>
<Setting Name="hb_build" Type="System.Int32" Scope="User">
- <Value Profile="(Default)">2008041701</Value>
+ <Value Profile="(Default)">2008043001</Value>
</Setting>
<Setting Name="skipversion" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
diff --git a/win/C#/app.config b/win/C#/app.config
index 61a016d11..1b9181203 100644
--- a/win/C#/app.config
+++ b/win/C#/app.config
@@ -32,7 +32,7 @@
<value>Checked</value>
</setting>
<setting name="hb_build" serializeAs="String">
- <value>2008041701</value>
+ <value>2008043001</value>
</setting>
<setting name="skipversion" serializeAs="String">
<value>0</value>
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index ac1e6f1ac..1ef113d36 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -37,81 +37,43 @@ namespace Handbrake
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmActivityWindow));
this.rtf_actLog = new System.Windows.Forms.RichTextBox();
- this.btn_close = new System.Windows.Forms.Button();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
- this.btn_copy = new System.Windows.Forms.Button();
- this.btn_refresh = new System.Windows.Forms.Button();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.panel1.SuspendLayout();
this.SuspendLayout();
//
// rtf_actLog
//
this.rtf_actLog.Cursor = System.Windows.Forms.Cursors.IBeam;
this.rtf_actLog.DetectUrls = false;
- this.rtf_actLog.Location = new System.Drawing.Point(12, 12);
+ this.rtf_actLog.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.rtf_actLog.Location = new System.Drawing.Point(0, 0);
this.rtf_actLog.Name = "rtf_actLog";
this.rtf_actLog.ReadOnly = true;
- this.rtf_actLog.Size = new System.Drawing.Size(515, 433);
+ this.rtf_actLog.Size = new System.Drawing.Size(390, 390);
this.rtf_actLog.TabIndex = 29;
this.rtf_actLog.Text = "";
//
- // btn_close
- //
- this.btn_close.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(399, 451);
- this.btn_close.Name = "btn_close";
- this.btn_close.Size = new System.Drawing.Size(128, 22);
- this.btn_close.TabIndex = 28;
- this.btn_close.TabStop = false;
- this.btn_close.Text = "Close Window";
- this.btn_close.UseVisualStyleBackColor = true;
- this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
- //
// ToolTip
//
this.ToolTip.Active = false;
//
- // btn_copy
- //
- this.btn_copy.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_copy.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_copy.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_copy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_copy.Location = new System.Drawing.Point(12, 451);
- this.btn_copy.Name = "btn_copy";
- this.btn_copy.Size = new System.Drawing.Size(134, 23);
- this.btn_copy.TabIndex = 93;
- this.btn_copy.Text = "Copy to Clipboard";
- this.btn_copy.UseVisualStyleBackColor = true;
- this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);
- //
- // btn_refresh
+ // panel1
//
- this.btn_refresh.BackColor = System.Drawing.SystemColors.ControlLight;
- this.btn_refresh.FlatAppearance.BorderColor = System.Drawing.Color.Black;
- this.btn_refresh.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btn_refresh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_refresh.Location = new System.Drawing.Point(152, 451);
- this.btn_refresh.Name = "btn_refresh";
- this.btn_refresh.Size = new System.Drawing.Size(69, 23);
- this.btn_refresh.TabIndex = 94;
- this.btn_refresh.Text = "Refresh";
- this.btn_refresh.UseVisualStyleBackColor = true;
- this.btn_refresh.Click += new System.EventHandler(this.btn_refresh_Click);
+ this.panel1.Controls.Add(this.rtf_actLog);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(390, 390);
+ this.panel1.TabIndex = 95;
//
// frmActivityWindow
//
- this.AcceptButton = this.btn_close;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(539, 486);
- this.Controls.Add(this.btn_refresh);
- this.Controls.Add(this.btn_copy);
- this.Controls.Add(this.rtf_actLog);
- this.Controls.Add(this.btn_close);
+ this.ClientSize = new System.Drawing.Size(390, 390);
+ this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
@@ -120,6 +82,7 @@ namespace Handbrake
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Activity Window";
this.Load += new System.EventHandler(this.frmActivityWindow_Load);
+ this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -127,9 +90,7 @@ namespace Handbrake
#endregion
internal System.Windows.Forms.RichTextBox rtf_actLog;
- internal System.Windows.Forms.Button btn_close;
internal System.Windows.Forms.ToolTip ToolTip;
- internal System.Windows.Forms.Button btn_copy;
- internal System.Windows.Forms.Button btn_refresh;
+ private System.Windows.Forms.Panel panel1;
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 4864df680..ebee0ea42 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -24,19 +24,15 @@ namespace Handbrake
/// </summary>
///
Thread monitorFile;
- public frmActivityWindow()
+ String read_file;
+ public frmActivityWindow(string file)
{
InitializeComponent();
this.rtf_actLog.Text = string.Empty;
monitorFile = new Thread(autoUpdate);
+ read_file = file;
}
-
- private void btn_close_Click(object sender, EventArgs e)
- {
- monitorFile.Abort();
- this.Hide();
- }
private void frmActivityWindow_Load(object sender, EventArgs e)
{
@@ -78,7 +74,7 @@ namespace Handbrake
{
// hb_encode_log.dat is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it,
// we'll need to make a copy of it.
- string logFile = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
+ string logFile = Path.Combine(Path.GetTempPath(), read_file);
string logFile2 = Path.Combine(Path.GetTempPath(), "hb_encode_log_AppReadable.dat");
// Make sure the application readable log file does not already exist. FileCopy fill fail if it does.
@@ -105,19 +101,5 @@ namespace Handbrake
return log;
}
-
- private void btn_copy_Click(object sender, EventArgs e)
- {
- if (rtf_actLog.Text != "")
- Clipboard.SetText(rtf_actLog.Text, TextDataFormat.Rtf);
- }
-
- private void btn_refresh_Click(object sender, EventArgs e)
- {
- rtf_actLog.Clear();
- rtf_actLog.Text = readFile();
- }
-
-
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 052f1b719..b9aad1efe 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -343,7 +343,7 @@ namespace Handbrake
}
private void mnu_viewDVDdata_Click(object sender, EventArgs e)
{
- frmDvdInfo dvdInfoWindow = new frmDvdInfo();
+ frmActivityWindow dvdInfoWindow = new frmActivityWindow("dvdinfo.dat");
dvdInfoWindow.Show();
}
private void mnu_options_Click(object sender, EventArgs e)
@@ -456,7 +456,7 @@ namespace Handbrake
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
- Form ActivityWindow = new frmActivityWindow();
+ frmActivityWindow ActivityWindow = new frmActivityWindow("hb_encode_log.dat");
ActivityWindow.ShowDialog();
}
@@ -465,7 +465,6 @@ namespace Handbrake
{
String filename = "";
text_source.Text = "";
- frmDvdInfo dvdInfoWindow = new frmDvdInfo();
if (check_fileMode.Checked)
{
@@ -484,7 +483,7 @@ namespace Handbrake
{
if (filename != "")
{
- Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
+ Form frmRD = new frmReadDVD(filename, this);
text_source.Text = filename;
frmRD.ShowDialog();
}
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
index 4c62658f6..d825d1c56 100644
--- a/win/C#/frmReadDVD.cs
+++ b/win/C#/frmReadDVD.cs
@@ -23,16 +23,14 @@ namespace Handbrake
{
private string inputFile;
private frmMain mainWindow;
- private frmDvdInfo dvdInfo;
private Parsing.DVD thisDvd;
private delegate void UpdateUIHandler();
- public frmReadDVD(string inputFile, frmMain parent, frmDvdInfo dvdInfoWindow)
+ public frmReadDVD(string inputFile, frmMain parent)
{
InitializeComponent();
this.inputFile = inputFile;
this.mainWindow = parent;
- this.dvdInfo = dvdInfoWindow;
startScan();
}
@@ -100,11 +98,9 @@ namespace Handbrake
}
}
}
-
}
-
- mainWindow.drp_dvdtitle.SelectedItem = title2Select;
+ mainWindow.drp_dvdtitle.SelectedItem = title2Select;
this.Close();
}
@@ -136,7 +132,7 @@ namespace Handbrake
{
hbproc.WaitForExit();
// TODO: Verify exit code if the CLI supports it properly
- }
+ }
if (!File.Exists(dvdInfoPath))
{
@@ -146,6 +142,8 @@ namespace Handbrake
using (StreamReader sr = new StreamReader(dvdInfoPath))
{
thisDvd = Parsing.DVD.Parse(sr);
+ sr.Close();
+ sr.Dispose();
}
updateUIElements();