]> granicus.if.org Git - handbrake/commitdiff
WinGui: (WPF) Initial setup for the Log Window.
authorsr55 <sr55.hb@outlook.com>
Sun, 30 Oct 2011 22:08:47 +0000 (22:08 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 30 Oct 2011 22:08:47 +0000 (22:08 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4331 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/Views/LogView.xaml
win/CS/HandBrakeWPF/Views/MainView.xaml

index c600cd1a4bcec285e9d80e1b1775284e5ee26c47..48710e7df3ebeca9b47d48356f6a3289ddcd7fc0 100644 (file)
@@ -81,6 +81,7 @@
     <Compile Include="UserSettingConstants.cs" />\r
     <Compile Include="ViewModels\AboutViewModel.cs" />\r
     <Compile Include="ViewModels\AddPresetViewModel.cs" />\r
+    <Compile Include="ViewModels\Interfaces\ILogViewModel.cs" />\r
     <Compile Include="ViewModels\Interfaces\IAboutViewModel.cs" />\r
     <Compile Include="ViewModels\Interfaces\IMainViewModel.cs" />\r
     <Compile Include="ViewModels\Interfaces\IOptionsViewModel.cs" />\r
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs
new file mode 100644 (file)
index 0000000..6aa1020
--- /dev/null
@@ -0,0 +1,18 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="ILogViewModel.cs" company="HandBrake Project (http://handbrake.fr)">\r
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
+// </copyright>\r
+// <summary>\r
+//   The Log View Model Interface\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.ViewModels.Interfaces\r
+{\r
+    /// <summary>\r
+    /// The Log View Model Interface\r
+    /// </summary>\r
+    public interface ILogViewModel\r
+    {\r
+    }\r
+}
\ No newline at end of file
index b0159669f29b0671cef3ba50fd0fb14d57016761..aebdd7e737500878241d010c219c985717979a63 100644 (file)
@@ -11,10 +11,12 @@ namespace HandBrakeWPF.ViewModels
 {\r
     using Caliburn.Micro;\r
 \r
+    using HandBrakeWPF.ViewModels.Interfaces;\r
+\r
     /// <summary>\r
     /// The Log View Model\r
     /// </summary>\r
-    public class LogViewModel : ViewModelBase\r
+    public class LogViewModel : ViewModelBase, ILogViewModel\r
     {\r
         /// <summary>\r
         /// Initializes a new instance of the <see cref="LogViewModel"/> class.\r
index e1976cbdd49b545fbdea1e10be432b7b66da0fe7..6e5153e85e52c30aad7673aed7678d39c493e9a7 100644 (file)
@@ -220,6 +220,15 @@ namespace HandBrakeWPF.ViewModels
             this.WindowManager.ShowWindow(new OptionsViewModel(this.WindowManager, this.userSettingService));\r
         }\r
 \r
+        /// <summary>\r
+        /// Open the Log Window\r
+        /// </summary>\r
+        public void OpenLogWindow()\r
+        {\r
+            this.WindowManager.ShowWindow(new LogViewModel(this.WindowManager));\r
+        }\r
+\r
+\r
         /// <summary>\r
         /// Open the Queue Window.\r
         /// </summary>\r
index ee66567886f6eecdd6ac180793432ef7635270d7..908cee484b3fd1eadf96d3e44cddd493b1b7632e 100644 (file)
@@ -1,8 +1,33 @@
 <Window x:Class="HandBrakeWPF.Views.LogView"\r
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
-        Title="LogView" Height="300" Width="300">\r
+        Title="LogView" Height="600" Width="420">\r
     <Grid>\r
-        \r
+        <Grid>\r
+            <Grid.RowDefinitions>\r
+                <RowDefinition Height="Auto" />\r
+                <RowDefinition Height="*" />\r
+            </Grid.RowDefinitions>\r
+            <ToolBar Grid.Row="0">\r
+                <Button>\r
+                    <StackPanel Orientation="Horizontal">\r
+                        <Image Source="Images/copy.png" Width="16"/>\r
+                        <TextBlock Text="Copy" Margin="2,0,0,0" />\r
+                    </StackPanel>\r
+                </Button>\r
+                <Button Margin="5,0,0,0" >\r
+                    <StackPanel Orientation="Horizontal">\r
+                        <Image Source="Images/folder.png" Width="16"/>\r
+                        <TextBlock Text="Open Log Directory" Margin="2,0,0,0" />\r
+                    </StackPanel>\r
+                </Button>\r
+                \r
+                <ComboBox Width="75" HorizontalAlignment="Right">\r
+                </ComboBox>\r
+            </ToolBar>\r
+\r
+            <RichTextBox Grid.Row="1"  />\r
+        </Grid>\r
+\r
     </Grid>\r
 </Window>\r
index 6b0e9ca66347a46157ee4c46392d8c8ef875468d..1994f743449dc27ca442d3fbaa69aaa4962d2222 100644 (file)
                     </MenuItem>\r
 \r
                     <MenuItem Header="Tools">\r
-                        <MenuItem Header="Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]" />\r
-                       \r
                         <MenuItem Header="Show Queue" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />\r
-                        <MenuItem Header="Activity Window" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />\r
+                        <MenuItem Header="Activity Window" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]" />\r
+                        <Separator />\r
+                        <MenuItem Header="Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]" />\r
                     </MenuItem>\r
 \r
                     <MenuItem Header="Help">\r
@@ -81,7 +81,7 @@
                             <Label Content="Preview"  Margin="8,0,0,0" VerticalAlignment="Center" />\r
                         </StackPanel>\r
                     </Button>\r
-                    <Button Name="ActivityWindow">\r
+                    <Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]"> \r
                         <StackPanel Orientation="Horizontal">\r
                             <Image Source="Images/ActivityWindow.png" Height="32" Width="32" />\r
                             <Label Content="Activity Window"  Margin="8,0,0,0" VerticalAlignment="Center" />\r