增加 添加系统和开始菜单项目功能
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using GeekDesk.Constant;
|
||||
using GeekDesk.Util;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
/// <summary>
|
||||
@@ -22,10 +25,60 @@ namespace GeekDesk.ViewModel
|
||||
private string content; //显示信息
|
||||
private bool adminStartUp = false; //始终管理员方式启动 默认否
|
||||
private byte[] defaultImage; //默认图标
|
||||
private string startArg; //启动参数
|
||||
private string lnkPath;
|
||||
|
||||
private IconType iconType = IconType.OTHER;
|
||||
|
||||
|
||||
public string LnkPath_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return lnkPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
lnkPath = value;
|
||||
}
|
||||
}
|
||||
public string LnkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return lnkPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
lnkPath = value;
|
||||
OnPropertyChanged("LnkPath");
|
||||
}
|
||||
}
|
||||
|
||||
public string StartArg
|
||||
{
|
||||
get
|
||||
{
|
||||
return startArg;
|
||||
}
|
||||
set
|
||||
{
|
||||
startArg = value;
|
||||
OnPropertyChanged("StartArg");
|
||||
}
|
||||
}
|
||||
public string StartArg_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return startArg;
|
||||
}
|
||||
set
|
||||
{
|
||||
startArg = value;
|
||||
}
|
||||
}
|
||||
|
||||
public IconType IconType
|
||||
{
|
||||
get
|
||||
@@ -53,6 +106,18 @@ namespace GeekDesk.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] DefaultImage_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultImage;
|
||||
}
|
||||
set
|
||||
{
|
||||
defaultImage = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AdminStartUp
|
||||
{
|
||||
get
|
||||
@@ -75,7 +140,14 @@ namespace GeekDesk.ViewModel
|
||||
set
|
||||
{
|
||||
count = value;
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
if (StringUtil.IsEmpty(Path))
|
||||
{
|
||||
Content = Name + "\n使用次数: " + Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
}
|
||||
OnPropertyChanged("Count");
|
||||
}
|
||||
}
|
||||
@@ -89,11 +161,30 @@ namespace GeekDesk.ViewModel
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
if (StringUtil.IsEmpty(Path))
|
||||
{
|
||||
Content = Name + "\n使用次数: " + Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
}
|
||||
OnPropertyChanged("Name");
|
||||
}
|
||||
}
|
||||
|
||||
public string Name_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return name;
|
||||
}
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
@@ -103,11 +194,31 @@ namespace GeekDesk.ViewModel
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
if (StringUtil.IsEmpty(Path))
|
||||
{
|
||||
Content = Name + "\n使用次数: " + Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||
}
|
||||
OnPropertyChanged("Path");
|
||||
}
|
||||
}
|
||||
|
||||
public string Path_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return path;
|
||||
}
|
||||
set
|
||||
{
|
||||
path = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public BitmapImage BitmapImage
|
||||
{
|
||||
get
|
||||
@@ -123,6 +234,20 @@ namespace GeekDesk.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public BitmapImage BitmapImage_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return ImageUtil.ByteArrToImage(ImageByteArr_NoWrite);
|
||||
}
|
||||
set
|
||||
{
|
||||
bitmapImage = value;
|
||||
ImageByteArr_NoWrite = ImageUtil.BitmapImageToByte(bitmapImage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public byte[] ImageByteArr
|
||||
{
|
||||
get
|
||||
@@ -137,6 +262,19 @@ namespace GeekDesk.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] ImageByteArr_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
return imageByteArr;
|
||||
}
|
||||
set
|
||||
{
|
||||
imageByteArr = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Content
|
||||
{
|
||||
get
|
||||
@@ -150,10 +288,18 @@ namespace GeekDesk.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string Content_NoWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return content;
|
||||
}
|
||||
set
|
||||
{
|
||||
content = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[field: NonSerializedAttribute()]
|
||||
|
||||
Reference in New Issue
Block a user