OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / HandBrakeWPF / ViewModels / MainViewModel.cs
index 0aaa4eb..b39906d 100644 (file)
@@ -16,6 +16,8 @@ namespace HandBrakeWPF.ViewModels
     using HandBrake.ApplicationServices.Services;\r
     using HandBrake.ApplicationServices.Services.Interfaces;\r
 \r
+    using Microsoft.Practices.ServiceLocation;\r
+\r
     /// <summary>\r
     /// HandBrakes Main Window\r
     /// </summary>\r
@@ -55,10 +57,10 @@ namespace HandBrakeWPF.ViewModels
 \r
         #endregion\r
 \r
-        /// <summary>\r
-        /// Initializes a new instance of the <see cref="MainViewModel"/> class.\r
-        /// </summary>\r
-        public MainViewModel()\r
+        #region Properties\r
+\r
+        public MainViewModel(IServiceLocator locator)\r
+            : base(locator)\r
         {\r
             // Setup Services (TODO - Bring Castle back into the project to wire these up for us)\r
             this.scanService = File.Exists("hb.dll") ? (IScan)new LibScan() : new ScanService();\r
@@ -79,7 +81,6 @@ namespace HandBrakeWPF.ViewModels
             this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;\r
         }\r
 \r
-        #region Properties\r
         /// <summary>\r
         /// Gets or sets TestProperty.\r
         /// </summary>\r
@@ -185,6 +186,14 @@ namespace HandBrakeWPF.ViewModels
             base.Shutdown();\r
         }\r
 \r
+\r
+        #region Menu and Taskbar\r
+        \r
+        public void AboutApplication()\r
+        {\r
+           this.ShowDialog<AboutViewModel>();\r
+        }\r
+        \r
         /// <summary>\r
         /// Shutdown the Application\r
         /// </summary>\r
@@ -193,6 +202,9 @@ namespace HandBrakeWPF.ViewModels
             Application.Current.Shutdown();\r
         }\r
 \r
+        #endregion\r
+\r
+\r
         #region Event Handlers\r
         /// <summary>\r
         /// Handle the Scan Status Changed Event.\r