Homepage: <http://handbrake.fr>.\r
It may be used under the terms of the GNU General Public License. */\r
\r
+using System;\r
using System.Xml;\r
using System.Text.RegularExpressions;\r
\r
XmlNode nodeRss;\r
XmlNode nodeChannel;\r
XmlNode nodeItem;\r
- private string hb_description;\r
+ private Uri hb_description;\r
private string hb_version;\r
private string hb_build;\r
private string hb_file;\r
/// </summary>\r
public void getInfo()\r
{\r
- int unstable_build = 0;\r
- string unstable_description = "", unstable_version = "";\r
- string unstable_file = "";\r
+ // Get the correct Appcast and set input.\r
+ if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+ readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable));\r
+ else \r
+ readRss(new XmlTextReader(Properties.Settings.Default.appcast));\r
\r
- // Check the stable appcast and get the stable build number\r
- readRss(new XmlTextReader(Properties.Settings.Default.appcast));\r
string input = nodeItem.InnerXml;\r
+\r
+ // Regular Expressions\r
Match ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
- int stable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
- ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
- string stable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
- string stable_description = nodeItem["description"].InnerText;\r
- string stable_file = nodeItem["windows"].InnerText;\r
+ Match verShort = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");\r
\r
- // If this is a snapshot release, or the user wants to check for snapshot releases\r
- if (Properties.Settings.Default.checkSnapshot == "Checked" || Properties.Settings.Default.hb_build.ToString().EndsWith("1"))\r
+ if (nodeItem != null)\r
{\r
- // Get the stable build\r
- readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable));\r
- input = nodeItem.InnerXml;\r
- ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");\r
- unstable_build = int.Parse(ver.ToString().Replace("sparkle:version=", "").Replace("\"", ""));\r
- ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9a-zA-Z.]*)\""");\r
- unstable_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
- unstable_description = nodeItem["description"].InnerText;\r
- unstable_file = nodeItem["windows"].InnerText;\r
+ hb_build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");\r
+ hb_version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");\r
+ hb_file = nodeItem["windows"].InnerText;\r
+ hb_description = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
}\r
\r
- // Set the global version information\r
- if (stable_build >= unstable_build)\r
- {\r
- hb_description = stable_description;\r
- hb_version = stable_version;\r
- hb_build = stable_build.ToString();\r
- hb_file = stable_file;\r
- }\r
- else\r
- {\r
- hb_description = unstable_description;\r
- hb_version = unstable_version;\r
- hb_build = unstable_build.ToString();\r
- hb_file = unstable_file;\r
- }\r
}\r
\r
/// <summary>\r
/// Get Information about an update to HandBrake\r
/// </summary>\r
/// <returns></returns>\r
- public string versionInfo()\r
+ public System.Uri descriptionUrl()\r
{\r
return hb_description;\r
}\r
this.drp_processors = new System.Windows.Forms.ComboBox();\r
this.Label4 = new System.Windows.Forms.Label();\r
this.tab_advanced = new System.Windows.Forms.TabPage();\r
+ this.numeric_updateCheckDays = new System.Windows.Forms.NumericUpDown();\r
+ this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox();\r
this.check_inGuiStatus = new System.Windows.Forms.CheckBox();\r
this.check_disablePresetNotification = new System.Windows.Forms.CheckBox();\r
this.check_dvdnav = new System.Windows.Forms.CheckBox();\r
this.drop_x264step = new System.Windows.Forms.ComboBox();\r
this.label28 = new System.Windows.Forms.Label();\r
this.check_queryEditorTab = new System.Windows.Forms.CheckBox();\r
- this.lbl_appcastUnstable = new System.Windows.Forms.Label();\r
this.check_mainMinimize = new System.Windows.Forms.CheckBox();\r
- this.check_snapshot = new System.Windows.Forms.CheckBox();\r
this.btn_drive_detect = new System.Windows.Forms.CheckBox();\r
this.label6 = new System.Windows.Forms.Label();\r
this.label8 = new System.Windows.Forms.Label();\r
this.label26 = new System.Windows.Forms.Label();\r
this.label27 = new System.Windows.Forms.Label();\r
this.openFile_vlc = new System.Windows.Forms.OpenFileDialog();\r
- this.check_trayStatusAlerts = new System.Windows.Forms.CheckBox();\r
+ this.label15 = new System.Windows.Forms.Label();\r
+ this.label31 = new System.Windows.Forms.Label();\r
this.tab_options.SuspendLayout();\r
this.tab_general.SuspendLayout();\r
this.tab_picture.SuspendLayout();\r
this.tab_cli.SuspendLayout();\r
this.tab_advanced.SuspendLayout();\r
+ ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
this.SuspendLayout();\r
// \r
// \r
// tab_advanced\r
// \r
+ this.tab_advanced.Controls.Add(this.label31);\r
+ this.tab_advanced.Controls.Add(this.label15);\r
+ this.tab_advanced.Controls.Add(this.numeric_updateCheckDays);\r
this.tab_advanced.Controls.Add(this.check_trayStatusAlerts);\r
this.tab_advanced.Controls.Add(this.check_inGuiStatus);\r
this.tab_advanced.Controls.Add(this.check_disablePresetNotification);\r
this.tab_advanced.Controls.Add(this.drop_x264step);\r
this.tab_advanced.Controls.Add(this.label28);\r
this.tab_advanced.Controls.Add(this.check_queryEditorTab);\r
- this.tab_advanced.Controls.Add(this.lbl_appcastUnstable);\r
this.tab_advanced.Controls.Add(this.check_mainMinimize);\r
- this.tab_advanced.Controls.Add(this.check_snapshot);\r
this.tab_advanced.Controls.Add(this.btn_drive_detect);\r
this.tab_advanced.Controls.Add(this.label6);\r
this.tab_advanced.Location = new System.Drawing.Point(4, 22);\r
this.tab_advanced.Text = "Advanced / Other";\r
this.tab_advanced.UseVisualStyleBackColor = true;\r
// \r
+ // numeric_updateCheckDays\r
+ // \r
+ this.numeric_updateCheckDays.Location = new System.Drawing.Point(323, 166);\r
+ this.numeric_updateCheckDays.Maximum = new decimal(new int[] {\r
+ 31,\r
+ 0,\r
+ 0,\r
+ 0});\r
+ this.numeric_updateCheckDays.Minimum = new decimal(new int[] {\r
+ 1,\r
+ 0,\r
+ 0,\r
+ 0});\r
+ this.numeric_updateCheckDays.Name = "numeric_updateCheckDays";\r
+ this.numeric_updateCheckDays.Size = new System.Drawing.Size(50, 21);\r
+ this.numeric_updateCheckDays.TabIndex = 94;\r
+ this.numeric_updateCheckDays.Value = new decimal(new int[] {\r
+ 1,\r
+ 0,\r
+ 0,\r
+ 0});\r
+ this.numeric_updateCheckDays.ValueChanged += new System.EventHandler(this.numeric_updateCheckDays_ValueChanged);\r
+ // \r
+ // check_trayStatusAlerts\r
+ // \r
+ this.check_trayStatusAlerts.AutoSize = true;\r
+ this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent;\r
+ this.check_trayStatusAlerts.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.check_trayStatusAlerts.Location = new System.Drawing.Point(97, 64);\r
+ this.check_trayStatusAlerts.Name = "check_trayStatusAlerts";\r
+ this.check_trayStatusAlerts.Size = new System.Drawing.Size(352, 17);\r
+ this.check_trayStatusAlerts.TabIndex = 93;\r
+ this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)";\r
+ this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +\r
+ " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" +\r
+ "");\r
+ this.check_trayStatusAlerts.UseVisualStyleBackColor = false;\r
+ this.check_trayStatusAlerts.CheckedChanged += new System.EventHandler(this.check_trayStatusAlerts_CheckedChanged);\r
+ // \r
// check_inGuiStatus\r
// \r
this.check_inGuiStatus.AutoSize = true;\r
this.check_dvdnav.AutoSize = true;\r
this.check_dvdnav.BackColor = System.Drawing.Color.Transparent;\r
this.check_dvdnav.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_dvdnav.Location = new System.Drawing.Point(76, 257);\r
+ this.check_dvdnav.Location = new System.Drawing.Point(76, 247);\r
this.check_dvdnav.Name = "check_dvdnav";\r
this.check_dvdnav.Size = new System.Drawing.Size(297, 17);\r
this.check_dvdnav.TabIndex = 90;\r
// \r
this.label32.AutoSize = true;\r
this.label32.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.label32.Location = new System.Drawing.Point(38, 257);\r
+ this.label32.Location = new System.Drawing.Point(38, 247);\r
this.label32.Name = "label32";\r
this.label32.Size = new System.Drawing.Size(32, 13);\r
this.label32.TabIndex = 89;\r
// label30\r
// \r
this.label30.AutoSize = true;\r
- this.label30.Location = new System.Drawing.Point(73, 215);\r
+ this.label30.Location = new System.Drawing.Point(73, 205);\r
this.label30.Name = "label30";\r
this.label30.Size = new System.Drawing.Size(230, 13);\r
this.label30.TabIndex = 87;\r
"0.50",\r
"0.25",\r
"0.20"});\r
- this.drop_x264step.Location = new System.Drawing.Point(312, 212);\r
+ this.drop_x264step.Location = new System.Drawing.Point(323, 202);\r
this.drop_x264step.Name = "drop_x264step";\r
- this.drop_x264step.Size = new System.Drawing.Size(111, 21);\r
+ this.drop_x264step.Size = new System.Drawing.Size(85, 21);\r
this.drop_x264step.TabIndex = 86;\r
this.ToolTip.SetToolTip(this.drop_x264step, "The number of processor\'s / processor cores. Unless your having problems, leave o" +\r
"n Automatic.");\r
// \r
this.label28.AutoSize = true;\r
this.label28.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.label28.Location = new System.Drawing.Point(27, 215);\r
+ this.label28.Location = new System.Drawing.Point(27, 205);\r
this.label28.Name = "label28";\r
this.label28.Size = new System.Drawing.Size(43, 13);\r
this.label28.TabIndex = 85;\r
this.check_queryEditorTab.UseVisualStyleBackColor = false;\r
this.check_queryEditorTab.CheckedChanged += new System.EventHandler(this.check_queryEditorTab_CheckedChanged);\r
// \r
- // lbl_appcastUnstable\r
- // \r
- this.lbl_appcastUnstable.AutoSize = true;\r
- this.lbl_appcastUnstable.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.lbl_appcastUnstable.Location = new System.Drawing.Point(6, 178);\r
- this.lbl_appcastUnstable.Name = "lbl_appcastUnstable";\r
- this.lbl_appcastUnstable.Size = new System.Drawing.Size(64, 13);\r
- this.lbl_appcastUnstable.TabIndex = 83;\r
- this.lbl_appcastUnstable.Text = "Updates:";\r
- // \r
// check_mainMinimize\r
// \r
this.check_mainMinimize.AutoSize = true;\r
this.check_mainMinimize.UseVisualStyleBackColor = false;\r
this.check_mainMinimize.CheckedChanged += new System.EventHandler(this.check_mainMinimize_CheckedChanged);\r
// \r
- // check_snapshot\r
- // \r
- this.check_snapshot.AutoSize = true;\r
- this.check_snapshot.BackColor = System.Drawing.Color.Transparent;\r
- this.check_snapshot.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_snapshot.Location = new System.Drawing.Point(76, 177);\r
- this.check_snapshot.Name = "check_snapshot";\r
- this.check_snapshot.Size = new System.Drawing.Size(273, 17);\r
- this.check_snapshot.TabIndex = 80;\r
- this.check_snapshot.Text = "Check for unstable development snapshots";\r
- this.ToolTip.SetToolTip(this.check_snapshot, "Enables the built in update checker to check for the latest development snapshot " +\r
- "builds.\r\nWarning: These are considered unstable builds and are not supported!");\r
- this.check_snapshot.UseVisualStyleBackColor = false;\r
- this.check_snapshot.CheckedChanged += new System.EventHandler(this.check_snapshot_CheckedChanged);\r
- // \r
// btn_drive_detect\r
// \r
this.btn_drive_detect.AutoSize = true;\r
this.openFile_vlc.DefaultExt = "exe";\r
this.openFile_vlc.Filter = "exe|*.exe";\r
// \r
- // check_trayStatusAlerts\r
+ // label15\r
// \r
- this.check_trayStatusAlerts.AutoSize = true;\r
- this.check_trayStatusAlerts.BackColor = System.Drawing.Color.Transparent;\r
- this.check_trayStatusAlerts.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
- this.check_trayStatusAlerts.Location = new System.Drawing.Point(97, 64);\r
- this.check_trayStatusAlerts.Name = "check_trayStatusAlerts";\r
- this.check_trayStatusAlerts.Size = new System.Drawing.Size(352, 17);\r
- this.check_trayStatusAlerts.TabIndex = 93;\r
- this.check_trayStatusAlerts.Text = "Display status messages from tray icon (balloon popups)";\r
- this.ToolTip.SetToolTip(this.check_trayStatusAlerts, "Minimize the window to the system tray rather than the task bar.\r\nThe system tray" +\r
- " icon has encode status notifications.\r\nNote: requires restart to take effect!\r\n" +\r
- "");\r
- this.check_trayStatusAlerts.UseVisualStyleBackColor = false;\r
- this.check_trayStatusAlerts.CheckedChanged += new System.EventHandler(this.check_trayStatusAlerts_CheckedChanged);\r
+ this.label15.AutoSize = true;\r
+ this.label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+ this.label15.Location = new System.Drawing.Point(6, 168);\r
+ this.label15.Name = "label15";\r
+ this.label15.Size = new System.Drawing.Size(64, 13);\r
+ this.label15.TabIndex = 95;\r
+ this.label15.Text = "Updates:";\r
+ // \r
+ // label31\r
+ // \r
+ this.label31.AutoSize = true;\r
+ this.label31.Location = new System.Drawing.Point(73, 168);\r
+ this.label31.Name = "label31";\r
+ this.label31.Size = new System.Drawing.Size(241, 13);\r
+ this.label31.TabIndex = 96;\r
+ this.label31.Text = "Number of days between update checks:";\r
// \r
// frmOptions\r
// \r
this.tab_cli.PerformLayout();\r
this.tab_advanced.ResumeLayout(false);\r
this.tab_advanced.PerformLayout();\r
+ ((System.ComponentModel.ISupportInitialize)(this.numeric_updateCheckDays)).EndInit();\r
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();\r
this.ResumeLayout(false);\r
this.PerformLayout();\r
internal System.Windows.Forms.CheckBox check_cli_minimized;\r
private System.Windows.Forms.Label label12;\r
internal System.Windows.Forms.ToolTip ToolTip;\r
- internal System.Windows.Forms.CheckBox check_snapshot;\r
private System.Windows.Forms.TabPage tab_picture;\r
internal System.Windows.Forms.Label label5;\r
private System.Windows.Forms.TextBox txt_autoNameFormat;\r
private System.Windows.Forms.Label label27;\r
internal System.Windows.Forms.ComboBox comboBox2;\r
private System.Windows.Forms.OpenFileDialog openFile_vlc;\r
- private System.Windows.Forms.Label lbl_appcastUnstable;\r
internal System.Windows.Forms.CheckBox check_mainMinimize;\r
internal System.Windows.Forms.CheckBox check_queryEditorTab;\r
private System.Windows.Forms.Label label30;\r
internal System.Windows.Forms.CheckBox check_disablePresetNotification;\r
internal System.Windows.Forms.CheckBox check_inGuiStatus;\r
internal System.Windows.Forms.CheckBox check_trayStatusAlerts;\r
+ private System.Windows.Forms.NumericUpDown numeric_updateCheckDays;\r
+ private System.Windows.Forms.Label label15;\r
+ private System.Windows.Forms.Label label31;\r
}\r
}
\ No newline at end of file