Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit 9ed1e83

Browse files
committed
Merge branch 'release/4.6.0版本发布'
2 parents 7f13b6b + 71557b0 commit 9ed1e83

26 files changed

+568
-279
lines changed

AutoUpdateTool/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
6-
</configuration>
6+
</configuration>

AutoUpdateTool/AutoUpdateTool.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
<OutputType>Exe</OutputType>
1010
<RootNamespace>AutoUpdateTool</RootNamespace>
1111
<AssemblyName>AutoUpdateTool</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<Deterministic>true</Deterministic>
1515
<NuGetPackageImportStamp>
1616
</NuGetPackageImportStamp>
17+
<TargetFrameworkProfile />
1718
</PropertyGroup>
1819
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1920
<PlatformTarget>AnyCPU</PlatformTarget>

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,17 @@ A convenitent and beautiful Windows StikyNotes Application </br></br>
1313

1414
## 2022年新开发目标
1515

16-
1. 升级依赖库,用MahApp为主体重构项目UI
16+
1. ~~升级依赖库,用MahApp为主体重构项目UI~~(完成)
1717
2. 支持多语言切换
1818
3. 支持夜间、日间模式
19-
4. 新增列表功能,不需要显示的可以暂时隐藏起来
19+
4. ~~新增列表功能,不需要显示的可以暂时隐藏起来~~(完成)
2020
5. 用web端的markdown文本编辑器或富文本编辑器替换现有WPF的富文本控件(WPF的富文本控件实在是不太行,暂时找不到新方案,欢迎大家提issue交流)
2121
6. 搭建一个主页网站(类似Typora,计划Asp.Net Core+Vue实现),方便无法科学上网下载软件的朋友能够下载和更新本软件
2222

2323
以上几点目标希望2022年能够实现。
2424

2525

2626

27-
##
28-
29-
##
30-
3127
## 安装 Installation
3228

3329
点击下载`StickyNotes.exe``AutoUpdateTool.exe`两个文件,放置在同一个目录下即可,双击`StickyNotes.exe`运行便签软件:
@@ -57,10 +53,11 @@ Support global hotkey.</br></br>
5753

5854
[更新日志](更新日志.md)
5955

60-
## ⚡功能更新 2021年1月10日
56+
## ⚡功能更新 2022年1月22日
6157

62-
1. 文本功能大更新,支持更多编辑功能,添加图片,列表等。
63-
2. UI界面修改。
58+
1. 新增便签列表功能、支持暂时不显示的便签隐藏
59+
1. 新增更多主题颜色
60+
1. 界面UI更新,更加扁平化,符合WIN10的审美
6461

6562
## 程序截图
6663

StickyNotes/App.xaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,21 @@
1919
<ResourceDictionary Source="Style/Label.xaml" />
2020
<ResourceDictionary Source="Style/Themes/Blue.xaml" />
2121

22-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
23-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
24-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
22+
2523
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />-->
2624
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />-->
2725
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
2826
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
29-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Grey.xaml" />
30-
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.LightBlue.xaml">
31-
<vm:ViewModelLocator
27+
28+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
29+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
30+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
31+
32+
</ResourceDictionary.MergedDictionaries>
33+
<vm:ViewModelLocator
3234
xmlns:vm="clr-namespace:StickyNotes.ViewModel"
3335
x:Key="Locator"
3436
d:IsDataSource="True" />
35-
</ResourceDictionary>
36-
</ResourceDictionary.MergedDictionaries>
37-
3837
<ContextMenu x:Key="NotifyIconMenu" StaysOpen="False">
3938
<MenuItem
4039
Name="MenuOpen"

StickyNotes/App.xaml.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ protected override void OnStartup(StartupEventArgs e)
5959
var windowsDatas = programData.Datas;
6060
ProgramData.Instance.IsWindowTopMost = programData.IsWindowTopMost;
6161
ProgramData.Instance.IsStartUpWithSystem = programData.IsStartUpWithSystem;
62-
ProgramData.Instance.CurrenTheme = programData.CurrenTheme;
62+
ProgramData.Instance.CurrentTheme = programData.CurrentTheme;
6363
ProgramData.Instance.ShowAllHotKey = programData.ShowAllHotKey;
6464
ProgramData.Instance.IsAutoCheckUpdate = programData.IsAutoCheckUpdate;
65-
ThemeAssist.ChangeTheme(programData.CurrenTheme);
65+
ProgramData.Instance.HideWindowData= programData.HideWindowData;
66+
ThemeAssist.ChangeTheme(programData.CurrentTheme);
6667
//有创建过的窗口
6768
if (windowsDatas.Count > 0)
6869
{
@@ -285,7 +286,6 @@ private void App_OnDispatcherUnhandledException(object sender, DispatcherUnhandl
285286
{
286287
Logger.Log().Error(ex.StackTrace);
287288
Logger.Log().Error(ex.Message);
288-
MessageBox.Show("应用程序发生不可恢复的异常,将要退出!");
289289
Application.Current.Shutdown();
290290
}
291291
}
@@ -317,17 +317,13 @@ private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionE
317317
{
318318
Logger.Log().Error(exception.StackTrace);
319319
Logger.Log().Error(exception.Message);
320-
MessageBox.Show("应用程序发生不可恢复的异常,将要退出!");
321320
Application.Current.Shutdown();
322-
323-
324321
}
325322
}
326323
catch (Exception exxxx)
327324
{
328325
Logger.Log().Error(exxxx.StackTrace);
329326
Logger.Log().Error(exxxx.Message);
330-
MessageBox.Show("应用程序发生不可恢复的异常,将要退出!");
331327
Application.Current.Shutdown();
332328

333329
}

StickyNotes/Converter/ThemeConverter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
3434
/// <returns></returns>
3535
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
3636
{
37-
var index = (Themes)value;
38-
return index;
39-
37+
//var index = (Themes)value;
38+
//return index;
39+
return "1";
4040
}
4141
}
4242
}

StickyNotes/Data/ProgramData.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ namespace StickyNotes
1212
public class ProgramData : INotifyPropertyChanged
1313
{
1414
public ObservableCollection<WindowsData> Datas { get; set; }
15+
public ObservableCollection<WindowsData> HideWindowData { get; set; }
16+
17+
1518

1619
/// <summary>
1720
/// 窗体是否置顶
@@ -33,10 +36,15 @@ public static ProgramData Instance
3336
/// </summary>
3437
public HotKeyModel ShowAllHotKey { get; set; }
3538

39+
40+
/// <summary>
41+
/// 日间或夜间
42+
/// </summary>
43+
public string BaseTheme { get; set; }
3644
/// <summary>
3745
/// 窗体主题颜色
3846
/// </summary>
39-
public Themes CurrenTheme { get; set; }
47+
public string CurrentTheme { get; set; }
4048

4149
/// <summary>
4250
/// 是否开机自启动
@@ -50,11 +58,13 @@ private ProgramData()
5058
{
5159
// Instance = new ProgramData();
5260
Datas = new ObservableCollection<WindowsData>();
61+
HideWindowData= new ObservableCollection<WindowsData>();
5362
IsWindowTopMost = false;
5463
IsStartUpWithSystem = false;
5564
IsAutoCheckUpdate = true;
5665
Datas.CollectionChanged += Datas_CollectionChanged;
57-
CurrenTheme = Themes.Blue;
66+
BaseTheme = "Light";
67+
CurrentTheme = "Blue";
5868
ShowAllHotKey = new HotKeyModel()
5969
{ IsSelectAlt = false, IsSelectCtrl = true, IsSelectShift = false, IsUsable = true, SelectKey = EKey.Q, Name = EHotKeySetting.ShowAllWindow.ToString() };
6070
}

StickyNotes/Data/WindowsData.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ public class WindowsData : INotifyPropertyChanged
5353
/// 当前窗口存储的文件路径
5454
/// </summary>
5555
public string DocumentFileName { get; set; }
56+
57+
/// <summary>
58+
/// 窗体是否已经显示
59+
/// </summary>
60+
public bool IsShowed { get; set; }
5661
/// <summary>
5762
/// 默认初始化数据
5863
/// </summary>
@@ -73,6 +78,7 @@ public WindowsData()
7378
RichTextBoxContent = string.Empty;
7479
IsCurrentWindowTopMost = false;
7580
IsFocused = true;
81+
IsShowed = true;
7682
}
7783

7884

StickyNotes/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

StickyNotes/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="Version" xml:space="preserve">
121-
<value>v4.5.4</value>
121+
<value>v4.6.0</value>
122122
<comment>程序版本</comment>
123123
</data>
124124
</root>

0 commit comments

Comments
 (0)