'添加自定义图标大小','待办任务可使用CRON表达式自定义提醒频率'
This commit is contained in:
@@ -21,10 +21,14 @@
|
|||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="Version" value="2.3" />
|
<add key="Version" value="2.3.10" />
|
||||||
<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" />
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ namespace GeekDesk.Constant
|
|||||||
IMAGE_HEIGHT_AM = 52, //动画变换高度
|
IMAGE_HEIGHT_AM = 52, //动画变换高度
|
||||||
IMAGE_PANEL_WIDTH = 110, //图标容器宽度
|
IMAGE_PANEL_WIDTH = 110, //图标容器宽度
|
||||||
IMAGE_PANEL_HEIGHT = 90, //图标容器高度
|
IMAGE_PANEL_HEIGHT = 90, //图标容器高度
|
||||||
WINDOW_ANIMATION_TIME = 200, //主窗口动画时间
|
WINDOW_ANIMATION_TIME = 200, //主窗口动画时间,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
Constant/TodoTaskExecType.cs
Normal file
14
Constant/TodoTaskExecType.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Constant
|
||||||
|
{
|
||||||
|
public enum TodoTaskExecType
|
||||||
|
{
|
||||||
|
SET_TIME = 1, //指定时间
|
||||||
|
CRON = 2 //cron表达式
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
using GeekDesk.Task;
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Task;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
|
using HandyControl.Controls;
|
||||||
|
using Quartz;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -34,8 +37,36 @@ namespace GeekDesk.Control.Other
|
|||||||
{
|
{
|
||||||
ToDoInfo info = this.DataContext as ToDoInfo;
|
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.ToDoList.Remove(info); //执行任务删除
|
if (info.ExecType == TodoTaskExecType.CRON)
|
||||||
appData.HiToDoList.Add(info); //添加历史任务
|
{
|
||||||
|
CronExpression exp = new CronExpression(info.Cron);
|
||||||
|
DateTime dtNow = DateTime.Now;
|
||||||
|
DateTimeOffset ddo = DateTime.SpecifyKind(dtNow, DateTimeKind.Local);
|
||||||
|
string nextExecTime = ddo.LocalDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
info.ExeTime = nextExecTime;
|
||||||
|
|
||||||
|
DateTime nextTime = ddo.LocalDateTime;
|
||||||
|
TimeSpan ts = nextTime.Subtract(dtNow);
|
||||||
|
int minutes = (int)Math.Ceiling(ts.TotalMinutes);
|
||||||
|
if (minutes < 0)
|
||||||
|
{
|
||||||
|
minutes = 0;
|
||||||
|
}
|
||||||
|
if (minutes > 60)
|
||||||
|
{
|
||||||
|
int m = minutes % 60;
|
||||||
|
int h = minutes / 60;
|
||||||
|
Growl.SuccessGlobal("下次任务将在 " + h + " 小时零 " + m + " 分钟后提醒您!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Growl.SuccessGlobal("下次任务将在 " + minutes + " 分钟后提醒您!");
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
appData.ToDoList.Remove(info); //执行任务删除
|
||||||
|
appData.HiToDoList.Add(info); //添加历史任务
|
||||||
|
}
|
||||||
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
||||||
ToDoTask.activityBacklog.Remove(info);//激活任务删除
|
ToDoTask.activityBacklog.Remove(info);//激活任务删除
|
||||||
CommonCode.SaveAppData(appData);
|
CommonCode.SaveAppData(appData);
|
||||||
@@ -93,9 +124,11 @@ namespace GeekDesk.Control.Other
|
|||||||
{
|
{
|
||||||
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");
|
||||||
|
Growl.SuccessGlobal("将在 " + time + " 分钟后再次提醒您!");
|
||||||
break;
|
break;
|
||||||
case "时":
|
case "时":
|
||||||
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");
|
||||||
|
Growl.SuccessGlobal("将在 " + time + " 小时后再次提醒您!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
ToDoTask.activityBacklog[info].Close(); //关闭桌面通知
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid MouseDown="DragMove" Background="AliceBlue">
|
<Grid MouseDown="DragMove" Background="AliceBlue">
|
||||||
<hc:SimplePanel Margin="20" >
|
<StackPanel Margin="20" >
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,0,-40,-12" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="背景图片" VerticalAlignment="Center"/>
|
<TextBlock Text="背景图片" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="19,20,-59,-31.5" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,0,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="图片路径:" VerticalAlignment="Center"/>
|
<TextBlock Text="图片路径:" VerticalAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding BacImgName}" Width="200"
|
<TextBlock Text="{Binding BacImgName}" Width="200"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<Button Content="修改" Click="BGButton_Click"/>
|
<Button Content="修改" Click="BGButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="19,60,11,-36.433" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,0,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox x:Name="IconIsAdmin" Content="毛玻璃效果" IsChecked="{Binding BlurEffect}">
|
<CheckBox x:Name="IconIsAdmin" Content="毛玻璃效果" IsChecked="{Binding BlurEffect}">
|
||||||
<CheckBox.Background>
|
<CheckBox.Background>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
@@ -38,16 +38,16 @@
|
|||||||
</CheckBox>
|
</CheckBox>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,91.5,0,34.5" LineStroke="Black" Grid.ColumnSpan="4"/>
|
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||||
|
|
||||||
<StackPanel Margin="0,30,0,0">
|
<StackPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,80,-40,-89.5" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="托盘不透明度" VerticalAlignment="Center"/>
|
<TextBlock Text="托盘不透明度" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,110,-40,-122" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<hc:PreviewSlider Value="{Binding CardOpacity}"
|
<hc:PreviewSlider Value="{Binding CardOpacity}"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Margin="0,-12,-313.5,19.5"
|
Width="350"
|
||||||
>
|
>
|
||||||
<hc:PreviewSlider.PreviewContent>
|
<hc:PreviewSlider.PreviewContent>
|
||||||
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
||||||
@@ -56,13 +56,13 @@
|
|||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,135,-40,-161.626" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="背景图片不透明度" VerticalAlignment="Center"/>
|
<TextBlock Text="背景图片不透明度" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,155,-40,-183" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<hc:PreviewSlider Value="{Binding BgOpacity}"
|
<hc:PreviewSlider Value="{Binding BgOpacity}"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Margin="0,0,-313.5,7.5"
|
Width="350"
|
||||||
>
|
>
|
||||||
<hc:PreviewSlider.PreviewContent>
|
<hc:PreviewSlider.PreviewContent>
|
||||||
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
||||||
@@ -71,14 +71,14 @@
|
|||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,195,-40,-208.813" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="主面板不透明度" VerticalAlignment="Center"/>
|
<TextBlock Text="主面板不透明度" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,215,-40,-241" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<hc:PreviewSlider Value="{Binding PannelOpacity}"
|
<hc:PreviewSlider Value="{Binding PannelOpacity}"
|
||||||
Minimum="50"
|
Minimum="50"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Margin="0,0,-313.5,7.5"
|
Width="350"
|
||||||
>
|
>
|
||||||
<hc:PreviewSlider.PreviewContent>
|
<hc:PreviewSlider.PreviewContent>
|
||||||
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
||||||
@@ -86,27 +86,44 @@
|
|||||||
</hc:PreviewSlider>
|
</hc:PreviewSlider>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,245,-40,-279.313" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="主面板圆角大小" VerticalAlignment="Center"/>
|
<TextBlock Text="主面板圆角大小" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,265,-40,-321" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<hc:PreviewSlider Value="{Binding PannelCornerRadius}"
|
<hc:PreviewSlider Value="{Binding PannelCornerRadius}"
|
||||||
Maximum="25"
|
Maximum="25"
|
||||||
Margin="0,0,-313.5,7.5"
|
Width="350"
|
||||||
>
|
>
|
||||||
<hc:PreviewSlider.PreviewContent>
|
<hc:PreviewSlider.PreviewContent>
|
||||||
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
||||||
</hc:PreviewSlider.PreviewContent>
|
</hc:PreviewSlider.PreviewContent>
|
||||||
</hc:PreviewSlider>
|
</hc:PreviewSlider>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
|
<TextBlock Text="图标大小" VerticalAlignment="Center"/>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4"
|
||||||
|
Background="#00FFFFFF"
|
||||||
|
PreviewMouseLeftButtonDown="PreviewSlider_MouseLeftButtonUp"
|
||||||
|
>
|
||||||
|
<hc:PreviewSlider Value="{Binding ImageWidth, Mode=TwoWay}"
|
||||||
|
Minimum="40"
|
||||||
|
Maximum="60"
|
||||||
|
Width="350"
|
||||||
|
>
|
||||||
|
<hc:PreviewSlider.PreviewContent>
|
||||||
|
<Label Style="{StaticResource LabelPrimary}" Content="{Binding Path=(hc:PreviewSlider.PreviewPosition),RelativeSource={RelativeSource Self}}" ContentStringFormat="#0"/>
|
||||||
|
</hc:PreviewSlider.PreviewContent>
|
||||||
|
</hc:PreviewSlider>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,341.5,0,-215.5" LineStroke="Black" Grid.ColumnSpan="4"/>
|
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,354,-40,-388.313" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<TextBlock VerticalAlignment="Center" Text="图标字体颜色:" />
|
<TextBlock VerticalAlignment="Center" Text="图标字体颜色:" />
|
||||||
<TextBlock VerticalAlignment="Center" Text="{Binding TextColor}" Width="100"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding TextColor}" Width="100"/>
|
||||||
<Button Content="选择" Click="ColorButton_Click"/>
|
<Button Content="选择" Click="ColorButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</hc:SimplePanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<StackPanel x:Name="ColorPanel" Visibility="Collapsed" VerticalAlignment="Center">
|
<StackPanel x:Name="ColorPanel" Visibility="Collapsed" VerticalAlignment="Center">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using GeekDesk.ViewModel;
|
|||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -87,5 +88,40 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
Window.GetWindow(this).DragMove();
|
Window.GetWindow(this).DragMove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PreviewSlider_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
CheckButtonUpClass cbu = new CheckButtonUpClass
|
||||||
|
{
|
||||||
|
e = e
|
||||||
|
};
|
||||||
|
System.Threading.ThreadStart ts = new System.Threading.ThreadStart(cbu.CheckButtonUp);
|
||||||
|
System.Threading.Thread t = new System.Threading.Thread(ts);
|
||||||
|
t.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class CheckButtonUpClass
|
||||||
|
{
|
||||||
|
public MouseButtonEventArgs e;
|
||||||
|
|
||||||
|
public void CheckButtonUp()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (e.LeftButton == MouseButtonState.Released)
|
||||||
|
{
|
||||||
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
||||||
|
{
|
||||||
|
AppData appData = MainWindow.appData;
|
||||||
|
ObservableCollection<IconInfo> selectIcons = appData.AppConfig.SelectedMenuIcons;
|
||||||
|
appData.AppConfig.SelectedMenuIcons = null;
|
||||||
|
appData.AppConfig.SelectedMenuIcons = selectIcons;
|
||||||
|
}));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
System.Threading.Thread.Sleep(50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,9 @@
|
|||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<!--右侧栏样式动画-->
|
<!--右侧栏样式动画-->
|
||||||
<Style x:Key="ImageStyle" TargetType="Image">
|
<Style x:Key="ImageStyle" TargetType="Image">
|
||||||
<Setter Property="Width" Value="{Binding ImageWidth}"/>
|
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
|
||||||
<Setter Property="Height" Value="{Binding ImageHeight}"/>
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
||||||
<Setter Property="Source" Value="{Binding BitmapImage}"/>
|
<Setter Property="Source" Value="{Binding BitmapImage}"/>
|
||||||
<Setter Property="RenderOptions.BitmapScalingMode" Value="LowQuality" />
|
|
||||||
<Setter Property="RenderOptions.CachingHint" Value="Cache" />
|
|
||||||
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
<Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
@@ -60,9 +57,9 @@
|
|||||||
</ListBox.Background>
|
</ListBox.Background>
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<DraggAnimatedPanel:DraggAnimatedPanel ItemsHeight="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight}"
|
<DraggAnimatedPanel:DraggAnimatedPanel Background="#00FFFFFF"
|
||||||
ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth}"
|
ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
|
||||||
Background="#00FFFFFF"
|
ItemsHeight="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
@@ -82,14 +79,18 @@
|
|||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource MyListBoxItemStyle}">
|
<Style TargetType="ListBoxItem" BasedOn="{StaticResource MyListBoxItemStyle}">
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
||||||
|
<!--<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"/>-->
|
||||||
</Style>
|
</Style>
|
||||||
</ListBox.ItemContainerStyle>
|
</ListBox.ItemContainerStyle>
|
||||||
|
<!--Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
|
||||||
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"-->
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="{Binding}"
|
<hc:SimpleStackPanel Tag="{Binding}"
|
||||||
Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight}"
|
Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}"
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth}"
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
hc:Poptip.HitMode="None"
|
hc:Poptip.HitMode="None"
|
||||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
@@ -111,7 +112,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
||||||
Text="{Binding Name}"/>
|
Text="{Binding Name}"/>
|
||||||
</StackPanel>
|
</hc:SimpleStackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using GeekDesk.Constant;
|
|||||||
using GeekDesk.Control.Other;
|
using GeekDesk.Control.Other;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
|
using HandyControl.Controls;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -11,6 +12,7 @@ using System.Drawing.Imaging;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -263,46 +265,142 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
|
|
||||||
private void StackPanel_MouseEnter(object sender, MouseEventArgs e)
|
private void StackPanel_MouseEnter(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ImgStoryBoard(sender, (int)CommonEnum.IMAGE_HEIGHT_AM, (int)CommonEnum.IMAGE_WIDTH_AM, 1);
|
|
||||||
|
double width = appData.AppConfig.ImageWidth;
|
||||||
|
double height = appData.AppConfig.ImageHeight;
|
||||||
|
width += width * 0.15;
|
||||||
|
height += height * 0.15;
|
||||||
|
ImgStoryBoard(sender, (int)width, (int)height, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StackPanel_MouseLeave(object sender, MouseEventArgs e)
|
private void StackPanel_MouseLeave(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
ImgStoryBoard(sender, (int)CommonEnum.IMAGE_HEIGHT, (int)CommonEnum.IMAGE_WIDTH, 220);
|
ImgStoryBoard(sender, appData.AppConfig.ImageWidth, appData.AppConfig.ImageHeight, 220);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ImgStoryBoard(object sender, int height, int width, int milliseconds)
|
private void ImgStoryBoard(object sender, int height, int width, int milliseconds, bool checkRmStoryboard = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (appData.AppConfig.PMModel) return;
|
if (appData.AppConfig.PMModel) return;
|
||||||
|
|
||||||
StackPanel sp = sender as StackPanel;
|
Panel sp = sender as Panel;
|
||||||
|
|
||||||
|
DependencyObject dos = sp.Parent;
|
||||||
|
|
||||||
Image img = sp.Children[0] as Image;
|
Image img = sp.Children[0] as Image;
|
||||||
|
|
||||||
|
double afterHeight = img.Height;
|
||||||
|
double afterWidth = img.Width;
|
||||||
|
|
||||||
DoubleAnimation heightAnimation = new DoubleAnimation();
|
//动画定义
|
||||||
DoubleAnimation widthAnimation = new DoubleAnimation();
|
Storyboard myStoryboard = new Storyboard();
|
||||||
|
|
||||||
heightAnimation.From = img.Height;
|
|
||||||
widthAnimation.From = img.Width;
|
|
||||||
|
|
||||||
heightAnimation.To = height;
|
|
||||||
widthAnimation.To = width;
|
|
||||||
|
|
||||||
heightAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds));
|
DoubleAnimation heightAnimation = new DoubleAnimation
|
||||||
widthAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds));
|
{
|
||||||
|
From = afterHeight,
|
||||||
|
To = height,
|
||||||
|
Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds))
|
||||||
|
};
|
||||||
|
DoubleAnimation widthAnimation = new DoubleAnimation
|
||||||
|
{
|
||||||
|
From = afterWidth,
|
||||||
|
To = width,
|
||||||
|
Duration = new Duration(TimeSpan.FromMilliseconds(milliseconds))
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
Timeline.SetDesiredFrameRate(heightAnimation, 60);
|
Timeline.SetDesiredFrameRate(heightAnimation, 60);
|
||||||
Timeline.SetDesiredFrameRate(widthAnimation, 60);
|
Timeline.SetDesiredFrameRate(widthAnimation, 60);
|
||||||
|
|
||||||
img.BeginAnimation(HeightProperty, null);
|
Storyboard.SetTarget(widthAnimation, img);
|
||||||
img.BeginAnimation(WidthProperty, null);
|
Storyboard.SetTargetProperty(widthAnimation, new PropertyPath("Width"));
|
||||||
|
Storyboard.SetTarget(heightAnimation, img);
|
||||||
|
Storyboard.SetTargetProperty(heightAnimation, new PropertyPath("Height"));
|
||||||
|
|
||||||
img.BeginAnimation(HeightProperty, heightAnimation);
|
myStoryboard.Children.Add(heightAnimation);
|
||||||
|
myStoryboard.Children.Add(widthAnimation);
|
||||||
|
|
||||||
|
CheckRemoveStoryboard crs = new CheckRemoveStoryboard
|
||||||
|
{
|
||||||
|
sb = myStoryboard,
|
||||||
|
sp = sp,
|
||||||
|
heightAnimation = heightAnimation,
|
||||||
|
widthAnimation = widthAnimation,
|
||||||
|
img = img,
|
||||||
|
isMouseOver = !checkRmStoryboard
|
||||||
|
};
|
||||||
|
|
||||||
|
heightAnimation.Completed += (s, e) =>
|
||||||
|
{
|
||||||
|
if (checkRmStoryboard)
|
||||||
|
{
|
||||||
|
ThreadStart ts = new ThreadStart(crs.Remove);
|
||||||
|
System.Threading.Thread t = new System.Threading.Thread(ts);
|
||||||
|
t.Start();
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
img.BeginAnimation(WidthProperty, null);
|
||||||
|
img.BeginAnimation(HeightProperty, null);
|
||||||
|
}
|
||||||
|
};
|
||||||
img.BeginAnimation(WidthProperty, widthAnimation);
|
img.BeginAnimation(WidthProperty, widthAnimation);
|
||||||
|
img.BeginAnimation(HeightProperty, heightAnimation);
|
||||||
|
|
||||||
|
//myStoryboard.Completed += (s, e) =>
|
||||||
|
//{
|
||||||
|
// if (checkRmStoryboard || true)
|
||||||
|
// {
|
||||||
|
// ThreadStart ts = new ThreadStart(crs.Remove);
|
||||||
|
// System.Threading.Thread t = new System.Threading.Thread(ts);
|
||||||
|
// t.Start();
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// myStoryboard.Remove();
|
||||||
|
// }
|
||||||
|
//};
|
||||||
|
//myStoryboard.Begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
private class CheckRemoveStoryboard
|
||||||
|
{
|
||||||
|
public Storyboard sb;
|
||||||
|
public Panel sp;
|
||||||
|
public Image img;
|
||||||
|
public DoubleAnimation heightAnimation;
|
||||||
|
public DoubleAnimation widthAnimation;
|
||||||
|
public bool isMouseOver;
|
||||||
|
public void Remove()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (sp.IsMouseOver == isMouseOver)
|
||||||
|
{
|
||||||
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
||||||
|
{
|
||||||
|
img.BeginAnimation(WidthProperty, null);
|
||||||
|
img.BeginAnimation(HeightProperty, null);
|
||||||
|
//heightAnimation.FillBehavior = FillBehavior.Stop;
|
||||||
|
//widthAnimation.FillBehavior = FillBehavior.Stop;
|
||||||
|
}));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.Threading.Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveSB(Object sb)
|
||||||
|
{
|
||||||
|
Storyboard sb2 = sb as Storyboard;
|
||||||
|
System.Threading.Thread.Sleep(500);
|
||||||
|
sb2.Remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddUrlIcon(object sender, RoutedEventArgs e)
|
private void AddUrlIcon(object sender, RoutedEventArgs e)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
</hc:SideMenu>
|
</hc:SideMenu>
|
||||||
</hc:Card>
|
</hc:Card>
|
||||||
<hc:ScrollViewer Grid.Row="0" Grid.Column="1">
|
<hc:ScrollViewer Grid.Row="0" Grid.Column="1">
|
||||||
<hc:Card x:Name="RightCard" Height="448">
|
<hc:Card x:Name="RightCard" Height="480">
|
||||||
</hc:Card>
|
</hc:Card>
|
||||||
</hc:ScrollViewer>
|
</hc:ScrollViewer>
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||||
xmlns:local="clr-namespace:GeekDesk"
|
xmlns:local="clr-namespace:GeekDesk"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Height="670"
|
Height="700"
|
||||||
Width="450"
|
Width="450"
|
||||||
Title="TaskInfo"
|
Title="TaskInfo"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
Background="Transparent" ShowInTaskbar="False"
|
Background="Transparent" ShowInTaskbar="False"
|
||||||
>
|
>
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
|
<cvt:TodoTaskExecConvert x:Key="TodoTaskExecConvert"/>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Border CornerRadius="3" BorderThickness="2" BorderBrush="Black" Margin="0,0,0,313.323" MouseDown="DragMove">
|
<Border CornerRadius="3" BorderThickness="2" BorderBrush="Black" Margin="0,0,0,313.323" MouseDown="DragMove">
|
||||||
<Border.Background>
|
<Border.Background>
|
||||||
@@ -23,48 +24,72 @@
|
|||||||
</Border.Background>
|
</Border.Background>
|
||||||
<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="65"/>
|
<Setter Property="Width" Value="67"/>
|
||||||
<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="FontSize" Value="14"/>
|
<Setter Property="FontSize" Value="14"/>
|
||||||
</Style>
|
</Style>
|
||||||
</Border.Resources>
|
</Border.Resources>
|
||||||
<Grid Margin="0,0,0,8">
|
<Grid Margin="0,0,0,8">
|
||||||
<hc:SimplePanel Margin="20" HorizontalAlignment="Center">
|
<StackPanel Margin="20" HorizontalAlignment="Center">
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<WrapPanel>
|
<WrapPanel VerticalAlignment="Center">
|
||||||
<TextBlock Text="待办任务:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="待办任务:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red" />
|
<TextBlock Text="*" Foreground="Red" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox x:Name="Title" Width="290" FontSize="14" />
|
<TextBox x:Name="Title" Width="290" Text="{Binding Title, Mode=OneWay}" FontSize="14" />
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,48.997,0,-48.997">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<TextBlock Text="待办详情:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="待办详情:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="Msg" TextWrapping="Wrap"
|
<TextBox x:Name="Msg" TextWrapping="Wrap"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
Text="{Binding Msg, Mode=OneWay}"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
VerticalScrollBarVisibility="Visible"
|
VerticalScrollBarVisibility="Visible"
|
||||||
Height="100" MaxHeight="150" MinHeight="100" Width="290" MinWidth="290"
|
Height="100" MaxHeight="150" MinHeight="100" Width="290" MinWidth="290"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,167.622,0,-167.622">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<TextBlock Text="待办时间*:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="运行方式:" Style="{StaticResource LeftTB}"/>
|
||||||
<hc:DateTimePicker x:Name="ExeTime" ErrorStr="test" Width="200"/>
|
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="1" Background="{DynamicResource SecondaryRegionBrush}"
|
||||||
|
Style="{StaticResource RadioButtonIcon}" Content="指定时间"
|
||||||
|
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=1}"/>
|
||||||
|
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Background="{DynamicResource SecondaryRegionBrush}" Tag="2"
|
||||||
|
Style="{StaticResource RadioButtonIcon}" Content="CRON表达式"
|
||||||
|
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,228,0,-228">
|
<hc:UniformSpacingPanel x:Name="SetTimePanel" Visibility="Visible" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
|
<TextBlock Text="指定时间:" Style="{StaticResource LeftTB}"/>
|
||||||
|
<TextBlock Text="*" Foreground="Red" Margin="-10,0,0,0"/>
|
||||||
|
<hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!" Width="200" Margin="-5.2,0,0,0"/>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
<hc:UniformSpacingPanel x:Name="CronPanel" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
|
<WrapPanel VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="CRON:" Style="{StaticResource LeftTB}"/>
|
||||||
|
<TextBlock Text="*" Foreground="Red" />
|
||||||
|
</WrapPanel>
|
||||||
|
<TextBox x:Name="Cron" Width="290" Text="{Binding Cron, Mode=OneWay}" FontSize="14" />
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<TextBlock Text="完成时间:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="完成时间:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock x:Name="DoneTime" Width="200"/>
|
<TextBlock x:Name="DoneTime" Text="{Binding DoneTime, Mode=OneWay}" Width="200"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,273.333,0,-93.333" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
<Button Content="保存" Background="#5BC0DE"
|
<Button Content="保存" Background="#5BC0DE"
|
||||||
Foreground="White" Margin="320,6,-208,-10"
|
Foreground="White" Margin="320,6,-208,-10"
|
||||||
Click="Save_Button_Click"/>
|
Click="Save_Button_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</hc:SimplePanel>
|
</StackPanel>
|
||||||
<Button Panel.ZIndex="2" Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
<Button Panel.ZIndex="2" Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
||||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using GeekDesk.Util;
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
|
using Quartz;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -29,23 +31,28 @@ namespace GeekDesk.Control.Windows
|
|||||||
|
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
|
|
||||||
private ToDoInfo info;
|
//private ToDoInfo info;
|
||||||
|
|
||||||
private ToDoInfoWindow()
|
private ToDoInfoWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ExeTime.SelectedDateTime = DateTime.Now.AddMinutes(10);
|
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
|
ExeTime.SelectedDateTime = DateTime.Now.AddMinutes(10);
|
||||||
|
SetTimePanel.Visibility = Visibility.Visible;
|
||||||
|
this.DataContext = new ToDoInfo();
|
||||||
}
|
}
|
||||||
private ToDoInfoWindow(ToDoInfo info)
|
private ToDoInfoWindow(ToDoInfo info)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
Title.Text = info.Title;
|
this.DataContext = info;
|
||||||
Msg.Text = info.Msg;
|
SetTimePanel.Visibility = Visibility.Visible;
|
||||||
ExeTime.Text = info.ExeTime;
|
//Title.Text = info.Title;
|
||||||
DoneTime.Text = info.DoneTime;
|
//Msg.Text = info.Msg;
|
||||||
this.info = info;
|
//ExeTime.Text = info.ExeTime;
|
||||||
|
//DoneTime.Text = info.DoneTime;
|
||||||
|
//this.info = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -79,41 +86,70 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void Save_Button_Click(object sender, RoutedEventArgs e)
|
private void Save_Button_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
DateTime dt;
|
DateTime dt;
|
||||||
if (Title.Text.Trim() == "" || ExeTime.Text.Trim() == "")
|
string execTime;
|
||||||
|
TodoTaskExecType execType;
|
||||||
|
if (Title.Text.Trim() == "")
|
||||||
{
|
{
|
||||||
Growl.Warning("任务标题 和 待办时间不能为空!");
|
Growl.Warning("任务标题不能为空!");
|
||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
try
|
if (SetTimePanel.Visibility == Visibility.Visible)
|
||||||
{
|
{
|
||||||
dt = Convert.ToDateTime(ExeTime.Text);
|
execType = TodoTaskExecType.SET_TIME;
|
||||||
} catch (Exception)
|
if (ExeTime.Text.Trim() == "")
|
||||||
{
|
{
|
||||||
Growl.Warning("请输入正确的时间!");
|
Growl.Warning("执行时间不能为空!");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dt = Convert.ToDateTime(ExeTime.Text);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Growl.Warning("请输入正确的时间!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
execTime = ExeTime.Text;
|
||||||
|
} else {
|
||||||
|
execType = TodoTaskExecType.CRON;
|
||||||
|
if (Cron.Text.Trim() == "")
|
||||||
|
{
|
||||||
|
Growl.Warning("Cron表达式不能为空!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bool isValid = CronExpression.IsValidExpression(Cron.Text);
|
||||||
|
if (!isValid) throw new Exception();
|
||||||
|
} catch (Exception)
|
||||||
|
{
|
||||||
|
Growl.Warning("请输入正确的Cron表达式!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CronExpression exp = new CronExpression(Cron.Text);
|
||||||
|
DateTime dd = DateTime.Now;
|
||||||
|
DateTimeOffset ddo = DateTime.SpecifyKind(dd, DateTimeKind.Local);
|
||||||
|
ddo = (DateTimeOffset)exp.GetNextValidTimeAfter(ddo);
|
||||||
|
execTime = ddo.LocalDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (windowType == NEW_TODO)
|
dt = Convert.ToDateTime(execTime);
|
||||||
|
ToDoInfo info = new ToDoInfo
|
||||||
{
|
{
|
||||||
info = new ToDoInfo
|
Title = Title.Text,
|
||||||
{
|
Msg = Msg.Text,
|
||||||
Title = Title.Text,
|
ExeTime = execTime,
|
||||||
Msg = Msg.Text,
|
ExecType = execType,
|
||||||
ExeTime = ExeTime.Text
|
Cron = Cron.Text
|
||||||
};
|
};
|
||||||
appData.ToDoList.Add(info);
|
if (windowType != NEW_TODO)
|
||||||
} else
|
|
||||||
{
|
{
|
||||||
appData.HiToDoList.Remove(info);
|
appData.HiToDoList.Remove(this.DataContext as ToDoInfo);
|
||||||
info.Title = Title.Text;
|
|
||||||
info.Msg = Msg.Text;
|
|
||||||
info.ExeTime = ExeTime.Text;
|
|
||||||
info.DoneTime = null;
|
|
||||||
appData.ToDoList.Add(info);
|
|
||||||
}
|
}
|
||||||
|
appData.ToDoList.Add(info);
|
||||||
|
|
||||||
DateTime dtNow = DateTime.Now;
|
DateTime dtNow = DateTime.Now;
|
||||||
TimeSpan ts = dt.Subtract(dtNow);
|
TimeSpan ts = dt.Subtract(dtNow);
|
||||||
@@ -184,5 +220,21 @@ namespace GeekDesk.Control.Windows
|
|||||||
windowType = DETAIL_TODO;
|
windowType = DETAIL_TODO;
|
||||||
window2.Show();
|
window2.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExecType_Checked(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
TodoTaskExecType tag = (TodoTaskExecType)Convert.ToInt32((sender as RadioButton).Tag.ToString());
|
||||||
|
switch (tag)
|
||||||
|
{
|
||||||
|
case TodoTaskExecType.SET_TIME:
|
||||||
|
SetTimePanel.Visibility = Visibility.Visible;
|
||||||
|
CronPanel.Visibility = Visibility.Collapsed;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CronPanel.Visibility = Visibility.Visible;
|
||||||
|
SetTimePanel.Visibility = Visibility.Collapsed;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
29
Converts/TodoTaskExecConvert.cs
Normal file
29
Converts/TodoTaskExecConvert.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
|
||||||
|
{
|
||||||
|
public class TodoTaskExecConvert : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return (TodoTaskExecType)value == (TodoTaskExecType)int.Parse(parameter.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
bool isChecked = (bool)value;
|
||||||
|
if (!isChecked)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (TodoTaskExecType)int.Parse(parameter.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,16 +60,39 @@
|
|||||||
<Reference Include="HandyControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
|
<Reference Include="HandyControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\HandyControl.3.1.0\lib\net472\HandyControl.dll</HintPath>
|
<HintPath>packages\HandyControl.3.1.0\lib\net472\HandyControl.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Quartz, Version=3.3.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Quartz.3.3.3\lib\net472\Quartz.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Drawing.Common.6.0.0-preview.6.21352.12\lib\net461\System.Drawing.Common.dll</HintPath>
|
<HintPath>packages\System.Drawing.Common.6.0.0-preview.6.21352.12\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
@@ -99,6 +122,7 @@
|
|||||||
<Compile Include="Constant\CommonEnum.cs" />
|
<Compile Include="Constant\CommonEnum.cs" />
|
||||||
<Compile Include="Constant\IconStartType.cs" />
|
<Compile Include="Constant\IconStartType.cs" />
|
||||||
<Compile Include="Constant\SortType.cs" />
|
<Compile Include="Constant\SortType.cs" />
|
||||||
|
<Compile Include="Constant\TodoTaskExecType.cs" />
|
||||||
<Compile Include="Constant\UpdateType.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>
|
||||||
@@ -152,6 +176,7 @@
|
|||||||
<DependentUpon>UpdateWindow.xaml</DependentUpon>
|
<DependentUpon>UpdateWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Converts\DoubleToGridLength.cs" />
|
<Compile Include="Converts\DoubleToGridLength.cs" />
|
||||||
|
<Compile Include="Converts\TodoTaskExecConvert.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="Converts\UpdateTypeConvert.cs" />
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
//通过使用 "*",如下所示:
|
//通过使用 "*",如下所示:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.3")]
|
[assembly: AssemblyVersion("2.3.1.0")]
|
||||||
[assembly: AssemblyFileVersion("2.3")]
|
[assembly: AssemblyFileVersion("2.3.1.0")]
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title" : "<22>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>",
|
"title" : "<22>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>",
|
||||||
"subTitle" : "V2.3 <20><>ʽ<EFBFBD><CABD>",
|
"subTitle" : "V2.3.10 <20><>ʽ<EFBFBD><CABD>",
|
||||||
"msgTitle" : "<22><><EFBFBD>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
"msgTitle" : "<22><><EFBFBD>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
|
||||||
"msg" : "['<27><>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD>ڵ<EFBFBD><EFBFBD>뵭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>(Ĭ<><C4AC>Ctrl+Shift+Q)','<27>Ҽ<EFBFBD><D2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><F2BFAAB3><EFBFBD>Ŀ¼<C4BF>˵<EFBFBD>']",
|
"msg" : "['<27><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؿ<EFBFBD><D8BF>ٵ<EFBFBD><D9B5><EFBFBD><EFBFBD><EFBFBD>','<27><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BUG','<27><><EFBFBD>Ӷ<EFBFBD>ʱ<EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ڿ<EFBFBD>ռ<EFBFBD>ø<EFBFBD>С<EFBFBD><D0A1><EFBFBD>ڴ<EFBFBD>','<27><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ㴰<DAB5>ڵ<EFBFBD>BUG','<27><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>С','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>CRON<4F><4E><EFBFBD><EFBFBD>ʽ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>']",
|
||||||
"githubUrl" : "https://github.com/Demo-Liu/GeekDesk/releases/tag",
|
"githubUrl" : "https://github.com/Demo-Liu/GeekDesk/releases/tag",
|
||||||
"giteeUrl" : "https://gitee.com/demo_liu/GeekDesk/releases",
|
"giteeUrl" : "https://gitee.com/demo_liu/GeekDesk/releases",
|
||||||
"version": "2.3"
|
"version": "2.3.10"
|
||||||
}
|
}
|
||||||
@@ -61,13 +61,89 @@ namespace GeekDesk.ViewModel
|
|||||||
private string textColor = "#000000"; //字体颜色
|
private string textColor = "#000000"; //字体颜色
|
||||||
private double imgPanelWidth = (double)CommonEnum.IMAGE_PANEL_WIDTH;
|
private double imgPanelWidth = (double)CommonEnum.IMAGE_PANEL_WIDTH;
|
||||||
private double imgPanelHeight = (double)CommonEnum.IMAGE_PANEL_HEIGHT;
|
private double imgPanelHeight = (double)CommonEnum.IMAGE_PANEL_HEIGHT;
|
||||||
|
|
||||||
private bool marginHide = false; //贴边隐藏
|
private bool marginHide = false; //贴边隐藏
|
||||||
|
|
||||||
private bool appAnimation = false; //主窗口动画效果
|
private bool appAnimation = false; //主窗口动画效果
|
||||||
|
private int imageWidth = (int)CommonEnum.IMAGE_WIDTH; //图片宽度
|
||||||
|
private int imageHeight = (int)CommonEnum.IMAGE_HEIGHT; //图片高度
|
||||||
|
|
||||||
#region GetSet
|
#region GetSet
|
||||||
|
public int ImageWidth
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
// 为了兼容旧版 暂时使用默认
|
||||||
|
if (imageWidth == 0)
|
||||||
|
{
|
||||||
|
return (int)CommonEnum.IMAGE_WIDTH;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return imageWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
imageWidth = value;
|
||||||
|
//同时设置高度
|
||||||
|
ImageHeight = value;
|
||||||
|
|
||||||
|
|
||||||
|
//计算 容器宽度因子
|
||||||
|
double i = ((double)imageWidth - (double)CommonEnum.IMAGE_WIDTH) / 5d;
|
||||||
|
double s = 2.44;
|
||||||
|
i *= 2d;
|
||||||
|
while (i > 1)
|
||||||
|
{
|
||||||
|
i /= 10d;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i > 0d)
|
||||||
|
{
|
||||||
|
s -= i;
|
||||||
|
}
|
||||||
|
//设置容器宽度
|
||||||
|
ImgPanelWidth = (int)(ImageWidth * s);
|
||||||
|
|
||||||
|
OnPropertyChanged("ImageWidth");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ImageHeight
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
//都使用宽度来确定大小
|
||||||
|
// 为了兼容旧版 暂时使用默认
|
||||||
|
if (imageHeight == 0)
|
||||||
|
{
|
||||||
|
return (int)CommonEnum.IMAGE_HEIGHT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return imageHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
imageHeight = value;
|
||||||
|
|
||||||
|
//计算容器高度因子
|
||||||
|
double i = ((double)imageHeight - (double)CommonEnum.IMAGE_HEIGHT) / 5d;
|
||||||
|
while (i > 1)
|
||||||
|
{
|
||||||
|
i /= 10d;
|
||||||
|
}
|
||||||
|
double s = 2.00;
|
||||||
|
if (i > 0d)
|
||||||
|
{
|
||||||
|
s -= i;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置容器高度
|
||||||
|
ImgPanelHeight = ImageHeight * s;
|
||||||
|
OnPropertyChanged("ImageHeight");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool AppAnimation
|
public bool AppAnimation
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ 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)CommonEnum.IMAGE_WIDTH; //图片宽度
|
|
||||||
private int imageHeight = (int)CommonEnum.IMAGE_HEIGHT; //图片高度
|
|
||||||
private bool adminStartUp = false; //始终管理员方式启动 默认否
|
private bool adminStartUp = false; //始终管理员方式启动 默认否
|
||||||
private byte[] defaultImage; //默认图标
|
private byte[] defaultImage; //默认图标
|
||||||
|
|
||||||
@@ -152,33 +150,7 @@ namespace GeekDesk.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ImageWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
// 为了兼容旧版 暂时使用默认
|
|
||||||
return (int)CommonEnum.IMAGE_WIDTH;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
imageWidth = value;
|
|
||||||
OnPropertyChanged("ImageWidth");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int ImageHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
// 为了兼容旧版 暂时使用默认
|
|
||||||
return (int)CommonEnum.IMAGE_HEIGHT;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
imageHeight = value;
|
|
||||||
OnPropertyChanged("ImageHeight");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using GeekDesk.Util;
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Util;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -17,8 +18,38 @@ namespace GeekDesk.ViewModel
|
|||||||
private string msg; //事项详情
|
private string msg; //事项详情
|
||||||
private string exeTime; //待办时间
|
private string exeTime; //待办时间
|
||||||
private string doneTime; //完成时间
|
private string doneTime; //完成时间
|
||||||
|
private TodoTaskExecType execType = TodoTaskExecType.SET_TIME;
|
||||||
|
private string cron; //cron表达式
|
||||||
//private int status; //状态 0 未处理 1 已处理
|
//private int status; //状态 0 未处理 1 已处理
|
||||||
|
|
||||||
|
public string Cron
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return cron;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
cron = value;
|
||||||
|
OnPropertyChanged("Cron");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public TodoTaskExecType ExecType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
//兼容老版本 需要给个默认值
|
||||||
|
if (execType == 0) return TodoTaskExecType.SET_TIME;
|
||||||
|
return execType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
execType = value;
|
||||||
|
OnPropertyChanged("ExecType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string DoneTime
|
public string DoneTime
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="CommonServiceLocator" version="2.0.6" targetFramework="net452" requireReinstallation="true" />
|
<package id="CommonServiceLocator" version="2.0.6" targetFramework="net452" requireReinstallation="true" />
|
||||||
<package id="HandyControl" version="3.1.0" targetFramework="net472" />
|
<package id="HandyControl" version="3.1.0" targetFramework="net472" />
|
||||||
|
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||||
|
<package id="Quartz" version="3.3.3" targetFramework="net472" />
|
||||||
|
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||||
|
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" />
|
||||||
<package id="System.Drawing.Common" version="6.0.0-preview.6.21352.12" targetFramework="net472" />
|
<package id="System.Drawing.Common" version="6.0.0-preview.6.21352.12" targetFramework="net472" />
|
||||||
|
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
||||||
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||||
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user