OSDN Git Service

WinGui;
[handbrake-jp/handbrake-jp-git.git] / win / C# / ToolWindows / BatchAdd.cs
1 /*  TitleSpecificScan.cs $\r
2     This file is part of the HandBrake source code.\r
3     Homepage: <http://handbrake.fr>.\r
4     It may be used under the terms of the GNU General Public License. */\r
5 \r
6 namespace Handbrake.ToolWindows\r
7 {\r
8     using System;\r
9     using System.Windows.Forms;\r
10 \r
11     /// <summary>\r
12     /// Title Specific Scan\r
13     /// </summary>\r
14     public partial class BatchAdd : Form\r
15     {\r
16         public BatchAdd()\r
17         {\r
18             InitializeComponent();\r
19 \r
20             // Get the Default values for batch encoding.\r
21             this.minDuration.Text = Properties.Settings.Default.batchMinDuration.ToString();\r
22             this.maxDuration.Text = Properties.Settings.Default.batchMaxDuration.ToString();\r
23         }\r
24 \r
25         /// <summary>\r
26         /// Button Cancel Click Event Handler\r
27         /// </summary>\r
28         /// <param name="sender">The Sender</param>\r
29         /// <param name="e">The EventArgs</param>\r
30         private void BtnCancelClick(object sender, EventArgs e)\r
31         {\r
32             this.DialogResult = DialogResult.Cancel;\r
33         }\r
34 \r
35         /// <summary>\r
36         /// Button Scan Click Event Handler\r
37         /// </summary>\r
38         /// <param name="sender">The Sender</param>\r
39         /// <param name="e">The EventArgs</param>\r
40         private void BtnScanClick(object sender, EventArgs e)\r
41         {\r
42             this.DialogResult = DialogResult.OK;\r
43         }\r
44 \r
45         /// <summary>\r
46         /// Gets the minimum duration that the user entered.\r
47         /// </summary>\r
48         public int Min\r
49         {\r
50             get\r
51             {\r
52                 int title;\r
53                 int.TryParse(this.minDuration.Text, out title);\r
54 \r
55                 return title;\r
56             }\r
57         }\r
58 \r
59         /// <summary>\r
60         /// Gets the maximum duration that the user entered.\r
61         /// </summary>\r
62         public int Max\r
63         {\r
64             get\r
65             {\r
66                 int title;\r
67                 int.TryParse(this.maxDuration.Text, out title);\r
68 \r
69                 return title;\r
70             }\r
71         }\r
72     }\r
73 }