diff options
-rw-r--r-- | win/C#/Program.cs | 33 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 106 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 3 |
3 files changed, 62 insertions, 80 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index f2bae9661..64ef81b6b 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -19,35 +19,16 @@ namespace Handbrake [STAThread]
static void Main()
{
- // Check the system meets the system requirements.
- Boolean launch = true;
- try
- {
- // Make sure the screen resolution is not below 1024x768
- Screen scr = Screen.PrimaryScreen;
- if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))
- {
- MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- launch = false;
- }
- }
- catch (Exception exc)
- {
- MessageBox.Show("frmMain.cs - systemCheck() " + exc);
- }
-
- // Either Launch or Close the Application
- if (launch)
+ Screen scr = Screen.PrimaryScreen;
+ if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))
+ MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ else
{
- string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake";
- if (!Directory.Exists(appDir))
- Directory.CreateDirectory(appDir);
-
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs");
if (!Directory.Exists(logDir))
Directory.CreateDirectory(logDir);
- if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml"))
+ if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))
{
PresetsHandler x = new PresetsHandler();
x.updateBuiltInPresets();
@@ -57,8 +38,6 @@ namespace Handbrake Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
- else
- Application.Exit();
}
}
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index b98355165..0fba4d244 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -99,7 +99,6 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
this.radio_cq = new System.Windows.Forms.RadioButton();
@@ -111,18 +110,14 @@ namespace Handbrake this.SliderValue = new System.Windows.Forms.Label();
this.Label46 = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
- this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
- this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.btn_importChapters = new System.Windows.Forms.Button();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
- this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -176,6 +171,11 @@ namespace Handbrake this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.openPreset = new System.Windows.Forms.OpenFileDialog();
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
+ this.Filters = new Handbrake.Controls.Filters();
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
+ this.Subtitles = new Handbrake.Controls.Subtitles();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -784,15 +784,6 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);
- this.AudioSettings.TabIndex = 0;
- //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -929,16 +920,6 @@ namespace Handbrake this.tab_picture.Text = "Picture";
this.tab_picture.UseVisualStyleBackColor = true;
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.Enabled = false;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);
- this.PictureSettings.TabIndex = 0;
- //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
@@ -978,15 +959,6 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -998,15 +970,6 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1057,16 +1020,6 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
- // x264Panel
- //
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.x264Query = "";
- //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1640,11 +1593,59 @@ namespace Handbrake //
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.Enabled = false;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
+ this.PictureSettings.TabIndex = 0;
+ //
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
+ // x264Panel
+ //
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.x264Query = "";
+ //
// frmMain
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(1000, 582);
this.Controls.Add(this.tableLayoutPanel3);
this.Controls.Add(this.toolStrip1);
@@ -1660,6 +1661,7 @@ namespace Handbrake this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MinimumSize = new System.Drawing.Size(775, 480);
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "HandBrake";
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 53b1541d7..ec2b3a6e1 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -756,6 +756,7 @@ namespace Handbrake private void btn_showQueue_Click(object sender, EventArgs e)
{
queueWindow.Show();
+ queueWindow.Activate();
}
private void tb_preview_Click(object sender, EventArgs e)
{
@@ -938,7 +939,7 @@ namespace Handbrake if (autoPath != null)
text_destination.Text = autoPath;
else
- MessageBox.Show("You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default direcotry set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show("You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default directory set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
data_chpt.Rows.Clear();
|