OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / HandBrake.ApplicationServices / Init.cs
1 /*  Init.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.ApplicationServices\r
7 {\r
8     using System;\r
9     using System.Reflection;\r
10 \r
11     /// <summary>\r
12     /// Initialize ApplicationServices\r
13     /// </summary>\r
14     public class Init\r
15     {\r
16         /// <summary>\r
17         /// Gets the Assembly version.\r
18         /// </summary>\r
19         /// <returns>\r
20         /// Version data\r
21         /// </returns>\r
22         public static Version AssemblyVersion()\r
23         {\r
24             return Assembly.GetExecutingAssembly().GetName().Version;\r
25         }\r
26 \r
27         /// <summary>\r
28         /// The instance ID used by the Main Applicaiton\r
29         /// </summary>\r
30         public static int InstanceId;\r
31 \r
32         /// <summary>\r
33         /// The Applicaiton that uses this DLL can pass in it's version string.\r
34         /// </summary>\r
35         public static string HandBrakeGuiVersionString;\r
36 \r
37         /// <summary>\r
38         /// What to do when the encode completes.\r
39         /// </summary>\r
40         public static string CompletionOption;\r
41 \r
42         /// <summary>\r
43         /// Disable LibDvdNav\r
44         /// </summary>\r
45         public static bool DisableDvdNav;\r
46 \r
47         /// <summary>\r
48         /// Growl when an encode has finished.\r
49         /// </summary>\r
50         public static bool GrowlEncode;\r
51 \r
52         /// <summary>\r
53         /// Growl when a queue has finished.\r
54         /// </summary>\r
55         public static bool GrowlQueue;\r
56 \r
57         /// <summary>\r
58         /// The Process Priority for HandBrakeCLI\r
59         /// </summary>\r
60         public static string ProcessPriority;\r
61 \r
62         /// <summary>\r
63         /// Path to save log files to.\r
64         /// </summary>\r
65         public static string SaveLogPath;\r
66 \r
67         /// <summary>\r
68         /// Copy log files to the SaveLogPath\r
69         /// </summary>\r
70         public static bool SaveLogToSpecifiedPath;\r
71 \r
72         /// <summary>\r
73         /// Save a copy of the log files with the video\r
74         /// </summary>\r
75         public static bool SaveLogWithVideo;\r
76 \r
77         /// <summary>\r
78         /// Show the CLI window when encoding.\r
79         /// </summary>\r
80         public static bool ShowCliForInGuiEncodeStatus;\r
81 \r
82         /// <summary>\r
83         /// Prevent system sleep\r
84         /// </summary>\r
85         public static bool PreventSleep;\r
86 \r
87         /// <summary>\r
88         /// Setup the Settings used by the applicaiton with this library\r
89         /// </summary>\r
90         /// <param name="versionString">\r
91         /// The version / name of the application that's using this DLL.\r
92         /// </param>\r
93         /// <param name="instanceId">\r
94         /// The Instance ID\r
95         /// </param>\r
96         /// <param name="completionOption">\r
97         /// The completion option.\r
98         /// </param>\r
99         /// <param name="disableDvdNav">\r
100         /// The disable dvd nav.\r
101         /// </param>\r
102         /// <param name="growlEncode">\r
103         /// The growl encode.\r
104         /// </param>\r
105         /// <param name="growlQueue">\r
106         /// The growl queue.\r
107         /// </param>\r
108         /// <param name="processPriority">\r
109         /// The process priority.\r
110         /// </param>\r
111         /// <param name="saveLogPath">\r
112         /// The save log path.\r
113         /// </param>\r
114         /// <param name="saveLogToSpecifiedPath">\r
115         /// The save log to specified path.\r
116         /// </param>\r
117         /// <param name="saveLogWithVideo">\r
118         /// The save log with video.\r
119         /// </param>\r
120         /// <param name="showCliForInGuiEncodeStatus">\r
121         /// The show cli for in gui encode status.\r
122         /// </param>\r
123         /// <param name="preventSleep">\r
124         /// Prevent the system from sleeping\r
125         /// </param>\r
126         public static void SetupSettings(string versionString, int instanceId, string completionOption, bool disableDvdNav,\r
127                                   bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,\r
128                                   bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)\r
129         {\r
130             InstanceId = instanceId;\r
131             HandBrakeGuiVersionString = versionString;\r
132             CompletionOption = completionOption;\r
133             DisableDvdNav = disableDvdNav;\r
134             GrowlEncode = growlEncode;\r
135             GrowlQueue = growlQueue;\r
136             ProcessPriority = processPriority;\r
137             SaveLogPath = saveLogPath;\r
138             SaveLogToSpecifiedPath = saveLogToSpecifiedPath;\r
139             SaveLogWithVideo = saveLogWithVideo;\r
140             ShowCliForInGuiEncodeStatus = showCliForInGuiEncodeStatus;\r
141             PreventSleep = preventSleep;\r
142         }\r
143     }\r
144 }\r