using System.Windows.Forms;\r
using Functions;\r
\r
+ using HandBrake.Framework.Model;\r
+ using HandBrake.Framework.Services;\r
+ using HandBrake.Framework.Views;\r
using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Parsing;\r
using HandBrake.ApplicationServices.Services;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
+ using Handbrake.ToolWindows;\r
+\r
using Model;\r
using Presets;\r
using Properties;\r
{\r
if (DateTime.Now.Subtract(Settings.Default.lastUpdateCheckDate).TotalDays > Properties.Settings.Default.daysBetweenUpdateCheck)\r
{\r
- Main.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false);\r
+ // Set when the last update was\r
+ Settings.Default.lastUpdateCheckDate = DateTime.Now;\r
+ Settings.Default.Save();\r
+ string url = Settings.Default.hb_build.ToString().EndsWith("1")\r
+ ? Settings.Default.appcast_unstable\r
+ : Settings.Default.appcast;\r
+ UpdateService.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false, url, Settings.Default.hb_build, Settings.Default.skipversion, Settings.Default.hb_version);\r
}\r
}\r
\r
return;\r
}\r
\r
- UpdateCheckInformation info;\r
-\r
try\r
{\r
- info = Main.EndCheckForUpdates(result);\r
+ UpdateCheckInformation info = UpdateService.EndCheckForUpdates(result);\r
\r
if (info.NewVersionAvailable)\r
{\r
- frmUpdater updateWindow = new frmUpdater(info.BuildInformation);\r
+ UpdateInfo updateWindow = new UpdateInfo(info.BuildInformation, Settings.Default.hb_version, Settings.Default.hb_build.ToString());\r
updateWindow.ShowDialog();\r
}\r
}\r
private void mnu_UpdateCheck_Click(object sender, EventArgs e)\r
{\r
lbl_updateCheck.Visible = true;\r
- Main.BeginCheckForUpdates(new AsyncCallback(this.UpdateCheckDoneMenu), false);\r
+ Settings.Default.lastUpdateCheckDate = DateTime.Now;\r
+ Settings.Default.Save();\r
+ string url = Settings.Default.hb_build.ToString().EndsWith("1")\r
+ ? Settings.Default.appcast_unstable\r
+ : Settings.Default.appcast;\r
+ UpdateService.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDoneMenu), false, url, Settings.Default.hb_build, Settings.Default.skipversion, Settings.Default.hb_version);\r
}\r
\r
/// <summary>\r
// Make sure the destination path exists.\r
if (!Directory.Exists(Path.GetDirectoryName(jobDestination)))\r
{\r
- MessageBox.Show("Destination Path does not exist.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ MessageBox.Show(string.Format("Destination Path does not exist.\nPath: {0}\n\nThis item was not added to the Queue.", Path.GetDirectoryName(jobDestination)), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
return;\r
}\r
\r
{\r
DialogResult result =\r
MessageBox.Show(\r
- "There is already a queue item for this destination path. \n\n If you continue, the encode will be overwritten. Do you wish to continue?",\r
+ string.Format("There is already a queue item for this destination path.\nDestination Path: {0} \n\nIf you continue, the encode will be overwritten. Do you wish to continue?", jobDestination),\r
"Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);\r
if (result == DialogResult.Yes)\r
encodeQueue.Add(query, this.GetTitle(), jobSourcePath, jobDestination, (rtf_query.Text != string.Empty));\r
if (title.ShowDialog() == DialogResult.OK)\r
{\r
sourceTitle = title.Title;\r
+ SelectSource(ISO_Open.FileName, sourceTitle);\r
}\r
-\r
- SelectSource(ISO_Open.FileName, sourceTitle);\r
}\r
else\r
UpdateSourceLabel();\r
if (title.ShowDialog() == DialogResult.OK)\r
{\r
sourceTitle = title.Title;\r
+ SelectSource(DVD_Open.SelectedPath, sourceTitle);\r
}\r
-\r
- SelectSource(DVD_Open.SelectedPath, sourceTitle);\r
}\r
else\r
UpdateSourceLabel();\r
for (int i = 1; i <= selectedTitle.AngleCount; i++)\r
drop_angle.Items.Add(i.ToString());\r
\r
+ if (drop_angle.Items.Count == 0)\r
+ {\r
+ drop_angle.Visible = false;\r
+ lbl_angle.Visible = false;\r
+ }\r
+\r
if (drop_angle.Items.Count != 0)\r
drop_angle.SelectedIndex = 0;\r
}\r
drop_chapterFinish.Text = drop_chapterFinish.Items[drop_chapterFinish.Items.Count - 1].ToString();\r
\r
// Populate the Audio Channels Dropdown\r
- AudioSettings.SetTrackList(selectedTitle, this.currentlySelectedPreset);\r
+ AudioSettings.SetTrackListFromPreset(selectedTitle, this.currentlySelectedPreset);\r
\r
// Populate the Subtitles dropdown\r
Subtitles.SetSubtitleTrackAuto(selectedTitle.Subtitles.ToArray());\r
BeginInvoke(new UpdateWindowHandler(UpdateScanStatusLabel));\r
return;\r
}\r
- lbl_encode.Text = SourceScan.ScanStatus;\r
+ labelSource.Text = SourceScan.ScanStatus;\r
}\r
\r
/// <summary>\r
{\r
if (InvokeRequired)\r
BeginInvoke(new UpdateWindowHandler(EnableGUI));\r
- lbl_encode.Text = "Scan Completed";\r
foreach (Control ctrl in Controls)\r
ctrl.Enabled = true;\r
btn_start.Enabled = true;\r
if (!(ctrl is StatusStrip || ctrl is MenuStrip || ctrl is ToolStrip))\r
ctrl.Enabled = false;\r
\r
- lbl_encode.Visible = true;\r
- lbl_encode.Text = "Scanning ...";\r
+ labelSource.Enabled = true;\r
+ labelStaticSource.Enabled = true;\r
+ SourceLayoutPanel.Enabled = true;\r
btn_source.Enabled = false;\r
btn_start.Enabled = false;\r
btn_showQueue.Enabled = false;\r
\r
SourceScan.Stop();\r
\r
- lbl_encode.Text = "Scan Cancelled!";\r
+ labelSource.Text = "Scan Cancelled";\r
}\r
\r
/// <summary>\r
try\r
{\r
// Get the information about the new build, if any, and close the window\r
- info = Main.EndCheckForUpdates(result);\r
+ info = UpdateService.EndCheckForUpdates(result);\r
\r
if (info.NewVersionAvailable && info.BuildInformation != null)\r
{\r
- frmUpdater updateWindow = new frmUpdater(info.BuildInformation);\r
+ UpdateInfo updateWindow = new UpdateInfo(info.BuildInformation, Settings.Default.hb_version, Settings.Default.hb_build.ToString());\r
updateWindow.ShowDialog();\r
}\r
else\r
return true;\r
}\r
\r
- if (keyData == (Keys.Control | Keys.A))\r
+ if (keyData == (Keys.Control | Keys.Shift | Keys.A))\r
{\r
btn_add2Queue_Click(this, new EventArgs());\r
return true;\r