OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / HandBrakeWPF / App.xaml.cs
1 /*  App.xaml.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 HandBrakeWPF\r
7 {\r
8     using Caliburn.PresentationFramework;\r
9     using Caliburn.PresentationFramework.ApplicationModel;\r
10 \r
11     using HandBrakeWPF.Services;\r
12     using HandBrakeWPF.ViewModels;\r
13 \r
14     /// <summary>\r
15     /// Interaction logic for App.xaml\r
16     /// </summary>\r
17     public partial class App : CaliburnApplication\r
18     {\r
19         /*\r
20          * TODO:\r
21          * - Setup Castle Windsor support for services.\r
22          * \r
23          * \r
24          */\r
25 \r
26 \r
27         /// <summary>\r
28         /// Initializes a new instance of the <see cref="App"/> class.\r
29         /// </summary>\r
30         public App()\r
31         {\r
32         }\r
33 \r
34         /// <summary>\r
35         /// Create the Root View\r
36         /// </summary>\r
37         /// <returns>\r
38         /// A MainViewMOdel\r
39         /// </returns>\r
40         protected override object CreateRootModel()\r
41         {\r
42             var binder = (DefaultBinder)Container.GetInstance<DefaultBinder>();\r
43 \r
44             binder.EnableBindingConventions();\r
45             binder.EnableMessageConventions();\r
46 \r
47             return Container.GetInstance<MainViewModel>();\r
48         }\r
49 \r
50 \r
51         protected override void ConfigurePresentationFramework(PresentationFrameworkModule module)\r
52         {\r
53             module.UsingWindowManager<WindowManager>();\r
54         }\r
55     }\r
56 }\r