From 7235278b41235cb6c97b7b0718606f2e65723995 Mon Sep 17 00:00:00 2001 From: chenguanzhou Date: Wed, 16 Mar 2016 15:10:58 +0800 Subject: [PATCH] v0.3.6 1. fix bug for save 2. move about to settings --- MarkDownEditor.Setup/Product.wxs | 4 ++-- MarkDownEditor/Properties/AssemblyInfo.cs | 4 ++-- MarkDownEditor/View/AboutControl.xaml | 14 ++++++++++---- MarkDownEditor/View/MainWindow.xaml | 6 +----- MarkDownEditor/View/SettingsControl.xaml | 3 +++ MarkDownEditor/ViewModel/MainViewModel.cs | 5 ++--- MarkDownEditor/ViewModel/SettingsViewModel.cs | 3 ++- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/MarkDownEditor.Setup/Product.wxs b/MarkDownEditor.Setup/Product.wxs index 3e055bc..51e127e 100644 --- a/MarkDownEditor.Setup/Product.wxs +++ b/MarkDownEditor.Setup/Product.wxs @@ -2,8 +2,8 @@ - - + + diff --git a/MarkDownEditor/Properties/AssemblyInfo.cs b/MarkDownEditor/Properties/AssemblyInfo.cs index 93b9020..6df9ca4 100644 --- a/MarkDownEditor/Properties/AssemblyInfo.cs +++ b/MarkDownEditor/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.5.0")] -[assembly: AssemblyFileVersion("0.3.5.0")] +[assembly: AssemblyVersion("0.3.6.0")] +[assembly: AssemblyFileVersion("0.3.6.0")] diff --git a/MarkDownEditor/View/AboutControl.xaml b/MarkDownEditor/View/AboutControl.xaml index c2049d4..2cc1997 100644 --- a/MarkDownEditor/View/AboutControl.xaml +++ b/MarkDownEditor/View/AboutControl.xaml @@ -7,9 +7,15 @@ xmlns:local="clr-namespace:MarkDownEditor.View" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="400"> - + - + + @@ -28,7 +34,7 @@ - + diff --git a/MarkDownEditor/View/MainWindow.xaml b/MarkDownEditor/View/MainWindow.xaml index ebb3bcb..f65bdd9 100644 --- a/MarkDownEditor/View/MainWindow.xaml +++ b/MarkDownEditor/View/MainWindow.xaml @@ -31,7 +31,6 @@ - @@ -59,10 +58,7 @@ - - - - + diff --git a/MarkDownEditor/View/SettingsControl.xaml b/MarkDownEditor/View/SettingsControl.xaml index c06f7e6..4d98f9a 100644 --- a/MarkDownEditor/View/SettingsControl.xaml +++ b/MarkDownEditor/View/SettingsControl.xaml @@ -127,5 +127,8 @@ + + + diff --git a/MarkDownEditor/ViewModel/MainViewModel.cs b/MarkDownEditor/ViewModel/MainViewModel.cs index 0c55b2c..225d704 100644 --- a/MarkDownEditor/ViewModel/MainViewModel.cs +++ b/MarkDownEditor/ViewModel/MainViewModel.cs @@ -75,7 +75,6 @@ public override void Cleanup() #region SubViewModels public SettingsViewModel SettingsViewModel { get; } = new SettingsViewModel(); - public AboutViewModel AboutViewModel { get; } = new AboutViewModel(); public FindReplaceViewModel FindReplaceViewModel { get; } = new FindReplaceViewModel(); #endregion //SubViewModels @@ -656,8 +655,8 @@ await DialogCoordinator.Instance.ShowMessageAsync(this, Properties.Resources.Sav { try { - Save(); - IsModified = false; + if (Save()) + IsModified = false; } catch (Exception ex) { diff --git a/MarkDownEditor/ViewModel/SettingsViewModel.cs b/MarkDownEditor/ViewModel/SettingsViewModel.cs index f2d7150..4658f1a 100644 --- a/MarkDownEditor/ViewModel/SettingsViewModel.cs +++ b/MarkDownEditor/ViewModel/SettingsViewModel.cs @@ -50,7 +50,8 @@ public override void Cleanup() base.Cleanup(); } - + public AboutViewModel AboutViewModel { get; } = new AboutViewModel(); + private bool showSettingsControl = false; public bool ShowSettingsControl {