Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bf0e6ad23 | ||
|
|
fadf020ecf | ||
|
|
c062f332ff | ||
|
|
4d416e673e | ||
|
|
a03fb713e4 | ||
|
|
489a27a0ef | ||
|
|
e112dfebea | ||
|
|
9ca443acf6 | ||
|
|
dd17bbc2b3 | ||
|
|
c9bb1c2fad | ||
|
|
8decd923ff | ||
|
|
65d57b69b6 | ||
|
|
28a523fb04 | ||
|
|
a38ecab5fa | ||
|
|
145564bfc5 | ||
|
|
fdd8c8bb10 | ||
|
|
fce6f47fbe | ||
|
|
c9bc4282c0 | ||
|
|
54200c8254 | ||
|
|
72bcbee888 | ||
|
|
de02248e75 | ||
|
|
78b5b52c2a | ||
|
|
b66c9cd082 | ||
|
|
83cdaa4491 | ||
|
|
9e3c6f67c8 | ||
|
|
1a24222f3f | ||
|
|
1b9e4fc79d | ||
|
|
9eaca05012 | ||
|
|
d82ce80374 | ||
|
|
4444e6000c | ||
|
|
46f6de321c | ||
|
|
c3e46bc751 | ||
|
|
b23a1d91c5 | ||
|
|
edacf3249c | ||
|
|
ab13cff769 |
30
App.config
30
App.config
@@ -1,21 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<section
|
<section name="SystemIcons" type="System.Configuration.DictionarySectionHandler" />
|
||||||
name="SystemIcons"
|
|
||||||
type="System.Configuration.DictionarySectionHandler" />
|
|
||||||
</configSections>
|
</configSections>
|
||||||
<SystemIcons>
|
<SystemIcons>
|
||||||
<add key="Calculator" value="计算器"/>
|
<add key="Calculator" value="计算器" />
|
||||||
<add key="Computer" value="此电脑"/>
|
<add key="Computer" value="此电脑" />
|
||||||
<add key="GroupPolicy" value="组策略"/>
|
<add key="GroupPolicy" value="组策略" />
|
||||||
<add key="Network" value="网络连接"/>
|
<add key="Network" value="网络连接" />
|
||||||
<add key="RecycleBin" value="回收站"/>
|
<add key="RecycleBin" value="回收站" />
|
||||||
<add key="Registry" value="注册表编辑器"/>
|
<add key="Registry" value="注册表编辑器" />
|
||||||
<add key="Notepad" value="记事本"/>
|
<add key="Notepad" value="记事本" />
|
||||||
<add key="Mstsc" value="远程桌面连接"/>
|
<add key="Mstsc" value="远程桌面连接" />
|
||||||
<add key="Control" value="控制面板"/>
|
<add key="Control" value="控制面板" />
|
||||||
<add key="CMD" value="命令行"/>
|
<add key="CMD" value="命令行" />
|
||||||
|
<add key="Services" value="服务" />
|
||||||
</SystemIcons>
|
</SystemIcons>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
@@ -45,15 +44,14 @@
|
|||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="Version" value="2.4.10" />
|
<add key="Version" value="2.4.12" />
|
||||||
<add key="GitHubUrl" value="https://github.com/Demo-Liu/GeekDesk" />
|
<add key="GitHubUrl" value="https://github.com/Demo-Liu/GeekDesk" />
|
||||||
<add key="GiteeUrl" value="https://gitee.com/demo_liu/GeekDesk/tree/master" />
|
<add key="GiteeUrl" value="https://gitee.com/demo_liu/GeekDesk/tree/master" />
|
||||||
<add key="GitHubUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" />
|
<add key="GitHubUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" />
|
||||||
<add key="GiteeUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" />
|
<add key="GiteeUpdateUrl" value="https://demo-liu.github.io/GeekDesk/Update.json" />
|
||||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||||
<add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law"/>
|
<add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
|
|
||||||
<system.web>
|
<system.web>
|
||||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||||
<providers>
|
<providers>
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ namespace GeekDesk.Constant
|
|||||||
{
|
{
|
||||||
public enum CommonEnum
|
public enum CommonEnum
|
||||||
{
|
{
|
||||||
WINDOW_WIDTH = 950, //默认窗体宽度
|
WINDOW_WIDTH = 666, //默认窗体宽度
|
||||||
WINDOW_HEIGHT = 650, //默认窗体高度
|
WINDOW_HEIGHT = 500, //默认窗体高度
|
||||||
MENU_CARD_WIDHT = 165, //默认菜单栏宽度
|
MENU_CARD_WIDHT = 165, //默认菜单栏宽度
|
||||||
IMAGE_WIDTH = 45, //默认图标宽度
|
IMAGE_WIDTH = 45, //默认图标宽度
|
||||||
IMAGE_HEIGHT = 45, //默认图标高度
|
IMAGE_HEIGHT = 45, //默认图标高度
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ namespace GeekDesk.Constant
|
|||||||
|
|
||||||
public static string ERROR_FILE_PATH = APP_DIR + "Error.log";
|
public static string ERROR_FILE_PATH = APP_DIR + "Error.log";
|
||||||
|
|
||||||
//系统图标路径
|
|
||||||
public static string SYSTEM_ICON_PATH = "GeekDesk.Resource.Image.SystemIcon.*";
|
|
||||||
//系统图标
|
//系统图标
|
||||||
public static Hashtable SYSTEM_ICONS = (Hashtable)ConfigurationManager.GetSection("SystemIcons");
|
public static Hashtable SYSTEM_ICONS = (Hashtable)ConfigurationManager.GetSection("SystemIcons");
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ namespace GeekDesk.Control.Other
|
|||||||
{
|
{
|
||||||
Growl.SuccessGlobal("下次任务将在 " + minutes + " 分钟后提醒您!");
|
Growl.SuccessGlobal("下次任务将在 " + minutes + " 分钟后提醒您!");
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
appData.ToDoList.Remove(info); //执行任务删除
|
appData.ToDoList.Remove(info); //执行任务删除
|
||||||
appData.HiToDoList.Add(info); //添加历史任务
|
appData.HiToDoList.Add(info); //添加历史任务
|
||||||
@@ -122,7 +123,7 @@ namespace GeekDesk.Control.Other
|
|||||||
ToDoInfo info = this.DataContext as ToDoInfo;
|
ToDoInfo info = this.DataContext as ToDoInfo;
|
||||||
int time = int.Parse(DelayTime.Text);
|
int time = int.Parse(DelayTime.Text);
|
||||||
string type = DelayType.Text;
|
string type = DelayType.Text;
|
||||||
switch(type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "分":
|
case "分":
|
||||||
info.ExeTime = DateTime.Now.AddMinutes(time).ToString("yyyy-MM-dd HH:mm:ss");
|
info.ExeTime = DateTime.Now.AddMinutes(time).ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ namespace GeekDesk.Control.Other
|
|||||||
if (!StringUtil.IsEmpty(IconUrl.Text) && !StringUtil.IsEmpty(JsonUrl.Text))
|
if (!StringUtil.IsEmpty(IconUrl.Text) && !StringUtil.IsEmpty(JsonUrl.Text))
|
||||||
{
|
{
|
||||||
IconfontWindow.vm.IsSettingUrl = "true";
|
IconfontWindow.vm.IsSettingUrl = "true";
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
IconfontWindow.vm.IsSettingUrl = "false";
|
IconfontWindow.vm.IsSettingUrl = "false";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ namespace GeekDesk.Control.Other
|
|||||||
info.BitmapImage = ImageUtil.GetBitmapIconByPath(ofd.FileName);
|
info.BitmapImage = ImageUtil.GetBitmapIconByPath(ofd.FileName);
|
||||||
CommonCode.SaveAppData(MainWindow.appData);
|
CommonCode.SaveAppData(MainWindow.appData);
|
||||||
}
|
}
|
||||||
} catch (Exception e1)
|
}
|
||||||
|
catch (Exception e1)
|
||||||
{
|
{
|
||||||
HandyControl.Controls.Growl.WarningGlobal("修改图标失败,已重置为默认图标!");
|
HandyControl.Controls.Growl.WarningGlobal("修改图标失败,已重置为默认图标!");
|
||||||
LogUtil.WriteErrorLog(e1, "修改图标失败!");
|
LogUtil.WriteErrorLog(e1, "修改图标失败!");
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ namespace GeekDesk.Control.Other
|
|||||||
info.BitmapImage = ImageUtil.GetBitmapIconByPath(ofd.FileName);
|
info.BitmapImage = ImageUtil.GetBitmapIconByPath(ofd.FileName);
|
||||||
CommonCode.SaveAppData(MainWindow.appData);
|
CommonCode.SaveAppData(MainWindow.appData);
|
||||||
}
|
}
|
||||||
} catch (Exception e1)
|
} catch (Exception ex)
|
||||||
{
|
{
|
||||||
HandyControl.Controls.Growl.WarningGlobal("修改图标失败,已重置为默认图标!");
|
HandyControl.Controls.Growl.WarningGlobal("修改图标失败,已重置为默认图标!");
|
||||||
LogUtil.WriteErrorLog(e1, "修改图标失败!");
|
LogUtil.WriteErrorLog(ex, "修改图标失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
<hc:Shield Subject=".net" Status=">=4.72" Margin="0,0,10,0" Color="#1182c3"/>
|
<hc:Shield Subject=".net" Status=">=4.72" Margin="0,0,10,0" Color="#1182c3"/>
|
||||||
<hc:Shield Subject="IDE" Status="VS2019" Margin="0,0,10,0" Color="#1182c3"/>
|
<hc:Shield Subject="IDE" Status="VS2019" Margin="0,0,10,0" Color="#1182c3"/>
|
||||||
|
|
||||||
<hc:Shield Subject="GitHub" Visibility="Visible" Status="Star"
|
<hc:Shield Subject="GitHub" Visibility="Visible" Status="Demo-liu"
|
||||||
Command="hc:ControlCommands.OpenLink"
|
Command="hc:ControlCommands.OpenLink"
|
||||||
CommandParameter="https://github.com/Demo-Liu/GeekDesk"
|
CommandParameter="https://github.com/Demo-Liu/GeekDesk"
|
||||||
Margin="0,0,10,0" Color="#24292F"/>
|
Margin="0,0,10,0" Color="#24292F"/>
|
||||||
<hc:Shield Subject="Gitee" Visibility="Visible" Status="Star"
|
<hc:Shield Subject="Gitee" Visibility="Visible" Status="Demo-liu"
|
||||||
Command="hc:ControlCommands.OpenLink"
|
Command="hc:ControlCommands.OpenLink"
|
||||||
CommandParameter="https://gitee.com/demo_liu/GeekDesk"
|
CommandParameter="https://gitee.com/demo_liu/GeekDesk"
|
||||||
Margin="0,0,10,0" Color="#C71D23"/>
|
Margin="0,0,10,0" Color="#C71D23"/>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
main = true;
|
main = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevKeyTemp == Key.None || prevKeyTemp!=downKey)
|
if (prevKeyTemp == Key.None || prevKeyTemp != downKey)
|
||||||
{
|
{
|
||||||
if (hotkeyFinished)
|
if (hotkeyFinished)
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
appConfig.Hotkey = 0;
|
appConfig.Hotkey = 0;
|
||||||
appConfig.HotkeyStr = "";
|
appConfig.HotkeyStr = "";
|
||||||
appConfig.HotkeyModifiers = 0;
|
appConfig.HotkeyModifiers = 0;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
appConfig.ToDoHotkey = 0;
|
appConfig.ToDoHotkey = 0;
|
||||||
appConfig.ToDoHotkeyStr = "";
|
appConfig.ToDoHotkeyStr = "";
|
||||||
@@ -90,7 +91,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
{
|
{
|
||||||
appConfig.HotkeyStr = GetKeyName(downKey);
|
appConfig.HotkeyStr = GetKeyName(downKey);
|
||||||
appConfig.HotkeyModifiers = GetModifierKeys(downKey);
|
appConfig.HotkeyModifiers = GetModifierKeys(downKey);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
appConfig.ToDoHotkeyStr = GetKeyName(downKey);
|
appConfig.ToDoHotkeyStr = GetKeyName(downKey);
|
||||||
appConfig.ToDoHotkeyModifiers = GetModifierKeys(downKey);
|
appConfig.ToDoHotkeyModifiers = GetModifierKeys(downKey);
|
||||||
@@ -111,7 +113,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
{
|
{
|
||||||
appConfig.Hotkey = downKey;
|
appConfig.Hotkey = downKey;
|
||||||
appConfig.HotkeyStr += downKey.ToString();
|
appConfig.HotkeyStr += downKey.ToString();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
appConfig.ToDoHotkey = downKey;
|
appConfig.ToDoHotkey = downKey;
|
||||||
appConfig.ToDoHotkeyStr += downKey.ToString();
|
appConfig.ToDoHotkeyStr += downKey.ToString();
|
||||||
@@ -125,7 +128,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
{
|
{
|
||||||
appConfig.HotkeyStr += GetKeyName(downKey);
|
appConfig.HotkeyStr += GetKeyName(downKey);
|
||||||
appConfig.HotkeyModifiers |= GetModifierKeys(downKey);
|
appConfig.HotkeyModifiers |= GetModifierKeys(downKey);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
appConfig.ToDoHotkeyStr += GetKeyName(downKey);
|
appConfig.ToDoHotkeyStr += GetKeyName(downKey);
|
||||||
appConfig.ToDoHotkeyModifiers |= GetModifierKeys(downKey);
|
appConfig.ToDoHotkeyModifiers |= GetModifierKeys(downKey);
|
||||||
@@ -143,7 +147,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
if (key == Key.LeftCtrl || key == Key.RightCtrl)
|
if (key == Key.LeftCtrl || key == Key.RightCtrl)
|
||||||
{
|
{
|
||||||
return "Ctrl + ";
|
return "Ctrl + ";
|
||||||
} else if (key == Key.LWin || key == Key.RWin)
|
}
|
||||||
|
else if (key == Key.LWin || key == Key.RWin)
|
||||||
{
|
{
|
||||||
return "Win + ";
|
return "Win + ";
|
||||||
}
|
}
|
||||||
@@ -195,7 +200,7 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
{
|
{
|
||||||
main = true;
|
main = true;
|
||||||
}
|
}
|
||||||
lock(this)
|
lock (this)
|
||||||
{
|
{
|
||||||
bool allKeyUp = true;
|
bool allKeyUp = true;
|
||||||
//判断所有键是否都松开
|
//判断所有键是否都松开
|
||||||
@@ -221,7 +226,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
GlobalHotKey.Dispose(MainWindow.hotKeyId);
|
GlobalHotKey.Dispose(MainWindow.hotKeyId);
|
||||||
}
|
}
|
||||||
MainWindow.RegisterHotKey(false);
|
MainWindow.RegisterHotKey(false);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (MainWindow.toDoHotKeyId != -1)
|
if (MainWindow.toDoHotKeyId != -1)
|
||||||
{
|
{
|
||||||
@@ -254,7 +260,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
if (appConfig.MarginHide)
|
if (appConfig.MarginHide)
|
||||||
{
|
{
|
||||||
MarginHide.StartHide();
|
MarginHide.StartHide();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
MarginHide.StopHide();
|
MarginHide.StopHide();
|
||||||
}
|
}
|
||||||
@@ -281,7 +288,8 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
if (appConfig.MouseMiddleShow)
|
if (appConfig.MouseMiddleShow)
|
||||||
{
|
{
|
||||||
MouseHookThread.MiddleHook();
|
MouseHookThread.MiddleHook();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
MouseHookThread.Dispose();
|
MouseHookThread.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
appConfig.BacImgName = ofd.FileName;
|
appConfig.BacImgName = ofd.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e1)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
LogUtil.WriteErrorLog(ex, "修改背景失败,已重置为默认背景!");
|
||||||
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
|
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
|
||||||
LogUtil.WriteErrorLog(e1, "修改背景失败!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,10 +70,10 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
appConfig.BitmapImage = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
|
appConfig.BitmapImage = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
|
||||||
appConfig.BacImgName = "系统默认";
|
appConfig.BacImgName = "系统默认";
|
||||||
}
|
}
|
||||||
catch (Exception e1)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
LogUtil.WriteErrorLog(ex, "修改背景失败2,已重置为默认背景!");
|
||||||
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
|
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
|
||||||
LogUtil.WriteErrorLog(e1, "修改默认背景失败!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,24 +44,13 @@
|
|||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</MultiTrigger.ExitActions>
|
</MultiTrigger.ExitActions>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
|
<!--<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="#FFE4DBDB"/>
|
||||||
<Setter Property="Background" Value="#FFECECEC"/>
|
</Trigger>-->
|
||||||
</Trigger>
|
<Trigger Property="IsSelected" Value="true">
|
||||||
<Trigger Property="IsSelected" Value="True">
|
|
||||||
<Setter Property="Background" Value="#FFECECEC"/>
|
<Setter Property="Background" Value="#FFECECEC"/>
|
||||||
<Setter Property="Foreground" Value="Black"/>
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
|
||||||
<MultiDataTrigger>
|
|
||||||
<MultiDataTrigger.Conditions>
|
|
||||||
<Condition Binding="{Binding IsEdit}" Value="True"/>
|
|
||||||
</MultiDataTrigger.Conditions>
|
|
||||||
<MultiDataTrigger.Setters>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
</MultiDataTrigger.Setters>
|
|
||||||
</MultiDataTrigger>
|
|
||||||
|
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
<cvt:MenuWidthConvert x:Key="MenuWidthConvert"/>
|
<cvt:MenuWidthConvert x:Key="MenuWidthConvert"/>
|
||||||
@@ -88,7 +77,6 @@
|
|||||||
</hc:Card.ContextMenu>
|
</hc:Card.ContextMenu>
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<ListBox x:Name="MenuListBox"
|
<ListBox x:Name="MenuListBox"
|
||||||
Padding="2,3,0,2"
|
|
||||||
ItemsSource="{Binding MenuList}"
|
ItemsSource="{Binding MenuList}"
|
||||||
Tag="{Binding AppConfig.MenuCardWidth}"
|
Tag="{Binding AppConfig.MenuCardWidth}"
|
||||||
BorderThickness="0" Foreground="{x:Null}"
|
BorderThickness="0" Foreground="{x:Null}"
|
||||||
@@ -123,18 +111,17 @@
|
|||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
||||||
<TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
|
<hc:TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Height="28"
|
Height="25"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextAlignment="Left"
|
TextAlignment="Left"
|
||||||
LostFocus="LostFocusOrEnterDown"
|
LostFocus="LostFocusOrEnterDown"
|
||||||
KeyDown="LostFocusOrEnterDown"
|
KeyDown="LostFocusOrEnterDown"
|
||||||
Tag="{Binding}"
|
Tag="{Binding}"
|
||||||
Padding="2"
|
Margin="2"
|
||||||
BorderThickness="0"
|
|
||||||
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
||||||
Visibility="{Binding MenuEdit}"/>
|
Visibility="{Binding MenuEdit}"/>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|||||||
@@ -204,7 +204,6 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
|
|
||||||
private void menus_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void menus_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
appData.AppConfig.SelectedMenuIcons = null;
|
|
||||||
//设置对应菜单的图标列表
|
//设置对应菜单的图标列表
|
||||||
if (MenuListBox.SelectedIndex == -1)
|
if (MenuListBox.SelectedIndex == -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,7 +104,8 @@
|
|||||||
hc:Poptip.Content="{Binding Content}"
|
hc:Poptip.Content="{Binding Content}"
|
||||||
hc:Poptip.Placement="BottomLeft"
|
hc:Poptip.Placement="BottomLeft"
|
||||||
Background="#00FFFFFF"
|
Background="#00FFFFFF"
|
||||||
MouseLeftButtonDown="IconClick"
|
MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
||||||
|
MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
||||||
MouseEnter="StackPanel_MouseEnter"
|
MouseEnter="StackPanel_MouseEnter"
|
||||||
MouseLeave="StackPanel_MouseLeave"
|
MouseLeave="StackPanel_MouseLeave"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -60,6 +60,23 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void Icon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (appData.AppConfig.DoubleOpen)
|
||||||
|
{
|
||||||
|
IconClick(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Icon_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (!appData.AppConfig.DoubleOpen)
|
||||||
|
{
|
||||||
|
IconClick(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图标点击事件
|
/// 图标点击事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -78,7 +95,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
}
|
}
|
||||||
} else if (!appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
}
|
||||||
|
else if (!appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
||||||
{
|
{
|
||||||
IconInfo icon = (IconInfo)((SimpleStackPanel)sender).Tag;
|
IconInfo icon = (IconInfo)((SimpleStackPanel)sender).Tag;
|
||||||
if (icon.AdminStartUp)
|
if (icon.AdminStartUp)
|
||||||
@@ -119,14 +137,15 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Process p = new Process();
|
using (Process p = new Process())
|
||||||
|
{
|
||||||
string startArg = icon.StartArg;
|
string startArg = icon.StartArg;
|
||||||
|
|
||||||
if (startArg!=null && Constants.SYSTEM_ICONS.ContainsKey(startArg))
|
if (startArg != null && Constants.SYSTEM_ICONS.ContainsKey(startArg))
|
||||||
{
|
{
|
||||||
StartSystemApp(startArg, type);
|
StartSystemApp(startArg, type);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
p.StartInfo.FileName = icon.Path;
|
p.StartInfo.FileName = icon.Path;
|
||||||
if (!StringUtil.IsEmpty(startArg))
|
if (!StringUtil.IsEmpty(startArg))
|
||||||
@@ -209,7 +228,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
}
|
}
|
||||||
p.Start();
|
p.Start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
icon.Count++;
|
icon.Count++;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -255,7 +274,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
if (type == IconStartType.ADMIN_STARTUP)
|
if (type == IconStartType.ADMIN_STARTUP)
|
||||||
{
|
{
|
||||||
Process.Start("mstsc", "-admin");
|
Process.Start("mstsc", "-admin");
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Process.Start("mstsc");
|
Process.Start("mstsc");
|
||||||
}
|
}
|
||||||
@@ -266,15 +286,21 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
case "CMD":
|
case "CMD":
|
||||||
if (type == IconStartType.ADMIN_STARTUP)
|
if (type == IconStartType.ADMIN_STARTUP)
|
||||||
{
|
{
|
||||||
Process process = new Process();
|
using (Process process = new Process())
|
||||||
|
{
|
||||||
process.StartInfo.FileName = "cmd.exe";
|
process.StartInfo.FileName = "cmd.exe";
|
||||||
process.StartInfo.Verb = "runas";
|
process.StartInfo.Verb = "runas";
|
||||||
process.Start();
|
process.Start();
|
||||||
} else
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Process.Start("cmd");
|
Process.Start("cmd");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "Services":
|
||||||
|
Process.Start("services.msc");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||||
if (appData.AppConfig.MarginHide)
|
if (appData.AppConfig.MarginHide)
|
||||||
@@ -428,7 +454,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
ThreadStart ts = new ThreadStart(crs.Remove);
|
ThreadStart ts = new ThreadStart(crs.Remove);
|
||||||
System.Threading.Thread t = new System.Threading.Thread(ts);
|
System.Threading.Thread t = new System.Threading.Thread(ts);
|
||||||
t.Start();
|
t.Start();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
img.BeginAnimation(WidthProperty, null);
|
img.BeginAnimation(WidthProperty, null);
|
||||||
img.BeginAnimation(HeightProperty, null);
|
img.BeginAnimation(HeightProperty, null);
|
||||||
@@ -511,5 +538,6 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
SystemItemWindow.Show();
|
SystemItemWindow.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,5 +84,20 @@ namespace GeekDesk.Control.UserControls.Backlog
|
|||||||
Menu.IsOpen = true;
|
Menu.IsOpen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 选中时颜色变化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void DataGridRow_Selected(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Color c = Color.FromRgb(91, 192, 222);
|
||||||
|
SolidColorBrush b = new SolidColorBrush
|
||||||
|
{
|
||||||
|
Color = c,
|
||||||
|
Opacity = 0.9
|
||||||
|
};
|
||||||
|
((DataGridRow)sender).Background = b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
|
|
||||||
private void Close_Click(object sender, RoutedEventArgs e)
|
private void Close_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,13 +74,15 @@ namespace GeekDesk.Control.Windows
|
|||||||
LoadingEle.Visibility = Visibility.Visible;
|
LoadingEle.Visibility = Visibility.Visible;
|
||||||
CustomIcon.Visibility = Visibility.Collapsed;
|
CustomIcon.Visibility = Visibility.Collapsed;
|
||||||
HandyControl.Controls.Dialog.Show(new CustomIconUrlDialog(appConfig), "IconUrlDialog");
|
HandyControl.Controls.Dialog.Show(new CustomIconUrlDialog(appConfig), "IconUrlDialog");
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (customIcons == null)
|
if (customIcons == null)
|
||||||
{
|
{
|
||||||
vm.Iconfonts = null;
|
vm.Iconfonts = null;
|
||||||
LoadingOnlineIcon();
|
LoadingOnlineIcon();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
vm.Iconfonts = customIcons;
|
vm.Iconfonts = customIcons;
|
||||||
LoadingEle.Visibility = Visibility.Collapsed;
|
LoadingEle.Visibility = Visibility.Collapsed;
|
||||||
@@ -121,6 +124,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +152,8 @@ namespace GeekDesk.Control.Windows
|
|||||||
if (CheckSettingUrl.Text == "true")
|
if (CheckSettingUrl.Text == "true")
|
||||||
{
|
{
|
||||||
LoadingOnlineIcon();
|
LoadingOnlineIcon();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
LoadingEle.IsRunning = true;
|
LoadingEle.IsRunning = true;
|
||||||
CustomIcon.Visibility = Visibility.Collapsed;
|
CustomIcon.Visibility = Visibility.Collapsed;
|
||||||
@@ -179,6 +184,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
||||||
private static SystemItemViewModel vm;
|
private static SystemItemViewModel vm;
|
||||||
private static List<IconInfo> systemIcons;
|
private List<IconInfo> systemIcons;
|
||||||
private static List<IconInfo> startMenuIcons;
|
private List<IconInfo> startMenuIcons;
|
||||||
private static List<IconInfo> storeIcons;
|
private List<IconInfo> storeIcons;
|
||||||
|
|
||||||
private SystemItemWindow()
|
private SystemItemWindow()
|
||||||
{
|
{
|
||||||
@@ -56,6 +56,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
|
|
||||||
private void Close_Click(object sender, RoutedEventArgs e)
|
private void Close_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,13 +150,24 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="listInfos"></param>
|
/// <param name="listInfos"></param>
|
||||||
private void GetInfos(string path, List<IconInfo> listInfos)
|
private void GetInfos(string filePath, List<IconInfo> listInfos)
|
||||||
{
|
{
|
||||||
DirectoryInfo di = new DirectoryInfo(path);
|
DirectoryInfo di = new DirectoryInfo(filePath);
|
||||||
FileSystemInfo[] fileInfoArr = di.GetFileSystemInfos();
|
string[] filePaths = Directory.GetFiles(filePath);
|
||||||
foreach(FileSystemInfo fi in fileInfoArr)
|
string[] dirPaths = Directory.GetDirectories(filePath);
|
||||||
|
|
||||||
|
string[] paths = new string[filePaths.Length + dirPaths.Length];
|
||||||
|
filePaths.CopyTo(paths, 0);
|
||||||
|
if (filePaths == null || filePaths.Length == 0)
|
||||||
|
{
|
||||||
|
dirPaths.CopyTo(paths, 0);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
dirPaths.CopyTo(paths, filePaths.Length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (string path in paths)
|
||||||
{
|
{
|
||||||
path = fi.FullName;
|
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
string ext = Path.GetExtension(path).ToLower();
|
string ext = Path.GetExtension(path).ToLower();
|
||||||
@@ -178,6 +190,13 @@ namespace GeekDesk.Control.Windows
|
|||||||
GetInfos(path, listInfos);
|
GetInfos(path, listInfos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FileSystemInfo[] fileInfoArr = di.GetFileSystemInfos();
|
||||||
|
//foreach(FileSystemInfo fi in fileInfoArr)
|
||||||
|
//{
|
||||||
|
// string path = fi.FullName;
|
||||||
|
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -270,6 +289,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<Border.Resources>
|
<Border.Resources>
|
||||||
<Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
|
<Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
|
||||||
<Setter Property="Width" Value="67"/>
|
<Setter Property="Width" Value="67"/>
|
||||||
|
<Setter Property="Margin" Value="0,5,0,0"/>
|
||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
@@ -67,13 +68,15 @@
|
|||||||
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel x:Name="SetTimePanel" Visibility="Visible" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel x:Name="SetTimePanel" Height="30" Visibility="Visible" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
|
<WrapPanel VerticalAlignment="Center">
|
||||||
<TextBlock Text="指定时间:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="指定时间:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red" Margin="-10,0,0,0"/>
|
<TextBlock Text="*" Foreground="Red"/>
|
||||||
<hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!" Width="200" Margin="-5.2,0,0,0"/>
|
</WrapPanel>
|
||||||
|
<hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!" Width="200" Margin="1.6,0,0,0"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel x:Name="CronPanel" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel x:Name="CronPanel" Height="30" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<WrapPanel VerticalAlignment="Center">
|
<WrapPanel VerticalAlignment="Center">
|
||||||
<TextBlock Text="CRON:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="CRON:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red" />
|
<TextBlock Text="*" Foreground="Red" />
|
||||||
@@ -84,8 +87,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
|
<WrapPanel VerticalAlignment="Center">
|
||||||
<TextBlock Text="完成时间:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="完成时间:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock x:Name="DoneTime" Text="{Binding DoneTime, Mode=OneWay}" Width="200"/>
|
</WrapPanel>
|
||||||
|
<TextBlock x:Name="DoneTime" VerticalAlignment="Center" Margin="5,6,0,0" Text="{Binding DoneTime, Mode=OneWay}" Width="200"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,14 @@ namespace GeekDesk.Control.Windows
|
|||||||
};
|
};
|
||||||
if (windowType != NEW_TODO)
|
if (windowType != NEW_TODO)
|
||||||
{
|
{
|
||||||
appData.HiToDoList.Remove(this.DataContext as ToDoInfo);
|
ToDoInfo tdi = this.DataContext as ToDoInfo;
|
||||||
|
if (appData.HiToDoList.Contains(tdi))
|
||||||
|
{
|
||||||
|
appData.HiToDoList.Remove(tdi);
|
||||||
|
} else if (appData.ToDoList.Contains(tdi))
|
||||||
|
{
|
||||||
|
appData.ToDoList.Remove(tdi);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
appData.ToDoList.Add(info);
|
appData.ToDoList.Add(info);
|
||||||
|
|
||||||
@@ -247,6 +254,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ namespace GeekDesk.Control.Windows
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataHandle(jo);
|
DataHandle(jo);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "更新信息格式化失败!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -111,6 +111,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
|
this.DataContext = null;
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
@@ -222,7 +221,6 @@
|
|||||||
<Compile Include="Util\ShowWindowFollowMouse.cs" />
|
<Compile Include="Util\ShowWindowFollowMouse.cs" />
|
||||||
<Compile Include="Util\StringUtil.cs" />
|
<Compile Include="Util\StringUtil.cs" />
|
||||||
<Compile Include="Util\SvgToGeometry.cs" />
|
<Compile Include="Util\SvgToGeometry.cs" />
|
||||||
<Compile Include="Util\SystemIcon.cs" />
|
|
||||||
<Compile Include="ViewModel\AppConfig.cs" />
|
<Compile Include="ViewModel\AppConfig.cs" />
|
||||||
<Compile Include="ViewModel\AppData.cs" />
|
<Compile Include="ViewModel\AppData.cs" />
|
||||||
<Compile Include="ViewModel\ToDoInfo.cs" />
|
<Compile Include="ViewModel\ToDoInfo.cs" />
|
||||||
@@ -385,35 +383,21 @@
|
|||||||
<Isolated>False</Isolated>
|
<Isolated>False</Isolated>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</COMReference>
|
</COMReference>
|
||||||
<COMReference Include="Shell32">
|
</ItemGroup>
|
||||||
<Guid>{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}</Guid>
|
<ItemGroup>
|
||||||
<VersionMajor>1</VersionMajor>
|
<Resource Include="Resource\Image\SystemIcon\Services.png" />
|
||||||
<VersionMinor>0</VersionMinor>
|
|
||||||
<Lcid>0</Lcid>
|
|
||||||
<WrapperTool>tlbimp</WrapperTool>
|
|
||||||
<Isolated>False</Isolated>
|
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
|
||||||
</COMReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resource\Image\SystemIcon\Calculator.png" />
|
<Resource Include="Resource\Image\SystemIcon\Calculator.png" />
|
||||||
|
<Resource Include="Resource\Image\SystemIcon\CMD.png" />
|
||||||
<Resource Include="Resource\Image\SystemIcon\Computer.png" />
|
<Resource Include="Resource\Image\SystemIcon\Computer.png" />
|
||||||
|
<Resource Include="Resource\Image\SystemIcon\Control.png" />
|
||||||
<Resource Include="Resource\Image\SystemIcon\GroupPolicy.png" />
|
<Resource Include="Resource\Image\SystemIcon\GroupPolicy.png" />
|
||||||
|
<Resource Include="Resource\Image\SystemIcon\Mstsc.png" />
|
||||||
<Resource Include="Resource\Image\SystemIcon\Network.png" />
|
<Resource Include="Resource\Image\SystemIcon\Network.png" />
|
||||||
|
<Resource Include="Resource\Image\SystemIcon\Notepad.png" />
|
||||||
<Resource Include="Resource\Image\SystemIcon\RecycleBin.png" />
|
<Resource Include="Resource\Image\SystemIcon\RecycleBin.png" />
|
||||||
<Resource Include="Resource\Image\SystemIcon\Registry.png" />
|
<Resource Include="Resource\Image\SystemIcon\Registry.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\SystemIcon\Notepad.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\SystemIcon\Mstsc.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\SystemIcon\Control.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\SystemIcon\CMD.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -61,10 +61,11 @@ namespace GeekDesk
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
|
GC.KeepAlive(appData); // 持活
|
||||||
this.DataContext = appData;
|
this.DataContext = appData;
|
||||||
if (appData.MenuList.Count == 0)
|
if (appData.MenuList.Count == 0)
|
||||||
{
|
{
|
||||||
appData.MenuList.Add(new MenuInfo() { MenuName = "NewMenu", MenuId = System.Guid.NewGuid().ToString(), MenuEdit = Visibility.Collapsed});
|
appData.MenuList.Add(new MenuInfo() { MenuName = "NewMenu", MenuId = System.Guid.NewGuid().ToString(), MenuEdit = Visibility.Collapsed });
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Width = appData.AppConfig.WindowWidth;
|
this.Width = appData.AppConfig.WindowWidth;
|
||||||
@@ -83,11 +84,13 @@ namespace GeekDesk
|
|||||||
if (appData.AppConfig.AppAnimation)
|
if (appData.AppConfig.AppAnimation)
|
||||||
{
|
{
|
||||||
this.Opacity = 0;
|
this.Opacity = 0;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.Visibility = Visibility.Collapsed;
|
this.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ShowApp();
|
ShowApp();
|
||||||
}
|
}
|
||||||
@@ -159,45 +162,8 @@ namespace GeekDesk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 淡入淡出效果
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="opacity"></param>
|
|
||||||
/// <param name="milliseconds"></param>
|
|
||||||
/// <param name="visibility"></param>
|
|
||||||
public static void FadeStoryBoard(int opacity, int milliseconds, Visibility visibility)
|
|
||||||
{
|
|
||||||
if (appData.AppConfig.AppAnimation)
|
|
||||||
{
|
|
||||||
DoubleAnimation opacityAnimation = new DoubleAnimation
|
|
||||||
{
|
|
||||||
From = mainWindow.Opacity,
|
|
||||||
To = opacity,
|
|
||||||
Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds))
|
|
||||||
};
|
|
||||||
opacityAnimation.Completed += (s, e) =>
|
|
||||||
{
|
|
||||||
mainWindow.BeginAnimation(OpacityProperty, null);
|
|
||||||
if (visibility == Visibility.Visible)
|
|
||||||
{
|
|
||||||
mainWindow.Opacity = 1;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
mainWindow.Opacity = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Timeline.SetDesiredFrameRate(opacityAnimation, 60);
|
|
||||||
mainWindow.BeginAnimation(OpacityProperty, opacityAnimation);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
//防止关闭动画后 窗体仍是0透明度
|
|
||||||
mainWindow.Opacity = 1;
|
|
||||||
mainWindow.Visibility = visibility;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 注册新建待办的热键
|
/// 注册新建待办的热键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -206,7 +172,7 @@ namespace GeekDesk
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
if (appData.AppConfig.ToDoHotkeyModifiers!=0)
|
if (appData.AppConfig.ToDoHotkeyModifiers != 0)
|
||||||
{
|
{
|
||||||
//加载完毕注册热键
|
//加载完毕注册热键
|
||||||
toDoHotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.ToDoHotkeyModifiers, appData.AppConfig.ToDoHotkey, () =>
|
toDoHotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.ToDoHotkeyModifiers, appData.AppConfig.ToDoHotkey, () =>
|
||||||
@@ -298,7 +264,8 @@ namespace GeekDesk
|
|||||||
if (appData.AppConfig.AppAnimation)
|
if (appData.AppConfig.AppAnimation)
|
||||||
{
|
{
|
||||||
FadeStoryBoard(0, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Collapsed);
|
FadeStoryBoard(0, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Collapsed);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.Visibility = Visibility.Collapsed;
|
this.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
@@ -349,6 +316,45 @@ namespace GeekDesk
|
|||||||
FadeStoryBoard(0, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Collapsed);
|
FadeStoryBoard(0, (int)CommonEnum.WINDOW_ANIMATION_TIME, Visibility.Collapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 淡入淡出效果
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opacity"></param>
|
||||||
|
/// <param name="milliseconds"></param>
|
||||||
|
/// <param name="visibility"></param>
|
||||||
|
public static void FadeStoryBoard(int opacity, int milliseconds, Visibility visibility)
|
||||||
|
{
|
||||||
|
if (appData.AppConfig.AppAnimation)
|
||||||
|
{
|
||||||
|
DoubleAnimation opacityAnimation = new DoubleAnimation
|
||||||
|
{
|
||||||
|
From = mainWindow.Opacity,
|
||||||
|
To = opacity,
|
||||||
|
Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds))
|
||||||
|
};
|
||||||
|
opacityAnimation.Completed += (s, e) =>
|
||||||
|
{
|
||||||
|
mainWindow.BeginAnimation(OpacityProperty, null);
|
||||||
|
if (visibility == Visibility.Visible)
|
||||||
|
{
|
||||||
|
mainWindow.Opacity = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mainWindow.Opacity = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Timeline.SetDesiredFrameRate(opacityAnimation, 60);
|
||||||
|
mainWindow.BeginAnimation(OpacityProperty, opacityAnimation);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//防止关闭动画后 窗体仍是0透明度
|
||||||
|
mainWindow.Opacity = 1;
|
||||||
|
mainWindow.Visibility = visibility;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
//通过使用 "*",如下所示:
|
//通过使用 "*",如下所示:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.4.1.0")]
|
[assembly: AssemblyVersion("2.4.1.2")]
|
||||||
[assembly: AssemblyFileVersion("2.4.1.0")]
|
[assembly: AssemblyFileVersion("2.4.1.2")]
|
||||||
|
|||||||
BIN
Resource/Image/SystemIcon/Services.png
Normal file
BIN
Resource/Image/SystemIcon/Services.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -1,5 +1,4 @@
|
|||||||
using GeekDesk.Control.UserControls.Config;
|
using GeekDesk.Control.UserControls.Config;
|
||||||
using GeekDesk.Util;
|
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using Gma.System.MouseKeyHook;
|
using Gma.System.MouseKeyHook;
|
||||||
using System;
|
using System;
|
||||||
@@ -16,7 +15,7 @@ namespace GeekDesk.Thread
|
|||||||
public class MouseHookThread
|
public class MouseHookThread
|
||||||
{
|
{
|
||||||
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
||||||
private static IKeyboardMouseEvents m_GlobalHook = null;
|
private static IKeyboardMouseEvents m_GlobalHook = Hook.GlobalEvents();
|
||||||
private static Dispatcher dispatcher;
|
private static Dispatcher dispatcher;
|
||||||
|
|
||||||
|
|
||||||
@@ -24,9 +23,7 @@ namespace GeekDesk.Thread
|
|||||||
public static void MiddleHook()
|
public static void MiddleHook()
|
||||||
{
|
{
|
||||||
//使用dispatcher来单独监听UI线程 防止程序卡顿
|
//使用dispatcher来单独监听UI线程 防止程序卡顿
|
||||||
if (dispatcher != null) return;
|
|
||||||
dispatcher = DispatcherBuild.Build();
|
dispatcher = DispatcherBuild.Build();
|
||||||
m_GlobalHook = Hook.GlobalEvents();
|
|
||||||
dispatcher.Invoke((Action)(() =>
|
dispatcher.Invoke((Action)(() =>
|
||||||
{
|
{
|
||||||
m_GlobalHook.MouseDownExt += M_GlobalHook_MouseDownExt;
|
m_GlobalHook.MouseDownExt += M_GlobalHook_MouseDownExt;
|
||||||
@@ -34,17 +31,10 @@ namespace GeekDesk.Thread
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void Dispose()
|
public static void Dispose()
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
m_GlobalHook.MouseDownExt -= M_GlobalHook_MouseDownExt;
|
m_GlobalHook.MouseDownExt -= M_GlobalHook_MouseDownExt;
|
||||||
m_GlobalHook.Dispose();
|
m_GlobalHook.Dispose();
|
||||||
m_GlobalHook = null;
|
|
||||||
dispatcher.InvokeShutdown();
|
dispatcher.InvokeShutdown();
|
||||||
dispatcher = null;
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -60,9 +50,7 @@ namespace GeekDesk.Thread
|
|||||||
{
|
{
|
||||||
MainWindow.mainWindow.Dispatcher.Invoke((Action)(() =>
|
MainWindow.mainWindow.Dispatcher.Invoke((Action)(() =>
|
||||||
{
|
{
|
||||||
if (MainWindow.mainWindow.Visibility == Visibility.Collapsed
|
if (MainWindow.mainWindow.Visibility == Visibility.Collapsed || MainWindow.mainWindow.Opacity == 0)
|
||||||
|| MainWindow.mainWindow.Opacity == 0
|
|
||||||
|| MarginHide.IS_HIDE)
|
|
||||||
{
|
{
|
||||||
MainWindow.ShowApp();
|
MainWindow.ShowApp();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ namespace GeekDesk.Thread
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e)
|
} catch (Exception ex)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "检测更新失败!");
|
LogUtil.WriteErrorLog(ex, "获取更新失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title": "GeekDesk版本更新",
|
"title": "GeekDesk版本更新",
|
||||||
"subTitle": "V2.4.10",
|
"subTitle": "V2.4.12",
|
||||||
"msgTitle": "本次更新内容如下",
|
"msgTitle": "本次更新内容如下",
|
||||||
"msg": "['各位兄弟去给我点个免费Star呗','增加添加系统和开始菜单应用功能','增加项目启动参数','优化贴边隐藏动画效果(可能现在并不完美)','增加双击打开功能','其它已知问题修复(如果有人发现)']",
|
"msg": "['各位兄弟去给我点个免费Star呗','这是个修复版本,主要修复上个版本的bug','修复图标无法拖动','修复界面遮挡任务栏']",
|
||||||
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
|
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
|
||||||
"giteeUrl": "https://gitee.com/demo_liu/GeekDesk/releases",
|
"giteeUrl": "https://gitee.com/demo_liu/GeekDesk/releases",
|
||||||
"version": "2.4.10"
|
"version": "2.4.12"
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"title": "GeekDesk<73>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>",
|
|
||||||
"subTitle": "V2.3.21",
|
|
||||||
"msgTitle": "<22><><EFBFBD>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
|
||||||
"msg": "['<27><><EFBFBD>д<EFBFBD><D0B4>ڿ<EFBFBD>Esc<73>˳<EFBFBD>','<27><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BUG,<2C><><EFBFBD><EFBFBD>û<EFBFBD><C3BB>D<EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ','<27><EFBFBD><DEB8><EFBFBD>֪<EFBFBD><D6AA><EFBFBD><EFBFBD>']",
|
|
||||||
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
|
|
||||||
"giteeUrl": "https://gitee.com/demo_liu/GeekDesk/releases",
|
|
||||||
"version": "2.3.21"
|
|
||||||
}
|
|
||||||
@@ -36,7 +36,7 @@ namespace GeekDesk.Util
|
|||||||
|
|
||||||
public static BitmapImage GetBitmapImage(string filePath)
|
public static BitmapImage GetBitmapImage(string filePath)
|
||||||
{
|
{
|
||||||
Icon ico = null;
|
Icon ico;
|
||||||
//选中文件中的图标总数
|
//选中文件中的图标总数
|
||||||
var iconTotalCount = PrivateExtractIcons(filePath, 0, 0, 0, null, null, 0, 0);
|
var iconTotalCount = PrivateExtractIcons(filePath, 0, 0, 0, null, null, 0, 0);
|
||||||
//用于接收获取到的图标指针
|
//用于接收获取到的图标指针
|
||||||
@@ -53,31 +53,18 @@ namespace GeekDesk.Util
|
|||||||
{
|
{
|
||||||
ip = hIcons[0];
|
ip = hIcons[0];
|
||||||
ico = Icon.FromHandle(ip);
|
ico = Icon.FromHandle(ip);
|
||||||
if (IsMinOrTransparent(ico))
|
|
||||||
{
|
|
||||||
ico = null;
|
|
||||||
}
|
}
|
||||||
}
|
else if (GetBlurExts().Contains(ext))
|
||||||
if (ico == null && GetBlurExts().Contains(ext))
|
|
||||||
{
|
{
|
||||||
ico = Icon.ExtractAssociatedIcon(filePath);
|
ico = Icon.ExtractAssociatedIcon(filePath);
|
||||||
if (IsMinOrTransparent(ico))
|
|
||||||
{
|
|
||||||
ico = null;
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
if (ico == null)
|
|
||||||
{
|
{
|
||||||
ip = GetJumboIcon(GetIconIndex(filePath));
|
ip = GetJumboIcon(GetIconIndex(filePath));
|
||||||
ico = Icon.FromHandle(ip);
|
ico = Icon.FromHandle(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
return IconToBitmapImage(ico, ip);
|
Bitmap bmp = ico.ToBitmap();
|
||||||
}
|
|
||||||
|
|
||||||
private static BitmapImage IconToBitmapImage(Icon icon, IntPtr iconIP)
|
|
||||||
{
|
|
||||||
Bitmap bmp = icon.ToBitmap();
|
|
||||||
MemoryStream strm = new MemoryStream();
|
MemoryStream strm = new MemoryStream();
|
||||||
|
|
||||||
ImageCodecInfo myImageCodecInfo = GetEncoderInfo("image/png");
|
ImageCodecInfo myImageCodecInfo = GetEncoderInfo("image/png");
|
||||||
@@ -86,51 +73,19 @@ namespace GeekDesk.Util
|
|||||||
EncoderParameters myEncoderParameters = new EncoderParameters(1);
|
EncoderParameters myEncoderParameters = new EncoderParameters(1);
|
||||||
myEncoderParameters.Param[0] = myEncoderParameter;
|
myEncoderParameters.Param[0] = myEncoderParameter;
|
||||||
|
|
||||||
//bmp.Save("d:\\test.png");
|
|
||||||
|
|
||||||
bmp.Save(strm, myImageCodecInfo, myEncoderParameters);
|
bmp.Save(strm, myImageCodecInfo, myEncoderParameters);
|
||||||
BitmapImage bmpImage = new BitmapImage();
|
BitmapImage bmpImage = new BitmapImage();
|
||||||
bmpImage.BeginInit();
|
bmpImage.BeginInit();
|
||||||
strm.Seek(0, SeekOrigin.Begin);
|
strm.Seek(0, SeekOrigin.Begin);
|
||||||
bmpImage.StreamSource = strm;
|
bmpImage.StreamSource = strm;
|
||||||
bmpImage.EndInit();
|
bmpImage.EndInit();
|
||||||
if (iconIP != IntPtr.Zero)
|
if (ip != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
Shell32.DestroyIcon(iconIP);
|
Shell32.DestroyIcon(ip);
|
||||||
}
|
}
|
||||||
return bmpImage.Clone();
|
return bmpImage.Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static bool IsMinOrTransparent(Icon ico)
|
|
||||||
{
|
|
||||||
Bitmap bm = ico.ToBitmap();
|
|
||||||
double w = bm.Width;
|
|
||||||
double h = bm.Height;
|
|
||||||
|
|
||||||
Color middleColor = bm.GetPixel((int)(w * 0.50), (int)(h * 0.50));
|
|
||||||
Color transparent = Color.FromArgb(0, 0, 0, 0);
|
|
||||||
|
|
||||||
//如果中间像素不为空 直接判断此icon不为空
|
|
||||||
if (middleColor != Color.Transparent && middleColor != transparent)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//判断中间一条横线像素 有不透明元素即判断 icon不为空
|
|
||||||
Color c;
|
|
||||||
int h2 = (int)h / 2;
|
|
||||||
for (int i=0; i<(int)w; i++)
|
|
||||||
{
|
|
||||||
c = bm.GetPixel(i, h2);
|
|
||||||
if (c!= Color.Transparent && c != transparent)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ImageCodecInfo GetEncoderInfo(String mimeType)
|
private static ImageCodecInfo GetEncoderInfo(String mimeType)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
@@ -461,6 +416,7 @@ namespace GeekDesk.Util
|
|||||||
int iOverlay,
|
int iOverlay,
|
||||||
ref int piIndex);
|
ref int piIndex);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace GeekDesk.Util
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
string path = shortcut.TargetPath;
|
string path = shortcut.TargetPath;
|
||||||
if (path==null || Regex.IsMatch(path, NO_PATH))
|
if (path == null || Regex.IsMatch(path, NO_PATH))
|
||||||
{
|
{
|
||||||
path = ParseShortcut(filePath);
|
path = ParseShortcut(filePath);
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,8 @@ namespace GeekDesk.Util
|
|||||||
|| !Regex.IsMatch(iconPath, HAVE_ICO))
|
|| !Regex.IsMatch(iconPath, HAVE_ICO))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return iconPath.Split(',')[0];
|
return iconPath.Split(',')[0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,10 +53,9 @@ namespace GeekDesk.Util
|
|||||||
UnregisterHotKey(handleTemp[id].Handle, id);
|
UnregisterHotKey(handleTemp[id].Handle, id);
|
||||||
GlobalHotKey.handleTemp[id].Dispose();
|
GlobalHotKey.handleTemp[id].Dispose();
|
||||||
GlobalHotKey.handleTemp.Remove(id);
|
GlobalHotKey.handleTemp.Remove(id);
|
||||||
} catch (Exception e)
|
} catch
|
||||||
{
|
{
|
||||||
//nothing
|
//nothing
|
||||||
LogUtil.WriteErrorLog(e, "取消注册热键异常!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,20 +93,25 @@ namespace GeekDesk.Util
|
|||||||
|
|
||||||
if (File.Exists(filePath) || IsSystemItem(filePath))
|
if (File.Exists(filePath) || IsSystemItem(filePath))
|
||||||
{
|
{
|
||||||
if (IsImage(filePath)) {
|
if (IsImage(filePath))
|
||||||
|
{
|
||||||
//图片
|
//图片
|
||||||
return GetThumbnailByFile(filePath, 256, 256);
|
return GetThumbnailByFile(filePath, 256, 256);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{ //其它文件
|
{ //其它文件
|
||||||
return FileIcon.GetBitmapImage(filePath);
|
return FileIcon.GetBitmapImage(filePath);
|
||||||
}
|
}
|
||||||
} else if(Directory.Exists(filePath)) {
|
}
|
||||||
|
else if (Directory.Exists(filePath))
|
||||||
|
{
|
||||||
|
|
||||||
if ((filePath.IndexOf("\\") == filePath.LastIndexOf("\\")) && filePath.IndexOf("\\") == filePath.Length - 1)
|
if ((filePath.IndexOf("\\") == filePath.LastIndexOf("\\")) && filePath.IndexOf("\\") == filePath.Length - 1)
|
||||||
{
|
{
|
||||||
//磁盘
|
//磁盘
|
||||||
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DISK_IMAGE_BASE64);
|
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DISK_IMAGE_BASE64);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
//文件夹
|
//文件夹
|
||||||
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DIR_IMAGE_BASE64);
|
return ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_DIR_IMAGE_BASE64);
|
||||||
@@ -218,7 +223,7 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "获取文件缩略图失败!filePath="+filePath);
|
LogUtil.WriteErrorLog(e, "获取文件缩略图失败!filePath=" + filePath);
|
||||||
return Base64ToBitmapImage(Constants.DEFAULT_IMG_IMAGE_BASE64);
|
return Base64ToBitmapImage(Constants.DEFAULT_IMG_IMAGE_BASE64);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +324,7 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "图片文件转base64失败!Imagefilename=" + Imagefilename + ",ImageFormat="+format);
|
LogUtil.WriteErrorLog(e, "图片文件转base64失败!Imagefilename=" + Imagefilename + ",ImageFormat=" + format);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,8 @@ namespace GeekDesk.Util
|
|||||||
HideAnimation(windowLeft, screenWidth - Math.Abs(screenLeft) - showMarginWidth, Window.LeftProperty, HideType.RIGHT_HIDE);
|
HideAnimation(windowLeft, screenWidth - Math.Abs(screenLeft) - showMarginWidth, Window.LeftProperty, HideType.RIGHT_HIDE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (mouseX >= windowLeft && mouseX <= windowLeft + windowWidth
|
}
|
||||||
|
else if (mouseX >= windowLeft && mouseX <= windowLeft + windowWidth
|
||||||
&& mouseY >= windowTop && mouseY <= windowTop + windowHeight && IS_HIDE)
|
&& mouseY >= windowTop && mouseY <= windowTop + windowHeight && IS_HIDE)
|
||||||
{
|
{
|
||||||
//上方显示
|
//上方显示
|
||||||
@@ -261,7 +262,8 @@ namespace GeekDesk.Util
|
|||||||
if (to == 0D)
|
if (to == 0D)
|
||||||
{
|
{
|
||||||
time = fadeHideTime;
|
time = fadeHideTime;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
time = fadeShowTime;
|
time = fadeShowTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,11 +48,9 @@ namespace GeekDesk.Util
|
|||||||
key.Close();
|
key.Close();
|
||||||
|
|
||||||
}
|
}
|
||||||
#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(ex, "注册启动Error1!");
|
LogUtil.WriteErrorLog(ex, "设置开机/取消失败!started=" + started);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,25 +61,21 @@ namespace GeekDesk.Util
|
|||||||
key.DeleteValue(exeName);//取消开机启动
|
key.DeleteValue(exeName);//取消开机启动
|
||||||
key.Close();
|
key.Close();
|
||||||
}
|
}
|
||||||
#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(ex, "注册启动Error2!");
|
LogUtil.WriteErrorLog(ex, "取消开机启动失败!started=" + started);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#pragma warning disable CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
#pragma warning restore CS0168 // 声明了变量“ex”,但从未使用过
|
|
||||||
{
|
{
|
||||||
|
LogUtil.WriteErrorLog(ex, "取消/开机/失败!started=" + started);
|
||||||
if (key != null)
|
if (key != null)
|
||||||
{
|
{
|
||||||
key.Close();
|
key.Close();
|
||||||
}
|
}
|
||||||
LogUtil.WriteErrorLog(ex, "注册启动Error3!");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace GeekDesk.Util
|
|||||||
double left = SystemParameters.VirtualScreenLeft;
|
double left = SystemParameters.VirtualScreenLeft;
|
||||||
double top = SystemParameters.VirtualScreenTop;
|
double top = SystemParameters.VirtualScreenTop;
|
||||||
double width = SystemParameters.VirtualScreenWidth;
|
double width = SystemParameters.VirtualScreenWidth;
|
||||||
double height = SystemParameters.WorkArea.Height + 20; // 不遮挡任务栏
|
double height = SystemParameters.WorkArea.Height + 20;
|
||||||
double right = width - Math.Abs(left);
|
double right = width - Math.Abs(left);
|
||||||
double bottom = height - Math.Abs(top);
|
double bottom = height - Math.Abs(top);
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ namespace GeekDesk.Util
|
|||||||
|
|
||||||
switch (position)
|
switch (position)
|
||||||
{
|
{
|
||||||
|
|
||||||
case MousePosition.LEFT_BOTTOM:
|
case MousePosition.LEFT_BOTTOM:
|
||||||
afterWidth = 0;
|
afterWidth = 0;
|
||||||
afterHeight = window.Height;
|
afterHeight = window.Height;
|
||||||
|
|||||||
@@ -21,18 +21,15 @@ namespace GeekDesk.Util
|
|||||||
string svgPath = "/GeekDesk;component/Resource/Iconfont/iconfont.js";
|
string svgPath = "/GeekDesk;component/Resource/Iconfont/iconfont.js";
|
||||||
string jsonPath = "/GeekDesk;component/Resource/Iconfont/iconfont.json";
|
string jsonPath = "/GeekDesk;component/Resource/Iconfont/iconfont.json";
|
||||||
|
|
||||||
|
Stream svgStream = Application.GetResourceStream(new Uri(svgPath, UriKind.Relative)).Stream;
|
||||||
|
Stream jsonStream = Application.GetResourceStream(new Uri(jsonPath, UriKind.Relative)).Stream;
|
||||||
|
|
||||||
using (Stream svgStream = Application.GetResourceStream(new Uri(svgPath, UriKind.Relative)).Stream,
|
StreamReader streamReader = new StreamReader(svgStream);
|
||||||
jsonStream = Application.GetResourceStream(new Uri(jsonPath, UriKind.Relative)).Stream)
|
|
||||||
{
|
|
||||||
using (StreamReader streamReader = new StreamReader(svgStream))
|
|
||||||
{
|
|
||||||
string svgJsStr = streamReader.ReadToEnd();
|
string svgJsStr = streamReader.ReadToEnd();
|
||||||
JObject jo = ReadJson(jsonStream);
|
JObject jo = ReadJson(jsonStream);
|
||||||
|
|
||||||
return GetIconfonts(svgJsStr, jo);
|
return GetIconfonts(svgJsStr, jo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<IconfontInfo> GetIconfonts(string svgJsStr, string jsonStr)
|
public static List<IconfontInfo> GetIconfonts(string svgJsStr, string jsonStr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GeekDesk.Util
|
|
||||||
{
|
|
||||||
public class SystemIcon
|
|
||||||
{
|
|
||||||
[DllImport("Shell32.dll")]
|
|
||||||
public static extern int ExtractIcon(IntPtr h, string strx, int ii);
|
|
||||||
|
|
||||||
public static Icon MyExtractIcon(string FileName, int iIndex, IntPtr h)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
IntPtr hIcon = (IntPtr)ExtractIcon(h, FileName, iIndex);
|
|
||||||
if (!hIcon.Equals(null))
|
|
||||||
{
|
|
||||||
Icon icon = Icon.FromHandle(hIcon);
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -121,7 +121,8 @@ namespace GeekDesk.ViewModel
|
|||||||
if (imageWidth == 0)
|
if (imageWidth == 0)
|
||||||
{
|
{
|
||||||
return (int)CommonEnum.IMAGE_WIDTH;
|
return (int)CommonEnum.IMAGE_WIDTH;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return imageWidth;
|
return imageWidth;
|
||||||
}
|
}
|
||||||
@@ -396,7 +397,8 @@ namespace GeekDesk.ViewModel
|
|||||||
if (blurEffect)
|
if (blurEffect)
|
||||||
{
|
{
|
||||||
BlurValue = 100;
|
BlurValue = 100;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
BlurValue = 0;
|
BlurValue = 0;
|
||||||
}
|
}
|
||||||
@@ -568,7 +570,8 @@ namespace GeekDesk.ViewModel
|
|||||||
bacImgName = "系统默认";
|
bacImgName = "系统默认";
|
||||||
//Image image = ImageUtil.ByteArrayToImage(Convert.FromBase64String(Constants.DEFAULT_BAC_IMAGE_BASE64));
|
//Image image = ImageUtil.ByteArrayToImage(Convert.FromBase64String(Constants.DEFAULT_BAC_IMAGE_BASE64));
|
||||||
return ImageUtil.ByteArrToImage(Convert.FromBase64String(Constants.DEFAULT_BAC_IMAGE_BASE64));
|
return ImageUtil.ByteArrToImage(Convert.FromBase64String(Constants.DEFAULT_BAC_IMAGE_BASE64));
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return ImageUtil.ByteArrToImage(ImageByteArr);
|
return ImageUtil.ByteArrToImage(ImageByteArr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -85,11 +84,6 @@ namespace GeekDesk.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString()
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
[field: NonSerializedAttribute()]
|
[field: NonSerializedAttribute()]
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
private void OnPropertyChanged(string propertyName)
|
private void OnPropertyChanged(string propertyName)
|
||||||
|
|||||||
@@ -143,7 +143,8 @@ namespace GeekDesk.ViewModel
|
|||||||
if (StringUtil.IsEmpty(Path))
|
if (StringUtil.IsEmpty(Path))
|
||||||
{
|
{
|
||||||
Content = Name + "\n使用次数: " + Count;
|
Content = Name + "\n使用次数: " + Count;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
Content = Path + "\n" + Name + "\n使用次数: " + Count;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -37,11 +36,5 @@ namespace GeekDesk.ViewModel
|
|||||||
name = value;
|
name = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString()
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -18,23 +17,11 @@ namespace GeekDesk.ViewModel
|
|||||||
private string menuId;
|
private string menuId;
|
||||||
private Visibility menuEdit = Visibility.Collapsed;
|
private Visibility menuEdit = Visibility.Collapsed;
|
||||||
private Visibility notMenuEdit = Visibility.Visible;
|
private Visibility notMenuEdit = Visibility.Visible;
|
||||||
private bool isEdit = false;
|
|
||||||
private string menuGeometry; //菜单几何图标
|
private string menuGeometry; //菜单几何图标
|
||||||
private string geometryColor; //几何图标颜色
|
private string geometryColor; //几何图标颜色
|
||||||
private ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
private ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
||||||
|
|
||||||
public bool IsEdit
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return isEdit;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
isEdit = value;
|
|
||||||
OnPropertyChanged("IsEdit");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string MenuGeometry
|
public string MenuGeometry
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -106,11 +93,9 @@ namespace GeekDesk.ViewModel
|
|||||||
menuEdit = value;
|
menuEdit = value;
|
||||||
if (menuEdit == Visibility.Visible)
|
if (menuEdit == Visibility.Visible)
|
||||||
{
|
{
|
||||||
IsEdit = true;
|
|
||||||
NotMenuEdit = Visibility.Collapsed;
|
NotMenuEdit = Visibility.Collapsed;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
IsEdit = false;
|
|
||||||
NotMenuEdit = Visibility.Visible;
|
NotMenuEdit = Visibility.Visible;
|
||||||
}
|
}
|
||||||
OnPropertyChanged("MenuEdit");
|
OnPropertyChanged("MenuEdit");
|
||||||
@@ -143,11 +128,6 @@ namespace GeekDesk.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString()
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
[field: NonSerializedAttribute()]
|
[field: NonSerializedAttribute()]
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
private void OnPropertyChanged(string propertyName)
|
private void OnPropertyChanged(string propertyName)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -130,10 +129,7 @@ namespace GeekDesk.ViewModel
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public override String ToString()
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[field: NonSerializedAttribute()]
|
[field: NonSerializedAttribute()]
|
||||||
|
|||||||
Reference in New Issue
Block a user