diff --git a/DesktopNote.csproj b/DesktopNote.csproj index f49845c..100dd5a 100644 --- a/DesktopNote.csproj +++ b/DesktopNote.csproj @@ -15,6 +15,7 @@ 4 true + false publish\ true Disk @@ -26,8 +27,7 @@ false true 0 - 1.0.0.%2a - false + 1.0.0.0 false true diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 7677538..e11a14a 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -437,21 +437,21 @@ private void Win_Main_Loaded(object sender, RoutedEventArgs e) if (f.Source == CurrentSetting.Font) mi.IsSelected = true; } App.FormatWindow.CB_Font.Items.SortDescriptions.Add(new System.ComponentModel.SortDescription("Content", System.ComponentModel.ListSortDirection.Ascending)); - App.FormatWindow.CB_Font.SelectionChanged += (object s1, SelectionChangedEventArgs e1) => - { - if (App.FormatWindow.Opacity == 1 && e1.AddedItems.Count == 1) - { - var mi = (ComboBoxItem)e1.AddedItems[0]; - - if (!RTB_Main.Selection.IsEmpty) //only change selected - RTB_Main.Selection.ApplyPropertyValue(TextElement.FontFamilyProperty, mi.FontFamily); - else //change default - { - RTB_Main.FontFamily = mi.FontFamily; - CurrentSetting.Font = mi.FontFamily.Source; - } - } - }; + //App.FormatWindow.CB_Font.SelectionChanged += (object s1, SelectionChangedEventArgs e1) => + //{ + // if (App.FormatWindow.Opacity == 1 && e1.AddedItems.Count == 1) + // { + // var mi = (ComboBoxItem)e1.AddedItems[0]; + + // if (!RTB_Main.Selection.IsEmpty) //only change selected + // RTB_Main.Selection.ApplyPropertyValue(TextElement.FontFamilyProperty, mi.FontFamily); + // else //change default + // { + // RTB_Main.FontFamily = mi.FontFamily; + // CurrentSetting.Font = mi.FontFamily.Source; + // } + // } + //}; } //loading contents diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 6d29750..ef18ff3 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.2.0")] -[assembly: AssemblyFileVersion("1.4.2.0")] +[assembly: AssemblyVersion("1.4.2.1")] +[assembly: AssemblyFileVersion("1.4.2.1")] diff --git a/Win_Format.xaml b/Win_Format.xaml index 0627dc9..3bc12ec 100644 --- a/Win_Format.xaml +++ b/Win_Format.xaml @@ -81,7 +81,8 @@ - + diff --git a/Win_Format.xaml.cs b/Win_Format.xaml.cs index 65ee114..3c5adaf 100644 --- a/Win_Format.xaml.cs +++ b/Win_Format.xaml.cs @@ -309,5 +309,21 @@ private void Button_Close_Click(object sender, RoutedEventArgs e) } catch { } } + + private void CB_Font_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (App.FormatWindow.Opacity == 1 && e.AddedItems.Count == 1) + { + var mi = (ComboBoxItem)e.AddedItems[0]; + + if (!RTB_Main.Selection.IsEmpty) //only change selected + RTB_Main.Selection.ApplyPropertyValue(TextElement.FontFamilyProperty, mi.FontFamily); + else //change default + { + RTB_Main.FontFamily = mi.FontFamily; + MainWin.CurrentSetting.Font = mi.FontFamily.Source; + } + } + } } } diff --git a/bin/Release/DesktopNote.exe b/bin/Release/DesktopNote.exe index 6f73a56..2bca6fb 100644 Binary files a/bin/Release/DesktopNote.exe and b/bin/Release/DesktopNote.exe differ