diff --git a/Control/UserControls/Config/AboutControl.xaml.cs b/Control/UserControls/Config/AboutControl.xaml.cs
index 9495b9a..5a1558a 100644
--- a/Control/UserControls/Config/AboutControl.xaml.cs
+++ b/Control/UserControls/Config/AboutControl.xaml.cs
@@ -32,6 +32,7 @@ namespace GeekDesk.Control.UserControls.Config
ZFBCode.Source = ImageUtil.Base64ToBitmapImage(Constants.ZFB_CODE_IMG_BASE64);
}
+
///
/// 移动窗口
///
diff --git a/Control/UserControls/Config/MotionControl.xaml.cs b/Control/UserControls/Config/MotionControl.xaml.cs
index 79785c8..89e5caa 100644
--- a/Control/UserControls/Config/MotionControl.xaml.cs
+++ b/Control/UserControls/Config/MotionControl.xaml.cs
@@ -30,9 +30,9 @@ namespace GeekDesk.Control.UserControls.Config
public partial class MotionControl : UserControl
{
public static bool hotkeyFinished = true; //热键设置结束
- private static KeyEventArgs prevKeyTemp; //上一个按键
- private static List keysTemp = new List();//存储一次快捷键集合
- private static AppConfig appConfig = MainWindow.appData.AppConfig;
+ private KeyEventArgs prevKeyTemp; //上一个按键
+ private readonly List keysTemp = new List();//存储一次快捷键集合
+ private readonly AppConfig appConfig = MainWindow.appData.AppConfig;
public MotionControl()
{
diff --git a/Control/Windows/ConfigWindow.xaml.cs b/Control/Windows/ConfigWindow.xaml.cs
index ca0d638..020c5bf 100644
--- a/Control/Windows/ConfigWindow.xaml.cs
+++ b/Control/Windows/ConfigWindow.xaml.cs
@@ -15,10 +15,10 @@ namespace GeekDesk.Control.Windows
///
public partial class ConfigWindow
{
- private static AboutControl about = new AboutControl();
- private static ThemeControl theme = new ThemeControl();
- private static MotionControl motion = new MotionControl();
- private static OtherControl other = new OtherControl();
+ private static readonly AboutControl about = new AboutControl();
+ private static readonly ThemeControl theme = new ThemeControl();
+ private static readonly MotionControl motion = new MotionControl();
+ private static readonly OtherControl other = new OtherControl();
public MainWindow mainWindow;
private ConfigWindow(AppConfig appConfig, MainWindow mainWindow)
diff --git a/Update.json b/Update.json
index 62d6955..9a7a1db 100644
--- a/Update.json
+++ b/Update.json
@@ -1,9 +1,9 @@
{
"title" : "汾",
- "subTitle" : "V2.2 ʽ",
+ "subTitle" : "V2.3 ʽ",
"msgTitle" : "θ",
"msg" : "['Ե','ڵ뵭','ݼ(ĬCtrl+Shift+Q)','ҼͼĿ¼˵']",
"githubUrl" : "https://github.com/Demo-Liu/GeekDesk/releases/tag",
"giteeUrl" : "https://gitee.com/demo_liu/GeekDesk/releases",
- "version": "2.2"
+ "version": "2.3"
}
\ No newline at end of file
diff --git a/Update.json.bak b/Update.json.bak
new file mode 100644
index 0000000..e918fb7
--- /dev/null
+++ b/Update.json.bak
@@ -0,0 +1,9 @@
+{
+ "title" : "版本更新",
+ "subTitle" : "V2.3 正式版",
+ "msgTitle" : "本次更新内容如下",
+ "msg" : "['边缘吸附功能','窗口淡入淡出动画','待办任务快捷键(默认Ctrl+Shift+Q)','右键任务栏图标打开程序目录菜单']",
+ "githubUrl" : "https://github.com/Demo-Liu/GeekDesk/releases/tag",
+ "giteeUrl" : "https://gitee.com/demo_liu/GeekDesk/releases",
+ "version": "2.3"
+}
\ No newline at end of file
diff --git a/Util/ImageUtil.cs b/Util/ImageUtil.cs
index 33bcfca..803358c 100644
--- a/Util/ImageUtil.cs
+++ b/Util/ImageUtil.cs
@@ -6,6 +6,7 @@ using System.Drawing.Imaging;
using System.IO;
using System.Windows;
using System.Windows.Interop;
+using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace GeekDesk.Util
@@ -22,9 +23,10 @@ namespace GeekDesk.Util
{
using (var ms = new System.IO.MemoryStream(array))
{
- var image = new BitmapImage();
+ BitmapImage image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad; // here
+ RenderOptions.SetBitmapScalingMode(image, BitmapScalingMode.LowQuality);
image.StreamSource = ms;
image.EndInit();
return image;
@@ -184,7 +186,7 @@ namespace GeekDesk.Util
Bitmap bmpOut = new Bitmap(lnNewWidth, lnNewHeight);
Graphics g = Graphics.FromImage(bmpOut);
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
- g.FillRectangle(Brushes.White, 0, 0, lnNewWidth, lnNewHeight);
+ g.FillRectangle(System.Drawing.Brushes.White, 0, 0, lnNewWidth, lnNewHeight);
g.DrawImage(loBMP, 0, 0, lnNewWidth, lnNewHeight);
loBMP.Dispose();
string tempPath = Constants.APP_DIR + "\\temp";
@@ -211,6 +213,7 @@ namespace GeekDesk.Util
BitmapImage bmImg = new BitmapImage();
bmImg.BeginInit();
bmImg.CacheOption = BitmapCacheOption.OnLoad;
+ RenderOptions.SetBitmapScalingMode(bmImg, BitmapScalingMode.LowQuality);
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
bmImg.StreamSource = fs;