@@ -11,4 +11,11 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
<appSettings>
|
||||||
|
<add key="version" value="1.0 beta"/>
|
||||||
|
<add key="GitHubUrl" value="1.0 beta"/>
|
||||||
|
<add key="MYUrl" value="1.0 beta"/>
|
||||||
|
<add key="GitHubUpdateUrl" value="1.0 beta"/>
|
||||||
|
<add key="MYUpdateUrl" value="1.0 beta"/>
|
||||||
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
namespace GeekDesk.Constant
|
namespace GeekDesk.Constant
|
||||||
{
|
{
|
||||||
public enum DefaultConstant
|
public enum MainWindowEnum
|
||||||
{
|
{
|
||||||
WINDOW_WIDTH = 666, //默认窗体宽度
|
WINDOW_WIDTH = 666, //默认窗体宽度
|
||||||
WINDOW_HEIGHT = 500, //默认窗体高度
|
WINDOW_HEIGHT = 500, //默认窗体高度
|
||||||
17
Constant/UpdateType.cs
Normal file
17
Constant/UpdateType.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新源
|
||||||
|
/// </summary>
|
||||||
|
namespace GeekDesk.Constant
|
||||||
|
{
|
||||||
|
public enum UpdateType
|
||||||
|
{
|
||||||
|
Gitee = 1,
|
||||||
|
GitHub = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ namespace GeekDesk.Control.Other
|
|||||||
{
|
{
|
||||||
|
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
public BacklogNotificatin(BacklogInfo info)
|
public BacklogNotificatin(ToDoInfo info)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.DataContext = info;
|
this.DataContext = info;
|
||||||
@@ -32,12 +32,12 @@ namespace GeekDesk.Control.Other
|
|||||||
|
|
||||||
private void BacklogDone_Click(object sender, RoutedEventArgs e)
|
private void BacklogDone_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogInfo info = this.DataContext as BacklogInfo;
|
ToDoInfo info = this.DataContext as ToDoInfo;
|
||||||
info.DoneTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
info.DoneTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
appData.ExeBacklogList.Remove(info); //执行任务删除
|
appData.ToDoList.Remove(info); //执行任务删除
|
||||||
appData.HiBacklogList.Add(info); //添加历史任务
|
appData.HiToDoList.Add(info); //添加历史任务
|
||||||
BacklogTask.activityBacklog[info].Close(); //关闭桌面通知
|
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
||||||
BacklogTask.activityBacklog.Remove(info);//激活任务删除
|
ToDoTask.activityBacklog.Remove(info);//激活任务删除
|
||||||
CommonCode.SaveAppData(appData);
|
CommonCode.SaveAppData(appData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ namespace GeekDesk.Control.Other
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DelayButton_Click(object sender, RoutedEventArgs e)
|
private void DelayButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogInfo info = this.DataContext as BacklogInfo;
|
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)
|
||||||
@@ -98,8 +98,8 @@ namespace GeekDesk.Control.Other
|
|||||||
info.ExeTime = DateTime.Now.AddHours(time).ToString("yyyy-MM-dd HH:mm:ss");
|
info.ExeTime = DateTime.Now.AddHours(time).ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BacklogTask.activityBacklog[info].Close(); //关闭桌面通知
|
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
||||||
BacklogTask.activityBacklog.Remove(info);//激活任务删除
|
ToDoTask.activityBacklog.Remove(info);//激活任务删除
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
@@ -10,26 +11,68 @@
|
|||||||
d:DesignHeight="400" d:DesignWidth="500">
|
d:DesignHeight="400" d:DesignWidth="500">
|
||||||
|
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
|
<cvt:UpdateTypeConvert x:Key="UpdateTypeConvert"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<hc:SimplePanel Margin="20,50,20,20">
|
<hc:SimplePanel Margin="20,50,20,20">
|
||||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top">
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
<Image Source="/Resource/Image/About.png" Width="400" Height="100"/>
|
<Image Source="/Resource/Image/About.png" Width="400" Height="100"/>
|
||||||
<TextBlock TextAlignment="Center" Text="Copyright © 2021 GeekDesk 1.0 beta"/>
|
<TextBlock x:Name="AppInfo" TextAlignment="Center" Text="Copyright © 2021 GeekDesk "/>
|
||||||
<WrapPanel Margin="0,10,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
<hc:UniformSpacingPanel Spacing="5" HorizontalAlignment="Center" Margin="10,10,0,0" VerticalAlignment="Center">
|
||||||
<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="公众号" Status="抓几个娃" Color="#04913B">
|
|
||||||
|
<hc:Shield Subject="GitHub" Status="Demo-liu"
|
||||||
|
Command="hc:ControlCommands.OpenLink"
|
||||||
|
CommandParameter="https://github.com/Demo-Liu/GeekDesk"
|
||||||
|
Margin="0,0,10,0" Color="#24292F"/>
|
||||||
|
<hc:Shield Subject="码云" Status="Demo-liu"
|
||||||
|
Command="hc:ControlCommands.OpenLink"
|
||||||
|
CommandParameter=""
|
||||||
|
Margin="0,5,10,0" Color="#C71D23"/>
|
||||||
|
|
||||||
|
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
|
<hc:UniformSpacingPanel Spacing="10" HorizontalAlignment="Center" Margin="0,5,0,0">
|
||||||
|
<hc:Shield Subject="公众号" Status="抓几个娃" Margin="0,0,5,0" Color="#04913B">
|
||||||
<hc:Poptip.Instance>
|
<hc:Poptip.Instance>
|
||||||
<hc:Poptip PlacementType="Top">
|
<hc:Poptip PlacementType="Top">
|
||||||
<hc:Poptip.Content>
|
<hc:Poptip.Content>
|
||||||
<Image Source="/Resource/Image/公众号.jpg" Width="150" Height="150" />
|
<Image x:Name="PublicWeChat" Width="150" Height="150" />
|
||||||
</hc:Poptip.Content>
|
</hc:Poptip.Content>
|
||||||
</hc:Poptip>
|
</hc:Poptip>
|
||||||
</hc:Poptip.Instance>
|
</hc:Poptip.Instance>
|
||||||
</hc:Shield>
|
</hc:Shield>
|
||||||
</WrapPanel>
|
<hc:Shield Subject="赞赏" Status="支付宝" Margin="0,0,10,0" Color="#1577FE">
|
||||||
|
<hc:Poptip.Instance>
|
||||||
|
<hc:Poptip PlacementType="Top">
|
||||||
|
<hc:Poptip.Content>
|
||||||
|
<Image x:Name="ZFBCode" Width="150" Height="150" />
|
||||||
|
</hc:Poptip.Content>
|
||||||
|
</hc:Poptip>
|
||||||
|
</hc:Poptip.Instance>
|
||||||
|
</hc:Shield>
|
||||||
|
<hc:Shield Subject="赞赏" Status="微信" Margin="0,0,10,0" Color="#04913B">
|
||||||
|
<hc:Poptip.Instance>
|
||||||
|
<hc:Poptip PlacementType="Top">
|
||||||
|
<hc:Poptip.Content>
|
||||||
|
<Image x:Name="WeChatCode" Width="150" Height="150" />
|
||||||
|
</hc:Poptip.Content>
|
||||||
|
</hc:Poptip>
|
||||||
|
</hc:Poptip.Instance>
|
||||||
|
</hc:Shield>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
<TextBlock Margin="0,20,0,0" FontSize="13" Width="200" TextAlignment="Center" Text="这是个人开发的程序,所有人可任意修改和免费使用(商用请联系作者)" TextWrapping="Wrap"/>
|
<TextBlock Margin="0,20,0,0" FontSize="13" Width="200" TextAlignment="Center" Text="这是个人开发的程序,所有人可任意修改和免费使用(商用请联系作者)" TextWrapping="Wrap"/>
|
||||||
|
|
||||||
|
<hc:UniformSpacingPanel Spacing="10" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
|
||||||
|
<TextBlock Text="更新源:" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||||
|
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
||||||
|
Style="{StaticResource RadioButtonIcon}" Content="Gitee"
|
||||||
|
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
|
||||||
|
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
||||||
|
Style="{StaticResource RadioButtonIcon}" Content="GitHub"
|
||||||
|
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Configuration;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -12,6 +13,8 @@ using System.Windows.Media;
|
|||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using GeekDesk.Util;
|
||||||
|
using GeekDesk.Constant;
|
||||||
|
|
||||||
namespace GeekDesk.Control.UserControls.Config
|
namespace GeekDesk.Control.UserControls.Config
|
||||||
{
|
{
|
||||||
@@ -23,6 +26,10 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
public AboutControl()
|
public AboutControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
AppInfo.Text += ConfigurationManager.AppSettings["version"];
|
||||||
|
PublicWeChat.Source = ImageUtil.Base64ToBitmapImage(Constants.PUBLIC_WE_CHAT_IMG_BASE64);
|
||||||
|
WeChatCode.Source = ImageUtil.Base64ToBitmapImage(Constants.WE_CHAT_CODE_IMG_BASE64);
|
||||||
|
ZFBCode.Source = ImageUtil.Base64ToBitmapImage(Constants.ZFB_CODE_IMG_BASE64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,9 @@
|
|||||||
<TextBlock Text="热键设置" VerticalAlignment="Center" Margin="-26,0,26,0"/>
|
<TextBlock Text="热键设置" VerticalAlignment="Center" Margin="-26,0,26,0"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="30,193,0,-180.337" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="30,193,0,-180.337" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="当前热键:"/>
|
<TextBlock Text="主面板:" Width="55"/>
|
||||||
<hc:TextBox HorizontalAlignment="Left"
|
<hc:TextBox HorizontalAlignment="Left"
|
||||||
|
Tag="Main"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
IsReadOnlyCaretVisible="True"
|
IsReadOnlyCaretVisible="True"
|
||||||
@@ -65,6 +66,20 @@
|
|||||||
KeyUp="HotKeyUp"
|
KeyUp="HotKeyUp"
|
||||||
Margin="12.967,-7.38,-12.967,0"/>
|
Margin="12.967,-7.38,-12.967,0"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
<!--<hc:UniformSpacingPanel Spacing="10" Margin="30,229,0,-216.337" Grid.ColumnSpan="4">
|
||||||
|
<TextBlock Text="新建待办:" Width="55"/>
|
||||||
|
<hc:TextBox HorizontalAlignment="Left"
|
||||||
|
Tag="ToDo"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
IsReadOnly="True"
|
||||||
|
IsReadOnlyCaretVisible="True"
|
||||||
|
Width="200"
|
||||||
|
Text="{Binding ToDoHotkeyStr}"
|
||||||
|
KeyDown="HotKeyDown"
|
||||||
|
KeyUp="HotKeyUp"
|
||||||
|
Margin="12.967,-7.38,-12.967,0"/>
|
||||||
|
</hc:UniformSpacingPanel>-->
|
||||||
|
<StackPanel hc:Growl.GrowlParent="True" hc:Growl.Token="HotKeyGrowl" VerticalAlignment="Top"/>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Microsoft.Win32;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -27,8 +28,9 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MotionControl : UserControl
|
public partial class MotionControl : UserControl
|
||||||
{
|
{
|
||||||
private static bool hotkeyFinished = true; //热键设置结束
|
public static bool hotkeyFinished = true; //热键设置结束
|
||||||
private static KeyEventArgs prevKeyTemp; //上一个按键
|
private static KeyEventArgs prevKeyTemp; //上一个按键
|
||||||
|
private static List<KeyEventArgs> keysTemp = new List<KeyEventArgs>();//存储一次快捷键集合
|
||||||
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
||||||
|
|
||||||
public MotionControl()
|
public MotionControl()
|
||||||
@@ -44,24 +46,50 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void HotKeyDown(object sender, KeyEventArgs e)
|
private void HotKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
string tag = (sender as TextBox).Tag.ToString();
|
||||||
|
|
||||||
|
bool main = false;
|
||||||
|
if ("Main".Equals(tag))
|
||||||
|
{
|
||||||
|
main = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!e.IsRepeat)
|
if (!e.IsRepeat)
|
||||||
{
|
{
|
||||||
if (hotkeyFinished)
|
if (hotkeyFinished)
|
||||||
{
|
{
|
||||||
appConfig.Hotkey = 0;
|
if (main)
|
||||||
appConfig.HotkeyStr = "";
|
{
|
||||||
appConfig.HotkeyModifiers = 0;
|
appConfig.Hotkey = 0;
|
||||||
|
appConfig.HotkeyStr = "";
|
||||||
|
appConfig.HotkeyModifiers = 0;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appConfig.ToDoHotkey = 0;
|
||||||
|
appConfig.ToDoHotkeyStr = "";
|
||||||
|
appConfig.ToDoHotkeyModifiers = 0;
|
||||||
|
}
|
||||||
hotkeyFinished = false;
|
hotkeyFinished = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
//首次按下按键
|
//首次按下按键
|
||||||
if (appConfig.HotkeyStr == null || appConfig.HotkeyStr.Length == 0)
|
if ((main && (appConfig.HotkeyStr == null || appConfig.HotkeyStr.Length == 0))
|
||||||
|
|| (!main && (appConfig.ToDoHotkeyStr == null || appConfig.ToDoHotkeyStr.Length == 0)))
|
||||||
{
|
{
|
||||||
if (CheckModifierKeys(e))
|
if (CheckModifierKeys(e))
|
||||||
{
|
{
|
||||||
//辅助键
|
//辅助键
|
||||||
appConfig.HotkeyStr = GetKeyName(e);
|
if (main)
|
||||||
appConfig.HotkeyModifiers = GetModifierKeys(e);
|
{
|
||||||
|
appConfig.HotkeyStr = GetKeyName(e);
|
||||||
|
appConfig.HotkeyModifiers = GetModifierKeys(e);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appConfig.ToDoHotkeyStr = GetKeyName(e);
|
||||||
|
appConfig.ToDoHotkeyModifiers = GetModifierKeys(e);
|
||||||
|
}
|
||||||
prevKeyTemp = e;
|
prevKeyTemp = e;
|
||||||
|
keysTemp.Add(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -72,15 +100,32 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
|| (e.Key >= Key.F1 && e.Key <= Key.F12)
|
|| (e.Key >= Key.F1 && e.Key <= Key.F12)
|
||||||
|| (e.Key >= Key.D0 && e.Key <= Key.D9)))
|
|| (e.Key >= Key.D0 && e.Key <= Key.D9)))
|
||||||
{
|
{
|
||||||
appConfig.Hotkey = e.Key;
|
if (main)
|
||||||
appConfig.HotkeyStr += e.Key.ToString();
|
{
|
||||||
|
appConfig.Hotkey = e.Key;
|
||||||
|
appConfig.HotkeyStr += e.Key.ToString();
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appConfig.ToDoHotkey = e.Key;
|
||||||
|
appConfig.ToDoHotkeyStr += e.Key.ToString();
|
||||||
|
}
|
||||||
prevKeyTemp = e;
|
prevKeyTemp = e;
|
||||||
|
keysTemp.Add(e);
|
||||||
}
|
}
|
||||||
else if (CheckModifierKeys(e))
|
else if (CheckModifierKeys(e))
|
||||||
{
|
{
|
||||||
appConfig.HotkeyStr += GetKeyName(e);
|
if (main)
|
||||||
appConfig.HotkeyModifiers |= GetModifierKeys(e);
|
{
|
||||||
|
appConfig.HotkeyStr += GetKeyName(e);
|
||||||
|
appConfig.HotkeyModifiers |= GetModifierKeys(e);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appConfig.ToDoHotkeyStr += GetKeyName(e);
|
||||||
|
appConfig.ToDoHotkeyModifiers |= GetModifierKeys(e);
|
||||||
|
}
|
||||||
|
|
||||||
prevKeyTemp = e;
|
prevKeyTemp = e;
|
||||||
|
keysTemp.Add(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,94 +183,113 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void HotKeyUp(object sender, KeyEventArgs e)
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||||
|
private void HotKeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
hotkeyFinished = true;
|
string tag = (sender as TextBox).Tag.ToString();
|
||||||
ConfigWindow cw = (ConfigWindow)Window.GetWindow(this);
|
bool main = false;
|
||||||
try
|
if ("Main".Equals(tag))
|
||||||
{
|
{
|
||||||
if (cw.mainWindow.hotKeyId != -1)
|
main = true;
|
||||||
|
}
|
||||||
|
lock(this)
|
||||||
|
{
|
||||||
|
bool allKeyUp = true;
|
||||||
|
//判断所有键是否都松开
|
||||||
|
foreach (KeyEventArgs key in keysTemp)
|
||||||
{
|
{
|
||||||
Hotkey.UnRegist(new WindowInteropHelper(cw.mainWindow).Handle, Hotkey.keymap[cw.mainWindow.hotKeyId]);
|
if (key.KeyStates == KeyStates.Down)
|
||||||
|
{
|
||||||
|
allKeyUp = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cw.mainWindow.hotKeyId = Hotkey.Regist(cw.mainWindow, appConfig.HotkeyModifiers, appConfig.Hotkey, () =>
|
if (allKeyUp && !hotkeyFinished)
|
||||||
{
|
{
|
||||||
if (cw.mainWindow.Visibility == Visibility.Collapsed)
|
keysTemp.Clear();
|
||||||
|
hotkeyFinished = true;
|
||||||
|
|
||||||
|
if (main)
|
||||||
{
|
{
|
||||||
cw.mainWindow.ShowApp();
|
if (MainWindow.hotKeyId != -1)
|
||||||
}
|
{
|
||||||
else
|
Hotkey.UnRegist(new WindowInteropHelper(MainWindow.mainWindow).Handle, Hotkey.keymap[MainWindow.hotKeyId]);
|
||||||
|
}
|
||||||
|
MainWindow.RegisterHotKey(false);
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
cw.mainWindow.Visibility = Visibility.Collapsed;
|
if (MainWindow.toDoHotKeyId != -1)
|
||||||
|
{
|
||||||
|
Hotkey.UnRegist(new WindowInteropHelper(MainWindow.toDoInfoWindow).Handle, Hotkey.keymap[MainWindow.toDoHotKeyId]);
|
||||||
|
}
|
||||||
|
MainWindow.RegisterCreateToDoHotKey(false);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
} catch (Exception)
|
|
||||||
{
|
}
|
||||||
HandyControl.Controls.Growl.WarningGlobal("当前快捷键已被其它程序占用(" + appConfig.HotkeyStr + ")!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowApp(MainWindow mainWindow)
|
//private void ShowApp(MainWindow mainWindow)
|
||||||
{
|
//{
|
||||||
if (appConfig.FollowMouse)
|
// if (appConfig.FollowMouse)
|
||||||
{
|
// {
|
||||||
ShowAppAndFollowMouse(mainWindow);
|
// ShowAppAndFollowMouse(mainWindow);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
this.Visibility = Visibility.Visible;
|
// this.Visibility = Visibility.Visible;
|
||||||
}
|
// }
|
||||||
Keyboard.Focus(this);
|
// Keyboard.Focus(this);
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 随鼠标位置显示面板 (鼠标始终在中间)
|
///// 随鼠标位置显示面板 (鼠标始终在中间)
|
||||||
/// </summary>
|
///// </summary>
|
||||||
private void ShowAppAndFollowMouse(MainWindow mainWindow)
|
//private void ShowAppAndFollowMouse(MainWindow mainWindow)
|
||||||
{
|
//{
|
||||||
//获取鼠标位置
|
// //获取鼠标位置
|
||||||
System.Windows.Point p = MouseUtil.GetMousePosition();
|
// System.Windows.Point p = MouseUtil.GetMousePosition();
|
||||||
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.VirtualScreenHeight;
|
// double height = SystemParameters.VirtualScreenHeight;
|
||||||
double right = width - Math.Abs(left);
|
// double right = width - Math.Abs(left);
|
||||||
double bottom = height - Math.Abs(top);
|
// double bottom = height - Math.Abs(top);
|
||||||
|
|
||||||
|
|
||||||
if (p.X - mainWindow.Width / 2 < left)
|
// if (p.X - mainWindow.Width / 2 < left)
|
||||||
{
|
// {
|
||||||
//判断是否在最左边缘
|
// //判断是否在最左边缘
|
||||||
mainWindow.Left = left;
|
// mainWindow.Left = left;
|
||||||
}
|
// }
|
||||||
else if (p.X + mainWindow.Width / 2 > right)
|
// else if (p.X + mainWindow.Width / 2 > right)
|
||||||
{
|
// {
|
||||||
//判断是否在最右边缘
|
// //判断是否在最右边缘
|
||||||
mainWindow.Left = right - mainWindow.Width;
|
// mainWindow.Left = right - mainWindow.Width;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
mainWindow.Left = p.X - mainWindow.Width / 2;
|
// mainWindow.Left = p.X - mainWindow.Width / 2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
if (p.Y - mainWindow.Height / 2 < top)
|
// if (p.Y - mainWindow.Height / 2 < top)
|
||||||
{
|
// {
|
||||||
//判断是否在最上边缘
|
// //判断是否在最上边缘
|
||||||
mainWindow.Top = top;
|
// mainWindow.Top = top;
|
||||||
}
|
// }
|
||||||
else if (p.Y + mainWindow.Height / 2 > bottom)
|
// else if (p.Y + mainWindow.Height / 2 > bottom)
|
||||||
{
|
// {
|
||||||
//判断是否在最下边缘
|
// //判断是否在最下边缘
|
||||||
mainWindow.Top = bottom - mainWindow.Height;
|
// mainWindow.Top = bottom - mainWindow.Height;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
mainWindow.Top = p.Y - mainWindow.Height / 2;
|
// mainWindow.Top = p.Y - mainWindow.Height / 2;
|
||||||
}
|
// }
|
||||||
|
|
||||||
mainWindow.Visibility = Visibility.Visible;
|
// mainWindow.Visibility = Visibility.Visible;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
<SolidColorBrush Opacity="0"/>
|
<SolidColorBrush Opacity="0"/>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<EventSetter Event="MouseLeftButtonDown" Handler="MenuClick"/>
|
||||||
|
<EventSetter Event="MouseRightButtonDown" Handler="MenuClick"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
@@ -74,12 +75,13 @@
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</hc:Card.ContextMenu>
|
</hc:Card.ContextMenu>
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<ListBox x:Name="menus"
|
<ListBox x:Name="MenuListBox"
|
||||||
ItemsSource="{Binding MenuList}"
|
ItemsSource="{Binding MenuList}"
|
||||||
Tag="{Binding AppConfig.MenuCardWidth}"
|
Tag="{Binding AppConfig.MenuCardWidth}"
|
||||||
BorderThickness="0" Foreground="{x:Null}"
|
BorderThickness="0" Foreground="{x:Null}"
|
||||||
SelectedIndex="{Binding AppConfig.SelectedMenuIndex}"
|
SelectedIndex="{Binding AppConfig.SelectedMenuIndex}"
|
||||||
VirtualizingPanel.VirtualizationMode="Recycling"
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
||||||
|
SelectionChanged="menus_SelectionChanged"
|
||||||
>
|
>
|
||||||
<ListBox.Resources>
|
<ListBox.Resources>
|
||||||
<ContextMenu x:Key="menuDialog" Width="200">
|
<ContextMenu x:Key="menuDialog" Width="200">
|
||||||
@@ -108,6 +110,9 @@
|
|||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
||||||
|
<StackPanel.Background>
|
||||||
|
<SolidColorBrush Color="AliceBlue" Opacity="0.01"/>
|
||||||
|
</StackPanel.Background>
|
||||||
<hc: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}}"
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}}"
|
||||||
|
|||||||
@@ -25,7 +25,13 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
public LeftCardControl()
|
public LeftCardControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
appData.AppConfig.SelectedMenuIcons = appData.MenuList[appData.AppConfig.SelectedMenuIndex].IconList;
|
if (appData.AppConfig.SelectedMenuIndex >= appData.MenuList.Count || appData.AppConfig.SelectedMenuIndex == -1)
|
||||||
|
{
|
||||||
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[0].IconList;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[appData.AppConfig.SelectedMenuIndex].IconList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +52,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
var dragged = menuList[fromS];
|
var dragged = menuList[fromS];
|
||||||
menuList.Remove(dragged);
|
menuList.Remove(dragged);
|
||||||
menuList.Insert(to, dragged);
|
menuList.Insert(to, dragged);
|
||||||
menus.SelectedIndex = to;
|
MenuListBox.SelectedIndex = to;
|
||||||
MainWindow.appData.MenuList = menuList;
|
MainWindow.appData.MenuList = menuList;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -73,14 +79,14 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
TextBlock tb = sender as TextBlock;
|
TextBlock tb = sender as TextBlock;
|
||||||
if (tb.Visibility == Visibility.Collapsed)
|
if (tb.Visibility == Visibility.Collapsed)
|
||||||
{
|
{
|
||||||
if (menus.SelectedIndex != -1)
|
if (MenuListBox.SelectedIndex != -1)
|
||||||
{
|
{
|
||||||
menuSelectIndexTemp = menus.SelectedIndex;
|
menuSelectIndexTemp = MenuListBox.SelectedIndex;
|
||||||
menus.SelectedIndex = -1;
|
MenuListBox.SelectedIndex = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
menus.SelectedIndex = menuSelectIndexTemp;
|
MenuListBox.SelectedIndex = menuSelectIndexTemp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,9 +100,9 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
MenuInfo info = new MenuInfo() { MenuEdit = Visibility.Collapsed, MenuId = System.Guid.NewGuid().ToString(), MenuName = "NewMenu" };
|
MenuInfo info = new MenuInfo() { MenuEdit = Visibility.Collapsed, MenuId = System.Guid.NewGuid().ToString(), MenuName = "NewMenu" };
|
||||||
appData.MenuList.Add(info);
|
appData.MenuList.Add(info);
|
||||||
menus.Items.Refresh();
|
MenuListBox.Items.Refresh();
|
||||||
menus.SelectedIndex = appData.MenuList.Count - 1;
|
MenuListBox.SelectedIndex = appData.MenuList.Count - 1;
|
||||||
appData.AppConfig.SelectedMenuIndex = menus.SelectedIndex;
|
appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
|
||||||
appData.AppConfig.SelectedMenuIcons = info.IconList;
|
appData.AppConfig.SelectedMenuIcons = info.IconList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,14 +130,20 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
//如果删除以后没有菜单的话 先创建一个
|
//如果删除以后没有菜单的话 先创建一个
|
||||||
CreateMenu(null, null);
|
CreateMenu(null, null);
|
||||||
}
|
}
|
||||||
appData.MenuList.Remove(menuInfo);
|
int index = appData.MenuList.IndexOf(menuInfo);
|
||||||
if (menus.SelectedIndex == -1)
|
if(index == 0)
|
||||||
{
|
{
|
||||||
// 选中下一个菜单
|
index = 0;
|
||||||
menus.SelectedIndex = 0;
|
} else
|
||||||
appData.AppConfig.SelectedMenuIndex = menus.SelectedIndex;
|
{
|
||||||
appData.AppConfig.SelectedMenuIcons = appData.MenuList[0].IconList;
|
index = index - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appData.MenuList.Remove(menuInfo);
|
||||||
|
// 选中下一个菜单
|
||||||
|
MenuListBox.SelectedIndex = index;
|
||||||
|
appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
|
||||||
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[index].IconList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -189,5 +201,17 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
||||||
IconfontWindow.Show(SvgToGeometry.GetIconfonts(), menuInfo);
|
IconfontWindow.Show(SvgToGeometry.GetIconfonts(), menuInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void menus_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
//设置对应菜单的图标列表
|
||||||
|
if (MenuListBox.SelectedIndex == -1)
|
||||||
|
{
|
||||||
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[appData.MenuList.Count-1].IconList;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[MenuListBox.SelectedIndex].IconList;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -172,7 +173,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
string path = (string)obj;
|
string path = (string)obj;
|
||||||
|
|
||||||
//string base64 = ImageUtil.FileImageToBase64(path, ImageFormat.Jpeg);
|
string base64 = ImageUtil.FileImageToBase64(path, ImageFormat.Jpeg);
|
||||||
|
|
||||||
IconInfo iconInfo = new IconInfo
|
IconInfo iconInfo = new IconInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<UserControl x:Class="GeekDesk.Control.UserControls.Backlog.BacklogControl"
|
<UserControl x:Class="GeekDesk.Control.UserControls.Backlog.TodoControl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
@@ -22,22 +22,22 @@ namespace GeekDesk.Control.UserControls.Backlog
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// BacklogControl.xaml 的交互逻辑
|
/// BacklogControl.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class BacklogControl : UserControl
|
public partial class TodoControl : UserControl
|
||||||
{
|
{
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
public BacklogControl()
|
public TodoControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteMenu_Click(object sender, RoutedEventArgs e)
|
private void DeleteMenu_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogInfo info = BacklogList.SelectedItem as BacklogInfo;
|
ToDoInfo info = BacklogList.SelectedItem as ToDoInfo;
|
||||||
Growl.Ask("确认删除吗?", isConfirmed =>
|
Growl.Ask("确认删除吗?", isConfirmed =>
|
||||||
{
|
{
|
||||||
if (isConfirmed)
|
if (isConfirmed)
|
||||||
{
|
{
|
||||||
appData.ExeBacklogList.Remove(info);
|
appData.ToDoList.Remove(info);
|
||||||
CommonCode.SaveAppData(MainWindow.appData);
|
CommonCode.SaveAppData(MainWindow.appData);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -46,8 +46,8 @@ namespace GeekDesk.Control.UserControls.Backlog
|
|||||||
|
|
||||||
private void DetailMenu_Click(object sender, RoutedEventArgs e)
|
private void DetailMenu_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogInfo info = BacklogList.SelectedItem as BacklogInfo;
|
ToDoInfo info = BacklogList.SelectedItem as ToDoInfo;
|
||||||
BacklogInfoWindow.ShowDetail(info);
|
ToDoInfoWindow.ShowDetail(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -29,12 +29,12 @@
|
|||||||
<Grid MouseDown="DragMove">
|
<Grid MouseDown="DragMove">
|
||||||
<TextBox x:Name="CheckSettingUrl" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
|
<TextBox x:Name="CheckSettingUrl" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
|
||||||
<hc:TabControl x:Name="MyTabControl" IsAnimationEnabled="True" SelectionChanged="TabControl_SelectionChanged" ShowContextMenu="True" IsTabFillEnabled="True" Margin="20,30,20,20" Height="350" VerticalAlignment="Top">
|
<hc:TabControl x:Name="MyTabControl" IsAnimationEnabled="True" SelectionChanged="TabControl_SelectionChanged" ShowContextMenu="True" IsTabFillEnabled="True" Margin="20,30,20,20" Height="350" VerticalAlignment="Top">
|
||||||
<hc:TabItem Tag="System" IsSelected="True" Header="系统图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" >
|
<hc:TabItem Tag="System" IsSelected="True" Header="系统图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource SystemIcon}" >
|
||||||
<hc:SimplePanel Background="AliceBlue">
|
<hc:SimplePanel Background="AliceBlue">
|
||||||
<uc:IconPannel x:Name="SystemIcon"/>
|
<uc:IconPannel x:Name="SystemIcon"/>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
</hc:TabItem>
|
</hc:TabItem>
|
||||||
<hc:TabItem Tag="Custom" Header="自定义图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CalendarGeometry}">
|
<hc:TabItem Tag="Custom" Header="自定义图标" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CustomIcon}">
|
||||||
<hc:SimplePanel Background="AliceBlue">
|
<hc:SimplePanel Background="AliceBlue">
|
||||||
<uc:IconPannel x:Name="CustomIcon"/>
|
<uc:IconPannel x:Name="CustomIcon"/>
|
||||||
<hc:LoadingCircle x:Name="LoadingEle"/>
|
<hc:LoadingCircle x:Name="LoadingEle"/>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="GeekDesk.Control.Windows.BacklogInfoWindow"
|
<Window x:Class="GeekDesk.Control.Windows.ToDoInfoWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@@ -20,24 +20,24 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// BacklogInfoWindow.xaml 的交互逻辑
|
/// BacklogInfoWindow.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class BacklogInfoWindow
|
public partial class ToDoInfoWindow
|
||||||
{
|
{
|
||||||
|
|
||||||
private static int windowType = -1;
|
private static int windowType = -1;
|
||||||
private static readonly int NEW_BACKLOG = 1;
|
private static readonly int NEW_TODO = 1;
|
||||||
private static readonly int DETAIL_BACKLOG = 2;
|
private static readonly int DETAIL_TODO = 2;
|
||||||
|
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
|
|
||||||
private BacklogInfo info;
|
private ToDoInfo info;
|
||||||
|
|
||||||
private BacklogInfoWindow()
|
private ToDoInfoWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ExeTime.SelectedDateTime = DateTime.Now.AddMinutes(10);
|
ExeTime.SelectedDateTime = DateTime.Now.AddMinutes(10);
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
}
|
}
|
||||||
private BacklogInfoWindow(BacklogInfo info)
|
private ToDoInfoWindow(ToDoInfo info)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
@@ -96,24 +96,24 @@ namespace GeekDesk.Control.Windows
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (windowType == NEW_BACKLOG)
|
if (windowType == NEW_TODO)
|
||||||
{
|
{
|
||||||
info = new BacklogInfo
|
info = new ToDoInfo
|
||||||
{
|
{
|
||||||
Title = Title.Text,
|
Title = Title.Text,
|
||||||
Msg = Msg.Text,
|
Msg = Msg.Text,
|
||||||
ExeTime = ExeTime.Text
|
ExeTime = ExeTime.Text
|
||||||
};
|
};
|
||||||
appData.ExeBacklogList.Add(info);
|
appData.ToDoList.Add(info);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int index =appData.ExeBacklogList.IndexOf(info);
|
int index =appData.ToDoList.IndexOf(info);
|
||||||
appData.ExeBacklogList.Remove(info);
|
appData.ToDoList.Remove(info);
|
||||||
info.Title = Title.Text;
|
info.Title = Title.Text;
|
||||||
info.Msg = Msg.Text;
|
info.Msg = Msg.Text;
|
||||||
info.ExeTime = ExeTime.Text;
|
info.ExeTime = ExeTime.Text;
|
||||||
info.DoneTime = DoneTime.Text;
|
info.DoneTime = DoneTime.Text;
|
||||||
appData.ExeBacklogList.Insert(index, info);
|
appData.ToDoList.Insert(index, info);
|
||||||
}
|
}
|
||||||
CommonCode.SaveAppData(MainWindow.appData);
|
CommonCode.SaveAppData(MainWindow.appData);
|
||||||
this.Close();
|
this.Close();
|
||||||
@@ -124,21 +124,34 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (window == null || !window.Activate())
|
if (window == null || !window.Activate())
|
||||||
{
|
{
|
||||||
window = new BacklogInfoWindow();
|
window = new ToDoInfoWindow();
|
||||||
|
window.Show();
|
||||||
}
|
}
|
||||||
windowType = NEW_BACKLOG;
|
windowType = NEW_TODO;
|
||||||
window.Show();
|
window.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static System.Windows.Window GetThis()
|
||||||
|
{
|
||||||
|
if (window == null || !window.Activate())
|
||||||
|
{
|
||||||
|
window = new ToDoInfoWindow();
|
||||||
|
window.Show();
|
||||||
|
}
|
||||||
|
window.Visibility = Visibility.Collapsed;
|
||||||
|
windowType = NEW_TODO;
|
||||||
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static System.Windows.Window window2 = null;
|
private static System.Windows.Window window2 = null;
|
||||||
public static void ShowDetail(BacklogInfo info)
|
public static void ShowDetail(ToDoInfo info)
|
||||||
{
|
{
|
||||||
if (window2 == null || !window2.Activate())
|
if (window2 == null || !window2.Activate())
|
||||||
{
|
{
|
||||||
window2 = new BacklogInfoWindow(info);
|
window2 = new ToDoInfoWindow(info);
|
||||||
}
|
}
|
||||||
windowType = DETAIL_BACKLOG;
|
windowType = DETAIL_TODO;
|
||||||
window2.Show();
|
window2.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="GeekDesk.Control.Windows.BacklogWindow"
|
<Window x:Class="GeekDesk.Control.Windows.ToDoWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
@@ -21,15 +21,15 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// BacklogWindow.xaml 的交互逻辑
|
/// BacklogWindow.xaml 的交互逻辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class BacklogWindow
|
public partial class ToDoWindow
|
||||||
{
|
{
|
||||||
private static BacklogControl backlog = new BacklogControl();
|
private static TodoControl backlog = new TodoControl();
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
private BacklogWindow()
|
private ToDoWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
RightCard.Content = backlog;
|
RightCard.Content = backlog;
|
||||||
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
|
backlog.BacklogList.ItemsSource = appData.ToDoList;
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +63,10 @@ namespace GeekDesk.Control.Windows
|
|||||||
switch (smi.Tag.ToString())
|
switch (smi.Tag.ToString())
|
||||||
{
|
{
|
||||||
case "History":
|
case "History":
|
||||||
backlog.BacklogList.ItemsSource = appData.HiBacklogList;
|
backlog.BacklogList.ItemsSource = appData.HiToDoList;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
|
backlog.BacklogList.ItemsSource = appData.ToDoList;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void CreateBacklog_BtnClick(object sender, RoutedEventArgs e)
|
private void CreateBacklog_BtnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogInfoWindow.ShowNone();
|
ToDoInfoWindow.ShowNone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
if (window == null || !window.Activate())
|
if (window == null || !window.Activate())
|
||||||
{
|
{
|
||||||
window = new BacklogWindow();
|
window = new ToDoWindow();
|
||||||
}
|
}
|
||||||
window.Show();
|
window.Show();
|
||||||
}
|
}
|
||||||
29
Converts/UpdateTypeConvert.cs
Normal file
29
Converts/UpdateTypeConvert.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using GeekDesk.Constant;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace GeekDesk.Converts
|
||||||
|
{
|
||||||
|
class UpdateTypeConvert : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return (UpdateType)value == (UpdateType)int.Parse(parameter.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
bool isChecked = (bool)value;
|
||||||
|
if (!isChecked)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (UpdateType)int.Parse(parameter.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -82,6 +82,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
@@ -113,26 +114,27 @@
|
|||||||
<Compile Include="Command\DelegateCommandBase.cs" />
|
<Compile Include="Command\DelegateCommandBase.cs" />
|
||||||
<Compile Include="Constant\AppHideType.cs" />
|
<Compile Include="Constant\AppHideType.cs" />
|
||||||
<Compile Include="Constant\Constants.cs" />
|
<Compile Include="Constant\Constants.cs" />
|
||||||
<Compile Include="Constant\DefaultConstant.cs" />
|
<Compile Include="Constant\MainWindowEnum.cs" />
|
||||||
<Compile Include="Constant\IconStartType.cs" />
|
<Compile Include="Constant\IconStartType.cs" />
|
||||||
<Compile Include="Constant\SortType.cs" />
|
<Compile Include="Constant\SortType.cs" />
|
||||||
|
<Compile Include="Constant\UpdateType.cs" />
|
||||||
<Compile Include="Control\Other\BacklogNotificatin.xaml.cs">
|
<Compile Include="Control\Other\BacklogNotificatin.xaml.cs">
|
||||||
<DependentUpon>BacklogNotificatin.xaml</DependentUpon>
|
<DependentUpon>BacklogNotificatin.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\Other\CustomIconUrlDialog.xaml.cs">
|
<Compile Include="Control\Other\CustomIconUrlDialog.xaml.cs">
|
||||||
<DependentUpon>CustomIconUrlDialog.xaml</DependentUpon>
|
<DependentUpon>CustomIconUrlDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\UserControls\Backlog\BacklogControl.xaml.cs">
|
<Compile Include="Control\UserControls\ToDo\TodoControl.xaml.cs">
|
||||||
<DependentUpon>BacklogControl.xaml</DependentUpon>
|
<DependentUpon>TodoControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\UserControls\IconFont\IconPannel.xaml.cs">
|
<Compile Include="Control\UserControls\IconFont\IconPannel.xaml.cs">
|
||||||
<DependentUpon>IconPannel.xaml</DependentUpon>
|
<DependentUpon>IconPannel.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\Windows\BacklogInfoWindow.xaml.cs">
|
<Compile Include="Control\Windows\ToDoInfoWindow.xaml.cs">
|
||||||
<DependentUpon>BacklogInfoWindow.xaml</DependentUpon>
|
<DependentUpon>ToDoInfoWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\Windows\BacklogWindow.xaml.cs">
|
<Compile Include="Control\Windows\ToDoWindow.xaml.cs">
|
||||||
<DependentUpon>BacklogWindow.xaml</DependentUpon>
|
<DependentUpon>ToDoWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Control\Windows\ConfigWindow.xaml.cs">
|
<Compile Include="Control\Windows\ConfigWindow.xaml.cs">
|
||||||
<DependentUpon>ConfigWindow.xaml</DependentUpon>
|
<DependentUpon>ConfigWindow.xaml</DependentUpon>
|
||||||
@@ -164,10 +166,12 @@
|
|||||||
<Compile Include="Converts\DoubleToGridLength.cs" />
|
<Compile Include="Converts\DoubleToGridLength.cs" />
|
||||||
<Compile Include="Converts\IntToCornerRadius.cs" />
|
<Compile Include="Converts\IntToCornerRadius.cs" />
|
||||||
<Compile Include="Converts\OpcityConvert.cs" />
|
<Compile Include="Converts\OpcityConvert.cs" />
|
||||||
|
<Compile Include="Converts\UpdateTypeConvert.cs" />
|
||||||
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.cs" />
|
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.cs" />
|
||||||
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.Drag.cs" />
|
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.Drag.cs" />
|
||||||
<Compile Include="Converts\HideTypeConvert.cs" />
|
<Compile Include="Converts\HideTypeConvert.cs" />
|
||||||
<Compile Include="Task\BacklogTask.cs" />
|
<Compile Include="Task\ToDoTask.cs" />
|
||||||
|
<Compile Include="Thread\UpdateThread.cs" />
|
||||||
<Compile Include="Util\AeroGlassHelper.cs" />
|
<Compile Include="Util\AeroGlassHelper.cs" />
|
||||||
<Compile Include="Util\CommonCode.cs" />
|
<Compile Include="Util\CommonCode.cs" />
|
||||||
<Compile Include="Util\ConsoleManager.cs" />
|
<Compile Include="Util\ConsoleManager.cs" />
|
||||||
@@ -186,7 +190,7 @@
|
|||||||
<Compile Include="Util\SystemIcon.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\BacklogInfo.cs" />
|
<Compile Include="ViewModel\ToDoInfo.cs" />
|
||||||
<Compile Include="ViewModel\IconfontInfo.cs" />
|
<Compile Include="ViewModel\IconfontInfo.cs" />
|
||||||
<Compile Include="ViewModel\IconInfo.cs" />
|
<Compile Include="ViewModel\IconInfo.cs" />
|
||||||
<Compile Include="ViewModel\MenuInfo.cs" />
|
<Compile Include="ViewModel\MenuInfo.cs" />
|
||||||
@@ -198,7 +202,7 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Control\UserControls\Backlog\BacklogControl.xaml">
|
<Page Include="Control\UserControls\ToDo\TodoControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -206,11 +210,11 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Control\Windows\BacklogInfoWindow.xaml">
|
<Page Include="Control\Windows\ToDoInfoWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Control\Windows\BacklogWindow.xaml">
|
<Page Include="Control\Windows\ToDoWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -302,15 +306,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resource\Iconfont\iconfont.js" />
|
<Resource Include="Resource\Iconfont\iconfont.js" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\公众号.jpg" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resource\Image\BacklogImg.png" />
|
<Resource Include="Resource\Image\BacklogImg.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resource\Image\Taskbar.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resource\Image\TitleLogo.png" />
|
<Resource Include="Resource\Image\TitleLogo.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
|
|
||||||
<uc:RightCardControl Grid.Row="1" Grid.Column="1"/>
|
<uc:RightCardControl Grid.Row="1" Grid.Column="1"/>
|
||||||
|
|
||||||
<hc:NotifyIcon Icon="/Resource/Image/Taskbar.png" Text="GeekDesk" Click="NotifyIcon_Click">
|
<hc:NotifyIcon Icon="/Taskbar.ico" Text="GeekDesk" Click="NotifyIcon_Click">
|
||||||
<hc:NotifyIcon.ContextMenu>
|
<hc:NotifyIcon.ContextMenu>
|
||||||
<ContextMenu Width="130">
|
<ContextMenu Width="130">
|
||||||
<MenuItem Header="打开面板" Click="ShowApp"/>
|
<MenuItem Header="打开面板" Click="ShowApp"/>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using DraggAnimatedPanelExample;
|
using DraggAnimatedPanelExample;
|
||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
using GeekDesk.Control;
|
using GeekDesk.Control;
|
||||||
|
using GeekDesk.Control.UserControls.Config;
|
||||||
using GeekDesk.Control.Windows;
|
using GeekDesk.Control.Windows;
|
||||||
using GeekDesk.Task;
|
using GeekDesk.Task;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
@@ -29,16 +30,21 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static AppData appData = CommonCode.GetAppDataByFile();
|
public static AppData appData = CommonCode.GetAppDataByFile();
|
||||||
public int hotKeyId = -1;
|
//public static ToDoInfoWindow toDoInfoWindow = (ToDoInfoWindow)ToDoInfoWindow.GetThis();
|
||||||
|
public static ToDoInfoWindow toDoInfoWindow;
|
||||||
|
public static int hotKeyId = -1;
|
||||||
|
public static int toDoHotKeyId = -1;
|
||||||
|
public static MainWindow mainWindow;
|
||||||
public HotKeyManager hkm = new HotKeyManager();
|
public HotKeyManager hkm = new HotKeyManager();
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
LoadData();
|
LoadData();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
mainWindow = this;
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
this.SizeChanged += MainWindow_Resize;
|
this.SizeChanged += MainWindow_Resize;
|
||||||
BacklogTask.BackLogCheck();
|
ToDoTask.BackLogCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
@@ -51,6 +57,7 @@ namespace GeekDesk
|
|||||||
|
|
||||||
this.Width = appData.AppConfig.WindowWidth;
|
this.Width = appData.AppConfig.WindowWidth;
|
||||||
this.Height = appData.AppConfig.WindowHeight;
|
this.Height = appData.AppConfig.WindowHeight;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window_Loaded(object sender, RoutedEventArgs e)
|
void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
@@ -58,28 +65,92 @@ namespace GeekDesk
|
|||||||
if (!appData.AppConfig.StartedShowPanel)
|
if (!appData.AppConfig.StartedShowPanel)
|
||||||
{
|
{
|
||||||
this.Visibility = Visibility.Collapsed;
|
this.Visibility = Visibility.Collapsed;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ShowApp();
|
||||||
}
|
}
|
||||||
|
RegisterHotKey(true);
|
||||||
|
//RegisterCreateToDoHotKey(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注册当前窗口的热键
|
||||||
|
/// </summary>
|
||||||
|
public static void RegisterHotKey(bool first)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HotKey hk = hkm.Register(Key.Y, ModifierKeys.Control);
|
if (appData.AppConfig.HotkeyModifiers != 0)
|
||||||
hkm.KeyPressed += DisplayWindowHotKeyPress;
|
{
|
||||||
////加载完毕注册热键
|
//加载完毕注册热键
|
||||||
//hotKeyId = Hotkey.Regist(this, appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
hotKeyId = Hotkey.Regist(new WindowInteropHelper(MainWindow.mainWindow).Handle, appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
||||||
//{
|
{
|
||||||
// if (this.Visibility == Visibility.Collapsed)
|
if (MotionControl.hotkeyFinished)
|
||||||
// {
|
{
|
||||||
// ShowApp();
|
if (mainWindow.Visibility == Visibility.Collapsed)
|
||||||
// }
|
{
|
||||||
// else
|
ShowApp();
|
||||||
// {
|
}
|
||||||
// this.Visibility = Visibility.Collapsed;
|
else
|
||||||
// }
|
{
|
||||||
//});
|
mainWindow.Visibility = Visibility.Collapsed;
|
||||||
} catch (Exception)
|
}
|
||||||
{
|
}
|
||||||
HandyControl.Controls.Growl.WarningGlobal("启动快捷键已被其它程序占用(" + appData.AppConfig.HotkeyStr + ")!");
|
});
|
||||||
|
}
|
||||||
|
if (!first)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
if (first)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.WarningGlobal("GeekDesk启动快捷键已被其它程序占用(" + appData.AppConfig.HotkeyStr + ")!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Warning("GeekDesk启动快捷键已被其它程序占用(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 注册新建待办的热键
|
||||||
|
/// </summary>
|
||||||
|
public static void RegisterCreateToDoHotKey(bool first)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (appData.AppConfig.ToDoHotkeyModifiers!=0)
|
||||||
|
{
|
||||||
|
//加载完毕注册热键
|
||||||
|
toDoHotKeyId = Hotkey.Regist(new WindowInteropHelper(MainWindow.mainWindow).Handle, appData.AppConfig.ToDoHotkeyModifiers, appData.AppConfig.ToDoHotkey, () =>
|
||||||
|
{
|
||||||
|
if (MotionControl.hotkeyFinished)
|
||||||
|
{
|
||||||
|
ToDoInfoWindow.ShowNone();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!first)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
if (first)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.WarningGlobal("新建待办任务快捷键已被其它程序占用(" + appData.AppConfig.ToDoHotkeyStr + ")!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Warning("新建待办任务快捷键已被其它程序占用(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisplayWindowHotKeyPress(object sender, KeyPressedEventArgs e)
|
private void DisplayWindowHotKeyPress(object sender, KeyPressedEventArgs e)
|
||||||
@@ -180,22 +251,22 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
ShowApp();
|
ShowApp();
|
||||||
}
|
}
|
||||||
public void ShowApp()
|
public static void ShowApp()
|
||||||
{
|
{
|
||||||
if (appData.AppConfig.FollowMouse)
|
if (appData.AppConfig.FollowMouse)
|
||||||
{
|
{
|
||||||
ShowAppAndFollowMouse();
|
ShowAppAndFollowMouse();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
this.Visibility = Visibility.Visible;
|
mainWindow.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
Keyboard.Focus(this);
|
Keyboard.Focus(mainWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 随鼠标位置显示面板 (鼠标始终在中间)
|
/// 随鼠标位置显示面板 (鼠标始终在中间)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void ShowAppAndFollowMouse()
|
private static void ShowAppAndFollowMouse()
|
||||||
{
|
{
|
||||||
//获取鼠标位置
|
//获取鼠标位置
|
||||||
System.Windows.Point p = MouseUtil.GetMousePosition();
|
System.Windows.Point p = MouseUtil.GetMousePosition();
|
||||||
@@ -207,38 +278,38 @@ namespace GeekDesk
|
|||||||
double bottom = height - Math.Abs(top);
|
double bottom = height - Math.Abs(top);
|
||||||
|
|
||||||
|
|
||||||
if (p.X - this.Width / 2 < left)
|
if (p.X - mainWindow.Width / 2 < left)
|
||||||
{
|
{
|
||||||
//判断是否在最左边缘
|
//判断是否在最左边缘
|
||||||
this.Left = left;
|
mainWindow.Left = left;
|
||||||
}
|
}
|
||||||
else if (p.X + this.Width / 2 > right)
|
else if (p.X + mainWindow.Width / 2 > right)
|
||||||
{
|
{
|
||||||
//判断是否在最右边缘
|
//判断是否在最右边缘
|
||||||
this.Left = right - this.Width;
|
mainWindow.Left = right - mainWindow.Width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.Left = p.X - this.Width / 2;
|
mainWindow.Left = p.X - mainWindow.Width / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (p.Y - this.Height / 2 < top)
|
if (p.Y - mainWindow.Height / 2 < top)
|
||||||
{
|
{
|
||||||
//判断是否在最上边缘
|
//判断是否在最上边缘
|
||||||
this.Top = top;
|
mainWindow.Top = top;
|
||||||
}
|
}
|
||||||
else if (p.Y + this.Height / 2 > bottom)
|
else if (p.Y + mainWindow.Height / 2 > bottom)
|
||||||
{
|
{
|
||||||
//判断是否在最下边缘
|
//判断是否在最下边缘
|
||||||
this.Top = bottom - this.Height;
|
mainWindow.Top = bottom - mainWindow.Height;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.Top = p.Y - this.Height / 2;
|
mainWindow.Top = p.Y - mainWindow.Height / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Visibility = Visibility.Visible;
|
mainWindow.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -318,7 +389,7 @@ namespace GeekDesk
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void BacklogMenuClick(object sender, RoutedEventArgs e)
|
private void BacklogMenuClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
BacklogWindow.Show();
|
ToDoWindow.Show();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 禁用设置按钮右键菜单
|
/// 禁用设置按钮右键菜单
|
||||||
|
|||||||
@@ -24,5 +24,14 @@
|
|||||||
M512 64C262.4 64 64 262.4 64 512s198.4 448 448 448 448-198.4 448-448S761.6 64 512 64z m256 544h-256c-19.2 0-32-12.8-32-32V256c0-19.2 12.8-32 32-32s32 12.8 32 32v288h224c19.2 0 32 12.8 32 32s-12.8 32-32 32z
|
M512 64C262.4 64 64 262.4 64 512s198.4 448 448 448 448-198.4 448-448S761.6 64 512 64z m256 544h-256c-19.2 0-32-12.8-32-32V256c0-19.2 12.8-32 32-32s32 12.8 32 32v288h224c19.2 0 32 12.8 32 32s-12.8 32-32 32z
|
||||||
</Geometry>
|
</Geometry>
|
||||||
|
|
||||||
|
<Geometry x:Key="SystemIcon">
|
||||||
|
M768 665.6H256a102.4 102.4 0 0 1-102.4-102.4V256A102.4 102.4 0 0 1 256 153.6h512A102.4 102.4 0 0 1 870.4 256v307.2A102.4 102.4 0 0 1 768 665.6zM409.6 460.8a51.2 51.2 0 0 0-51.2 51.2 51.2 51.2 0 0 0 51.2 51.2h204.8a51.2 51.2 0 0 0 51.2-51.2 51.2 51.2 0 0 0-51.2-51.2zM307.2 768h409.6q51.2 0 51.2 51.2t-51.2 51.2H307.2q-51.2 0-51.2-51.2t51.2-51.2z
|
||||||
|
M460.8 819.251v-153.6q0-51.2 51.2-51.2t51.2 51.2v153.6q0 51.2-51.2 51.2t-51.2-51.2z
|
||||||
|
</Geometry>
|
||||||
|
|
||||||
|
<Geometry x:Key="CustomIcon">
|
||||||
|
M760.844227 482.947384l227.272092-215.929406a116.216042 116.216042 0 0 0 0-164.329483l-56.713429-56.713429a116.216042 116.216042 0 0 0-162.144622-2.068645l-221.995883 210.792657-215.673731-230.363439-1.766484-1.836213A75.958805 75.958805 0 0 0 222.392061 22.057805L60.526358 183.923508a75.912319 75.912319 0 0 0-1.30162 105.593896l212.442925 226.946687-200.867807 190.803497a116.216042 116.216042 0 0 0-33.098329 57.73613L3.7432 909.971609a76.888533 76.888533 0 0 0 96.529044 91.276079l139.738169-41.163722a116.843609 116.843609 0 0 0 47.2302-27.217797l198.032135-188.153772 238.521805 254.838537 1.766484 1.836213a75.958805 75.958805 0 0 0 107.430109 0.441621l161.865703-161.865703a75.912319 75.912319 0 0 0 1.30162-105.593896zM283.475213 833.129562L177.90456 727.558909a36.886972 36.886972 0 0 0-11.482145-7.600529L690.74271 221.833181l110.428483 110.428483a34.399948 34.399948 0 0 0 5.578371 3.718913z m537.452708-734.95025a41.233452 41.233452 0 0 1 57.550184 0.743783l56.713428 56.713428a41.419397 41.419397 0 0 1-0.743783 59.03775l-75.610156 71.658811a35.492379 35.492379 0 0 0-4.648642-7.158908l-109.196593-109.057134zM247.169321 380.630781a37.189133 37.189133 0 0 0 25.892934-10.877822l56.225322-56.225321a37.491295 37.491295 0 0 0-52.994516-52.994515l-56.225321 56.225321a37.189133 37.189133 0 0 0-10.459443 23.731316l-95.62256-102.270117c-0.604323-0.604323-0.604323-1.208647-0.418378-1.348106l161.865704-161.91219c0.139459-0.139459 0.790269-0.139459 1.464322 0.488107l215.999136 230.758573-166.862994 158.518682zM79.074438 929.309958a1.8827 1.8827 0 0 1-2.324321-2.324321l33.958328-144.96789a41.558857 41.558857 0 0 1 6.22918-13.457818 37.189133 37.189133 0 0 0 7.902691 11.877279l103.432277 103.432278a41.070749 41.070749 0 0 1-9.297283 4.160534l-139.784656 41.186965z m700.922193 19.524295c-0.139459 0.139459-0.790269 0.139459-1.464322-0.488107l-147.12951-157.170575a36.58481 36.58481 0 0 0 16.502678-9.041608l56.225321-56.225322a37.491295 37.491295 0 1 0-52.994515-52.994515l-56.225321 56.225321a37.189133 37.189133 0 0 0-8.553501 13.945925l-46.742092-49.972898L706.478362 534.593793 941.443956 785.620444c0.557837 0.604323 0.557837 1.208647 0.418378 1.348106l-161.819217 161.865703z
|
||||||
|
</Geometry>
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
@@ -14,12 +14,12 @@ using System.Timers;
|
|||||||
|
|
||||||
namespace GeekDesk.Task
|
namespace GeekDesk.Task
|
||||||
{
|
{
|
||||||
public class BacklogTask
|
public class ToDoTask
|
||||||
{
|
{
|
||||||
|
|
||||||
///public static ObservableCollection<BacklogInfo> activityBacklog = new ObservableCollection<BacklogInfo>();
|
///public static ObservableCollection<ToDoInfo> activityBacklog = new ObservableCollection<ToDoInfo>();
|
||||||
|
|
||||||
public static Dictionary<BacklogInfo, Notification> activityBacklog = new Dictionary<BacklogInfo, Notification>();
|
public static Dictionary<ToDoInfo, Notification> activityBacklog = new Dictionary<ToDoInfo, Notification>();
|
||||||
|
|
||||||
public static void BackLogCheck()
|
public static void BackLogCheck()
|
||||||
{
|
{
|
||||||
@@ -36,11 +36,11 @@ namespace GeekDesk.Task
|
|||||||
{
|
{
|
||||||
App.Current.Dispatcher.Invoke((Action)(() =>
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
||||||
{
|
{
|
||||||
if (MainWindow.appData.ExeBacklogList.Count > 0)
|
if (MainWindow.appData.ToDoList.Count > 0)
|
||||||
{
|
{
|
||||||
string nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
string nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
ObservableCollection<BacklogInfo> exeBacklogList = MainWindow.appData.ExeBacklogList;
|
ObservableCollection<ToDoInfo> exeBacklogList = MainWindow.appData.ToDoList;
|
||||||
foreach (BacklogInfo info in exeBacklogList)
|
foreach (ToDoInfo info in exeBacklogList)
|
||||||
{
|
{
|
||||||
if (info.ExeTime.CompareTo(nowTime) == -1 && !activityBacklog.ContainsKey(info))
|
if (info.ExeTime.CompareTo(nowTime) == -1 && !activityBacklog.ContainsKey(info))
|
||||||
{
|
{
|
||||||
BIN
Taskbar.ico
BIN
Taskbar.ico
Binary file not shown.
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 4.2 KiB |
24
Thread/UpdateThread.cs
Normal file
24
Thread/UpdateThread.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Thread
|
||||||
|
{
|
||||||
|
public class UpdateThread
|
||||||
|
{
|
||||||
|
public static void Update()
|
||||||
|
{
|
||||||
|
System.Threading.Thread t = new System.Threading.Thread(new ThreadStart(updateApp));
|
||||||
|
t.IsBackground = true;
|
||||||
|
t.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void updateApp()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,24 +30,22 @@ namespace GeekDesk.Util
|
|||||||
/// <param name="fsModifiers">组合键</param>
|
/// <param name="fsModifiers">组合键</param>
|
||||||
/// <param name="key">快捷键</param>
|
/// <param name="key">快捷键</param>
|
||||||
/// <param name="callBack">回调函数</param>
|
/// <param name="callBack">回调函数</param>
|
||||||
public static int Regist(Window window, HotkeyModifiers fsModifiers, Key key, HotKeyCallBackHanlder callBack)
|
public static int Regist(IntPtr windowHandle, HotkeyModifiers fsModifiers, Key key, HotKeyCallBackHanlder callBack)
|
||||||
{
|
{
|
||||||
var hwnd = new WindowInteropHelper(window).Handle;
|
HwndSource hs = HwndSource.FromHwnd(windowHandle);
|
||||||
var _hwndSource = HwndSource.FromHwnd(hwnd);
|
hs.AddHook(WndProc);
|
||||||
_hwndSource.AddHook(WndProc);
|
|
||||||
|
|
||||||
int id = keyid++;
|
int id = keyid++;
|
||||||
|
int vk = KeyInterop.VirtualKeyFromKey(key);
|
||||||
var vk = KeyInterop.VirtualKeyFromKey(key);
|
keymap.Add(id, callBack);
|
||||||
keymap[id] = callBack;
|
if (!RegisterHotKey(windowHandle, id, fsModifiers, (uint)vk)) throw new Exception("RegisterHotKey Failed");
|
||||||
if (!RegisterHotKey(hwnd, id, fsModifiers, (uint)vk)) throw new Exception("RegisterHotKey Failed");
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 快捷键消息处理
|
/// 快捷键消息处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
static IntPtr WndProc(IntPtr windowHandle, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||||
{
|
{
|
||||||
if (msg == WM_HOTKEY)
|
if (msg == WM_HOTKEY)
|
||||||
{
|
{
|
||||||
@@ -65,16 +63,21 @@ namespace GeekDesk.Util
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hWnd">持有快捷键窗口的句柄</param>
|
/// <param name="hWnd">持有快捷键窗口的句柄</param>
|
||||||
/// <param name="callBack">回调函数</param>
|
/// <param name="callBack">回调函数</param>
|
||||||
public static void UnRegist(IntPtr hWnd, HotKeyCallBackHanlder callBack)
|
public static void UnRegist(IntPtr windowHandle, HotKeyCallBackHanlder callBack)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<int, HotKeyCallBackHanlder> var in keymap)
|
List<int> list = new List<int>(keymap.Keys);
|
||||||
|
for (int i=0; i < list.Count; i++)
|
||||||
{
|
{
|
||||||
if (var.Value == callBack)
|
if (keymap[list[i]] == callBack)
|
||||||
UnregisterHotKey(hWnd, var.Key);
|
{
|
||||||
|
HwndSource hs = HwndSource.FromHwnd(windowHandle);
|
||||||
|
hs.RemoveHook(WndProc);
|
||||||
|
UnregisterHotKey(windowHandle, list[i]);
|
||||||
|
keymap.Remove(list[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const int WM_HOTKEY = 0x312;
|
const int WM_HOTKEY = 0x312;
|
||||||
static int keyid = 10;
|
static int keyid = 10;
|
||||||
public static Dictionary<int, HotKeyCallBackHanlder> keymap = new Dictionary<int, HotKeyCallBackHanlder>();
|
public static Dictionary<int, HotKeyCallBackHanlder> keymap = new Dictionary<int, HotKeyCallBackHanlder>();
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ namespace GeekDesk.ViewModel
|
|||||||
{
|
{
|
||||||
private SortType menuSortType = SortType.CUSTOM; //菜单排序类型
|
private SortType menuSortType = SortType.CUSTOM; //菜单排序类型
|
||||||
private SortType iconSortType = SortType.CUSTOM; //图表排序类型
|
private SortType iconSortType = SortType.CUSTOM; //图表排序类型
|
||||||
private double windowWidth = (double)DefaultConstant.WINDOW_WIDTH; //窗口宽度
|
private double windowWidth = (double)MainWindowEnum.WINDOW_WIDTH; //窗口宽度
|
||||||
private double windowHeight = (double)DefaultConstant.WINDOW_HEIGHT; //窗口高度
|
private double windowHeight = (double)MainWindowEnum.WINDOW_HEIGHT; //窗口高度
|
||||||
private double menuCardWidth = (double)DefaultConstant.MENU_CARD_WIDHT;//菜单栏宽度
|
private double menuCardWidth = (double)MainWindowEnum.MENU_CARD_WIDHT;//菜单栏宽度
|
||||||
private int selectedMenuIndex = 0; //上次选中菜单索引
|
private int selectedMenuIndex = 0; //上次选中菜单索引
|
||||||
private bool followMouse = true; //面板跟随鼠标 默认是
|
private bool followMouse = true; //面板跟随鼠标 默认是
|
||||||
private Visibility configIconVisible = Visibility.Visible; // 设置按钮是否显示
|
private Visibility configIconVisible = Visibility.Visible; // 设置按钮是否显示
|
||||||
@@ -37,18 +37,79 @@ namespace GeekDesk.ViewModel
|
|||||||
private int pannelCornerRadius = 4; //面板圆角 默认4
|
private int pannelCornerRadius = 4; //面板圆角 默认4
|
||||||
[field: NonSerialized]
|
[field: NonSerialized]
|
||||||
private ObservableCollection<IconInfo> selectedMenuIcons;
|
private ObservableCollection<IconInfo> selectedMenuIcons;
|
||||||
|
|
||||||
private string hotkeyStr = "Ctrl + Q"; //默认启动面板快捷键
|
private string hotkeyStr = "Ctrl + Q"; //默认启动面板快捷键
|
||||||
private HotkeyModifiers hotkeyModifiers = HotkeyModifiers.MOD_CONTROL; //默认启动面板快捷键
|
private HotkeyModifiers hotkeyModifiers = HotkeyModifiers.MOD_CONTROL; //默认启动面板快捷键
|
||||||
private Key hotkey = Key.Q; //默认启动面板快捷键
|
private Key hotkey = Key.Q; //默认启动面板快捷键
|
||||||
|
|
||||||
|
private string toDoHotkeyStr; //待办任务快捷键
|
||||||
|
private HotkeyModifiers toDoHotkeyModifiers; //待办任务快捷键
|
||||||
|
private Key toDoHotkey; //待办任务快捷键
|
||||||
|
|
||||||
private string customIconUrl; //自定义图标url
|
private string customIconUrl; //自定义图标url
|
||||||
private string customIconJsonUrl; //自定义图标json信息url
|
private string customIconJsonUrl; //自定义图标json信息url
|
||||||
|
|
||||||
private bool blurEffect = false; //毛玻璃效果 默认否
|
private bool blurEffect = false; //毛玻璃效果 默认否
|
||||||
private double blurValue;
|
private double blurValue;
|
||||||
|
|
||||||
|
private UpdateType updateType = UpdateType.Gitee; //更新源 默认gitee源
|
||||||
|
|
||||||
#region GetSet
|
#region GetSet
|
||||||
|
|
||||||
|
|
||||||
|
public Key ToDoHotkey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return toDoHotkey;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
toDoHotkey = value;
|
||||||
|
OnPropertyChanged("ToDoHotkey");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public HotkeyModifiers ToDoHotkeyModifiers
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return toDoHotkeyModifiers;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
toDoHotkeyModifiers = value;
|
||||||
|
OnPropertyChanged("ToDoHotkeyModifiers");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ToDoHotkeyStr
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return toDoHotkeyStr;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
toDoHotkeyStr = value;
|
||||||
|
OnPropertyChanged("ToDoHotkeyStr");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateType UpdateType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return updateType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
updateType = value;
|
||||||
|
OnPropertyChanged("UpdateType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public double BlurValue
|
public double BlurValue
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -14,42 +14,42 @@ namespace GeekDesk.ViewModel
|
|||||||
{
|
{
|
||||||
private ObservableCollection<MenuInfo> menuList; //菜单信息及菜单对应icon信息
|
private ObservableCollection<MenuInfo> menuList; //菜单信息及菜单对应icon信息
|
||||||
private AppConfig appConfig = new AppConfig(); //程序设置信息
|
private AppConfig appConfig = new AppConfig(); //程序设置信息
|
||||||
private ObservableCollection<BacklogInfo> hiBacklogList; //历史待办
|
private ObservableCollection<ToDoInfo> hiToDoList; //历史待办
|
||||||
private ObservableCollection<BacklogInfo> exeBacklogList; //未处理待办 为了提高任务效率 分开处理
|
private ObservableCollection<ToDoInfo> toDoList; //未处理待办 为了提高任务效率 分开处理
|
||||||
|
|
||||||
|
|
||||||
public ObservableCollection<BacklogInfo> HiBacklogList
|
public ObservableCollection<ToDoInfo> HiToDoList
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (hiBacklogList == null)
|
if (hiToDoList == null)
|
||||||
{
|
{
|
||||||
hiBacklogList = new ObservableCollection<BacklogInfo>();
|
hiToDoList = new ObservableCollection<ToDoInfo>();
|
||||||
|
|
||||||
}
|
}
|
||||||
return hiBacklogList;
|
return hiToDoList;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
hiBacklogList = value;
|
hiToDoList = value;
|
||||||
OnPropertyChanged("HiBacklogList");
|
OnPropertyChanged("HiToDoList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<BacklogInfo> ExeBacklogList
|
public ObservableCollection<ToDoInfo> ToDoList
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (exeBacklogList == null)
|
if (toDoList == null)
|
||||||
{
|
{
|
||||||
exeBacklogList = new ObservableCollection<BacklogInfo>();
|
toDoList = new ObservableCollection<ToDoInfo>();
|
||||||
}
|
}
|
||||||
return exeBacklogList;
|
return toDoList;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
exeBacklogList = value;
|
toDoList = value;
|
||||||
OnPropertyChanged("ExeBacklogList");
|
OnPropertyChanged("ToDoList");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ namespace GeekDesk.ViewModel
|
|||||||
private BitmapImage bitmapImage; //位图
|
private BitmapImage bitmapImage; //位图
|
||||||
private byte[] imageByteArr; //图片 byte数组
|
private byte[] imageByteArr; //图片 byte数组
|
||||||
private string content; //显示信息
|
private string content; //显示信息
|
||||||
private int imageWidth = (int)DefaultConstant.IMAGE_WIDTH; //图片宽度
|
private int imageWidth = (int)MainWindowEnum.IMAGE_WIDTH; //图片宽度
|
||||||
private int imageHeight = (int)DefaultConstant.IMAGE_HEIGHT; //图片高度
|
private int imageHeight = (int)MainWindowEnum.IMAGE_HEIGHT; //图片高度
|
||||||
private bool adminStartUp = false; //始终管理员方式启动 默认否
|
private bool adminStartUp = false; //始终管理员方式启动 默认否
|
||||||
private byte[] defaultImage; //默认图标
|
private byte[] defaultImage; //默认图标
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace GeekDesk.ViewModel
|
|||||||
{
|
{
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class BacklogInfo : INotifyPropertyChanged
|
public class ToDoInfo : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
//private string id; //任务唯一id
|
//private string id; //任务唯一id
|
||||||
private string title; //待办事项
|
private string title; //待办事项
|
||||||
Reference in New Issue
Block a user