OSDN Git Service

8cc209e5289e26c32b5eb1b61728ab9bf731c2b4
[handbrake-jp/handbrake-jp-git.git] / win / C# / HandBrake.ApplicationServices / Functions / Main.cs
1 /*  Main.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.Functions\r
7 {\r
8     using System.Diagnostics;\r
9 \r
10     using HandBrake.ApplicationServices.Views;\r
11 \r
12     /// <summary>\r
13     /// Useful functions which various screens can use.\r
14     /// </summary>\r
15     public static class Main\r
16     {\r
17         /// <summary>\r
18         /// Get the Process ID of HandBrakeCLI for the current instance.\r
19         /// </summary>\r
20         /// <returns>A list of processes</returns>\r
21         public static Process[] GetCliProcess()\r
22         {\r
23             return Process.GetProcessesByName("HandBrakeCLI");\r
24         }\r
25 \r
26         /// <summary>\r
27         /// Show the Exception Window\r
28         /// </summary>\r
29         /// <param name="shortError">\r
30         /// The short error.\r
31         /// </param>\r
32         /// <param name="longError">\r
33         /// The long error.\r
34         /// </param>\r
35         public static void ShowExceptiowWindow(string shortError, string longError)\r
36         {\r
37             ExceptionWindow exceptionWindow = new ExceptionWindow();\r
38             exceptionWindow.Setup(shortError, longError);\r
39             exceptionWindow.Show();\r
40         }\r
41     }\r
42 }