]> granicus.if.org Git - handbrake/commitdiff
WinGui: Give the preview window a presence on the picture settings tab. Added some...
authorsr55 <sr55.hb@outlook.com>
Sat, 17 May 2014 21:27:20 +0000 (21:27 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 17 May 2014 21:27:20 +0000 (21:27 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6197 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj
win/CS/HandBrake.Server/HandBrake.Server.csproj
win/CS/HandBrake10.sln
win/CS/HandBrakeWPF/HandBrakeWPF.csproj
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml

index 6ba1e302db33b1e95027e588beb5ea07210e13fb..39596c2220b0011eb32d537ca086e71c3ea21a79 100644 (file)
     <DebugType>pdbonly</DebugType>\r
     <DebugSymbols>true</DebugSymbols>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x86\Debug31\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x64\Debug31\</OutputPath>\r
+    <DefineConstants>TRACE;DEBUG</DefineConstants>\r
+    <PlatformTarget>x64</PlatformTarget>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="Caliburn.Micro, Version=1.3.1.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">\r
       <SpecificVersion>False</SpecificVersion>\r
index d86da1833880a112e79b9e41a7201f996221e0c8..720f64395d89b43739a6c884c55bbe975023cdf5 100644 (file)
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>\r
     <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x64\Debug31\</OutputPath>\r
+    <DefineConstants>TRACE;DEBUG;X64</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>x64</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>\r
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x86\Debug31\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>\r
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>\r
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>\r
+  </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="PresentationCore">\r
       <RequiredTargetFramework>3.0</RequiredTargetFramework>\r
index b27f798d6abbb261b83d2291978fd0a21da84b54..7e202d4c22a3e6cbd5e3048281ac6635cee9cd53 100644 (file)
     <PlatformTarget>x64</PlatformTarget>\r
     <OutputPath>bin\Release\</OutputPath>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x86\Debug31\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x64\Debug31\</OutputPath>\r
+    <PlatformTarget>x64</PlatformTarget>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="System" />\r
     <Reference Include="System.Core" />\r
index 4878465ae4f5277b74de09fb88678d4fff3feaf9..4af3e5007ca0ec4bd57264b5604047f8b3c12727 100644 (file)
@@ -1,6 +1,8 @@
 \r
-Microsoft Visual Studio Solution File, Format Version 11.00\r
-# Visual Studio 2010\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 2013\r
+VisualStudioVersion = 12.0.30110.0\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.ApplicationServices", "HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"\r
 EndProject\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeWPF", "HandBrakeWPF\HandBrakeWPF.csproj", "{DADE66CB-0E12-4959-ADE5-0ACD31D27C59}"\r
@@ -20,6 +22,10 @@ Global
                Debug|Mixed Platforms = Debug|Mixed Platforms\r
                Debug|x64 = Debug|x64\r
                Debug|x86 = Debug|x86\r
+               Debug32|Any CPU = Debug32|Any CPU\r
+               Debug32|Mixed Platforms = Debug32|Mixed Platforms\r
+               Debug32|x64 = Debug32|x64\r
+               Debug32|x86 = Debug32|x86\r
                Release|Any CPU = Release|Any CPU\r
                Release|Mixed Platforms = Release|Mixed Platforms\r
                Release|x64 = Release|x64\r
@@ -33,6 +39,13 @@ Global
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x64.Build.0 = Debug|x64\r
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x86.ActiveCfg = Debug|x86\r
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x86.Build.0 = Debug|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Any CPU.ActiveCfg = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Mixed Platforms.Build.0 = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x64.ActiveCfg = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x64.Build.0 = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x86.ActiveCfg = Debug32|x86\r
+               {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x86.Build.0 = Debug32|x86\r
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.ActiveCfg = Release|x86\r
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Mixed Platforms.Build.0 = Release|x86\r
@@ -47,6 +60,13 @@ Global
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x64.Build.0 = Debug|x64\r
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x86.ActiveCfg = Debug|x86\r
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x86.Build.0 = Debug|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Any CPU.ActiveCfg = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Mixed Platforms.Build.0 = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x64.ActiveCfg = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x64.Build.0 = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x86.ActiveCfg = Debug32|x86\r
+               {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x86.Build.0 = Debug32|x86\r
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|Any CPU.ActiveCfg = Release|x86\r
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|Mixed Platforms.Build.0 = Release|x86\r
@@ -61,6 +81,13 @@ Global
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug|x64.Build.0 = Debug|x64\r
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug|x86.ActiveCfg = Debug|x86\r
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug|x86.Build.0 = Debug|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Any CPU.ActiveCfg = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Mixed Platforms.Build.0 = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x64.ActiveCfg = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x64.Build.0 = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x86.ActiveCfg = Debug32|x86\r
+               {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x86.Build.0 = Debug32|x86\r
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Release|Any CPU.ActiveCfg = Release|x86\r
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Release|Mixed Platforms.Build.0 = Release|x86\r
@@ -75,6 +102,13 @@ Global
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug|x64.Build.0 = Debug|x64\r
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug|x86.ActiveCfg = Debug|x86\r
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug|x86.Build.0 = Debug|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Any CPU.ActiveCfg = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Mixed Platforms.Build.0 = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x64.ActiveCfg = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x64.Build.0 = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x86.ActiveCfg = Debug32|x86\r
+               {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x86.Build.0 = Debug32|x86\r
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Release|Any CPU.ActiveCfg = Release|x86\r
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Release|Mixed Platforms.Build.0 = Release|x86\r
index adad1827a2bb0229a32ab57a2d4dcbc719a5abf9..2250b4fc5e22bacc75fc1a7334e0de6a46fad49f 100644 (file)
     <PlatformTarget>x64</PlatformTarget>\r
     <ErrorReport>prompt</ErrorReport>\r
   </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x86\Debug31\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>x86</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <OutputPath>bin\x64\Debug31\</OutputPath>\r
+    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <DebugType>full</DebugType>\r
+    <PlatformTarget>x64</PlatformTarget>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+  </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="Caliburn.Micro">\r
       <HintPath>..\libraries\caliburn\Caliburn.Micro.dll</HintPath>\r
index 384cfbc014672e6f788fa0d5216b0845a0a72293..adb1478dd423f3ce576c827546e3336e3ec67d15 100644 (file)
@@ -689,6 +689,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Output: {0}.\r
+        /// </summary>\r
+        public static string PictureSettings_OutputResolution {\r
+            get {\r
+                return ResourceManager.GetString("PictureSettings_OutputResolution", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Preset Version.\r
         /// </summary>\r
@@ -746,6 +755,24 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Still Preview.\r
+        /// </summary>\r
+        public static string Preview {\r
+            get {\r
+                return ResourceManager.GetString("Preview", resourceCulture);\r
+            }\r
+        }\r
+        \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Still Preview (Scaled).\r
+        /// </summary>\r
+        public static string Preview_Scaled {\r
+            get {\r
+                return ResourceManager.GetString("Preview_Scaled", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Question.\r
         /// </summary>\r
index ec7809d9e97348b77146922b02b8b4bb74e46c9d..2d7dbc438728e0769d0e7c66ae652d39e7603867 100644 (file)
@@ -507,4 +507,13 @@ Do you wish to proceed?</value>
   <data name="Main_InvalidDestination" xml:space="preserve">\r
     <value>The entered destination contained illegal characters. You must fix the path and filename before continuing.</value>\r
   </data>\r
+  <data name="Preview" xml:space="preserve">\r
+    <value>Still Preview</value>\r
+  </data>\r
+  <data name="Preview_Scaled" xml:space="preserve">\r
+    <value>Still Preview (Scaled)</value>\r
+  </data>\r
+  <data name="PictureSettings_OutputResolution" xml:space="preserve">\r
+    <value>Output: {0}</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index c051b0aad2c10183683852f70571920c0cdfb1fa..b10c0f292b17d71494e3f1c4408e1a38641c6d0c 100644 (file)
@@ -1049,7 +1049,7 @@ namespace HandBrakeWPF.ViewModels
                 double dispWidth = Math.Round((result.OutputWidth * result.OutputParWidth / result.OutputParHeight), 0);\r
 \r
                 this.DisplaySize = this.sourceResolution.IsEmpty\r
-                                     ? string.Empty\r
+                                     ? string.Format(Properties.Resources.PictureSettings_OutputResolution, "None")\r
                                      : string.Format("Output: {0}x{1}, Anamorphic: {2}x{3}", result.OutputWidth, result.OutputHeight, dispWidth, result.OutputHeight);\r
             }\r
             else\r
index fd683fc2a617051a7976593296c43fde2638d765..279cc6fc8b07c4f7badc1c2ea706979a1ff83c61 100644 (file)
@@ -10,6 +10,7 @@
 namespace HandBrakeWPF.ViewModels\r
 {\r
     using System;\r
+    using System.Windows;\r
     using System.Windows.Media.Imaging;\r
 \r
     using HandBrake.ApplicationServices.Model;\r
@@ -22,6 +23,12 @@ namespace HandBrakeWPF.ViewModels
     /// </summary>\r
     public class StaticPreviewViewModel : ViewModelBase, IStaticPreviewViewModel\r
     {\r
+        /*\r
+         * TODO\r
+         * - Screen needs to be made DPI Aware\r
+         * - Integrate Video Preview panel.\r
+         */\r
+\r
         #region Fields\r
 \r
         /// <summary>\r
@@ -63,6 +70,7 @@ namespace HandBrakeWPF.ViewModels
         {\r
             this.scanService = scanService;\r
             this.selectedPreviewImage = 1;\r
+            this.Title = Properties.Resources.Preview;\r
         }\r
 \r
         #endregion\r
@@ -172,11 +180,18 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Public Methods and Operators\r
 \r
+        /// <summary>\r
+        /// The update preview frame.\r
+        /// </summary>\r
+        /// <param name="task">\r
+        /// The task.\r
+        /// </param>\r
         public void UpdatePreviewFrame(EncodeTask task)\r
         {\r
             this.Task = task;\r
             this.UpdatePreviewFrame();\r
             this.DisplayName = "Picture Preview";\r
+            this.Title = Properties.Resources.Preview;\r
         }\r
 \r
         /// <summary>\r
@@ -193,6 +208,28 @@ namespace HandBrakeWPF.ViewModels
                 this.PreviewImage = image;\r
             }\r
         }\r
+\r
+        /// <summary>\r
+        /// The preview size changed.\r
+        /// </summary>\r
+        /// <param name="ea">\r
+        /// The ea.\r
+        /// </param>\r
+        public void PreviewSizeChanged(SizeChangedEventArgs ea)\r
+        {\r
+            Rect workArea = SystemParameters.WorkArea;\r
+            if (ea.NewSize.Width > workArea.Width)\r
+            {\r
+                this.Width = (int)Math.Round(workArea.Width, 0) - 20;\r
+                this.Title = Properties.Resources.Preview_Scaled;\r
+            }\r
+\r
+            if (ea.NewSize.Height > workArea.Height)\r
+            {\r
+                this.Height = (int)Math.Round(workArea.Height, 0) - 20;\r
+                this.Title = Properties.Resources.Preview_Scaled;\r
+            }\r
+        }\r
         #endregion\r
     }\r
 }
\ No newline at end of file
index a3971995936d03b11843e42e4d122cd7fe563292..1458d1deab811d31c02d2aa32650a58d0eadced5 100644 (file)
                 <ColumnDefinition Width="*" />\r
             </Grid.ColumnDefinitions>\r
 \r
+            <Grid.RowDefinitions>\r
+                <RowDefinition Height="Auto" />\r
+                <RowDefinition Height="*" />\r
+            </Grid.RowDefinitions>\r
+\r
             <!-- Size Panel-->\r
-            <StackPanel Name="SizePanel" Orientation="Vertical" VerticalAlignment="Top" Grid.Column="0" >\r
+            <StackPanel Name="SizePanel" Orientation="Vertical" VerticalAlignment="Top" Grid.Column="0" Grid.Row="0" Grid.RowSpan="1" >\r
                 <Label Content="Size" FontWeight="Bold" />\r
 \r
                 <!-- Row 1-->\r
                                              IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5" />\r
                 </Grid>\r
 \r
-                <!-- Row 5-->\r
-                <Grid Margin="5,15,5,0">\r
-                    <Grid.RowDefinitions>\r
-                        <RowDefinition Height="Auto" />\r
-                    </Grid.RowDefinitions>\r
-\r
-                    <Grid.ColumnDefinitions>\r
-                        <ColumnDefinition Width="Auto" />\r
-                    </Grid.ColumnDefinitions>\r
-\r
-\r
-                    <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5"\r
-                       Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />\r
-                </Grid>\r
             </StackPanel>\r
 \r
             <!-- Crop Panel -->\r
-            <StackPanel Name="CropPanel" Margin="50,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1">\r
+            <StackPanel Name="CropPanel" Margin="15,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="0" Grid.RowSpan="2" Grid.Column="1">\r
                 <Label Content="Cropping" FontWeight="Bold" />\r
                 <RadioButton Content="Automatic" IsChecked="{Binding IsCustomCrop, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="10,0,0,0"/>\r
                 <RadioButton Content="Custom" IsChecked="{Binding IsCustomCrop}" Margin="10,5,0,0" />\r
                 </Grid>\r
 \r
             </StackPanel>\r
+\r
+            <!-- Preview Panel -->\r
+            <StackPanel Name="PreviewPanel" Margin="0,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="1"  Grid.Column="0">\r
+                <Label Content="Output" FontWeight="Bold" />\r
+\r
+                <Grid Margin="5,0,0,0">\r
+                    <Grid.RowDefinitions>\r
+                        <RowDefinition Height="Auto" />\r
+                        <RowDefinition Height="Auto" />\r
+                    </Grid.RowDefinitions>\r
+\r
+                    <Grid.ColumnDefinitions>\r
+                        <ColumnDefinition Width="Auto" />\r
+                    </Grid.ColumnDefinitions>\r
+\r
+                    <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,5"\r
+                       Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />\r
+\r
+                    <Button Content="Preview" Grid.Row="1" Margin="5,0,0,0"\r
+                            cal:Message.Attach="[Event Click] = [Action PreviewImage]" HorizontalAlignment="Left" />\r
+                </Grid>\r
+                \r
+            </StackPanel>\r
         </Grid>\r
     </Border>\r
 </UserControl>\r
index 080d10ea8a80b8b83d00d88dbcf9070f83a402c9..ae044945c2506267a2d1cac03f08f6a1779fb87a 100644 (file)
@@ -2,12 +2,15 @@
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" \r
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" \r
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"\r
+             xmlns:cal="http://www.caliburnproject.org"\r
              mc:Ignorable="d" SizeToContent="WidthAndHeight"\r
              TextOptions.TextFormattingMode="Display"\r
-             Title="Still Preview">\r
+             WindowStartupLocation="CenterScreen"\r
+             cal:Message.Attach="[Event SizeChanged] = [Action PreviewSizeChanged($eventArgs)]"       \r
+             Title="{Binding Title}">\r
     <Grid>\r
-        \r
+\r
         <Image Source="{Binding PreviewImage}" MaxWidth="{Binding Width}" MaxHeight="{Binding Height}" />\r
         <Slider Maximum="{Binding TotalPreviews}" Minimum="0" \r
                 Value="{Binding SelectedPreviewImage}"\r
@@ -15,6 +18,6 @@
                 HorizontalAlignment="Center"\r
                 Margin="0,0,0,20" Width="150" \r
                 Background="Transparent" \r
-                /> \r
+                />\r
     </Grid>\r
 </Window>\r