优化代码
This commit is contained in:
1
App.xaml
1
App.xaml
@@ -11,7 +11,6 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
|
||||
<ResourceDictionary Source="d:\workspace\workspace-vs\geekdesk\resource\dictionary\gemetrydictionary.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<Border CornerRadius="5" BorderThickness="0">
|
||||
<!--背景图片-->
|
||||
<Border.Background>
|
||||
<ImageBrush ImageSource="D:\壁纸\tmig.jpg" Opacity="1"></ImageBrush>
|
||||
<ImageBrush ImageSource="D:\壁纸\wallhaven-nrd85w.jpg" Opacity="1"></ImageBrush>
|
||||
</Border.Background>
|
||||
<Grid>
|
||||
<!--<Grid.Background>
|
||||
@@ -168,7 +168,7 @@
|
||||
Margin="5,0,0,5"
|
||||
>
|
||||
<hc:Card.Background>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0.5"/>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0.1"/>
|
||||
</hc:Card.Background>
|
||||
<hc:Card.BorderBrush>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
|
||||
@@ -254,7 +254,7 @@
|
||||
Effect="{DynamicResource EffectShadow2}"
|
||||
Margin="5,0,5,5" Grid.ColumnSpan="2">
|
||||
<hc:Card.Background>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0.5"/>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0.1"/>
|
||||
</hc:Card.Background>
|
||||
<hc:Card.BorderBrush>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
|
||||
|
||||
@@ -4,6 +4,7 @@ using GeekDesk.Util;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
/// <summary>
|
||||
/// 程序设置
|
||||
@@ -24,10 +25,55 @@ namespace GeekDesk.ViewModel
|
||||
private Visibility configIconVisible = Visibility.Visible; // 设置按钮是否显示
|
||||
private AppHideType appHideType = AppHideType.START_EXE; //面板关闭方式 (默认启动程序后)
|
||||
private bool startedShowPanel = true; //启动时是否显示主面板 默认显示
|
||||
[field: NonSerialized]
|
||||
private BitmapImage bitmapImage; //位图
|
||||
private byte[] imageByteArr; //背景图片 byte数组
|
||||
private byte[] defaultImage; //默认背景图片
|
||||
|
||||
|
||||
|
||||
#region GetSet
|
||||
|
||||
public byte[] ImageByteArr
|
||||
{
|
||||
get
|
||||
{
|
||||
return imageByteArr;
|
||||
}
|
||||
set
|
||||
{
|
||||
imageByteArr = value;
|
||||
OnPropertyChanged("ImageByteArr");
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] DefaultImage
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultImage;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultImage = value;
|
||||
OnPropertyChanged("DefaultImage");
|
||||
}
|
||||
}
|
||||
|
||||
public BitmapImage BitmapImage
|
||||
{
|
||||
get
|
||||
{
|
||||
return bitmapImage;
|
||||
}
|
||||
set
|
||||
{
|
||||
bitmapImage = value;
|
||||
OnPropertyChanged("BitmapImage");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool StartedShowPanel
|
||||
{
|
||||
get
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace GeekDesk.ViewModel
|
||||
private int count = 0; //打开次数
|
||||
[field: NonSerialized]
|
||||
private BitmapImage bitmapImage; //位图
|
||||
private byte[] imageByteArr; //图片 base64
|
||||
private byte[] imageByteArr; //图片 byte数组
|
||||
private string content; //显示信息
|
||||
private int imageWidth = (int)DefaultConstant.IMAGE_WIDTH; //图片宽度
|
||||
private int imageHeight = (int)DefaultConstant.IMAGE_HEIGHT; //图片高度
|
||||
|
||||
Reference in New Issue
Block a user