9 Commits

Author SHA1 Message Date
BookerLiu
4f65c303a0 🐛 2.5.12 2022-08-29 16:47:33 +08:00
BookerLiu
6ae4312bdf 修改文字 2022-08-02 17:47:03 +08:00
BookerLiu
001270e4ad ♻️ 优化滚动条动画 :boom:增加触底切换菜单 2022-08-02 17:28:09 +08:00
BookerLiu
aa2ca80822 🐛 修复缩放屏幕截图bug 2022-07-27 17:14:57 +08:00
BookerLiu
43314a3006 🐛 修复缩放屏幕截图bug 2022-07-27 17:13:45 +08:00
BookerLiu
a682f27223 Merge branch 'master' of https://github.com/BookerLiu/GeekDesk into 2.5.12 2022-07-27 17:06:21 +08:00
BookerLiu
a50d88f2c2 🐛 1修复程序崩溃, :boom:2添加时钟显秒 2022-07-25 17:57:57 +08:00
BookerLiu
6f62e6b2a0 Merge remote-tracking branch 'origin/master' into 2.5.12 2022-07-20 17:25:57 +08:00
BookerLiu
bf4111cc81 Merge remote-tracking branch 'origin/master' into 2.5.12 2022-07-20 17:22:07 +08:00
29 changed files with 576 additions and 639 deletions

View File

@@ -10,7 +10,7 @@
<add key="Version" value="1.0.01" /> <add key="Version" value="1.0.01" />
<add key="LProportion" value="0.82" /> <add key="LProportion" value="0.82" />
<add key="TProportion" value="0.03" /> <add key="TProportion" value="0.03" />
<add key="DelayTime" value="1500" /> <add key="DelayTime" value="800" />
</ShowSecondsSettings> </ShowSecondsSettings>
<SystemIcons> <SystemIcons>
<add key="Calculator" value="计算器" /> <add key="Calculator" value="计算器" />
@@ -28,59 +28,59 @@
<SystemBGs> <SystemBGs>
<GradientBGParam Color1="#FCCF31" Color2="#F55555" Name="诸神黄昏" /> <GradientBGParam Color1="#FCCF31" Color2="#F55555" Name="诸神黄昏" />
</SystemBGs> </SystemBGs>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" /> <probing privatePath="lib" />
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" /> <assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.6.0" newVersion="2.0.6.0" /> <bindingRedirect oldVersion="0.0.0.0-2.0.6.0" newVersion="2.0.6.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" /> <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" /> <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<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> <dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" /> <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" /> <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" /> <bindingRedirect oldVersion="0.0.0.0-2.1.1.0" newVersion="2.1.1.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<appSettings> <appSettings>
<add key="Version" value="2.5.13" /> <add key="Version" value="2.5.12" />
<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:///D:/WorkSpace/workspace-VS/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" />
<add key="ShowPublicWeChat" value="Y" /> <add key="ShowPublicWeChat" value="Y" />
</appSettings> </appSettings>
<system.web> <system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider"> <membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers> <providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers> </providers>
</membership> </membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> <roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers> <providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers> </providers>
</roleManager> </roleManager>
</system.web> </system.web>
</configuration> </configuration>

View File

@@ -47,7 +47,7 @@ namespace GeekDesk.Control.UserControls.Config
if (!CheckIsEnable(hkType)) return; if (!CheckIsEnable(hkType)) return;
if (prevKeyTemp == Key.None || prevKeyTemp != downKey) if (prevKeyTemp == Key.None || prevKeyTemp != downKey)
{ {
if (hotkeyFinished) if (hotkeyFinished)
@@ -342,8 +342,7 @@ namespace GeekDesk.Control.UserControls.Config
if (true == appConfig.EnableAppHotKey) if (true == appConfig.EnableAppHotKey)
{ {
MainWindow.RegisterHotKey(false); MainWindow.RegisterHotKey(false);
} } else
else
{ {
if (MainWindow.hotKeyId != -1) if (MainWindow.hotKeyId != -1)
{ {

View File

@@ -107,7 +107,7 @@
Foreground="Black" Foreground="Black"
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/> IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/>
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
<TextBlock Text="其它" Margin="0,25,0,0"/> <TextBlock Text="其它" Margin="0,25,0,0"/>
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0"> <hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
<Button Content="备份数据" <Button Content="备份数据"

View File

@@ -121,16 +121,21 @@ namespace GeekDesk.Control.UserControls.Config
private void ShowSeconds_Click(object sender, RoutedEventArgs e) private void ShowSeconds_Click(object sender, RoutedEventArgs e)
{ {
if (MainWindow.appData.AppConfig.SecondsWindow == true) //if (MainWindow.appData.AppConfig.SecondsWindow == true)
{ //{
//StartSecondsWindow(); // //StartSecondsWindow();
SecondsWindow.ShowWindow(); // //SecondsWindow.ShowWindow();
} // MouseHookThread.Dispose();
else // MouseHookThread.Hook();
{ //}
SecondsWindow.CloseWindow(); //else
//StopSecondsWindow(); //{
} // MouseHookThread.Dispose();
// MouseHookThread.Hook();
//}
MouseHookThread.Dispose();
MouseHookThread.Hook();
} }
public static void StopSecondsWindow() public static void StopSecondsWindow()

View File

@@ -170,9 +170,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
lbi.MouseLeave -= Lbi_MouseLeave; lbi.MouseLeave -= Lbi_MouseLeave;
lbi.Background = bac; lbi.Background = bac;
lbi.Foreground = fontColor; lbi.Foreground = fontColor;
} } catch { }
catch { }
} }
private void Lbi_MouseLeave(object sender, MouseEventArgs e) private void Lbi_MouseLeave(object sender, MouseEventArgs e)
@@ -334,7 +333,6 @@ namespace GeekDesk.Control.UserControls.PannelCard
appData.AppConfig.SelectedMenuIcons = null; appData.AppConfig.SelectedMenuIcons = null;
RunTimeStatus.SHOW_MENU_PASSWORDBOX = true; RunTimeStatus.SHOW_MENU_PASSWORDBOX = true;
MainWindow.mainWindow.RightCard.PDDialog.Title.Text = "输入密码"; MainWindow.mainWindow.RightCard.PDDialog.Title.Text = "输入密码";
MainWindow.mainWindow.RightCard.PDDialog.type = PasswordType.INPUT;
MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible; MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible;
} }
else else
@@ -445,8 +443,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
} }
MenuListBox.SelectedIndex = index; MenuListBox.SelectedIndex = index;
} }
} } else if (e.Delta > 0)
else if (e.Delta > 0)
{ {
if (ScrollUtil.IsTopScrollView(scrollViewer)) if (ScrollUtil.IsTopScrollView(scrollViewer))
{ {
@@ -510,15 +507,14 @@ namespace GeekDesk.Control.UserControls.PannelCard
MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible; MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible;
//单独设置焦点 //单独设置焦点
MainWindow.mainWindow.RightCard.PDDialog.SetFocus(); MainWindow.mainWindow.RightCard.PDDialog.SetFocus();
} } else
else
{ {
if (string.IsNullOrEmpty(appData.AppConfig.MenuPassword)) if (string.IsNullOrEmpty(appData.AppConfig.MenuPassword))
{ {
MainWindow.mainWindow.RightCard.PDDialog.menuInfo = menuInfo; MainWindow.mainWindow.RightCard.PDDialog.menuInfo = menuInfo;
MainWindow.mainWindow.RightCard.PDDialog.Title.Text = "设置新密码"; MainWindow.mainWindow.RightCard.PDDialog.Title.Text = "设置新密码";
MainWindow.mainWindow.RightCard.PDDialog.type = PasswordType.CREATE; MainWindow.mainWindow.RightCard.PDDialog.type = PasswordType.CREATE;
RunTimeStatus.SHOW_MENU_PASSWORDBOX = true; RunTimeStatus.SHOW_MENU_PASSWORDBOX = true;
MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible; MainWindow.mainWindow.RightCard.PDDialog.Visibility = Visibility.Visible;
} }
else else
@@ -556,8 +552,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
if (string.IsNullOrEmpty(appData.AppConfig.MenuPassword)) if (string.IsNullOrEmpty(appData.AppConfig.MenuPassword))
{ {
AlterPW1.Visibility = Visibility.Collapsed; AlterPW1.Visibility = Visibility.Collapsed;
} } else
else
{ {
AlterPW1.Visibility = Visibility.Visible; AlterPW1.Visibility = Visibility.Visible;
} }
@@ -568,7 +563,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
ListBoxItem lbi = sender as ListBoxItem; ListBoxItem lbi = sender as ListBoxItem;
MenuInfo info = lbi.DataContext as MenuInfo; MenuInfo info = lbi.DataContext as MenuInfo;
ItemCollection ics = lbi.ContextMenu.Items; ItemCollection ics = lbi.ContextMenu.Items;
foreach (object obj in ics) foreach (object obj in ics)
{ {
@@ -590,8 +585,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
if (info.IsEncrypt) if (info.IsEncrypt)
{ {
mi.Header = "取消加密此列表"; mi.Header = "取消加密此列表";
} } else
else
{ {
mi.Header = "加密此列表"; mi.Header = "加密此列表";
} }

View File

@@ -119,7 +119,7 @@
</Border> </Border>
</Grid> </Grid>
</Popup> </Popup>
<hc:Card AllowDrop="True" <hc:Card AllowDrop="True"
x:Name="WrapCard" x:Name="WrapCard"
Visibility="Visible" Visibility="Visible"
@@ -152,23 +152,22 @@
IsVisibleChanged="PDDialog_IsVisibleChanged" IsVisibleChanged="PDDialog_IsVisibleChanged"
Margin="0,-100,0,0"/> Margin="0,-100,0,0"/>
<StackPanel Panel.ZIndex="1" Margin="0,-10,-0,0"/> <StackPanel Panel.ZIndex="1" Margin="0,-10,-0,0"/>
<WrapPanel Orientation="Horizontal" <WrapPanel Orientation="Horizontal"
Margin="10"
VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsContainerVirtualizable="True" VirtualizingPanel.IsContainerVirtualizable="True"
> >
<UniformGrid x:Name="WrapUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}"> <UniformGrid x:Name="WrapUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}">
<!--<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition3}">--> <!--<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition3}">-->
<ListBox x:Name="IconListBox" <ListBox x:Name="IconListBox"
ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=OneWay}" ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=OneWay}"
BorderThickness="0" BorderThickness="0"
Padding="0,10,0,0" Padding="0,10,0,0"
ScrollViewer.CanContentScroll ="False" ScrollViewer.CanContentScroll ="False"
> >
<ListBox.Template> <ListBox.Template>
<ControlTemplate TargetType="ListBox"> <ControlTemplate TargetType="ListBox">
<hc:ScrollViewer x:Name="WrapScroll" <hc:ScrollViewer x:Name="WrapScroll"
Orientation="Vertical" Orientation="Vertical"
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
@@ -183,48 +182,48 @@
</Border> </Border>
</hc:ScrollViewer> </hc:ScrollViewer>
</ControlTemplate> </ControlTemplate>
</ListBox.Template> </ListBox.Template>
<ListBox.Background> <ListBox.Background>
<SolidColorBrush Color="#00FFFFFF" /> <SolidColorBrush Color="#00FFFFFF" />
</ListBox.Background> </ListBox.Background>
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<!--<DraggAnimatedPanel:DraggAnimatedPanel Background="#00FFFFFF" <!--<DraggAnimatedPanel:DraggAnimatedPanel Background="#00FFFFFF"
ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}" ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
ItemsHeight="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}" 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}}}"/>-->
<WrapPanel Background="#00FFFFFF" <WrapPanel Background="#00FFFFFF"
Width="{Binding AppConfig.WindowWidth, Mode=OneWay, Width="{Binding AppConfig.WindowWidth, Mode=OneWay,
Converter={StaticResource GetWidthByWWConvert}, Converter={StaticResource GetWidthByWWConvert},
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}" ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}"
/> />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.Resources> <ListBox.Resources>
<ContextMenu x:Key="IconDialog" Width="200"> <ContextMenu x:Key="IconDialog" Width="200">
<MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/> <MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
<MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/> <MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
<MenuItem Header="添加URL项目" Click="AddUrlIcon"/> <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
<MenuItem Header="添加系统项目" Click="AddSystemIcon"/> <MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
<MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/> <MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
<MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/> <MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
<MenuItem Header="从列表移除" Click="RemoveIcon" Tag="{Binding}"/> <MenuItem Header="从列表移除" Click="RemoveIcon" Tag="{Binding}"/>
</ContextMenu> </ContextMenu>
</ListBox.Resources> </ListBox.Resources>
<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}"/>
</Style> </Style>
</ListBox.ItemContainerStyle> </ListBox.ItemContainerStyle>
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<hc:SimpleStackPanel Tag="{Binding}" <hc:SimpleStackPanel Tag="{Binding}"
Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelHeight, Mode=OneWay}" 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}" Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImgPanelWidth, Mode=OneWay}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -235,13 +234,13 @@
MouseLeftButtonDown="Icon_MouseLeftButtonDown" MouseLeftButtonDown="Icon_MouseLeftButtonDown"
MouseLeftButtonUp="Icon_MouseLeftButtonUp" MouseLeftButtonUp="Icon_MouseLeftButtonUp"
> >
<!--<StackPanel Background="#00FFFFFF" <!--<StackPanel Background="#00FFFFFF"
MouseEnter="CursorPanel_MouseEnter" MouseEnter="CursorPanel_MouseEnter"
MouseLeave="CursorPanel_MouseLeave" MouseLeave="CursorPanel_MouseLeave"
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}">--> Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}">-->
<Image Style="{StaticResource ImageStyle}" <Image Style="{StaticResource ImageStyle}"
RenderOptions.BitmapScalingMode="HighQuality"/> RenderOptions.BitmapScalingMode="HighQuality"/>
<TextBlock MaxWidth="80" <TextBlock MaxWidth="80"
Margin="0,5,0,0" Margin="0,5,0,0"
MaxHeight="40" MaxHeight="40"
FontSize="13" FontSize="13"
@@ -251,13 +250,13 @@
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>--> <!--</StackPanel>-->
</hc:SimpleStackPanel> </hc:SimpleStackPanel>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<!--</hc:TransitioningContentControl>--> <!--</hc:TransitioningContentControl>-->
</UniformGrid> </UniformGrid>
</WrapPanel> </WrapPanel>
@@ -282,13 +281,12 @@
</hc:Card.BorderBrush> </hc:Card.BorderBrush>
<Grid> <Grid>
<WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling" <WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsContainerVirtualizable="True" VirtualizingPanel.IsContainerVirtualizable="True"
Margin="10" >
>
<UniformGrid x:Name="VerticalUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}"> <UniformGrid x:Name="VerticalUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}">
<!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">--> <!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}" <ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
BorderThickness="0" BorderThickness="0"
Padding="0,10,0,0" Padding="0,10,0,0"
x:Name="SearchListBox" x:Name="SearchListBox"
@@ -311,39 +309,39 @@
</ListBox.Template> </ListBox.Template>
<ListBox.Background> <ListBox.Background>
<SolidColorBrush Opacity="0"/> <SolidColorBrush Opacity="0"/>
</ListBox.Background> </ListBox.Background>
<ListBox.Resources> <ListBox.Resources>
<ContextMenu x:Key="IconDialog" Width="200"> <ContextMenu x:Key="IconDialog" Width="200">
<MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/> <MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
<MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/> <MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
<MenuItem Header="添加URL项目" Click="AddUrlIcon"/> <MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
<MenuItem Header="添加系统项目" Click="AddSystemIcon"/> <MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
<MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/> <MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
<MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/> <MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
</ContextMenu> </ContextMenu>
</ListBox.Resources> </ListBox.Resources>
<ListBox.ItemContainerStyle> <ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}"> <Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}">
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/> <Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
</Style> </Style>
</ListBox.ItemContainerStyle> </ListBox.ItemContainerStyle>
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Background="#00FFFFFF" <StackPanel Background="#00FFFFFF"
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay, Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
Converter={StaticResource GetWidthByWWConvert}, Converter={StaticResource GetWidthByWWConvert},
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}" ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}"
/> />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Border CornerRadius="8"> <Border CornerRadius="8">
<Border.Style> <Border.Style>
<Style TargetType="Border"> <Style TargetType="Border">
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
@@ -389,9 +387,9 @@
Text="{Binding Name}"/> Text="{Binding Name}"/>
</WrapPanel> </WrapPanel>
</Border> </Border>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<!--</hc:TransitioningContentControl>--> <!--</hc:TransitioningContentControl>-->
</UniformGrid> </UniformGrid>

View File

@@ -35,7 +35,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{ {
InitializeComponent(); InitializeComponent();
this.Loaded += RightCardControl_Loaded; this.Loaded += RightCardControl_Loaded;
} }
private void RightCardControl_Loaded(object sender, RoutedEventArgs e) private void RightCardControl_Loaded(object sender, RoutedEventArgs e)
@@ -175,12 +175,20 @@ namespace GeekDesk.Control.UserControls.PannelCard
private void StartIconApp(IconInfo icon, IconStartType type, bool useRelativePath = false) private void StartIconApp(IconInfo icon, IconStartType type, bool useRelativePath = false)
{ {
try try
{ {
using (Process p = new Process()) Process p = new Process();
{ //using ()
string startArg = icon.StartArg; //{
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
string startArg = icon.StartArg;
if (startArg != null && Constants.SYSTEM_ICONS.ContainsKey(startArg)) if (startArg != null && Constants.SYSTEM_ICONS.ContainsKey(startArg))
{ {
StartSystemApp(startArg, type); StartSystemApp(startArg, type);
@@ -192,8 +200,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{ {
string fullPath = Path.Combine(Constants.APP_DIR, icon.RelativePath); string fullPath = Path.Combine(Constants.APP_DIR, icon.RelativePath);
path = Path.GetFullPath(fullPath); path = Path.GetFullPath(fullPath);
} } else
else
{ {
path = icon.Path; path = icon.Path;
} }
@@ -211,8 +218,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{ {
StartIconApp(icon, type, true); StartIconApp(icon, type, true);
return; return;
} } else
else
{ {
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(文件路径不存在或已删除)!"); HandyControl.Controls.Growl.WarningGlobal("程序启动失败(文件路径不存在或已删除)!");
return; return;
@@ -222,11 +228,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
switch (type) switch (type)
{ {
case IconStartType.ADMIN_STARTUP: case IconStartType.ADMIN_STARTUP:
//p.StartInfo.Arguments = "1";//启动参数
p.StartInfo.Verb = "runas"; p.StartInfo.Verb = "runas";
//p.StartInfo.CreateNoWindow = false; //设置显示窗口
p.StartInfo.UseShellExecute = true;//不使用操作系统外壳程序启动进程
//p.StartInfo.ErrorDialog = false;
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL) if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
{ {
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口 //如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
@@ -244,7 +246,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
} }
break;// c#好像不能case穿透 break;// c#好像不能case穿透
case IconStartType.DEFAULT_STARTUP: case IconStartType.DEFAULT_STARTUP:
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL) if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
{ {
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口 //如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
@@ -286,13 +288,15 @@ namespace GeekDesk.Control.UserControls.PannelCard
} }
} }
p.Start(); p.Start();
p.Close();
p.Dispose();
if (useRelativePath) if (useRelativePath)
{ {
//如果使用相对路径启动成功 那么重新设置程序绝对路径 //如果使用相对路径启动成功 那么重新设置程序绝对路径
icon.Path = path; icon.Path = path;
} }
} }
} //}
icon.Count++; icon.Count++;
//隐藏搜索框 //隐藏搜索框
@@ -312,7 +316,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(可能为不支持的启动方式)!"); HandyControl.Controls.Growl.WarningGlobal("程序启动失败(可能为不支持的启动方式)!");
LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type); LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type);
} }
} }
} }
@@ -475,7 +479,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
})); }));
}); });
} }
double width = appData.AppConfig.ImageWidth; double width = appData.AppConfig.ImageWidth;
@@ -769,8 +773,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
if (RunTimeStatus.LOCK_APP_PANEL) if (RunTimeStatus.LOCK_APP_PANEL)
{ {
CardLockCM.Header = "解锁主面板"; CardLockCM.Header = "解锁主面板";
} } else
else
{ {
CardLockCM.Header = "锁定主面板"; CardLockCM.Header = "锁定主面板";
} }
@@ -862,8 +865,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
if (RunTimeStatus.ICONLIST_MOUSE_WHEEL) if (RunTimeStatus.ICONLIST_MOUSE_WHEEL)
{ {
RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 500; RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 500;
} } else
else
{ {
RunTimeStatus.ICONLIST_MOUSE_WHEEL = true; RunTimeStatus.ICONLIST_MOUSE_WHEEL = true;
@@ -896,7 +898,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{ {
//在card 上获取的事件 //在card 上获取的事件
scrollViewer = ScrollUtil.FindSimpleVisualChild<System.Windows.Controls.ScrollViewer>(IconListBox); scrollViewer = ScrollUtil.FindSimpleVisualChild<System.Windows.Controls.ScrollViewer>(IconListBox);
} }
if (e.Delta < 0) if (e.Delta < 0)
{ {
int index = MainWindow.mainWindow.LeftCard.MenuListBox.SelectedIndex; int index = MainWindow.mainWindow.LeftCard.MenuListBox.SelectedIndex;

View File

@@ -22,7 +22,7 @@
</Window.Resources> </Window.Resources>
<Grid> <Grid>
<Image x:Name="DesktopBG" RenderOptions.BitmapScalingMode="HighQuality"/> <Image x:Name="DesktopBG" RenderOptions.BitmapScalingMode="HighQuality"/>
<Canvas HorizontalAlignment="Left" VerticalAlignment="Top" Background="Transparent"> <Canvas HorizontalAlignment="Left" VerticalAlignment="Top" Background="Transparent">
<Canvas x:Name="ColorCanvas" <Canvas x:Name="ColorCanvas"
Width="185" Width="185"

View File

@@ -39,12 +39,11 @@ namespace GeekDesk.Control.Windows
{ {
InitializeComponent(); InitializeComponent();
this.colorPicker = colorPicker; this.colorPicker = colorPicker;
//try
try //{
{ // SetProcessDPIAware();
SetProcessDPIAware(); //}
} //catch (Exception e) { }
catch (Exception e) { }
ColorPickerWindow_Init(); ColorPickerWindow_Init();
} }
@@ -88,7 +87,6 @@ namespace GeekDesk.Control.Windows
Int32Rect.Empty, Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions() BitmapSizeOptions.FromEmptyOptions()
); );
DesktopBG.Source = bs; DesktopBG.Source = bs;
VisualBrush b = (VisualBrush)PixelBG.Fill; VisualBrush b = (VisualBrush)PixelBG.Fill;
b.Visual = DesktopBG; b.Visual = DesktopBG;
@@ -131,7 +129,7 @@ namespace GeekDesk.Control.Windows
mi.Invoke(colorPicker, new object[] { null, null }); mi.Invoke(colorPicker, new object[] { null, null });
} }
} }
private void Window_PreviewMouseMove(object sender, MouseEventArgs e) private void Window_PreviewMouseMove(object sender, MouseEventArgs e)
{ {
SetPixelAbout(e); SetPixelAbout(e);
@@ -215,7 +213,6 @@ namespace GeekDesk.Control.Windows
/// <param name="e"></param> /// <param name="e"></param>
private void Window_MouseRightButtonDown(object sender, MouseButtonEventArgs e) private void Window_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{ {
Mouse.OverrideCursor = null;
GlobalColorPickerWindow.ShowOrHide(); GlobalColorPickerWindow.ShowOrHide();
//关闭 //关闭
this.Close(); this.Close();

View File

@@ -69,8 +69,7 @@ namespace GeekDesk.Control.Windows
{ {
backlog.NoData.Visibility = Visibility.Collapsed; backlog.NoData.Visibility = Visibility.Collapsed;
backlog.BacklogList.Visibility = Visibility.Visible; backlog.BacklogList.Visibility = Visibility.Visible;
} } else
else
{ {
backlog.NoData.Visibility = Visibility.Visible; backlog.NoData.Visibility = Visibility.Visible;
backlog.BacklogList.Visibility = Visibility.Collapsed; backlog.BacklogList.Visibility = Visibility.Collapsed;
@@ -111,7 +110,9 @@ namespace GeekDesk.Control.Windows
private static System.Windows.Window window = null; private static System.Windows.Window window = null;
#pragma warning disable CS0108 // “ToDoWindow.Show()”隐藏继承的成员“Window.Show()”。如果是有意隐藏,请使用关键字 new。
public static void Show() public static void Show()
#pragma warning restore CS0108 // “ToDoWindow.Show()”隐藏继承的成员“Window.Show()”。如果是有意隐藏,请使用关键字 new。
{ {
if (window == null || !window.Activate()) if (window == null || !window.Activate())
{ {

View File

@@ -1,29 +0,0 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace GeekDesk.Converts
{
class SearchResWidth : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string param = parameter as string;
if ("1".Equals(param))
{
double menuLeftWidth = double.Parse(value.ToString());
return MainWindow.mainWindow.Width - menuLeftWidth;
}
else
{
double menuLeftWidth = double.Parse(value.ToString());
return (MainWindow.mainWindow.Width - menuLeftWidth) / 2;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return null;
}
}
}

View File

@@ -49,10 +49,10 @@
<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\GeekDesk\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@@ -61,13 +61,14 @@
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject>GeekDesk.App</StartupObject> <StartupObject>
</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignManifests>false</SignManifests> <SignManifests>false</SignManifests>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>Logo.ico</ApplicationIcon> <ApplicationIcon>Taskbar.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetZone>LocalIntranet</TargetZone> <TargetZone>LocalIntranet</TargetZone>
@@ -88,9 +89,6 @@
<Reference Include="HandyControl, Version=3.3.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL"> <Reference Include="HandyControl, Version=3.3.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
<HintPath>packages\HandyControl.3.3.0\lib\net472\HandyControl.dll</HintPath> <HintPath>packages\HandyControl.3.3.0\lib\net472\HandyControl.dll</HintPath>
</Reference> </Reference>
<Reference Include="KeyMouseHook, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\KeyMouseHook.1.0.6\lib\net40\KeyMouseHook.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> <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> <HintPath>packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference> </Reference>
@@ -252,12 +250,11 @@
</Compile> </Compile>
<Compile Include="Converts\CountGreZero2BoolConvert.cs" /> <Compile Include="Converts\CountGreZero2BoolConvert.cs" />
<Compile Include="Converts\Count2VisibleConvert.cs" /> <Compile Include="Converts\Count2VisibleConvert.cs" />
<Compile Include="Converts\GetWidthByWWConvert.cs" />
<Compile Include="Converts\SearchTypeConvert.cs" /> <Compile Include="Converts\SearchTypeConvert.cs" />
<Compile Include="Converts\StringAppendConvert.cs" /> <Compile Include="Converts\StringAppendConvert.cs" />
<Compile Include="Converts\DoubleToGridLength.cs" /> <Compile Include="Converts\DoubleToGridLength.cs" />
<Compile Include="Converts\MenuInfoConvert.cs" /> <Compile Include="Converts\MenuInfoConvert.cs" />
<Compile Include="Converts\SearchResWidth.cs" /> <Compile Include="Converts\GetWidthByWWConvert.cs" />
<Compile Include="Converts\SortTypeConvert.cs" /> <Compile Include="Converts\SortTypeConvert.cs" />
<Compile Include="Converts\TodoTaskExecConvert.cs" /> <Compile Include="Converts\TodoTaskExecConvert.cs" />
<Compile Include="Converts\IntToCornerRadius.cs" /> <Compile Include="Converts\IntToCornerRadius.cs" />
@@ -271,12 +268,10 @@
<Compile Include="Converts\HideTypeConvert.cs" /> <Compile Include="Converts\HideTypeConvert.cs" />
<Compile Include="Interface\IWindowCommon.cs" /> <Compile Include="Interface\IWindowCommon.cs" />
<Compile Include="MyThread\RelativePathThread.cs" /> <Compile Include="MyThread\RelativePathThread.cs" />
<Compile Include="Plugins\ShowSeconds\Common\Constants.cs" /> <Compile Include="Plugins\ShowSeconds\ViewModel\SecondsDataContext.cs" />
<Compile Include="Plugins\ShowSeconds\SecondsWindow.xaml.cs"> <Compile Include="Plugins\ShowSeconds\SecondsWindow.xaml.cs">
<DependentUpon>SecondsWindow.xaml</DependentUpon> <DependentUpon>SecondsWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Plugins\ShowSeconds\ViewModel\SecondsDataContext.cs" />
<Compile Include="Task\ShowSecondTask.cs" />
<Compile Include="Task\ToDoTask.cs" /> <Compile Include="Task\ToDoTask.cs" />
<Compile Include="MyThread\MouseHookThread.cs" /> <Compile Include="MyThread\MouseHookThread.cs" />
<Compile Include="MyThread\DispatcherBuild.cs" /> <Compile Include="MyThread\DispatcherBuild.cs" />
@@ -285,15 +280,12 @@
<Compile Include="Util\BGSettingUtil.cs" /> <Compile Include="Util\BGSettingUtil.cs" />
<Compile Include="Util\BlurGlassUtil.cs" /> <Compile Include="Util\BlurGlassUtil.cs" />
<Compile Include="Util\ColorUtil.cs" /> <Compile Include="Util\ColorUtil.cs" />
<Compile Include="Util\DefaultIcons.cs" />
<Compile Include="Util\DragAdorner.cs" /> <Compile Include="Util\DragAdorner.cs" />
<Compile Include="Util\GlobalHotKey.cs" /> <Compile Include="Util\GlobalHotKey.cs" />
<Compile Include="Util\CommonCode.cs" /> <Compile Include="Util\CommonCode.cs" />
<Compile Include="Util\FileIcon.cs" /> <Compile Include="Util\FileIcon.cs" />
<Compile Include="Util\FileUtil.cs" /> <Compile Include="Util\FileUtil.cs" />
<Compile Include="Util\HideWindowUtil.cs" /> <Compile Include="Util\HideWindowUtil.cs" />
<Compile Include="Util\IconHelper.cs" />
<Compile Include="Util\IconUtil.cs" />
<Compile Include="Util\KeyUtil.cs" /> <Compile Include="Util\KeyUtil.cs" />
<Compile Include="Util\ListBoxDragDropManager.cs" /> <Compile Include="Util\ListBoxDragDropManager.cs" />
<Compile Include="Util\LogUtil.cs" /> <Compile Include="Util\LogUtil.cs" />
@@ -305,7 +297,6 @@
<Compile Include="Util\MessageUtil.cs" /> <Compile Include="Util\MessageUtil.cs" />
<Compile Include="Util\MouseHook.cs" /> <Compile Include="Util\MouseHook.cs" />
<Compile Include="Util\MouseUtil.cs" /> <Compile Include="Util\MouseUtil.cs" />
<Compile Include="Util\NativeMethods.cs" />
<Compile Include="Util\RegisterUtil.cs" /> <Compile Include="Util\RegisterUtil.cs" />
<Compile Include="Util\RelayCommand.cs" /> <Compile Include="Util\RelayCommand.cs" />
<Compile Include="Util\ScreenUtil.cs" /> <Compile Include="Util\ScreenUtil.cs" />
@@ -315,7 +306,6 @@
<Compile Include="Util\StringUtil.cs" /> <Compile Include="Util\StringUtil.cs" />
<Compile Include="Util\SvgToGeometry.cs" /> <Compile Include="Util\SvgToGeometry.cs" />
<Compile Include="Util\UserActivityHook.cs" /> <Compile Include="Util\UserActivityHook.cs" />
<Compile Include="Util\WindowsThumbnailProvider.cs" />
<Compile Include="ViewModel\AppConfig.cs" /> <Compile Include="ViewModel\AppConfig.cs" />
<Compile Include="ViewModel\AppData.cs" /> <Compile Include="ViewModel\AppData.cs" />
<Compile Include="ViewModel\GradientBGParam.cs" /> <Compile Include="ViewModel\GradientBGParam.cs" />
@@ -544,9 +534,7 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<Resource Include="Logo.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>

BIN
Logo.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

View File

@@ -29,7 +29,7 @@
GotFocus="Window_GotFocus" GotFocus="Window_GotFocus"
Loaded="Window_Loaded" Loaded="Window_Loaded"
> >
<Window.Resources> <Window.Resources>
<RoutedUICommand x:Key="SearchHotKeyDown" Text="SearchHotKeyDown"/> <RoutedUICommand x:Key="SearchHotKeyDown" Text="SearchHotKeyDown"/>
@@ -39,11 +39,11 @@
<cvt:DoubleToGridLength x:Key="DoubleToGridLength"/> <cvt:DoubleToGridLength x:Key="DoubleToGridLength"/>
<cvt:ReverseBoolConvert x:Key="ReverseBoolConvert"/> <cvt:ReverseBoolConvert x:Key="ReverseBoolConvert"/>
</Window.Resources> </Window.Resources>
<WindowChrome.WindowChrome> <WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="0" CornerRadius="30" ResizeBorderThickness="15"/> <WindowChrome CaptionHeight="0" CornerRadius="30" ResizeBorderThickness="15"/>
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<Window.InputBindings> <Window.InputBindings>
<KeyBinding Gesture="Ctrl+F" Key="F" Command="{StaticResource SearchHotKeyDown}"/> <KeyBinding Gesture="Ctrl+F" Key="F" Command="{StaticResource SearchHotKeyDown}"/>
</Window.InputBindings> </Window.InputBindings>
@@ -68,35 +68,35 @@
<DropShadowEffect BlurRadius="30" Direction="-90" Color="Gray" <DropShadowEffect BlurRadius="30" Direction="-90" Color="Gray"
RenderingBias="Quality" ShadowDepth="2"/> RenderingBias="Quality" ShadowDepth="2"/>
</Border.Effect> </Border.Effect>
<hc:DialogContainer Focusable="True"> <hc:DialogContainer Focusable="True">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40" MouseMove="DragMove"></RowDefinition> <RowDefinition Height="40" MouseMove="DragMove"></RowDefinition>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="200"></ColumnDefinition> <ColumnDefinition x:Name="LeftColumn" MinWidth="80" Width="{Binding AppConfig.MenuCardWidth, Mode=TwoWay, Converter={StaticResource DoubleToGridLength}}" MaxWidth="200"></ColumnDefinition>
<ColumnDefinition x:Name="RightColumn" Width="*"></ColumnDefinition> <ColumnDefinition x:Name="RightColumn" Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox x:Name="ShowBox" Visibility="Hidden" Panel.ZIndex="2"/> <CheckBox x:Name="ShowBox" Visibility="Hidden" Panel.ZIndex="2"/>
<CheckBox x:Name="HideBox" Visibility="Hidden" Panel.ZIndex="2"/> <CheckBox x:Name="HideBox" Visibility="Hidden" Panel.ZIndex="2"/>
<StackPanel HorizontalAlignment="Right" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowGrowl" Grid.Column="1" Grid.Row="1"/> <StackPanel HorizontalAlignment="Right" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowGrowl" Grid.Column="1" Grid.Row="1"/>
<DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove"> <DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
<DockPanel.Background> <DockPanel.Background>
<SolidColorBrush Opacity="0.01"/> <SolidColorBrush Opacity="0.01"/>
</DockPanel.Background> </DockPanel.Background>
<Image Visibility="{Binding AppConfig.TitleLogoVisible}" Source="/Resource/Image/TitleLogo.png" RenderOptions.BitmapScalingMode="HighQuality" Margin="10,0,0,0" Width="200" Height="30" HorizontalAlignment="Left"/> <Image Visibility="{Binding AppConfig.TitleLogoVisible}" Source="/Resource/Image/TitleLogo.png" Margin="10,0,0,0" Width="94" Height="30" HorizontalAlignment="Left"/>
</DockPanel> </DockPanel>
<DockPanel Grid.Row="0" Grid.Column="2" MouseMove="DragMove"> <DockPanel Grid.Row="0" Grid.Column="2" MouseMove="DragMove">
<DockPanel.Background> <DockPanel.Background>
<SolidColorBrush Opacity="0.01"/> <SolidColorBrush Opacity="0.01"/>
</DockPanel.Background> </DockPanel.Background>
<hc:UniformSpacingPanel Grid.ColumnSpan="4" HorizontalAlignment="Right" VerticalAlignment="Center"> <hc:UniformSpacingPanel Grid.ColumnSpan="4" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button Background="Transparent" <Button Background="Transparent"
BorderThickness="0" BorderThickness="0"
hc:IconElement.Geometry="M917.930667 512c0-57.6 36.181333-106.496 86.869333-125.952a505.429333 505.429333 0 0 0-55.210667-133.461333A134.826667 134.826667 0 0 1 771.413333 74.410667 507.733333 507.733333 0 0 0 637.952 19.2 135.168 135.168 0 0 1 512 106.069333 134.912 134.912 0 0 1 386.048 19.2 505.429333 505.429333 0 0 0 252.586667 74.410667c22.186667 49.749333 13.141333 109.824-27.562667 150.528a135.168 135.168 0 0 1-150.528 27.648 502.016 502.016 0 0 0-55.296 133.461333c50.688 19.626667 86.869333 68.437333 86.869333 125.952 0 57.6-36.181333 106.496-86.869333 125.952 12.117333 47.530667 30.72 92.330667 55.210667 133.461333a134.826667 134.826667 0 0 1 178.090666 178.176 507.733333 507.733333 0 0 0 133.546667 55.210667A135.168 135.168 0 0 1 512 917.930667c57.6 0 106.496 36.181333 125.952 86.869333a505.429333 505.429333 0 0 0 133.461333-55.210667 134.912 134.912 0 0 1 27.562667-150.528 135.168 135.168 0 0 1 150.528-27.648 502.016 502.016 0 0 0 55.296-133.461333A134.912 134.912 0 0 1 917.930667 512zM512 647.338667a135.338667 135.338667 0 1 1 0.085333-270.762667A135.338667 135.338667 0 0 1 512 647.338667z" hc:IconElement.Geometry="M917.930667 512c0-57.6 36.181333-106.496 86.869333-125.952a505.429333 505.429333 0 0 0-55.210667-133.461333A134.826667 134.826667 0 0 1 771.413333 74.410667 507.733333 507.733333 0 0 0 637.952 19.2 135.168 135.168 0 0 1 512 106.069333 134.912 134.912 0 0 1 386.048 19.2 505.429333 505.429333 0 0 0 252.586667 74.410667c22.186667 49.749333 13.141333 109.824-27.562667 150.528a135.168 135.168 0 0 1-150.528 27.648 502.016 502.016 0 0 0-55.296 133.461333c50.688 19.626667 86.869333 68.437333 86.869333 125.952 0 57.6-36.181333 106.496-86.869333 125.952 12.117333 47.530667 30.72 92.330667 55.210667 133.461333a134.826667 134.826667 0 0 1 178.090666 178.176 507.733333 507.733333 0 0 0 133.546667 55.210667A135.168 135.168 0 0 1 512 917.930667c57.6 0 106.496 36.181333 125.952 86.869333a505.429333 505.429333 0 0 0 133.461333-55.210667 134.912 134.912 0 0 1 27.562667-150.528 135.168 135.168 0 0 1 150.528-27.648 502.016 502.016 0 0 0 55.296-133.461333A134.912 134.912 0 0 1 917.930667 512zM512 647.338667a135.338667 135.338667 0 1 1 0.085333-270.762667A135.338667 135.338667 0 0 1 512 647.338667z"
hc:IconElement.Height="18" hc:IconElement.Height="18"
@@ -108,14 +108,14 @@
x:Name="SettingButton" x:Name="SettingButton"
FocusVisualStyle="{x:Null}" FocusVisualStyle="{x:Null}"
> >
<Button.ContextMenu> <Button.ContextMenu>
<ContextMenu x:Name="SettingMenus" Width="130"> <ContextMenu x:Name="SettingMenus" Width="130">
<MenuItem Header="设置" Click="ConfigMenuClick"/> <MenuItem Header="设置" Click="ConfigMenuClick"/>
<MenuItem Header="待办" Click="BacklogMenuClick"/> <MenuItem Header="待办" Click="BacklogMenuClick"/>
</ContextMenu> </ContextMenu>
</Button.ContextMenu> </Button.ContextMenu>
</Button> </Button>
<Button Background="Transparent" <Button Background="Transparent"
BorderThickness="0" BorderThickness="0"
hc:IconElement.Geometry="M828.770654 148.714771C641.293737-20.89959 354.184117-19.590868 168.245698 152.630946c-212.062907 196.418185-212.062907 522.329912 0 718.748098 185.93842 172.221815 473.048039 173.520546 660.524956 3.916176 219.435707-198.536117 219.435707-528.054322 0-726.580449z m-121.880976 569.643707c-11.708566 11.708566-30.680039 11.708566-42.388605 0L502.729054 556.586459c-0.659356-0.659356-1.728312-0.659356-2.397659 0L338.609327 718.318517c-11.708566 11.708566-30.680039 11.708566-42.388605 0l-0.039961-0.039961c-11.708566-11.708566-11.708566-30.680039 0-42.388605l161.732059-161.732058c0.659356-0.659356 0.659356-1.728312 0-2.397659L296.1408 350.008195c-11.708566-11.708566-11.708566-30.680039 0-42.388605l0.039961-0.039961c11.708566-11.708566 30.680039-11.708566 42.388605 0l161.772019 161.77202c0.659356 0.659356 1.728312 0.659356 2.397659 0L664.551024 307.539668c11.708566-11.708566 30.680039-11.708566 42.388605 0l0.039961 0.039961c11.708566 11.708566 11.708566 30.680039 0 42.388605L545.15762 511.770224c-0.659356 0.659356-0.659356 1.728312 0 2.397659L706.919649 675.939902c11.708566 11.708566 11.708566 30.680039 0 42.388605l-0.029971 0.029971z" hc:IconElement.Geometry="M828.770654 148.714771C641.293737-20.89959 354.184117-19.590868 168.245698 152.630946c-212.062907 196.418185-212.062907 522.329912 0 718.748098 185.93842 172.221815 473.048039 173.520546 660.524956 3.916176 219.435707-198.536117 219.435707-528.054322 0-726.580449z m-121.880976 569.643707c-11.708566 11.708566-30.680039 11.708566-42.388605 0L502.729054 556.586459c-0.659356-0.659356-1.728312-0.659356-2.397659 0L338.609327 718.318517c-11.708566 11.708566-30.680039 11.708566-42.388605 0l-0.039961-0.039961c-11.708566-11.708566-11.708566-30.680039 0-42.388605l161.732059-161.732058c0.659356-0.659356 0.659356-1.728312 0-2.397659L296.1408 350.008195c-11.708566-11.708566-11.708566-30.680039 0-42.388605l0.039961-0.039961c11.708566-11.708566 30.680039-11.708566 42.388605 0l161.772019 161.77202c0.659356 0.659356 1.728312 0.659356 2.397659 0L664.551024 307.539668c11.708566-11.708566 30.680039-11.708566 42.388605 0l0.039961 0.039961c11.708566 11.708566 11.708566 30.680039 0 42.388605L545.15762 511.770224c-0.659356 0.659356-0.659356 1.728312 0 2.397659L706.919649 675.939902c11.708566 11.708566 11.708566 30.680039 0 42.388605l-0.029971 0.029971z"
hc:IconElement.Height="18" hc:IconElement.Height="18"
@@ -125,17 +125,17 @@
PreviewMouseLeftButtonDown="AppButton_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonDown="AppButton_PreviewMouseLeftButtonDown"
FocusVisualStyle="{x:Null}" FocusVisualStyle="{x:Null}"
/> />
</hc:UniformSpacingPanel> </hc:UniformSpacingPanel>
</DockPanel> </DockPanel>
<uc:LeftCardControl x:Name="LeftCard" Grid.Row="1" Grid.Column="0"/> <uc:LeftCardControl x:Name="LeftCard" Grid.Row="1" Grid.Column="0"/>
<!--分割线--> <!--分割线-->
<GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Right"/> <GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
<!--搜索输入框--> <!--搜索输入框-->
<TextBox Panel.ZIndex="2" Grid.Row="0" Grid.Column="1" <TextBox Panel.ZIndex="2" Grid.Row="0" Grid.Column="1"
x:Name="SearchBox" x:Name="SearchBox"
Width="0" Width="0"
Margin="-100,5,0,0" Margin="-100,5,0,0"
@@ -146,28 +146,28 @@
/> />
<hc:NotifyIcon Icon="/Logo.ico" Click="NotifyIcon_Click" x:Name="BarIcon" <hc:NotifyIcon Icon="/Taskbar.ico" Click="NotifyIcon_Click" x:Name="BarIcon"
Visibility="{Binding AppConfig.ShowBarIcon, Mode=TwoWay, Converter={StaticResource Boolean2VisibilityConverter}}"> Visibility="{Binding AppConfig.ShowBarIcon, Mode=TwoWay, Converter={StaticResource Boolean2VisibilityConverter}}">
<hc:NotifyIcon.ContextMenu> <hc:NotifyIcon.ContextMenu>
<ContextMenu Width="130" x:Name="TaskbarContextMenu"> <ContextMenu Width="130" x:Name="TaskbarContextMenu">
<MenuItem Header="打开面板" Click="ShowApp"/> <MenuItem Header="打开面板" Click="ShowApp"/>
<MenuItem Header="拾色器" Click="ColorPicker"/> <MenuItem Header="拾色器" Click="ColorPicker"/>
<MenuItem Header="备份" Click="BakDataFile"/> <MenuItem Header="备份" Click="BakDataFile"/>
<MenuItem Header="隐藏图标" Click="CloseBarIcon"/> <MenuItem Header="隐藏图标" Click="CloseBarIcon"/>
<MenuItem Header="待办" Click="BacklogMenuClick"/> <MenuItem Header="待办" Click="BacklogMenuClick"/>
<MenuItem Header="程序目录" Click="OpenThisDir"/> <MenuItem Header="程序目录" Click="OpenThisDir"/>
<MenuItem Header="设置" Click="ConfigApp"/> <MenuItem Header="设置" Click="ConfigApp"/>
<MenuItem Header="重启" Click="ReStartApp"/> <MenuItem Header="重启" Click="ReStartApp"/>
<MenuItem Header="退出" Click="ExitApp"/> <MenuItem Header="退出" Click="ExitApp"/>
</ContextMenu> </ContextMenu>
</hc:NotifyIcon.ContextMenu> </hc:NotifyIcon.ContextMenu>
</hc:NotifyIcon> </hc:NotifyIcon>
<uc:RightCardControl x:Name="RightCard" Grid.Row="1" Grid.Column="1"/> <uc:RightCardControl x:Name="RightCard" Grid.Row="1" Grid.Column="1"/>
<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>
</hc:DialogContainer> </hc:DialogContainer>
</Border> </Border>
</Window> </Window>

View File

@@ -62,7 +62,7 @@ namespace GeekDesk
} }
/// <summary> /// <summary>
@@ -95,9 +95,9 @@ namespace GeekDesk
/// <param name="e"></param> /// <param name="e"></param>
private void SearchBox_TextChanged(object sender, TextChangedEventArgs e) private void SearchBox_TextChanged(object sender, TextChangedEventArgs e)
{ {
if (!RunTimeStatus.SEARCH_BOX_SHOW if (!RunTimeStatus.SEARCH_BOX_SHOW
&& appData.AppConfig.SearchType != SearchType.KEY_DOWN && appData.AppConfig.SearchType != SearchType.KEY_DOWN
) )
{ {
SearchBox.TextChanged -= SearchBox_TextChanged; SearchBox.TextChanged -= SearchBox_TextChanged;
SearchBox.Clear(); SearchBox.Clear();
@@ -181,6 +181,8 @@ namespace GeekDesk
/// <param name="e"></param> /// <param name="e"></param>
void Window_Loaded(object sender, RoutedEventArgs e) void Window_Loaded(object sender, RoutedEventArgs e)
{ {
SecondsWindow.ShowWindow();
BGSettingUtil.BGSetting(); BGSettingUtil.BGSetting();
if (!appData.AppConfig.StartedShowPanel) if (!appData.AppConfig.StartedShowPanel)
{ {
@@ -215,17 +217,11 @@ namespace GeekDesk
} }
//注册鼠标监听事件 //注册鼠标监听事件
if (appData.AppConfig.MouseMiddleShow) if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow==true)
{ {
MouseHookThread.Hook(); MouseHookThread.Hook();
} }
//显秒插件
if (appData.AppConfig.SecondsWindow == true)
{
SecondsWindow.ShowWindow();
}
//更新线程开启 检测更新 //更新线程开启 检测更新
UpdateThread.Update(); UpdateThread.Update();
@@ -266,8 +262,7 @@ namespace GeekDesk
{ {
HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl"); HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
} }
} } else
else
{ {
} }
} }
@@ -310,7 +305,7 @@ namespace GeekDesk
HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl"); HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
} }
} }
} }
catch (Exception) catch (Exception)
{ {
@@ -480,8 +475,7 @@ namespace GeekDesk
if (RunTimeStatus.SHOW_MENU_PASSWORDBOX) if (RunTimeStatus.SHOW_MENU_PASSWORDBOX)
{ {
mainWindow.RightCard.PDDialog.SetFocus(); mainWindow.RightCard.PDDialog.SetFocus();
} } else
else
{ {
Keyboard.Focus(mainWindow.SearchBox); Keyboard.Focus(mainWindow.SearchBox);
} }
@@ -498,7 +492,7 @@ namespace GeekDesk
appData.AppConfig.IsShow = null; appData.AppConfig.IsShow = null;
HideAppVis(); HideAppVis();
} }
} }
private static void HideAppVis() private static void HideAppVis()
@@ -512,7 +506,7 @@ namespace GeekDesk
mainWindow.Visibility = Visibility.Collapsed; mainWindow.Visibility = Visibility.Collapsed;
//if (!MarginHide.IS_HIDE) //if (!MarginHide.IS_HIDE)
//{ //{
//} //}
//else //else
//{ //{
@@ -683,7 +677,7 @@ namespace GeekDesk
/// <param name="e"></param> /// <param name="e"></param>
private void ExitApp(object sender, RoutedEventArgs e) private void ExitApp(object sender, RoutedEventArgs e)
{ {
if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow == true) if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow==true)
{ {
MouseHookThread.Dispose(); MouseHookThread.Dispose();
} }
@@ -729,8 +723,8 @@ namespace GeekDesk
HideApp(); HideApp();
} }
if (RunTimeStatus.SEARCH_BOX_SHOW && (e.Key == Key.Up if (RunTimeStatus.SEARCH_BOX_SHOW && (e.Key == Key.Up
|| e.Key == Key.Down || e.Key == Key.Down
|| e.Key == Key.Tab || e.Key == Key.Tab
|| e.Key == Key.Enter || e.Key == Key.Enter
)) ))
@@ -738,16 +732,14 @@ namespace GeekDesk
if (e.Key == Key.Down || e.Key == Key.Tab) if (e.Key == Key.Down || e.Key == Key.Tab)
{ {
RightCard.SearchListBoxIndexAdd(); RightCard.SearchListBoxIndexAdd();
} } else if (e.Key == Key.Up)
else if (e.Key == Key.Up)
{ {
RightCard.SearchListBoxIndexSub(); RightCard.SearchListBoxIndexSub();
} } else if (e.Key == Key.Enter)
else if (e.Key == Key.Enter)
{ {
RightCard.StartupSelectionItem(); RightCard.StartupSelectionItem();
} }
} }
} }
@@ -801,9 +793,9 @@ namespace GeekDesk
//必须在其它文本框没有工作的时候才给搜索框焦点 //必须在其它文本框没有工作的时候才给搜索框焦点
Keyboard.Focus(SearchBox); Keyboard.Focus(SearchBox);
} }
} }
} }
private void AppWindow_Deactivated(object sender, EventArgs e) private void AppWindow_Deactivated(object sender, EventArgs e)

View File

@@ -3,6 +3,7 @@ using GeekDesk.Control.Windows;
using GeekDesk.Util; using GeekDesk.Util;
using GeekDesk.ViewModel; using GeekDesk.ViewModel;
using Gma.System.MouseKeyHook; using Gma.System.MouseKeyHook;
using ShowSeconds;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Threading; using System.Threading;
@@ -30,16 +31,24 @@ namespace GeekDesk.MyThread
hook.OnMouseWheelUp += OnMouseWheelUp; hook.OnMouseWheelUp += OnMouseWheelUp;
} }
if (appConfig.SecondsWindow == true)
{
hook.OnMouseLeftDown += OnMouseLeftDown;
hook.OnMouseLeftUp += OnMouseLeftUp;
}
hook.Start(true, false); hook.Start(true, false);
})); }));
} }
private static void OnMouseLeftDown(object sender, System.Windows.Forms.MouseEventArgs e) private static void OnMouseLeftDown(object sender, System.Windows.Forms.MouseEventArgs e)
{ {
SecondsWindow.SecondsBakColorFun(sender, e);
} }
private static void OnMouseLeftUp(object sender, System.Windows.Forms.MouseEventArgs e) private static void OnMouseLeftUp(object sender, System.Windows.Forms.MouseEventArgs e)
{ {
SecondsWindow.SecondsHookSetFuc(sender, e);
} }
private static void OnMouseWheelUp(object sender, System.Windows.Forms.MouseEventArgs e) private static void OnMouseWheelUp(object sender, System.Windows.Forms.MouseEventArgs e)
@@ -96,8 +105,7 @@ namespace GeekDesk.MyThread
dispatcher = null; dispatcher = null;
} }
} }
catch (Exception ex) catch (Exception ex) {
{
LogUtil.WriteErrorLog(ex, "关闭hook出错"); LogUtil.WriteErrorLog(ex, "关闭hook出错");
} }
} }

View File

@@ -36,8 +36,7 @@ namespace GeekDesk.MyThread
} }
CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_PATH); CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_PATH);
CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_BAK_PATH); CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_BAK_PATH);
} } catch (Exception ex)
catch (Exception ex)
{ {
LogUtil.WriteErrorLog(ex, "init相对路径出错!"); LogUtil.WriteErrorLog(ex, "init相对路径出错!");
} }

View File

@@ -1,39 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShowSeconds.Common
{
public class Constants
{
public readonly static string MY_UUID = "8400A17AEEF7C029";
//dark theam
public readonly static System.Windows.Media.SolidColorBrush darkBG
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(46, 50, 54),
Opacity = 0.8
};
public readonly static System.Windows.Media.SolidColorBrush darkFont
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(255, 255, 255)
};
//light theam
public readonly static System.Windows.Media.SolidColorBrush lightBG
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(236, 244, 251),
Opacity = 1
};
public readonly static System.Windows.Media.SolidColorBrush lightFont
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(65, 63, 61),
};
}
}

View File

@@ -1,19 +1,21 @@
<Window x:Class="ShowSeconds.SecondsWindow" <Window x:Class="ShowSeconds.SecondsWindow"
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"
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:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF" xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
Height="90" Height="90"
Width="160" Width="160"
WindowStyle="None" WindowStyle="None"
Title="" Title="ShowSeconds_Main_8400A17AEEF7C029"
AllowsTransparency="True" AllowsTransparency="True"
Background="Transparent" ShowInTaskbar="False" Background="Transparent"
Focusable="True" ShowInTaskbar="False"
Focusable="True"
Loaded="Window_Loaded" Loaded="Window_Loaded"
> ShowActivated="False"
>
<Grid Margin="20"> <Grid Margin="20">
<Grid.Effect> <Grid.Effect>

View File

@@ -1,13 +1,14 @@
using GeekDesk.Util; using GeekDesk;
using Gma.System.MouseKeyHook; using GeekDesk.MyThread;
using ShowSeconds.Common;
using GeekDesk.Util; using GeekDesk.Util;
using ShowSeconds.ViewModel; using ShowSeconds.ViewModel;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -17,14 +18,11 @@ using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Interop;
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 System.Windows.Threading; using System.Windows.Threading;
using GeekDesk.MyThread;
using GeekDesk;
using System.Collections;
namespace ShowSeconds namespace ShowSeconds
{ {
@@ -34,15 +32,40 @@ namespace ShowSeconds
public partial class SecondsWindow : Window public partial class SecondsWindow : Window
{ {
private System.Drawing.Color beforeColor; private static Color beforeColor;
private System.Drawing.Color topBeforeColor; private static Color topBeforeColor;
private bool expandClock = true; //是否展开时钟 //dark theam
private System.Windows.Forms.Timer timer; private readonly static System.Windows.Media.SolidColorBrush darkBG
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(46, 50, 54),
Opacity = 0.8
};
private readonly static System.Windows.Media.SolidColorBrush darkFont
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(255, 255, 255)
};
//light theam
private readonly static System.Windows.Media.SolidColorBrush lightBG
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(236, 244, 251),
Opacity = 1
};
private readonly static System.Windows.Media.SolidColorBrush lightFont
= new System.Windows.Media.SolidColorBrush
{
Color = System.Windows.Media.Color.FromRgb(65, 63, 61),
};
private static bool expandClock = true; //是否展开时钟
private static System.Windows.Forms.Timer timer;
private static double lProportion = 0.82; private static double lProportion = 0.82;
private static double tProportion = 0.03; private static double tProportion = 0.03;
private static int sleepTime = 1000; private static int sleepTime = 800;
public SecondsWindow() public SecondsWindow()
{ {
SecondsDataContext dc = new SecondsDataContext SecondsDataContext dc = new SecondsDataContext
@@ -51,16 +74,9 @@ namespace ShowSeconds
FormatMS(DateTime.Now.Minute) + ":" + FormatMS(DateTime.Now.Minute) + ":" +
FormatMS(DateTime.Now.Second) FormatMS(DateTime.Now.Second)
}; };
InitializeComponent();
SolidColorBrush scb = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 47, 52, 44))
{
Opacity = 0.8
};
try try
{ {
Hashtable settings = (Hashtable)ConfigurationManager.GetSection("ShowSecondsSettings"); Hashtable settings = (Hashtable)ConfigurationManager.GetSection("ShowSecondsSettings");
lProportion = Convert.ToDouble(settings["LProportion"]); lProportion = Convert.ToDouble(settings["LProportion"]);
@@ -71,34 +87,157 @@ namespace ShowSeconds
{ {
lProportion = 0.82; lProportion = 0.82;
tProportion = 0.03; tProportion = 0.03;
sleepTime = 1000; sleepTime = 800;
} }
BGBorder.Background = scb; InitializeComponent();
this.DataContext = dc; this.DataContext = dc;
this.Topmost = true; this.Topmost = true;
BGBorder.Visibility = Visibility.Collapsed; BGBorder.Visibility = Visibility.Collapsed;
this.Show();
} }
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
timer = new System.Windows.Forms.Timer(); timer = new System.Windows.Forms.Timer();
timer.Interval = 1000; timer.Interval = 1000;
timer.Tick += Timer_Tick; timer.Tick += Timer_Tick;
Dispatcher secondsDP = DispatcherBuild.Build();
IKeyboardMouseEvents secondsHook = Hook.GlobalEvents();
secondsDP.Invoke((Action)(() =>
{
secondsHook.MouseDownExt += SecondsBakColorFun;
secondsHook.MouseUpExt += SecondsHookSetFuc;
}));
HideWindowUtil.HideAltTab(this); HideWindowUtil.HideAltTab(this);
} }
public static void SecondsHookSetFuc(object sender, System.Windows.Forms.MouseEventArgs e)
{
ThreadPool.QueueUserWorkItem(state =>
{
window.Dispatcher.Invoke(() =>
{
if (ScreenUtil.IsPrimaryFullScreen()) return;
App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
{
int x = e.X;
int y = e.Y;
//获取实际坐标 windows可能会有缩放
IntPtr hdc = GetDC(IntPtr.Zero);
double scale = ScreenUtil.GetScreenScalingFactor();
x = (int)(x / scale);
y = (int)(y / scale);
double w = 1920;
double h = 1080;
double width = SystemParameters.PrimaryScreenWidth;
double height = SystemParameters.PrimaryScreenHeight;
if (x > 1843 / w * width
&& x < 1907 / w * width
&& y > 1037 / h * height
&& y < 1074 / h * height)
{
Color c;
int count = sleepTime;
do
{
c = GetBottomBeforeColor();
if (c.A != beforeColor.A
|| c.R != beforeColor.R
|| c.G != beforeColor.G
|| c.B != beforeColor.B)
{
break;
}
Thread.Sleep(50);
count -= 50;
} while (count > 0);
if (c.A != beforeColor.A
|| c.R != beforeColor.R
|| c.G != beforeColor.G
|| c.B != beforeColor.B)
{
//判断是否展开时钟
Color ct = GetTopBeforeColor();
if (ct.A != topBeforeColor.A
|| ct.R != topBeforeColor.R
|| ct.G != topBeforeColor.G
|| ct.B != topBeforeColor.B)
{
expandClock = true;
}
else
{
expandClock = false;
}
if (!window.BGBorder.IsVisible)
{
Color theamColor = GetColor(1919, 1079);
if (CalculateLight(theamColor) > 255 / 2)
{
//light
window.BGBorder.Background = lightBG;
window.SecondsText.Foreground = lightFont;
}
else
{
// dark
window.BGBorder.Background = darkBG;
window.SecondsText.Foreground = darkFont;
}
SecondsDataContext dc = window.DataContext as SecondsDataContext;
dc.Seconds = (DateTime.Now.Hour).ToString() + ":" +
FormatMS(DateTime.Now.Minute) + ":" +
FormatMS(DateTime.Now.Second);
int sx = (int)(width * lProportion);
int sMarginBottom = (int)(height * tProportion);
window.Left = sx - window.Width;
window.Top = SystemParameters.WorkArea.Height - window.Height;
window.BGBorder.Visibility = Visibility.Visible;
timer.Start();
}
else
{
window.BGBorder.Visibility = Visibility.Collapsed;
timer.Stop();
}
}
}
else if ((expandClock && (x < 1574 / w * width
|| x > 1906 / w * width
|| y < 598 / h * height
|| y > 1020 / h * height)
)
|| !expandClock && (x < 1574 / w * width
|| x > 1906 / w * width
|| y < 950 / h * height
|| y > 1020 / h * height)
)
{
window.BGBorder.Visibility = Visibility.Collapsed;
timer.Stop();
}
}));
});
});
}
public static void SecondsBakColorFun(object sender, System.Windows.Forms.MouseEventArgs e)
{
ThreadPool.QueueUserWorkItem(state =>
{
window.Dispatcher.Invoke(() =>
{
beforeColor = GetBottomBeforeColor();
topBeforeColor = GetTopBeforeColor();
});
});
}
private void Timer_Tick(object sender, EventArgs e) private void Timer_Tick(object sender, EventArgs e)
{ {
string str = (DateTime.Now.Hour).ToString() + ":" + string str = (DateTime.Now.Hour).ToString() + ":" +
@@ -106,10 +245,11 @@ namespace ShowSeconds
FormatMS(DateTime.Now.Second); FormatMS(DateTime.Now.Second);
SecondsDataContext dc = this.DataContext as SecondsDataContext; SecondsDataContext dc = this.DataContext as SecondsDataContext;
dc.Seconds = str; dc.Seconds = str;
this.DataContext = null;
this.DataContext = dc;
} }
private static string FormatMS(int ms) private static string FormatMS(int ms)
{ {
if (ms < 10) if (ms < 10)
@@ -122,180 +262,57 @@ namespace ShowSeconds
} }
} }
private void SecondsHookSetFuc(object sender, MouseEventExtArgs e) private static Color GetBottomBeforeColor()
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
if (ScreenUtil.IsPrimaryFullScreen()) return;
App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
{
int x = e.X;
int y = e.Y;
double w = 1920;
double h = 1080;
double width = SystemParameters.PrimaryScreenWidth;
double height = SystemParameters.PrimaryScreenHeight;
if (x > 1843 / w * width
&& x < 1907 / w * width
&& y > 1037 / h * height
&& y < 1074 / h * height)
{
System.Drawing.Color c;
int count = sleepTime;
do
{
c = GetBottomBeforeColor();
if (c.A != beforeColor.A
|| c.R != beforeColor.R
|| c.G != beforeColor.G
|| c.B != beforeColor.B)
{
break;
}
Thread.Sleep(50);
count -= 50;
} while (count > 0);
if (c.A != beforeColor.A
|| c.R != beforeColor.R
|| c.G != beforeColor.G
|| c.B != beforeColor.B)
{
//判断是否展开时钟
System.Drawing.Color ct = GetTopBeforeColor();
if (ct.A != topBeforeColor.A
|| ct.R != topBeforeColor.R
|| ct.G != topBeforeColor.G
|| ct.B != topBeforeColor.B)
{
expandClock = true;
}
else
{
expandClock = false;
}
if (!BGBorder.IsVisible)
{
System.Drawing.Color theamColor = GetColor(1919, 1079);
if (CalculateLight(theamColor) > 255 / 2)
{
//light
BGBorder.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(theamColor.A, theamColor.R, theamColor.G, theamColor.B));
SecondsText.Foreground = Constants.lightFont;
}
else
{
// dark
//BGBorder.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(theamColor.A, theamColor.R, theamColor.G, theamColor.B));
BGBorder.Background = Constants.darkBG;
SecondsText.Foreground = Constants.darkFont;
}
SecondsDataContext dc = this.DataContext as SecondsDataContext;
dc.Seconds = (DateTime.Now.Hour).ToString() + ":" +
FormatMS(DateTime.Now.Minute) + ":" +
FormatMS(DateTime.Now.Second);
int sx = (int)(SystemParameters.PrimaryScreenWidth * lProportion);
int sMarginBottom = (int)(SystemParameters.WorkArea.Height * tProportion);
Left = sx - Width;
Top = SystemParameters.WorkArea.Height - Height;
BGBorder.Visibility = Visibility.Visible;
timer.Start();
}
else
{
BGBorder.Visibility= Visibility.Collapsed;
timer.Stop();
}
}
}
else if (true)
{
if ((expandClock && (x < 1574 / w * width
|| x > 1906 / w * width
|| y < 598 / h * height
|| y > 1020 / h * height)
)
|| !expandClock && (x < 1574 / w * width
|| x > 1906 / w * width
|| y < 950 / h * height
|| y > 1020 / h * height)
)
{
BGBorder.Visibility = Visibility.Collapsed;
timer.Stop();
}
}
}));
}
}
private static System.Windows.Window window = null;
public static void ShowWindow()
{
try
{
if (window == null || !window.Activate())
{
window = new SecondsWindow();
}
} catch (Exception e)
{
LogUtil.WriteErrorLog(e, "打开显秒窗口异常!");
}
}
public static void CloseWindow()
{
try
{
window.Close();
} catch (Exception e)
{
LogUtil.WriteErrorLog(e, "关闭显秒窗口异常!");
}
}
private void SecondsBakColorFun(object sender, MouseEventExtArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
beforeColor = GetBottomBeforeColor();
topBeforeColor = GetTopBeforeColor();
}
}
private static System.Drawing.Color GetBottomBeforeColor()
{ {
return GetColor(1760, 985); return GetColor(1760, 985);
} }
private static System.Drawing.Color GetTopBeforeColor() private static Color GetTopBeforeColor()
{ {
return GetColor(1751, 693); return GetColor(1751, 693);
} }
private static System.Drawing.Color GetColor(int w2, int h2) private static Color GetColor(int w2, int h2)
{ {
double w = 1920; double w = 1920;
double h = 1080; double h = 1080;
double width = SystemParameters.PrimaryScreenWidth; double width = SystemParameters.PrimaryScreenWidth;
double height = SystemParameters.PrimaryScreenHeight; double height = SystemParameters.PrimaryScreenHeight;
System.Drawing.Point p = new System.Drawing.Point((int)(w2 / w * width), (int)(h2 / h * height)); double scale = ScreenUtil.GetScreenScalingFactor();
System.Drawing.Point p = new System.Drawing.Point((int)(w2 / w * width * scale), (int)(h2 / h * height * scale));
return ScreenUtil.GetColorAt(p); return ScreenUtil.GetColorAt(p);
} }
protected override void OnSourceInitialized(EventArgs e)
private static int CalculateLight(System.Drawing.Color color)
{ {
int[] colorArr = new int[] { color.R, color.G, color.B }; base.OnSourceInitialized(e);
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
if (hwndSource != null)
{
IntPtr handle = hwndSource.Handle;
hwndSource.AddHook(new HwndSourceHook(WndProc));
}
}
IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == MessageUtil.WM_COPYDATA)
{
MessageUtil.CopyDataStruct cds = (MessageUtil.CopyDataStruct)System.Runtime.InteropServices.Marshal.PtrToStructure(lParam, typeof(MessageUtil.CopyDataStruct));
if ("Shutdown".Equals(cds.msg))
{
Application.Current.Shutdown();
}
}
return hwnd;
}
private static int CalculateLight(Color color)
{
int[] colorArr = new int[] {color.R, color.G, color.B};
int max = 0; int max = 0;
int min = 255; int min = 255;
@@ -308,5 +325,43 @@ namespace ShowSeconds
return avg; return avg;
} }
private static SecondsWindow window = null;
public static void ShowWindow()
{
if (window == null || !window.Activate())
{
window = new SecondsWindow();
}
window.Show();
Keyboard.Focus(window);
}
//#######################################################
/// <summary>
/// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,
/// 以后可以在GDI函数中使用该句柄来在设备上下文环境中绘图。
/// </summary>
/// <param name="hWnd">设备上下文环境被检索的窗口的句柄如果该值为NULLGetDC则检索整个屏幕的设备上下文环境。</param>
/// <returns>如果成功返回指定窗口客户区的设备上下文环境如果失败返回值为Null。</returns>
[DllImport("user32")]
public static extern IntPtr GetDC(IntPtr hWnd);
/// <summary>
/// 该函数释放设备上下文环境DC供其他应用程序使用。函数的效果与设备上下文环境类型有关。
/// 它只释放公用的和设备上下文环境,对于类或私有的则无效。
/// </summary>
/// <param name="hWnd">指向要释放的设备上下文环境所在的窗口的句柄。</param>
/// <param name="hDC">指向要释放的设备上下文环境的句柄。</param>
/// <returns>如果释放成功则返回值为1如果没有释放成功则返回值为0。</returns>
[DllImport("user32")]
public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
[DllImport("user32")]
public static extern bool GetCursorPos(out System.Drawing.Point pt);
} }
} }

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace GeekDesk.Task
{
internal class ShowSecondTask
{
public static void SHowSecond()
{
System.Timers.Timer timer = new System.Timers.Timer
{
Enabled = true,
Interval = 5000
};
timer.Start();
timer.Elapsed += Timer_Elapsed;
}
private static void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Process[] pcArr = Process.GetProcessesByName("ShellExperienceHost.exe");
Thread.Sleep(1000);
}
}
}

View File

@@ -60,7 +60,7 @@ namespace GeekDesk.Task
if (Environment.OSVersion.Platform == PlatformID.Win32NT) if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{ {
SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1); SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
} }
} }
#region #region

View File

@@ -1,9 +1,9 @@
{ {
"title": "GeekDesk版本更新", "title": "GeekDesk版本更新",
"subTitle": "V2.5.13", "subTitle": "V2.5.12",
"msgTitle": "本次更新内容如下", "msgTitle": "本次更新内容如下",
"msg": "['求Star,求Star', '集成Win11显秒插件', '崩溃问题修复', '现在在右侧栏(快捷图标区域)也可以鼠标滚轮切换菜单了', '缩放屏幕截图问题修复(感谢@1062406901提的PR)', '更改一下Logo', '其它已知问题修复']", "msg": "['求Star,求Star', '集成Win11显秒插件', '崩溃问题修复', '现在在右侧栏(快捷图标区域)也可以鼠标滚轮切换菜单了', '缩放屏幕截图问题修复(感谢@1062406901提的PR)', '其它已知问题修复']",
"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.5.13" "version": "2.5.12"
} }

View File

@@ -44,7 +44,7 @@ namespace GeekDesk.Util
BinaryFormatter bf = new BinaryFormatter(); BinaryFormatter bf = new BinaryFormatter();
appData = bf.Deserialize(fs) as AppData; appData = bf.Deserialize(fs) as AppData;
} }
} }
catch catch
{ {
if (File.Exists(Constants.DATA_FILE_BAK_PATH)) if (File.Exists(Constants.DATA_FILE_BAK_PATH))
@@ -69,22 +69,20 @@ namespace GeekDesk.Util
GlobalMsgNotification gm = new GlobalMsgNotification(msg); GlobalMsgNotification gm = new GlobalMsgNotification(msg);
HandyControl.Controls.Notification ntf = HandyControl.Controls.Notification.Show(gm, ShowAnimation.Fade, true); HandyControl.Controls.Notification ntf = HandyControl.Controls.Notification.Show(gm, ShowAnimation.Fade, true);
gm.ntf = ntf; gm.ntf = ntf;
} } catch
catch
{ {
MessageBox.Show("不幸的是, GeekDesk当前的数据文件已经损坏\n如果你有备份, 请将备份文件重命名为:Data 然后将Data覆盖到GeekDesk的根目录即可!"); MessageBox.Show("不幸的是, GeekDesk当前的数据文件已经损坏\n如果你有备份, 请将备份文件重命名为:Data 然后将Data覆盖到GeekDesk的根目录即可!");
Application.Current.Shutdown(); Application.Current.Shutdown();
return null; return null;
} }
} } else
else
{ {
MessageBox.Show("不幸的是, GeekDesk当前的数据文件已经损坏\n如果你有备份, 请将备份文件重命名为:Data 然后将Data覆盖到GeekDesk的根目录即可!"); MessageBox.Show("不幸的是, GeekDesk当前的数据文件已经损坏\n如果你有备份, 请将备份文件重命名为:Data 然后将Data覆盖到GeekDesk的根目录即可!");
Application.Current.Shutdown(); Application.Current.Shutdown();
return null; return null;
} }
} }
} }
return appData; return appData;
@@ -144,7 +142,7 @@ namespace GeekDesk.Util
} }
} }
/// <summary> /// <summary>
/// 根据路径获取文件图标等信息 /// 根据路径获取文件图标等信息
@@ -246,7 +244,7 @@ namespace GeekDesk.Util
} }
/// <summary> /// <summary>

View File

@@ -172,8 +172,7 @@ namespace GeekDesk.Util
.ToString() .ToString()
.Replace('/', Path.DirectorySeparatorChar) .Replace('/', Path.DirectorySeparatorChar)
); );
} } catch (Exception ex)
catch (Exception ex)
{ {
LogUtil.WriteErrorLog(ex, "建立相对路径出错:fromPath:" + fromPath + ",toPath:" + toPath); LogUtil.WriteErrorLog(ex, "建立相对路径出错:fromPath:" + fromPath + ",toPath:" + toPath);
} }

View File

@@ -51,14 +51,14 @@
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。 在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation --> 将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
</windowsSettings>
</application>
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) --> <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!-- <!--

View File

@@ -2,7 +2,6 @@
<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.3.0" targetFramework="net472" /> <package id="HandyControl" version="3.3.0" targetFramework="net472" />
<package id="KeyMouseHook" version="1.0.6" targetFramework="net472" developmentDependency="true" />
<package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="net472" developmentDependency="true" /> <package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="net472" developmentDependency="true" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" /> <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" />
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="net472" developmentDependency="true" /> <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="net472" developmentDependency="true" />