5 Commits

Author SHA1 Message Date
liufei
240008ce2c :bug:修改提示 2022-06-15 17:40:43 +08:00
liufei
8f043ffd05 ♻️ 优化贴边隐藏的动画时间 2022-06-14 11:49:46 +08:00
liufei
6e58afcdea ♻️ 优化动画及部分样式 2022-06-14 10:37:24 +08:00
liufei
896dc26f11 🐛 修复路径可能为空导致创建相对路径报错的问题 2022-06-14 09:48:13 +08:00
liufei
d44cc90100 💥 2.5.10 2022-06-13 20:59:31 +08:00
15 changed files with 98 additions and 127 deletions

View File

@@ -54,12 +54,12 @@
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<appSettings> <appSettings>
<add key="Version" value="2.4.17" /> <add key="Version" value="2.5.10" />
<add key="GitHubUrl" value="https://github.com/BookerLiu/GeekDesk" /> <add key="GitHubUrl" value="https://github.com/BookerLiu/GeekDesk" />
<add key="GiteeUrl" value="https://gitee.com/BookerLiu/GeekDesk/tree/master" /> <add key="GiteeUrl" value="https://gitee.com/BookerLiu/GeekDesk/tree/master" />
<add key="GitHubUpdateUrl" value="https://raw.githubusercontent.com/BookerLiu/GeekDesk/master/Update.json" /> <add key="GitHubUpdateUrl" value="https://raw.githubusercontent.com/BookerLiu/GeekDesk/master/Update.json" />
<add key="GiteeUpdateUrl" value="https://gitee.com/BookerLiu/GeekDesk/raw/master/Update.json" /> <add key="GiteeUpdateUrl" value="https://gitee.com/BookerLiu/GeekDesk/raw/master/Update.json" />
<!--<add key="GiteeUpdateUrl" value="file:///C:/Users/Fei/Desktop/GeekDesk/Update.json" />--> <!--<add key="GiteeUpdateUrl" value="file:///D:/WorkSpace/workspace-VS/GeekDesk/Update.json" />-->
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law" /> <add key="CustomIconTeachUrl" value="https://mp.weixin.qq.com/s/LxoHAekho9HBVl4FRw_Law" />
</appSettings> </appSettings>

View File

@@ -4,6 +4,7 @@
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:cvt="clr-namespace:GeekDesk.Converts"
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
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"
@@ -16,7 +17,11 @@
<Grid MouseDown="DragMove"> <Grid MouseDown="DragMove">
<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"
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndContract}, Delay=250}"
/>
<TextBlock x:Name="AppInfo" TextAlignment="Center" Text="Copyright © 2021 GeekDesk V"/> <TextBlock x:Name="AppInfo" TextAlignment="Center" Text="Copyright © 2021 GeekDesk V"/>
<hc:UniformSpacingPanel Spacing="5" HorizontalAlignment="Center" Margin="10,10,0,0" VerticalAlignment="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"/>

View File

@@ -84,15 +84,7 @@
</CheckBox> </CheckBox>
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
<CheckBox Content="主窗口动画效果" IsChecked="{Binding AppAnimation}" Click="Animation_Checked">
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4"> <hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
<TextBlock Text="面板关闭方式" VerticalAlignment="Center"/> <TextBlock Text="面板关闭方式" VerticalAlignment="Center"/>

View File

@@ -306,14 +306,6 @@ namespace GeekDesk.Control.UserControls.Config
} }
} }
private void Animation_Checked(object sender, RoutedEventArgs e)
{
if (MainWindow.mainWindow.Visibility == Visibility.Collapsed)
{
appConfig.IsShow = true;
}
appConfig.IsShow = null;
}
/// <summary> /// <summary>

View File

@@ -111,6 +111,24 @@
<hc:Divider LineStrokeDashArray="3,3" Margin="0,0,0,0" Height="20" LineStroke="Black" Grid.ColumnSpan="1"/> <hc:Divider LineStrokeDashArray="3,3" Margin="0,0,0,0" Height="20" LineStroke="Black" Grid.ColumnSpan="1"/>
<hc:UniformSpacingPanel Spacing="10" Margin="5,-10,0,0" Grid.ColumnSpan="4"> <hc:UniformSpacingPanel Spacing="10" Margin="5,-10,0,0" Grid.ColumnSpan="4">
<CheckBox Content="主窗口动画" IsChecked="{Binding AppAnimation}" Click="Animation_Checked">
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="5,10,0,0" Grid.ColumnSpan="4">
<CheckBox Content="列表展开动画" IsChecked="{Binding ItemSpradeAnimation}">
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
</hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="5,10,0,0" Grid.ColumnSpan="4">
<CheckBox x:Name="BarIcon" Content="显示托盘图标" IsChecked="{Binding ShowBarIcon}"> <CheckBox x:Name="BarIcon" Content="显示托盘图标" IsChecked="{Binding ShowBarIcon}">
<CheckBox.Background> <CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0"> <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
@@ -120,7 +138,7 @@
</CheckBox> </CheckBox>
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
<hc:UniformSpacingPanel Spacing="10" Margin="5,5,0,0" Grid.ColumnSpan="4"> <hc:UniformSpacingPanel Spacing="10" Margin="5,10,0,0" Grid.ColumnSpan="4">
<CheckBox Content="显示主面板Logo" IsChecked="{Binding TitleLogoVisible, Mode=TwoWay, Converter={StaticResource Visibility2BooleanConverter}}"> <CheckBox Content="显示主面板Logo" IsChecked="{Binding TitleLogoVisible, Mode=TwoWay, Converter={StaticResource Visibility2BooleanConverter}}">
<CheckBox.Background> <CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0"> <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">

View File

@@ -157,5 +157,16 @@ namespace GeekDesk.Control.UserControls.Config
GradientBGDialog gbg = new GradientBGDialog(); GradientBGDialog gbg = new GradientBGDialog();
gbg.dialog = HandyControl.Controls.Dialog.Show(gbg, "ConfigWindowDialog"); gbg.dialog = HandyControl.Controls.Dialog.Show(gbg, "ConfigWindowDialog");
} }
private void Animation_Checked(object sender, RoutedEventArgs e)
{
if (MainWindow.mainWindow.Visibility == Visibility.Collapsed)
{
appConfig.IsShow = true;
}
appConfig.IsShow = null;
}
} }
} }

View File

@@ -311,7 +311,11 @@ namespace GeekDesk.Control.UserControls.PannelCard
{ {
if (RunTimeStatus.IS_MENU_EDIT) return; if (RunTimeStatus.IS_MENU_EDIT) return;
if (appData.AppConfig.ItemSpradeAnimation)
{
//是否启用列表展开动画
MainWindow.mainWindow.RightCard.WrapUFG.Visibility = Visibility.Collapsed; MainWindow.mainWindow.RightCard.WrapUFG.Visibility = Visibility.Collapsed;
}
//设置对应菜单的图标列表 //设置对应菜单的图标列表
if (MenuListBox.SelectedIndex == -1) if (MenuListBox.SelectedIndex == -1)

View File

@@ -112,7 +112,7 @@
</hc:Card.ContextMenu> </hc:Card.ContextMenu>
<hc:DialogContainer> <hc:DialogContainer>
<Grid> <Grid>
<ot:PasswordDialog xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}" <ot:PasswordDialog xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility, Duration=50, Delay=0}"
x:Name="PDDialog" x:Name="PDDialog"
Panel.ZIndex="99" Panel.ZIndex="99"
IsVisibleChanged="PDDialog_IsVisibleChanged" IsVisibleChanged="PDDialog_IsVisibleChanged"

View File

@@ -110,7 +110,7 @@
</hc:SideMenu> </hc:SideMenu>
</hc:Card> </hc:Card>
<hc:ScrollViewer Grid.Row="0" Grid.Column="1" BorderThickness="0" Margin="0,5,1,5"> <hc:ScrollViewer Grid.Row="0" Grid.Column="1" BorderThickness="0" Margin="0,5,1,5">
<UniformGrid x:Name="UFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndSlideFromLeft}, Event=Visibility}"> <UniformGrid x:Name="UFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, Event=Visibility, Delay=0}">
<!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">--> <!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
<hc:Card x:Name="RightCard" BorderThickness="0" MouseDown="DragMove"> <hc:Card x:Name="RightCard" BorderThickness="0" MouseDown="DragMove">
<hc:Card.Background> <hc:Card.Background>

View File

@@ -49,7 +49,7 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -57,6 +57,8 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject>GeekDesk.App</StartupObject> <StartupObject>GeekDesk.App</StartupObject>

View File

@@ -49,5 +49,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.1.7")] [assembly: AssemblyVersion("2.5.1.0")]
[assembly: AssemblyFileVersion("2.4.1.7")] [assembly: AssemblyFileVersion("2.5.1.0")]

View File

@@ -1,9 +1,9 @@
{ {
"title": "GeekDesk版本更新", "title": "GeekDesk版本更新",
"subTitle": "V2.4.16", "subTitle": "V2.5.10",
"msgTitle": "本次更新内容如下", "msgTitle": "本次更新内容如下",
"msg": "['兄弟萌求Star, 求Star, 由于功能越来越多, 之后的更新我会测试一周再发布, 尽量做到没有BUG, 见谅', '这个版本没有功能性改变, 主要是为了修复上个版本的bug', '修复无法修改菜单名称的问题', '修复通过任务栏图标打开拾色器, 图标菜单消失问题']", "msg": "['依旧耗费了我大量精力开发,希望大家去给我点个免费的Star', '这个版本有一些优化点, 大家可以自行探索, 另外征集新Logo的设计, 要求美观并能体现\\'极客\\'风格','本次重新打包了程序文件(文件目录更清爽了,注意,这次不要使用覆盖升级), 可以将旧版本根目录下的Data文件复制到新版本根目录, 然后使用新版本启动','增加可拖动图标到其它菜单的功能,取消了拖动时的动画','增加了列表展开动画的开关','增加了数据备份功能','优化大部分动画','优化搜索功能(达到了可只用键盘或只用鼠标启动所需目标)','增加了相对路径(实验性,可能有bug)','增加列表加密功能(实验性,可能有bug)','其它已知问题修复']",
"githubUrl": "https://github.com/BookerLiu/GeekDesk/releases", "githubUrl": "https://github.com/BookerLiu/GeekDesk/releases",
"giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases", "giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases",
"version": "2.4.16" "version": "2.5.10"
} }

View File

@@ -159,21 +159,7 @@ namespace GeekDesk.Util
public static string MakeRelativePath(string fromPath, string toPath) public static string MakeRelativePath(string fromPath, string toPath)
{ {
//if (string.IsNullOrEmpty(fromPath)) throw new ArgumentNullException("fromPath"); if (string.IsNullOrEmpty(toPath) || string.IsNullOrEmpty(fromPath)) return null;
//if (string.IsNullOrEmpty(toPath)) throw new ArgumentNullException("toPath");
//Uri fromUri = new Uri(fromPath);
//Uri toUri = new Uri(toPath);
//if (fromUri.Scheme != toUri.Scheme) { return toPath; } // path can't be made relative.
//Uri relativeUri = fromUri.MakeRelativeUri(toUri);
//string relativePath = Uri.UnescapeDataString(relativeUri.ToString());
//if (toUri.Scheme.Equals("file", StringComparison.InvariantCultureIgnoreCase))
//{
// relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
//}
Uri file = new Uri(@toPath); Uri file = new Uri(@toPath);
// Must end in a slash to indicate folder // Must end in a slash to indicate folder
Uri folder = new Uri(@fromPath); Uri folder = new Uri(@fromPath);

View File

@@ -25,8 +25,8 @@ namespace GeekDesk.Util
{ {
private static Window window;//定义使用该方法的窗体 private static Window window;//定义使用该方法的窗体
private static readonly int hideTime = 50; private static readonly int hideTime = 65;
private static readonly int showTime = 30; private static readonly int showTime = 15;
private static int animalTime; private static int animalTime;
@@ -127,7 +127,7 @@ namespace GeekDesk.Util
else if (mouseX >= windowLeft && mouseX <= windowLeft + windowWidth else if (mouseX >= windowLeft && mouseX <= windowLeft + windowWidth
&& mouseY >= windowTop && mouseY <= windowTop + windowHeight && IS_HIDE && window.Visibility != Visibility.Visible) && mouseY >= windowTop && mouseY <= windowTop + windowHeight && IS_HIDE && window.Visibility != Visibility.Visible)
{ {
window.Visibility = Visibility.Visible; window.Show();
//上方显示 //上方显示
if (windowTop <= screenTop - showMarginWidth) if (windowTop <= screenTop - showMarginWidth)
{ {
@@ -227,17 +227,30 @@ namespace GeekDesk.Util
{ {
App.Current.Dispatcher.Invoke(() => App.Current.Dispatcher.Invoke(() =>
{ {
double abs = Math.Abs(Math.Abs(to) - Math.Abs(from));
double subLen = abs / hideTime;
if ((int)hideType <= 3) switch (hideType)
{
case HideType.LEFT_SHOW:
to -= 20;
break;
case HideType.RIGHT_SHOW:
to += 20;
break;
case HideType.TOP_SHOW:
to -= 20;
break;
}
double abs = Math.Abs(Math.Abs(to) - Math.Abs(from));
if (hideType <= HideType.RIGHT_SHOW)
{ {
animalTime = showTime; animalTime = showTime;
} else } else
{ {
animalTime = hideTime; animalTime = hideTime;
} }
double subLen = abs / animalTime;
int count = 0; int count = 0;
while (count < animalTime) while (count < animalTime)
{ {
@@ -268,86 +281,20 @@ namespace GeekDesk.Util
switch (hideType) switch (hideType)
{ {
case HideType.LEFT_HIDE:
window.Left = to;
break;
case HideType.LEFT_SHOW:
window.Left = to - 20;
break;
case HideType.RIGHT_HIDE:
window.Left = to;
break;
case HideType.RIGHT_SHOW:
window.Left = to + 20;
break;
case HideType.TOP_HIDE: case HideType.TOP_HIDE:
window.Top = to; window.Top = to;
break; break;
case HideType.TOP_SHOW: case HideType.TOP_SHOW:
window.Top = to - 20; window.Top = to;
break;
default:
window.Left = to;
break; break;
} }
if (hideType > HideType.RIGHT_SHOW) if (hideType > HideType.RIGHT_SHOW)
{ {
window.Visibility = Visibility.Collapsed; window.Visibility = Visibility.Collapsed;
} }
//double toTemp = to;
//double leftT = 0;
//double topT = 0;
//switch (hideType)
//{
// case HideType.LEFT_HIDE:
// to += leftT;
// break;
// case HideType.LEFT_SHOW:
// to -= leftT;
// break;
// case HideType.RIGHT_HIDE:
// to -= leftT;
// break;
// case HideType.RIGHT_SHOW:
// to += leftT;
// break;
// case HideType.TOP_HIDE:
// to += topT;
// break;
// case HideType.TOP_SHOW:
// to -= topT;
// break;
//}
//DoubleAnimation da = new DoubleAnimation
//{
// From = from,
// To = to,
// Duration = new Duration(TimeSpan.FromMilliseconds(hideTime))
//};
//// 如果是显示 则贴屏幕侧不显示阴影
//bool isShow = false;
//int shadowWidthTemp = Constants.SHADOW_WIDTH;
//if (hideType <= HideType.RIGHT_SHOW)
//{
// isShow = true;
// if (hideType == HideType.RIGHT_SHOW)
// {
// shadowWidthTemp = -shadowWidthTemp;
// }
//}
//da.Completed += (s, e) =>
//{
// if ("Top".Equals(property.Name))
// {
// window.Top = isShow ? toTemp - shadowWidthTemp : toTemp;
// }
// else
// {
// window.Left = isShow ? toTemp - shadowWidthTemp : toTemp;
// }
// window.BeginAnimation(property, null);
//};
//Timeline.SetDesiredFrameRate(da, 60);
//window.BeginAnimation(property, da);
}); });
}).Start(); }).Start();

View File

@@ -101,8 +101,22 @@ namespace GeekDesk.ViewModel
private bool? isShow; private bool? isShow;
private bool itemSpradeAnimation; //列表展开动画
#region GetSet #region GetSet
public bool ItemSpradeAnimation
{
get
{
return itemSpradeAnimation;
}
set
{
itemSpradeAnimation = value;
OnPropertyChanged("ItemSpradeAnimation");
}
}
public bool? IsShow public bool? IsShow
{ {
get get