Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
087e98e6df | ||
|
|
8b2919c3b5 | ||
|
|
1d6830b30b | ||
|
|
ac8302280f | ||
|
|
2df6582f83 | ||
|
|
ece8787b8e | ||
|
|
2e1cc7ee3c | ||
|
|
f152aaf1f4 | ||
|
|
6fd1e65db7 | ||
|
|
ea39576709 | ||
|
|
9485b801b6 | ||
|
|
08424b0db0 | ||
|
|
9de5a19f7f | ||
|
|
943e8bcefb | ||
|
|
48732a0815 | ||
|
|
08b4596f31 | ||
|
|
4565dc5bd6 | ||
|
|
48fffa6da7 | ||
|
|
6072832654 | ||
|
|
dd41635199 | ||
|
|
85ad6a6bc4 | ||
|
|
c34142923c | ||
|
|
29bb799f11 | ||
|
|
41799251af | ||
|
|
a7181f6973 | ||
|
|
eba6d4770a | ||
|
|
058ed5016a | ||
|
|
77a6233e63 | ||
|
|
98f332dc2e | ||
|
|
3a18882372 | ||
|
|
26e4a7e4d5 | ||
|
|
280e66f457 | ||
|
|
1fce566f4a | ||
|
|
3654ec393a | ||
|
|
b12bbe9183 | ||
|
|
37dd2f7fb2 | ||
|
|
4b5cc7b7eb | ||
|
|
a18a66352c | ||
|
|
d0547da214 | ||
|
|
300fcb78da | ||
|
|
05afacd3ae | ||
|
|
425d1a4ce5 | ||
|
|
32adce1815 | ||
|
|
80a9975140 | ||
|
|
c1e83e8a39 | ||
|
|
5fa5d3436d | ||
|
|
f4a060eb00 | ||
|
|
6fda2ea107 | ||
|
|
ce17e7174e | ||
|
|
2fd078f722 | ||
|
|
753a4e4fa2 | ||
|
|
ca38d44feb | ||
|
|
546985f132 | ||
|
|
ee47443c34 | ||
|
|
ad2556a216 | ||
|
|
ab5529f1e8 | ||
|
|
7589736751 | ||
|
|
de57b8d78d | ||
|
|
d9b0a4de89 | ||
|
|
d5e0dc98db | ||
|
|
e82af431b5 |
112
App.config
112
App.config
@@ -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="800" />
|
<add key="DelayTime" value="1500" />
|
||||||
</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;Plugins\EveryThing\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.12" />
|
<add key="Version" value="2.5.14" />
|
||||||
<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>
|
||||||
@@ -54,7 +54,7 @@ namespace GeekDesk
|
|||||||
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "严重异常!");
|
LogUtil.WriteErrorLog(e, "严重异常!");
|
||||||
MessageBox.Show("GeekDesk遇到未知问题崩溃!");
|
//MessageBox.Show("GeekDesk遇到未知问题崩溃!");
|
||||||
}
|
}
|
||||||
public static void DoEvents()
|
public static void DoEvents()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ namespace GeekDesk.Constant
|
|||||||
|
|
||||||
public static string PW_FILE_BAK_PATH = APP_DIR + "bak\\pw.txt"; //密码文件路径
|
public static string PW_FILE_BAK_PATH = APP_DIR + "bak\\pw.txt"; //密码文件路径
|
||||||
|
|
||||||
|
public static string UUID_FILE_BAK_PATH = APP_DIR + "bak\\uuid.txt"; //密码文件路径
|
||||||
|
|
||||||
public static string LOG_FILE_PATH = APP_DIR + "logs\\log.log"; //日志文件
|
public static string LOG_FILE_PATH = APP_DIR + "logs\\log.log"; //日志文件
|
||||||
|
|
||||||
public static string ERROR_FILE_PATH = APP_DIR + "logs\\error.log"; // 错误日志
|
public static string ERROR_FILE_PATH = APP_DIR + "logs\\error.log"; // 错误日志
|
||||||
|
|||||||
14
Constant/MenuType.cs
Normal file
14
Constant/MenuType.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Constant
|
||||||
|
{
|
||||||
|
public enum MenuType
|
||||||
|
{
|
||||||
|
NORMAL, //普通菜单
|
||||||
|
LINK, //关联菜单
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace GeekDesk.Constant
|
using System;
|
||||||
|
|
||||||
|
namespace GeekDesk.Constant
|
||||||
{
|
{
|
||||||
internal class RunTimeStatus
|
internal class RunTimeStatus
|
||||||
{
|
{
|
||||||
@@ -6,57 +8,83 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询框是否在工作
|
/// 查询框是否在工作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SEARCH_BOX_SHOW = false;
|
public static volatile bool SEARCH_BOX_SHOW = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询框是否已经关闭了300毫秒 防止点击右侧区域关闭查询框时误打开列表
|
||||||
|
/// </summary>
|
||||||
|
public static volatile bool SEARCH_BOX_HIDED_300 = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 贴边隐藏后 以非鼠标经过方式触发显示
|
/// 贴边隐藏后 以非鼠标经过方式触发显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool MARGIN_HIDE_AND_OTHER_SHOW = false;
|
public static volatile bool MARGIN_HIDE_AND_OTHER_SHOW = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否锁定主面板 锁定后 不执行隐藏动作
|
/// 是否锁定主面板 锁定后 不执行隐藏动作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool LOCK_APP_PANEL = false;
|
public static volatile bool LOCK_APP_PANEL = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否弹出了菜单密码框
|
/// 是否弹出了菜单密码框
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SHOW_MENU_PASSWORDBOX = false;
|
public static volatile bool SHOW_MENU_PASSWORDBOX = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否弹出了右键菜单
|
/// 是否弹出了右键菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SHOW_RIGHT_BTN_MENU = false;
|
public static volatile bool SHOW_RIGHT_BTN_MENU = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否点击了面板功能按钮
|
/// 是否点击了面板功能按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool APP_BTN_IS_DOWN = false;
|
public static volatile bool APP_BTN_IS_DOWN = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否正在编辑菜单
|
/// 是否正在编辑菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool IS_MENU_EDIT = false;
|
public static volatile bool IS_MENU_EDIT = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图标card 鼠标滚轮是否正在工作
|
/// 图标card 鼠标滚轮是否正在工作
|
||||||
/// 用来控制popup的显示 否则低性能机器会造成卡顿
|
/// 用来控制popup的显示 否则低性能机器会造成卡顿
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool ICONLIST_MOUSE_WHEEL = false;
|
public static volatile bool ICONLIST_MOUSE_WHEEL = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 控制多少毫秒后 关闭(ICONLIST_MOUSE_WHEEL)鼠标滚轮运行状态
|
/// 控制多少毫秒后 关闭(ICONLIST_MOUSE_WHEEL)鼠标滚轮运行状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int MOUSE_WHEEL_WAIT_MS = 100;
|
public static volatile int MOUSE_WHEEL_WAIT_MS = 100;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 与关闭popup 配合使用, 避免线程结束后不显示popup
|
/// 与关闭popup 配合使用, 避免线程结束后不显示popup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool MOUSE_ENTER_ICON = false;
|
public static volatile bool MOUSE_ENTER_ICON = false;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 控制每次刷新搜索结果 鼠标移动后显示popup
|
/// 控制每次刷新搜索结果 鼠标移动后显示popup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static int MOUSE_MOVE_COUNT = 0;
|
public static volatile int MOUSE_MOVE_COUNT = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// everything 新的键入搜索
|
||||||
|
/// </summary>
|
||||||
|
public static volatile bool EVERYTHING_NEW_SEARCH = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 键入多少毫秒后 没有新的键入开启搜索
|
||||||
|
/// </summary>
|
||||||
|
public static volatile int EVERYTHING_SEARCH_DELAY_TIME = 300;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 控制主界面热键按下规定时间内只执行一次show hide
|
||||||
|
/// </summary>
|
||||||
|
public static volatile bool MAIN_HOT_KEY_DOWN = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 控制主界面热键按下规定时间内只执行一次show hide
|
||||||
|
/// </summary>
|
||||||
|
public static volatile int MAIN_HOT_KEY_TIME = 300;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ namespace GeekDesk.Constant
|
|||||||
{
|
{
|
||||||
LEFT_CARD = 0, //左侧托盘宽度
|
LEFT_CARD = 0, //左侧托盘宽度
|
||||||
RIGHT_CARD = 1, //右侧托盘宽度
|
RIGHT_CARD = 1, //右侧托盘宽度
|
||||||
RIGHT_CARD_HALF = 2 //右侧托盘宽度的一半
|
RIGHT_CARD_HALF = 2, //右侧托盘宽度的一半
|
||||||
|
RIGHT_CARD_HALF_TEXT = 3, //右侧托盘宽度的一半 再减去左侧图像宽度
|
||||||
|
RIGHT_CARD_20 = 4, //右侧托盘宽度 - 20
|
||||||
|
RIGHT_CARD_40 = 5, //右侧托盘宽度 - 40
|
||||||
|
RIGHT_CARD_70 = 6, //右侧托盘宽度 - 70
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,17 +37,17 @@
|
|||||||
</hc:Card>
|
</hc:Card>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="20" HorizontalAlignment="Center" Margin="45.5,310,42.5,36">
|
<hc:UniformSpacingPanel Spacing="20" HorizontalAlignment="Center" Margin="45.5,310,42.5,36">
|
||||||
<hc:TextBox x:Name="DelayTime" Height="20" Width="60" Text="10" PreviewTextInput="DelayTime_PreviewTextInput" PreviewLostKeyboardFocus="DelayTime_PreviewLostKeyboardFocus" />
|
<hc:TextBox x:Name="DelayTime" Style="{StaticResource MyTextBoxStyle}" Height="20" Width="60" Text="10" PreviewTextInput="DelayTime_PreviewTextInput" PreviewLostKeyboardFocus="DelayTime_PreviewLostKeyboardFocus" />
|
||||||
<ComboBox x:Name="DelayType" hc:DropDownElement.ConsistentWidth="False" SelectedIndex="0" Height="20" Width="60">
|
<ComboBox x:Name="DelayType" hc:DropDownElement.ConsistentWidth="False" SelectedIndex="0" Height="20" Width="60">
|
||||||
<ComboBox.Items>
|
<ComboBox.Items>
|
||||||
<ComboBoxItem Content="分"/>
|
<ComboBoxItem Content="分"/>
|
||||||
<ComboBoxItem Content="时"/>
|
<ComboBoxItem Content="时"/>
|
||||||
</ComboBox.Items>
|
</ComboBox.Items>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<Button Content="推迟提醒" Click="DelayButton_Click"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="推迟提醒" Click="DelayButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
<Button Click="BacklogDone_Click" Content="朕已阅" Margin="10,0,10,20" Width="298" VerticalAlignment="Bottom"/>
|
<Button Style="{StaticResource MyBtnStyle}" Click="BacklogDone_Click" Content="朕已阅" Margin="10,0,10,20" Width="298" VerticalAlignment="Bottom"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<TextBlock Text="SVG 图标地址:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="SVG 图标地址:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red"/>
|
<TextBlock Text="*" Foreground="Red"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox x:Name="IconUrl" Text="{Binding CustomIconUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
<TextBox x:Name="IconUrl" Style="{StaticResource MyTextBoxStyle}" Text="{Binding CustomIconUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,58.276,0,-58.276">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,58.276,0,-58.276">
|
||||||
@@ -31,18 +31,18 @@
|
|||||||
<TextBlock Text="JSON 配置地址:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="JSON 配置地址:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red"/>
|
<TextBlock Text="*" Foreground="Red"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox x:Name="JsonUrl" Text="{Binding CustomIconJsonUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
<TextBox x:Name="JsonUrl" Style="{StaticResource MyTextBoxStyle}" Text="{Binding CustomIconJsonUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<TextBlock Text="注: 需配置正确的url方可加载远程图标!" Foreground="Red" Margin="10,95,-10,-92" />
|
<TextBlock Text="注: 需配置正确的url方可加载远程图标!" Foreground="Red" Margin="10,95,-10,-92" />
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="203,125,-203,-125">
|
<hc:UniformSpacingPanel Spacing="10" Margin="203,125,-203,-125">
|
||||||
<Button Content="取消" Command="hc:ControlCommands.Close" HorizontalAlignment="Stretch" Margin="-1,1,1,1" VerticalAlignment="Stretch"
|
<Button Style="{StaticResource MyBtnStyle}" Content="取消" Command="hc:ControlCommands.Close" HorizontalAlignment="Stretch" Margin="-1,1,1,1" VerticalAlignment="Stretch"
|
||||||
/>
|
/>
|
||||||
<Button Content="教程" Click="Teach_Click"
|
<Button Content="教程" Click="Teach_Click"
|
||||||
Style="{StaticResource Btn1}"/>
|
Style="{StaticResource MyBtnStyle}"/>
|
||||||
<Button Content="保存" Click="Confirm_Click"
|
<Button Content="保存" Click="Confirm_Click"
|
||||||
Command="hc:ControlCommands.Close"
|
Command="hc:ControlCommands.Close"
|
||||||
Style="{StaticResource Btn1}"/>
|
Style="{StaticResource MyBtnStyle}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!--<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>-->
|
<!--<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>-->
|
||||||
|
|||||||
@@ -49,6 +49,6 @@
|
|||||||
</hc:Card>
|
</hc:Card>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Button Click="Close_Click" Content="朕已阅" Margin="10,0,10,20" Width="298" VerticalAlignment="Bottom"/>
|
<Button Style="{StaticResource MyBtnStyle}" Click="Close_Click" Content="朕已阅" Margin="10,0,10,20" Width="298" VerticalAlignment="Bottom"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<Button Content="关闭" Style="{StaticResource Btn1}" Click="Close_Click" HorizontalAlignment="Stretch" Margin="524,360,-524,10" VerticalAlignment="Stretch"/>
|
<Button Content="关闭" Style="{StaticResource MyBtnStyle}" Click="Close_Click" HorizontalAlignment="Stretch" Margin="524,360,-524,10" VerticalAlignment="Stretch"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
|
<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
||||||
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="230" FontSize="14"/>
|
<TextBox x:Name="IconName" Style="{StaticResource MyTextBoxStyle}" Text="{Binding Name, Mode=OneWay}" Width="230" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
||||||
<TextBlock Text="相对路径:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="相对路径:" Style="{StaticResource LeftTB}"/>
|
||||||
@@ -40,24 +40,19 @@
|
|||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,15,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,15,0,0">
|
||||||
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
||||||
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
|
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
|
||||||
<Button Content="修改" Click="EditImage"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="修改" Click="EditImage"/>
|
||||||
<Button Content="重置" Click="ReStoreImage"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="重置" Click="ReStoreImage"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="4,15,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="4,15,0,0">
|
||||||
<CheckBox x:Name="IconIsAdmin" Content="始终以管理员方式启动" IsChecked="{Binding AdminStartUp, Mode=OneWay}">
|
<CheckBox x:Name="IconIsAdmin" Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="始终以管理员方式启动" IsChecked="{Binding AdminStartUp, Mode=OneWay}"/>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,15,0,0">
|
||||||
<TextBlock Text="启动参数:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="启动参数:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="StartArg" Text="{Binding StartArg, Mode=OneWay}" Width="230" Height="100" TextWrapping="Wrap" FontSize="14"/>
|
<TextBox x:Name="StartArg" Style="{StaticResource MyTextBoxStyle}" Text="{Binding StartArg, Mode=OneWay}" Width="230" Height="100" TextWrapping="Wrap" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Margin="0,25,0,0" Spacing="10" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Margin="0,25,0,0" Spacing="10" Grid.ColumnSpan="4">
|
||||||
<Button Content="保存" Style="{StaticResource Btn1}" Click="SaveProperty" Margin="265,10,0,0"/>
|
<Button Content="保存" Style="{StaticResource MyBtnStyle}" Click="SaveProperty" Margin="265,10,0,0"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
|
|||||||
@@ -23,23 +23,23 @@
|
|||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
||||||
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
|
<TextBox x:Name="IconName" Style="{StaticResource MyTextBoxStyle}" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
||||||
<TextBlock Text="Url:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="Url:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="IconUrl" Text="{Binding Path, Mode=OneWay}" Width="180" FontSize="14"/>
|
<TextBox x:Name="IconUrl" Style="{StaticResource MyTextBoxStyle}" Text="{Binding Path, Mode=OneWay}" Width="180" FontSize="14"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Center">
|
||||||
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
||||||
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
|
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" Width="60" Height="60"/>
|
||||||
<Button Content="修改" Click="EditImage"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="修改" Click="EditImage"/>
|
||||||
<Button Content="重置" Click="ReStoreImage"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="重置" Click="ReStoreImage"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
<hc:Divider LineStrokeDashArray="3,3" LineStroke="Black"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10">
|
<hc:UniformSpacingPanel Spacing="10">
|
||||||
<Button Content="保存" Click="SaveProperty" Style="{StaticResource Btn1}" Margin="224,-10,-224,0" />
|
<Button Content="保存" Click="SaveProperty" Style="{StaticResource MyBtnStyle}" Margin="224,-10,-224,0" />
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using GeekDesk.Control.Windows;
|
using GeekDesk.Control.Windows;
|
||||||
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -64,14 +65,15 @@ namespace GeekDesk.Control.Other
|
|||||||
private void MyColorPicker_SelectedColorChanged(object sender, HandyControl.Data.FunctionEventArgs<Color> e)
|
private void MyColorPicker_SelectedColorChanged(object sender, HandyControl.Data.FunctionEventArgs<Color> e)
|
||||||
{
|
{
|
||||||
SolidColorBrush scb = MyColorPicker.SelectedBrush;
|
SolidColorBrush scb = MyColorPicker.SelectedBrush;
|
||||||
|
Color c = scb.Color;
|
||||||
switch (colorType)
|
switch (colorType)
|
||||||
{
|
{
|
||||||
case ColorType.COLOR_1:
|
case ColorType.COLOR_1:
|
||||||
appConfig.GradientBGParam.Color1 = scb.ToString(); break;
|
appConfig.GradientBGParam.Color1 = string.Format("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B); break;
|
||||||
case ColorType.COLOR_2:
|
case ColorType.COLOR_2:
|
||||||
appConfig.GradientBGParam.Color2 = scb.ToString(); break;
|
appConfig.GradientBGParam.Color2 = string.Format("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B); break;
|
||||||
default:
|
default:
|
||||||
appConfig.TextColor = scb.ToString(); break;
|
appConfig.TextColor = string.Format("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid Height="65" x:Name="HintGrid" Visibility="Collapsed" Margin="0,20,0,0" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, Event=Visibility}">
|
<Grid Height="65" x:Name="HintGrid" Visibility="Collapsed" Margin="0,20,0,0" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, Event=Visibility}">
|
||||||
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Top" HorizontalAlignment="Center">
|
<hc:UniformSpacingPanel Spacing="10" VerticalAlignment="Top" HorizontalAlignment="Center">
|
||||||
<hc:TextBox x:Name="HintBox" TextAlignment="Left" Width="220"/>
|
<hc:TextBox Style="{StaticResource MyTextBoxStyle}" x:Name="HintBox" TextAlignment="Left" Width="220"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="202,35,0,0" VerticalAlignment="Top" HorizontalAlignment="Left">
|
<hc:UniformSpacingPanel Spacing="10" Margin="202,35,0,0" VerticalAlignment="Top" HorizontalAlignment="Left">
|
||||||
<TextBlock Text="跳过" MouseLeftButtonDown="NextTB_MouseLeftButtonDown" Style="{StaticResource NextTB}"/>
|
<TextBlock Text="跳过" MouseLeftButtonDown="NextTB_MouseLeftButtonDown" Style="{StaticResource NextTB}"/>
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ namespace GeekDesk.Control.Other
|
|||||||
if (!string.IsNullOrEmpty(appData.AppConfig.PasswordHint))
|
if (!string.IsNullOrEmpty(appData.AppConfig.PasswordHint))
|
||||||
{
|
{
|
||||||
//显示提示信息
|
//显示提示信息
|
||||||
|
HintMsg.Text = "提示: " + appData.AppConfig.PasswordHint;
|
||||||
HintMsg.Visibility = Visibility.Visible;
|
HintMsg.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,25 +170,33 @@ namespace GeekDesk.Control.Other
|
|||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
Thread.Sleep(time);
|
Thread.Sleep(time);
|
||||||
Dispatcher.Invoke(() =>
|
try
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(P1.Password))
|
Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
P1.Focus();
|
try
|
||||||
return;
|
{
|
||||||
}
|
if (string.IsNullOrEmpty(P1.Password))
|
||||||
if (string.IsNullOrEmpty(P2.Password))
|
{
|
||||||
{
|
P1.Focus();
|
||||||
P2.Focus();
|
return;
|
||||||
return;
|
}
|
||||||
}
|
if (string.IsNullOrEmpty(P2.Password))
|
||||||
if (string.IsNullOrEmpty(P3.Password))
|
{
|
||||||
{
|
P2.Focus();
|
||||||
P3.Focus();
|
return;
|
||||||
return;
|
}
|
||||||
}
|
if (string.IsNullOrEmpty(P3.Password))
|
||||||
P4.Focus();
|
{
|
||||||
});
|
P3.Focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
P4.Focus();
|
||||||
|
}
|
||||||
|
catch (Exception ex) { }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (Exception e2) { }
|
||||||
}).Start();
|
}).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
196
Control/Other/SearchResControl.xaml
Normal file
196
Control/Other/SearchResControl.xaml
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<UserControl x:Class="GeekDesk.Control.Other.SearchResControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:GeekDesk.Control.Other"
|
||||||
|
xmlns:temp="clr-namespace:GeekDesk.ViewModel.Temp"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||||
|
xmlns:cst="clr-namespace:GeekDesk.Constant"
|
||||||
|
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
||||||
|
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
|
||||||
|
xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
|
>
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style x:Key="SearchListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
|
<Border>
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ImageStyle" TargetType="Image">
|
||||||
|
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Source" Value="{Binding BitmapImage}"/>
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ImageStyleNoWrite" TargetType="Image">
|
||||||
|
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Source" Value="{Binding BitmapImage_NoWrite}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<cvt:OpcityConvert x:Key="OpcityConvert"/>
|
||||||
|
<cvt:GetWidthByWWConvert x:Key="GetWidthByWWConvert"/>
|
||||||
|
<cvt:Visibility2BooleanConverter x:Key="Visibility2BooleanConverter"/>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid>
|
||||||
|
<WrapPanel Orientation="Horizontal"
|
||||||
|
Margin="10"
|
||||||
|
Panel.ZIndex="1"
|
||||||
|
>
|
||||||
|
<UniformGrid x:Name="VerticalUFG"
|
||||||
|
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, Event=Loaded}"
|
||||||
|
xf:Animations.Secondary="{xf:Animate BasedOn={StaticResource FadeOut}, Event=None}"
|
||||||
|
xf:Animations.SecondaryBinding="{Binding Visibility,
|
||||||
|
Converter={StaticResource Visibility2BooleanConverter}, ConverterParameter='reverse',
|
||||||
|
ElementName=VerticalUFG}"
|
||||||
|
>
|
||||||
|
<!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
|
||||||
|
<ListBox VirtualizingPanel.VirtualizationMode="Recycling"
|
||||||
|
VirtualizingPanel.IsVirtualizing="True"
|
||||||
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
||||||
|
VirtualizingPanel.ScrollUnit="Pixel"
|
||||||
|
ItemsSource="{Binding}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Padding="0,10,0,0"
|
||||||
|
x:Name="SearchListBox"
|
||||||
|
SelectionChanged="SearchListBox_SelectionChanged"
|
||||||
|
>
|
||||||
|
<ListBox.Template>
|
||||||
|
<ControlTemplate TargetType="ListBox">
|
||||||
|
<hc:ScrollViewer
|
||||||
|
HorizontalScrollBarVisibility="Hidden"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
IsInertiaEnabled="True"
|
||||||
|
CanContentScroll="True"
|
||||||
|
PreviewMouseWheel="VerticalIconList_PreviewMouseWheel"
|
||||||
|
ScrollChanged="VerticalCard_ScrollChanged"
|
||||||
|
>
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderBrush}">
|
||||||
|
<ItemsPresenter/>
|
||||||
|
</Border>
|
||||||
|
</hc:ScrollViewer>
|
||||||
|
</ControlTemplate>
|
||||||
|
</ListBox.Template>
|
||||||
|
|
||||||
|
<ListBox.Background>
|
||||||
|
<SolidColorBrush Opacity="0"/>
|
||||||
|
</ListBox.Background>
|
||||||
|
|
||||||
|
<ListBox.Resources>
|
||||||
|
<ContextMenu x:Key="IconDialog" Width="200">
|
||||||
|
<MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
|
||||||
|
<MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
|
||||||
|
<MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
|
||||||
|
</ContextMenu>
|
||||||
|
</ListBox.Resources>
|
||||||
|
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}">
|
||||||
|
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
|
|
||||||
|
<ListBox.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<VirtualizingStackPanel
|
||||||
|
Orientation="Vertical"
|
||||||
|
Background="#00FFFFFF"
|
||||||
|
VirtualizationMode="Recycling"
|
||||||
|
IsVirtualizing="True"
|
||||||
|
IsContainerVirtualizable="True"
|
||||||
|
VirtualizingPanel.ScrollUnit="Pixel"
|
||||||
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
|
||||||
|
Converter={StaticResource GetWidthByWWConvert},
|
||||||
|
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}"
|
||||||
|
/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Border CornerRadius="8">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem }}}"
|
||||||
|
Value="True">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.68"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<WrapPanel Tag="{Binding}"
|
||||||
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
|
||||||
|
Converter={StaticResource GetWidthByWWConvert},
|
||||||
|
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_HALF}}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
hc:Poptip.HitMode="None"
|
||||||
|
hc:Poptip.Placement="BottomLeft"
|
||||||
|
Background="#00FFFFFF"
|
||||||
|
MouseEnter="SearchIcon_MouseEnter"
|
||||||
|
MouseLeave="SearchIcon_MouseLeave"
|
||||||
|
MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
||||||
|
MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
||||||
|
MouseMove="SearchIcon_MouseMove"
|
||||||
|
Margin="25,10,0,10"
|
||||||
|
>
|
||||||
|
<Image Style="{StaticResource ImageStyleNoWrite}" RenderOptions.BitmapScalingMode="HighQuality"/>
|
||||||
|
<StackPanel Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
|
||||||
|
Converter={StaticResource GetWidthByWWConvert},
|
||||||
|
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_HALF_TEXT}}" >
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,5,0,0"
|
||||||
|
MaxHeight="40"
|
||||||
|
FontSize="13"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
TextAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
||||||
|
Text="{Binding Name}"/>
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,10,0,0"
|
||||||
|
MaxHeight="40"
|
||||||
|
FontSize="11"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
TextAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
||||||
|
Text="{Binding Path}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</WrapPanel>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<!--</hc:TransitioningContentControl>-->
|
||||||
|
</UniformGrid>
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
331
Control/Other/SearchResControl.xaml.cs
Normal file
331
Control/Other/SearchResControl.xaml.cs
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Control.Windows;
|
||||||
|
using GeekDesk.Plugins.EveryThing;
|
||||||
|
using GeekDesk.Util;
|
||||||
|
using GeekDesk.ViewModel;
|
||||||
|
using GeekDesk.ViewModel.Temp;
|
||||||
|
using HandyControl.Controls;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
|
namespace GeekDesk.Control.Other
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// SearchResControl.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class SearchResControl : UserControl
|
||||||
|
{
|
||||||
|
public SearchResControl(ObservableCollection<IconInfo> iconList)
|
||||||
|
{
|
||||||
|
this.DataContext = iconList;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void SearchListBoxIndexAdd()
|
||||||
|
{
|
||||||
|
//控制移动后 鼠标即使在图标上也不显示popup
|
||||||
|
RunTimeStatus.MOUSE_MOVE_COUNT = 0;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = false;
|
||||||
|
|
||||||
|
if (SearchListBox.Items.Count > 0)
|
||||||
|
{
|
||||||
|
if (SearchListBox.SelectedIndex < SearchListBox.Items.Count - 1)
|
||||||
|
{
|
||||||
|
SearchListBox.SelectedIndex += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SearchListBoxIndexSub()
|
||||||
|
{
|
||||||
|
//控制移动后 鼠标即使在图标上也不显示popup
|
||||||
|
RunTimeStatus.MOUSE_MOVE_COUNT = 0;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = false;
|
||||||
|
|
||||||
|
if (SearchListBox.Items.Count > 0)
|
||||||
|
{
|
||||||
|
if (SearchListBox.SelectedIndex > 0)
|
||||||
|
{
|
||||||
|
SearchListBox.SelectedIndex -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartupSelectionItem()
|
||||||
|
{
|
||||||
|
if (SearchListBox.SelectedItem != null)
|
||||||
|
{
|
||||||
|
IconInfo icon = SearchListBox.SelectedItem as IconInfo;
|
||||||
|
if (icon.AdminStartUp)
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SearchListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
SearchListBox.ScrollIntoView(SearchListBox.SelectedItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询结果ICON鼠标移动事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void SearchIcon_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
//控制首次刷新搜索结果后, 鼠标首次移动后显示popup
|
||||||
|
RunTimeStatus.MOUSE_MOVE_COUNT++;
|
||||||
|
|
||||||
|
//防止移动后不刷新popup content
|
||||||
|
IconInfo info = (sender as Panel).Tag as IconInfo;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptipContent.Text = info.Content;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.VerticalOffset = 30;
|
||||||
|
|
||||||
|
if (RunTimeStatus.MOUSE_MOVE_COUNT > 1 && !RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
||||||
|
{
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询结果 ICON 鼠标进入事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void SearchIcon_MouseEnter(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
//显示popup
|
||||||
|
RunTimeStatus.MOUSE_ENTER_ICON = true;
|
||||||
|
if (!RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
||||||
|
{
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
this.Dispatcher.BeginInvoke(new Action(() =>
|
||||||
|
{
|
||||||
|
IconInfo info = (sender as Panel).Tag as IconInfo;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptipContent.Text = info.Content;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.VerticalOffset = 30;
|
||||||
|
Thread.Sleep(100);
|
||||||
|
if (!RunTimeStatus.ICONLIST_MOUSE_WHEEL && RunTimeStatus.MOUSE_MOVE_COUNT > 1)
|
||||||
|
{
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = true;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询结果ICON鼠标离开事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void SearchIcon_MouseLeave(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
RunTimeStatus.MOUSE_ENTER_ICON = false;
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 搜索结果icon 列表鼠标滚轮预处理时间
|
||||||
|
/// 主要使用自定义popup解决卡顿问题解决卡顿问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void VerticalIconList_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||||
|
{
|
||||||
|
//控制在滚动时不显示popup 否则会在低GPU性能机器上造成卡顿
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = false;
|
||||||
|
if (RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
||||||
|
{
|
||||||
|
RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 500;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RunTimeStatus.ICONLIST_MOUSE_WHEEL = true;
|
||||||
|
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
while (RunTimeStatus.MOUSE_WHEEL_WAIT_MS > 0)
|
||||||
|
{
|
||||||
|
Thread.Sleep(1);
|
||||||
|
RunTimeStatus.MOUSE_WHEEL_WAIT_MS -= 1;
|
||||||
|
}
|
||||||
|
if (RunTimeStatus.MOUSE_ENTER_ICON)
|
||||||
|
{
|
||||||
|
this.Dispatcher.BeginInvoke(new Action(() =>
|
||||||
|
{
|
||||||
|
MainWindow.mainWindow.RightCard.MyPoptip.IsOpen = true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 100;
|
||||||
|
RunTimeStatus.ICONLIST_MOUSE_WHEEL = false;
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void Icon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (MainWindow.appData.AppConfig.DoubleOpen)
|
||||||
|
{
|
||||||
|
IconClick(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Icon_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (!MainWindow.appData.AppConfig.DoubleOpen)
|
||||||
|
{
|
||||||
|
IconClick(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图标点击事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void IconClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (MainWindow.appData.AppConfig.DoubleOpen && e.ClickCount >= 2)
|
||||||
|
{
|
||||||
|
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
||||||
|
if (icon.AdminStartUp)
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!MainWindow.appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
||||||
|
{
|
||||||
|
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
||||||
|
if (icon.AdminStartUp)
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static volatile bool EveryThingRuning = false;
|
||||||
|
private void VerticalCard_ScrollChanged(object sender, ScrollChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (MainWindow.appData.AppConfig.EnableEveryThing == true && EveryThingUtil.HasNext())
|
||||||
|
{
|
||||||
|
HandyControl.Controls.ScrollViewer sv = sender as HandyControl.Controls.ScrollViewer;
|
||||||
|
if (sv.ExtentHeight - (sv.ActualHeight + sv.VerticalOffset) < 100
|
||||||
|
&& EveryThingUtil.HasNext()
|
||||||
|
&& !EveryThingRuning)
|
||||||
|
{
|
||||||
|
EveryThingRuning = true;
|
||||||
|
MainWindow.mainWindow.RightCard.Loading_RightCard.Visibility = Visibility.Visible;
|
||||||
|
int everyThingCount = Convert.ToInt32(MainWindow.mainWindow.EverythingSearchCount.Text);
|
||||||
|
|
||||||
|
ObservableCollection<IconInfo> resList = this.DataContext as ObservableCollection<IconInfo>;
|
||||||
|
|
||||||
|
ThreadPool.QueueUserWorkItem(state =>
|
||||||
|
{
|
||||||
|
ObservableCollection<IconInfo> searchRes = EveryThingUtil.NextPage();
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
everyThingCount += searchRes.Count;
|
||||||
|
MainWindow.mainWindow.EverythingSearchCount.Text = Convert.ToString(everyThingCount);
|
||||||
|
foreach (IconInfo info in searchRes)
|
||||||
|
{
|
||||||
|
resList.Add(info);
|
||||||
|
}
|
||||||
|
MainWindow.mainWindow.RightCard.Loading_RightCard.Visibility = Visibility.Collapsed;
|
||||||
|
EveryThingRuning = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 管理员方式启动
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void IconAdminStart(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 打开文件所在位置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void ShowInExplore(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||||
|
ProcessUtil.StartIconApp(icon, IconStartType.SHOW_IN_EXPLORE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void SystemContextMenu(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||||
|
DirectoryInfo[] folders = new DirectoryInfo[1];
|
||||||
|
folders[0] = new DirectoryInfo(icon.Path);
|
||||||
|
ShellContextMenu scm = new ShellContextMenu();
|
||||||
|
System.Drawing.Point p = System.Windows.Forms.Cursor.Position;
|
||||||
|
p.X -= 80;
|
||||||
|
p.Y -= 80;
|
||||||
|
scm.ShowContextMenu(folders, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,10 +48,11 @@
|
|||||||
<hc:UniformSpacingPanel Spacing="10" HorizontalAlignment="Center" Margin="0,5,0,0">
|
<hc:UniformSpacingPanel Spacing="10" HorizontalAlignment="Center" Margin="0,5,0,0">
|
||||||
<hc:Shield x:Name="PublicWeChatPanel" Subject="公众号" Visibility="Visible" Status="抓几个娃" Margin="0,0,5,0" Color="#04913B">
|
<hc:Shield x:Name="PublicWeChatPanel" Subject="公众号" Visibility="Visible" Status="抓几个娃" Margin="0,0,5,0" Color="#04913B">
|
||||||
<hc:Poptip.Instance>
|
<hc:Poptip.Instance>
|
||||||
<hc:Poptip PlacementType="Top">
|
<hc:Poptip PlacementType="Top" >
|
||||||
<hc:Poptip.Content>
|
<hc:Poptip.Content>
|
||||||
<Image x:Name="PublicWeChat" Width="150" Height="150" />
|
<Image x:Name="PublicWeChat" Width="150" Height="150" />
|
||||||
</hc:Poptip.Content>
|
</hc:Poptip.Content>
|
||||||
|
|
||||||
</hc:Poptip>
|
</hc:Poptip>
|
||||||
</hc:Poptip.Instance>
|
</hc:Poptip.Instance>
|
||||||
</hc:Shield>
|
</hc:Shield>
|
||||||
@@ -79,10 +80,10 @@
|
|||||||
<!--<hc:UniformSpacingPanel Spacing="10" Visibility="Visible" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
|
<!--<hc:UniformSpacingPanel Spacing="10" Visibility="Visible" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0">
|
||||||
<TextBlock Text="更新源:" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
<TextBlock Text="更新源:" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="Gitee"
|
Style="{StaticResource MyRadioBtnStyle}" Content="Gitee"
|
||||||
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="GitHub"
|
Style="{StaticResource MyRadioBtnStyle}" Content="GitHub"
|
||||||
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=2}"/>
|
||||||
</hc:UniformSpacingPanel>-->
|
</hc:UniformSpacingPanel>-->
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -25,63 +25,36 @@
|
|||||||
<TextBlock Text="面板动作设置" VerticalAlignment="Center"/>
|
<TextBlock Text="面板动作设置" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox x:Name="IconIsAdmin" Content="启动时显示主面板" IsChecked="{Binding StartedShowPanel}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
x:Name="IconIsAdmin"
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
Content="启动时显示主面板" IsChecked="{Binding StartedShowPanel}"/>
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox Content="显示时追随鼠标位置" IsChecked="{Binding FollowMouse}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="显示时追随鼠标位置" IsChecked="{Binding FollowMouse}"/>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox Content="鼠标中键呼出" Click="MouseMiddle_Changed" IsChecked="{Binding MouseMiddleShow}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="鼠标中键呼出"
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
Click="MouseMiddle_Changed" IsChecked="{Binding MouseMiddleShow}"/>
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox Content="双击启动" IsChecked="{Binding DoubleOpen}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="双击启动" IsChecked="{Binding DoubleOpen}"/>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox Content="悬停切换菜单" IsChecked="{Binding HoverMenu}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="悬停切换菜单" IsChecked="{Binding HoverMenu}"/>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox Content="贴边隐藏" IsChecked="{Binding MarginHide}" Click="MarginHide_Changed">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}"
|
||||||
<CheckBox.Background>
|
Content="贴边隐藏" IsChecked="{Binding MarginHide}"
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
Click="MarginHide_Changed"/>
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
@@ -90,27 +63,35 @@
|
|||||||
<TextBlock Text="面板关闭方式" VerticalAlignment="Center"/>
|
<TextBlock Text="面板关闭方式" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="失去焦点后"
|
Style="{StaticResource MyRadioBtnStyle}"
|
||||||
|
Content="失去焦点后"
|
||||||
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=1}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="运行项目后"
|
<RadioButton Margin="10,0,0,0"
|
||||||
|
Style="{StaticResource MyRadioBtnStyle}" Content="运行项目后"
|
||||||
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=2}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="手动关闭"
|
Style="{StaticResource MyRadioBtnStyle}" Content="手动关闭"
|
||||||
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=3}"/>
|
IsChecked="{Binding AppHideType, Mode=TwoWay, Converter={StaticResource HideTypeConvert}, ConverterParameter=3}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</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"
|
||||||
|
/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="快捷键"
|
hc:Poptip.Content="主面板显示时按下Ctrl+F开始搜索"
|
||||||
IsChecked="{Binding SearchType, Mode=TwoWay, Converter={StaticResource SearchTypeConvert}, ConverterParameter=0}"/>
|
hc:Poptip.Placement="Top"
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
Style="{StaticResource MyRadioBtnStyle}" Content="快捷键"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="按键即搜"
|
IsChecked="{Binding SearchType, Mode=TwoWay, Converter={StaticResource SearchTypeConvert}, ConverterParameter=0}"/>
|
||||||
IsChecked="{Binding SearchType, Mode=TwoWay, Converter={StaticResource SearchTypeConvert}, ConverterParameter=1}"/>
|
<RadioButton Margin="10,0,0,0"
|
||||||
|
hc:Poptip.Content="主面板显示时按下按键直接搜索"
|
||||||
|
hc:Poptip.Placement="Top"
|
||||||
|
Style="{StaticResource MyRadioBtnStyle}" Content="按键即搜"
|
||||||
|
IsChecked="{Binding SearchType, Mode=TwoWay, Converter={StaticResource SearchTypeConvert}, ConverterParameter=1}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</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">
|
||||||
@@ -119,6 +100,7 @@
|
|||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="主面板:" VerticalAlignment="Center" Margin="0,5,0,0" Width="55"/>
|
<TextBlock Text="主面板:" VerticalAlignment="Center" Margin="0,5,0,0" Width="55"/>
|
||||||
<hc:TextBox HorizontalAlignment="Left"
|
<hc:TextBox HorizontalAlignment="Left"
|
||||||
|
Style="{StaticResource MyTextBoxStyle}"
|
||||||
Tag="{x:Static cst:HotKeyType.Main}"
|
Tag="{x:Static cst:HotKeyType.Main}"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
@@ -129,20 +111,17 @@
|
|||||||
KeyUp="HotKeyUp"
|
KeyUp="HotKeyUp"
|
||||||
InputMethod.IsInputMethodEnabled="False"
|
InputMethod.IsInputMethodEnabled="False"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CheckBox Content="启用"
|
<CheckBox Content="启用"
|
||||||
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
Click="EnableHotKey_Click"
|
Click="EnableHotKey_Click"
|
||||||
Tag="{x:Static cst:HotKeyType.Main}"
|
Tag="{x:Static cst:HotKeyType.Main}"
|
||||||
IsChecked="{Binding EnableAppHotKey}">
|
IsChecked="{Binding EnableAppHotKey}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="待办任务:" Margin="0,5,0,0" Width="55"/>
|
<TextBlock Text="待办任务:" Margin="0,5,0,0" Width="55"/>
|
||||||
<hc:TextBox HorizontalAlignment="Left"
|
<hc:TextBox HorizontalAlignment="Left"
|
||||||
|
Style="{StaticResource MyTextBoxStyle}"
|
||||||
Tag="{x:Static cst:HotKeyType.ToDo}"
|
Tag="{x:Static cst:HotKeyType.ToDo}"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
@@ -153,21 +132,18 @@
|
|||||||
KeyUp="HotKeyUp"
|
KeyUp="HotKeyUp"
|
||||||
InputMethod.IsInputMethodEnabled="False"
|
InputMethod.IsInputMethodEnabled="False"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CheckBox Content="启用"
|
<CheckBox Content="启用"
|
||||||
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
Click="EnableHotKey_Click"
|
Click="EnableHotKey_Click"
|
||||||
Tag="{x:Static cst:HotKeyType.ToDo}"
|
Tag="{x:Static cst:HotKeyType.ToDo}"
|
||||||
IsChecked="{Binding EnableTodoHotKey}">
|
IsChecked="{Binding EnableTodoHotKey}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="拾色器:" Margin="0,5,0,0" Width="55"/>
|
<TextBlock Text="拾色器:" Margin="0,5,0,0" Width="55"/>
|
||||||
<hc:TextBox HorizontalAlignment="Left"
|
<hc:TextBox HorizontalAlignment="Left"
|
||||||
|
Style="{StaticResource MyTextBoxStyle}"
|
||||||
Tag="{x:Static cst:HotKeyType.ColorPicker}"
|
Tag="{x:Static cst:HotKeyType.ColorPicker}"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
@@ -179,15 +155,10 @@
|
|||||||
InputMethod.IsInputMethodEnabled="False"
|
InputMethod.IsInputMethodEnabled="False"
|
||||||
/>
|
/>
|
||||||
<CheckBox Content="启用"
|
<CheckBox Content="启用"
|
||||||
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
Tag="{x:Static cst:HotKeyType.ColorPicker}"
|
Tag="{x:Static cst:HotKeyType.ColorPicker}"
|
||||||
Click="EnableHotKey_Click"
|
Click="EnableHotKey_Click"
|
||||||
IsChecked="{Binding EnableColorPickerHotKey}">
|
IsChecked="{Binding EnableColorPickerHotKey}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -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,7 +342,8 @@ 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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,75 +20,71 @@
|
|||||||
<StackPanel >
|
<StackPanel >
|
||||||
<TextBlock Text="程序设置" />
|
<TextBlock Text="程序设置" />
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
|
||||||
<CheckBox x:Name="SelfStartUpBox" Content="开机自启动" IsChecked="{Binding SelfStartUp}" Click="SelfStartUpBox_Click">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" x:Name="SelfStartUpBox" Content="开机自启动" IsChecked="{Binding SelfStartUp}" Click="SelfStartUpBox_Click"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,6,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,6,0,0">
|
||||||
<CheckBox Content="性能模式" IsChecked="{Binding PMModel}"
|
<CheckBox Content="性能模式"
|
||||||
hc:Poptip.HitMode="None"
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
IsChecked="{Binding PMModel}"
|
||||||
hc:Poptip.Content="开启性能模式将取消图标动画效果"
|
hc:Poptip.HitMode="None"
|
||||||
hc:Poptip.Placement="TopLeft">
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
<CheckBox.Background>
|
hc:Poptip.Content="开启性能模式将取消图标动画效果"
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
hc:Poptip.Placement="Top"
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
/>
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<TextBlock Text="插件" Margin="0,20,0,0"/>
|
<TextBlock Text="插件" Margin="0,20,0,0"/>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,6,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,6,0,0">
|
||||||
<CheckBox Content="时钟显秒" Click="ShowSeconds_Click" IsChecked="{Binding SecondsWindow}"
|
<CheckBox Content="时钟显秒"
|
||||||
hc:Poptip.HitMode="None"
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
Click="ShowSeconds_Click" IsChecked="{Binding SecondsWindow}"
|
||||||
hc:Poptip.Content="仅Win11有效"
|
hc:Poptip.HitMode="None"
|
||||||
hc:Poptip.Placement="TopLeft">
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
<CheckBox.Background>
|
hc:Poptip.Content="仅Win11有效"
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
hc:Poptip.Placement="Top"
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
/>
|
||||||
</LinearGradientBrush>
|
<CheckBox Content="EveryThing搜索"
|
||||||
</CheckBox.Background>
|
Style="{StaticResource MyCheckBoxStyle}"
|
||||||
</CheckBox>
|
Click="EveryThing_Changed" IsChecked="{Binding EnableEveryThing}"
|
||||||
|
hc:Poptip.HitMode="None"
|
||||||
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
|
hc:Poptip.Content="勾选后若弹出用户帐户控制请选择是"
|
||||||
|
hc:Poptip.Placement="Top"
|
||||||
|
/>
|
||||||
</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">
|
||||||
<RadioButton x:Name="CustomSort" Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton x:Name="CustomSort" Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="自定义"
|
Style="{StaticResource MyRadioBtnStyle}" Content="自定义"
|
||||||
Tag="1"
|
Tag="1"
|
||||||
hc:IconElement.Geometry="{StaticResource CustomSort}"
|
hc:IconElement.Geometry="{StaticResource CustomSort}"
|
||||||
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
||||||
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=1}"/>
|
||||||
|
|
||||||
<RadioButton x:Name="CountUpSort" Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton x:Name="CountUpSort" Margin="10,0,0,0"
|
||||||
hc:IconElement.Geometry="{StaticResource UpSort}"
|
hc:IconElement.Geometry="{StaticResource UpSort}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="使用次数"
|
Style="{StaticResource MyRadioBtnStyle}" Content="使用次数"
|
||||||
Tag="2"
|
Tag="2"
|
||||||
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
||||||
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=2}"/>
|
||||||
|
|
||||||
<RadioButton x:Name="CountLowSort" Margin="10,0,0,0" Visibility="Collapsed" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton x:Name="CountLowSort" Margin="10,0,0,0" Visibility="Collapsed"
|
||||||
hc:IconElement.Geometry="{StaticResource LowSort}"
|
hc:IconElement.Geometry="{StaticResource LowSort}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="使用次数"
|
Style="{StaticResource MyRadioBtnStyle}" Content="使用次数"
|
||||||
Tag="3"
|
Tag="3"
|
||||||
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
||||||
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=3}"/>
|
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=3}"/>
|
||||||
|
|
||||||
<RadioButton x:Name="NameUpSort" Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton x:Name="NameUpSort" Margin="10,0,0,0"
|
||||||
hc:IconElement.Geometry="{StaticResource UpSort}"
|
hc:IconElement.Geometry="{StaticResource UpSort}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="名称"
|
Style="{StaticResource MyRadioBtnStyle}" Content="名称"
|
||||||
Tag="4"
|
Tag="4"
|
||||||
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
||||||
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=4}"/>
|
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=4}"/>
|
||||||
|
|
||||||
<RadioButton x:Name="NameLowSort" Margin="10,0,0,0" Visibility="Collapsed" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton x:Name="NameLowSort" Margin="10,0,0,0" Visibility="Collapsed"
|
||||||
hc:IconElement.Geometry="{StaticResource LowSort}"
|
hc:IconElement.Geometry="{StaticResource LowSort}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="名称"
|
Style="{StaticResource MyRadioBtnStyle}" Content="名称"
|
||||||
Tag="5"
|
Tag="5"
|
||||||
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
PreviewMouseLeftButtonDown="SortType_PreviewMouseLeftButtonDown"
|
||||||
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=5}"/>
|
IsChecked="{Binding IconSortType, Mode=OneWay, Converter={StaticResource SortTypeConvert}, ConverterParameter=5}"/>
|
||||||
@@ -96,25 +92,25 @@
|
|||||||
</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">
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="Gitee"
|
Style="{StaticResource MyRadioBtnStyle}" Content="Gitee"
|
||||||
hc:IconElement.Geometry="{StaticResource Gitee}"
|
hc:IconElement.Geometry="{StaticResource Gitee}"
|
||||||
Foreground="#B32225"
|
Foreground="#B32225"
|
||||||
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding UpdateType, Mode=TwoWay, Converter={StaticResource UpdateTypeConvert}, ConverterParameter=1}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
hc:IconElement.Geometry="{StaticResource GitHub}"
|
hc:IconElement.Geometry="{StaticResource GitHub}"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="GitHub"
|
Style="{StaticResource MyRadioBtnStyle}" Content="GitHub"
|
||||||
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="备份数据"
|
||||||
hc:Poptip.Content="当数据文件损坏时, 以便能够恢复部分数据 (损坏时将有操作提示)"
|
hc:Poptip.Content="当数据文件损坏时, 以便能够恢复部分数据 (损坏时将有操作提示)"
|
||||||
hc:Poptip.Placement="TopLeft"
|
hc:Poptip.Placement="Top"
|
||||||
hc:Poptip.Offset="10"
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
Style="{StaticResource Btn1}"
|
Style="{StaticResource MyBtnStyle}"
|
||||||
Click="BakDataFile"/>
|
Click="BakDataFile"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
using GeekDesk.MyThread;
|
using GeekDesk.MyThread;
|
||||||
|
using GeekDesk.Plugins.EveryThing;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using ShowSeconds;
|
using ShowSeconds;
|
||||||
@@ -121,21 +122,16 @@ 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();
|
}
|
||||||
// MouseHookThread.Hook();
|
else
|
||||||
//}
|
{
|
||||||
//else
|
SecondsWindow.CloseWindow();
|
||||||
//{
|
//StopSecondsWindow();
|
||||||
// MouseHookThread.Dispose();
|
}
|
||||||
// MouseHookThread.Hook();
|
|
||||||
//}
|
|
||||||
|
|
||||||
MouseHookThread.Dispose();
|
|
||||||
MouseHookThread.Hook();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void StopSecondsWindow()
|
public static void StopSecondsWindow()
|
||||||
@@ -191,7 +187,20 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
catch (Exception ex) { }
|
catch (Exception ex) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// EveryThing插件开关
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void EveryThing_Changed(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (MainWindow.appData.AppConfig.EnableEveryThing == true)
|
||||||
|
{
|
||||||
|
EveryThingUtil.EnableEveryThing(0);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
EveryThingUtil.DisableEveryThing(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,11 @@
|
|||||||
<TextBlock Text="背景风格" VerticalAlignment="Center"/>
|
<TextBlock Text="背景风格" VerticalAlignment="Center"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="10,5,0,0" Grid.ColumnSpan="4">
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Click="BGStyle_Changed" Content="图 片"
|
Style="{StaticResource MyRadioBtnStyle}" Click="BGStyle_Changed" Content="图 片"
|
||||||
IsChecked="{Binding BGStyle, Mode=TwoWay, Converter={StaticResource BGStyleConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding BGStyle, Mode=TwoWay, Converter={StaticResource BGStyleConvert}, ConverterParameter=1}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0"
|
||||||
Style="{StaticResource RadioButtonIcon}" Click="BGStyle_Changed" Content="纯 色"
|
Style="{StaticResource MyRadioBtnStyle}" Click="BGStyle_Changed" Content="纯 色"
|
||||||
IsChecked="{Binding BGStyle, Mode=TwoWay, Converter={StaticResource BGStyleConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding BGStyle, Mode=TwoWay, Converter={StaticResource BGStyleConvert}, ConverterParameter=2}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
@@ -49,18 +49,12 @@
|
|||||||
hc:Poptip.Content="{Binding BacImgName}"
|
hc:Poptip.Content="{Binding BacImgName}"
|
||||||
hc:Poptip.Placement="TopLeft"
|
hc:Poptip.Placement="TopLeft"
|
||||||
/>
|
/>
|
||||||
<Button Content="修改" Click="BGButton_Click"/>
|
<Button Content="修改" Style="{StaticResource MyBtnStyle}" Click="BGButton_Click"/>
|
||||||
<Button Content="默认" Click="DefaultButton_Click"/>
|
<Button Content="默认" Style="{StaticResource MyBtnStyle}" Click="DefaultButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,10,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,10,0,0" Grid.ColumnSpan="4">
|
||||||
<CheckBox x:Name="IconIsAdmin" Content="毛玻璃效果" Click="BGStyle_Changed" IsChecked="{Binding BlurEffect}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" x:Name="IconIsAdmin" Content="毛玻璃效果" Click="BGStyle_Changed" IsChecked="{Binding BlurEffect}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
@@ -82,7 +76,10 @@
|
|||||||
Margin="0,5,0,0"
|
Margin="0,5,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
/>
|
/>
|
||||||
<Button Content="设置" Tag="Color1" Click="ColorButton_Click"/>
|
<Button Style="{StaticResource MyBtnStyle}"
|
||||||
|
Content="设置"
|
||||||
|
Tag="Color1"
|
||||||
|
Click="ColorButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,5,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="20,5,0,0" Grid.ColumnSpan="4">
|
||||||
<TextBlock Text="色彩2:" VerticalAlignment="Center" Margin="0,5,0,0"/>
|
<TextBlock Text="色彩2:" VerticalAlignment="Center" Margin="0,5,0,0"/>
|
||||||
@@ -92,10 +89,15 @@
|
|||||||
Margin="0,5,0,0"
|
Margin="0,5,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
/>
|
/>
|
||||||
<Button Content="设置" Tag="Color2" Click="ColorButton_Click"/>
|
<Button Style="{StaticResource MyBtnStyle}"
|
||||||
|
Content="设置" Tag="Color2"
|
||||||
|
Click="ColorButton_Click"
|
||||||
|
/>
|
||||||
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<Button Content="系统预设"
|
<Button Content="系统预设"
|
||||||
|
Style="{StaticResource MyBtnStyle}"
|
||||||
Margin="0,5,0,0"
|
Margin="0,5,0,0"
|
||||||
hc:Poptip.HitMode="None"
|
hc:Poptip.HitMode="None"
|
||||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||||
@@ -109,43 +111,26 @@
|
|||||||
|
|
||||||
|
|
||||||
<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 Style="{StaticResource MyCheckBoxStyle}" Content="置于顶层" IsChecked="{Binding AlwaysTopmost}"/>
|
||||||
<CheckBox.Background>
|
</hc:UniformSpacingPanel>
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
<hc:UniformSpacingPanel Spacing="10" Margin="5,10,0,0" Grid.ColumnSpan="4">
|
||||||
</LinearGradientBrush>
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" Content="主窗口动画" IsChecked="{Binding AppAnimation}" Click="Animation_Checked"/>
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<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 ItemSpradeAnimation}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" Content="列表展开动画" IsChecked="{Binding ItemSpradeAnimation}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
<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 x:Name="BarIcon" Content="显示托盘图标" IsChecked="{Binding ShowBarIcon}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" x:Name="BarIcon" Content="显示托盘图标" IsChecked="{Binding ShowBarIcon}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<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="显示主面板Logo" IsChecked="{Binding TitleLogoVisible, Mode=TwoWay, Converter={StaticResource Visibility2BooleanConverter}}">
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" Content="显示主面板Logo" IsChecked="{Binding TitleLogoVisible, Mode=TwoWay, Converter={StaticResource Visibility2BooleanConverter}}"/>
|
||||||
<CheckBox.Background>
|
|
||||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
|
||||||
<GradientStop Color="#FF9EA3A6"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</CheckBox.Background>
|
|
||||||
</CheckBox>
|
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
@@ -232,7 +217,7 @@
|
|||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||||
<TextBlock VerticalAlignment="Center" Text="图标字体颜色:" />
|
<TextBlock VerticalAlignment="Center" Text="图标字体颜色:" />
|
||||||
<TextBlock VerticalAlignment="Center" Text="{Binding TextColor}" Foreground="{Binding TextColor}" Width="100"/>
|
<TextBlock VerticalAlignment="Center" Text="{Binding TextColor}" Foreground="{Binding TextColor}" Width="100"/>
|
||||||
<Button Content="选择" Margin="0,-10,0,0" Tag="Text" Click="ColorButton_Click"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="选择" Margin="0,-10,0,0" Tag="Text" Click="ColorButton_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
OpenFileDialog ofd = new OpenFileDialog
|
OpenFileDialog ofd = new OpenFileDialog
|
||||||
{
|
{
|
||||||
Multiselect = false, //只允许选中单个文件
|
Multiselect = false, //只允许选中单个文件
|
||||||
Filter = "图像文件(*.png, *.jpg)|*.png;*.jpg;*.gif"
|
Filter = "图像文件(*.png, *.jpg, *.gif)|*.png;*.jpg;*.gif"
|
||||||
};
|
};
|
||||||
if (ofd.ShowDialog() == true)
|
if (ofd.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
@@ -167,6 +167,6 @@ namespace GeekDesk.Control.UserControls.Config
|
|||||||
}
|
}
|
||||||
appConfig.IsShow = null;
|
appConfig.IsShow = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@
|
|||||||
<hc:Card.ContextMenu>
|
<hc:Card.ContextMenu>
|
||||||
<ContextMenu Width="200">
|
<ContextMenu Width="200">
|
||||||
<MenuItem Header="新建菜单" Click="CreateMenu"/>
|
<MenuItem Header="新建菜单" Click="CreateMenu"/>
|
||||||
|
<MenuItem Header="新建关联菜单" Click="CreateLinkMenu"/>
|
||||||
<MenuItem x:Name="AlterPW1" Header="修改密码" Click="AlterPassword"/>
|
<MenuItem x:Name="AlterPW1" Header="修改密码" Click="AlterPassword"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</hc:Card.ContextMenu>
|
</hc:Card.ContextMenu>
|
||||||
@@ -158,6 +159,7 @@
|
|||||||
<ListBox.Resources>
|
<ListBox.Resources>
|
||||||
<ContextMenu x:Key="MenuDialog" Width="200">
|
<ContextMenu x:Key="MenuDialog" Width="200">
|
||||||
<MenuItem Header="新建菜单" Click="CreateMenu"/>
|
<MenuItem Header="新建菜单" Click="CreateMenu"/>
|
||||||
|
<MenuItem Header="新建关联菜单" Click="CreateLinkMenu"/>
|
||||||
<MenuItem Header="重命名" Click="RenameMenu" Tag="{Binding}"/>
|
<MenuItem Header="重命名" Click="RenameMenu" Tag="{Binding}"/>
|
||||||
<MenuItem Header="加密此列表" Click="EncryptMenu" Tag="{Binding}"/>
|
<MenuItem Header="加密此列表" Click="EncryptMenu" Tag="{Binding}"/>
|
||||||
<MenuItem x:Name="AlterPW2" Header="修改密码" Click="AlterPassword"/>
|
<MenuItem x:Name="AlterPW2" Header="修改密码" Click="AlterPassword"/>
|
||||||
@@ -184,7 +186,7 @@
|
|||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Tag="{Binding}">
|
<StackPanel Tag="{Binding}">
|
||||||
<TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
|
<TextBox Style="{StaticResource MyTextBoxStyle}" Text="{Binding Path=MenuName, Mode=TwoWay}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"
|
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
@@ -197,7 +199,11 @@
|
|||||||
Padding="2"
|
Padding="2"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
||||||
Visibility="{Binding MenuEdit}"/>
|
Visibility="{Binding MenuEdit}">
|
||||||
|
<TextBox.Background>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.6" />
|
||||||
|
</TextBox.Background>
|
||||||
|
</TextBox>
|
||||||
<StackPanel Orientation="Horizontal"
|
<StackPanel Orientation="Horizontal"
|
||||||
IsVisibleChanged="MenuWhenVisibilityChanged"
|
IsVisibleChanged="MenuWhenVisibilityChanged"
|
||||||
Visibility="{Binding NotMenuEdit}">
|
Visibility="{Binding NotMenuEdit}">
|
||||||
|
|||||||
@@ -4,14 +4,19 @@ using GeekDesk.Control.Other;
|
|||||||
using GeekDesk.Control.Windows;
|
using GeekDesk.Control.Windows;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
using WindowsAPICodePack.Dialogs;
|
||||||
|
|
||||||
namespace GeekDesk.Control.UserControls.PannelCard
|
namespace GeekDesk.Control.UserControls.PannelCard
|
||||||
{
|
{
|
||||||
@@ -22,13 +27,14 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
{
|
{
|
||||||
private int menuSelectIndexTemp = -1;
|
private int menuSelectIndexTemp = -1;
|
||||||
private AppData appData = MainWindow.appData;
|
private AppData appData = MainWindow.appData;
|
||||||
private SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(236, 236, 236));
|
private SolidColorBrush bac = new SolidColorBrush(Color.FromRgb(255, 255, 255));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public LeftCardControl()
|
public LeftCardControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
bac.Opacity = 0.6;
|
||||||
|
|
||||||
this.Loaded += (s, e) =>
|
this.Loaded += (s, e) =>
|
||||||
{
|
{
|
||||||
@@ -170,8 +176,9 @@ 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)
|
||||||
@@ -199,6 +206,77 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
Lbi_Selected(obj, null);
|
Lbi_Selected(obj, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建实时文件菜单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void CreateLinkMenu(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
CommonOpenFileDialog dialog = new CommonOpenFileDialog
|
||||||
|
{
|
||||||
|
IsFolderPicker = true,
|
||||||
|
Title = "选择关联文件夹"
|
||||||
|
};
|
||||||
|
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
|
||||||
|
{
|
||||||
|
string menuId = System.Guid.NewGuid().ToString();
|
||||||
|
|
||||||
|
string path = dialog.FileName;
|
||||||
|
|
||||||
|
MenuInfo menuInfo = new MenuInfo
|
||||||
|
{
|
||||||
|
MenuName = Path.GetFileNameWithoutExtension(path),
|
||||||
|
MenuId = menuId,
|
||||||
|
MenuType = MenuType.LINK,
|
||||||
|
LinkPath = path,
|
||||||
|
IsEncrypt = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
appData.MenuList.Add(menuInfo);
|
||||||
|
|
||||||
|
MenuListBox.SelectedIndex = appData.MenuList.Count - 1;
|
||||||
|
appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
|
||||||
|
appData.AppConfig.SelectedMenuIcons = menuInfo.IconList;
|
||||||
|
//首次触发不了Selected事件
|
||||||
|
object obj = MenuListBox.ItemContainerGenerator.ContainerFromIndex(MenuListBox.SelectedIndex);
|
||||||
|
SetListBoxItemEvent((ListBoxItem)obj);
|
||||||
|
Lbi_Selected(obj, null);
|
||||||
|
HandyControl.Controls.Growl.Success("菜单关联成功, 加载列表中, 稍后重新进入此菜单可查看列表!", "MainWindowGrowl");
|
||||||
|
FileWatcher.LinkMenuWatcher(menuInfo);
|
||||||
|
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
DirectoryInfo dirInfo = new DirectoryInfo(menuInfo.LinkPath);
|
||||||
|
FileSystemInfo[] fileInfos = dirInfo.GetFileSystemInfos();
|
||||||
|
|
||||||
|
ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
||||||
|
foreach (FileSystemInfo fileInfo in fileInfos)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = CommonCode.GetIconInfoByPath_NoWrite(fileInfo.FullName);
|
||||||
|
iconList.Add(iconInfo);
|
||||||
|
}
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
menuInfo.IconList = iconList;
|
||||||
|
//foreach (IconInfo iconInfo in iconList)
|
||||||
|
//{
|
||||||
|
// menuInfo.IconList = iconList;
|
||||||
|
//}
|
||||||
|
});
|
||||||
|
}).Start();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogUtil.WriteErrorLog(ex, "新建关联菜单失败!");
|
||||||
|
HandyControl.Controls.Growl.WarningGlobal("新建关联菜单失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重命名菜单 将textbox 设置为可见
|
/// 重命名菜单 将textbox 设置为可见
|
||||||
@@ -219,7 +297,26 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DeleteMenu(object sender, RoutedEventArgs e)
|
private void DeleteMenu(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
||||||
|
if (menuInfo.IconList != null && menuInfo.IconList.Count > 0)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Ask("确认删除此菜单吗?", isConfirmed =>
|
||||||
|
{
|
||||||
|
if (isConfirmed)
|
||||||
|
{
|
||||||
|
DeleteMenu(menuInfo);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}, "MainWindowAskGrowl");
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
DeleteMenu(menuInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeleteMenu(MenuInfo menuInfo)
|
||||||
|
{
|
||||||
if (appData.MenuList.Count == 1)
|
if (appData.MenuList.Count == 1)
|
||||||
{
|
{
|
||||||
//如果删除以后没有菜单的话 先创建一个
|
//如果删除以后没有菜单的话 先创建一个
|
||||||
@@ -333,6 +430,7 @@ 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
|
||||||
@@ -443,7 +541,8 @@ 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))
|
||||||
{
|
{
|
||||||
@@ -484,15 +583,44 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
MyPoptip.IsOpen = false;
|
MyPoptip.IsOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拖动移动图标到指定菜单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
private void Menu_Drop(object sender, DragEventArgs e)
|
private void Menu_Drop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
MyPoptip.IsOpen = false;
|
MyPoptip.IsOpen = false;
|
||||||
|
|
||||||
MenuInfo mi = (sender as ListBoxItem).DataContext as MenuInfo;
|
MenuInfo mi = (sender as ListBoxItem).DataContext as MenuInfo;
|
||||||
IconInfo iconInfo = (IconInfo)e.Data.GetData(typeof(IconInfo));
|
IconInfo iconInfo = (IconInfo)e.Data.GetData(typeof(IconInfo));
|
||||||
|
if (iconInfo != null)
|
||||||
|
{
|
||||||
|
// 将已有图标移动到该菜单
|
||||||
|
appData.MenuList[MenuListBox.SelectedIndex].IconList.Remove(iconInfo);
|
||||||
|
appData.MenuList[MenuListBox.Items.IndexOf(mi)].IconList.Add(iconInfo);
|
||||||
|
|
||||||
appData.MenuList[MenuListBox.SelectedIndex].IconList.Remove(iconInfo);
|
}
|
||||||
appData.MenuList[MenuListBox.Items.IndexOf(mi)].IconList.Add(iconInfo);
|
else
|
||||||
|
{
|
||||||
|
// 直接将新图标移动到该菜单
|
||||||
|
Array dropObject = (System.Array)e.Data.GetData(DataFormats.FileDrop);
|
||||||
|
if (dropObject == null) return;
|
||||||
|
foreach (object obj in dropObject)
|
||||||
|
{
|
||||||
|
string path = (string)obj;
|
||||||
|
iconInfo = CommonCode.GetIconInfoByPath(path);
|
||||||
|
if (iconInfo == null)
|
||||||
|
{
|
||||||
|
LogUtil.WriteErrorLog("添加项目失败,未能获取到项目图标:" + path);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
appData.MenuList[MenuListBox.Items.IndexOf(mi)].IconList.Add(iconInfo);
|
||||||
|
}
|
||||||
|
CommonCode.SortIconList();
|
||||||
|
CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_PATH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EncryptMenu(object sender, RoutedEventArgs e)
|
private void EncryptMenu(object sender, RoutedEventArgs e)
|
||||||
@@ -507,14 +635,15 @@ 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
|
||||||
@@ -552,7 +681,8 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -563,7 +693,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)
|
||||||
{
|
{
|
||||||
@@ -585,7 +715,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
if (info.IsEncrypt)
|
if (info.IsEncrypt)
|
||||||
{
|
{
|
||||||
mi.Header = "取消加密此列表";
|
mi.Header = "取消加密此列表";
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mi.Header = "加密此列表";
|
mi.Header = "加密此列表";
|
||||||
}
|
}
|
||||||
@@ -593,5 +724,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,12 @@
|
|||||||
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||||
xmlns:cst="clr-namespace:GeekDesk.Constant"
|
xmlns:cst="clr-namespace:GeekDesk.Constant"
|
||||||
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
||||||
|
xmlns:component="clr-namespace:GeekDesk.CustomComponent.VirtualizingWrapPanel"
|
||||||
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
|
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
|
||||||
xmlns:ot="clr-namespace:GeekDesk.Control.Other"
|
xmlns:ot="clr-namespace:GeekDesk.Control.Other"
|
||||||
xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800"
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
|
AllowDrop="True"
|
||||||
>
|
>
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<!--右侧栏样式动画-->
|
<!--右侧栏样式动画-->
|
||||||
@@ -28,6 +29,11 @@
|
|||||||
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
||||||
<Setter Property="Source" Value="{Binding BitmapImage}"/>
|
<Setter Property="Source" Value="{Binding BitmapImage}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ImageStyleNoWrite" TargetType="Image">
|
||||||
|
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageWidth, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"/>
|
||||||
|
<Setter Property="Source" Value="{Binding BitmapImage_NoWrite}"/>
|
||||||
|
</Style>
|
||||||
<Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
<Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
@@ -119,7 +125,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"
|
||||||
@@ -148,82 +154,89 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<ot:PasswordDialog xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility, Duration=50, Delay=0}"
|
<ot:PasswordDialog xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility, Duration=50, Delay=0}"
|
||||||
x:Name="PDDialog"
|
x:Name="PDDialog"
|
||||||
|
Visibility="Collapsed"
|
||||||
Panel.ZIndex="99"
|
Panel.ZIndex="99"
|
||||||
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"
|
||||||
VirtualizingPanel.VirtualizationMode="Recycling"
|
Margin="10"
|
||||||
VirtualizingPanel.IsVirtualizing="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 ="True"
|
||||||
>
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
||||||
<ListBox.Template>
|
VirtualizingPanel.IsVirtualizing="True"
|
||||||
<ControlTemplate TargetType="ListBox">
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
||||||
|
VirtualizingPanel.ScrollUnit="Pixel"
|
||||||
|
>
|
||||||
|
<ListBox.Template>
|
||||||
|
<ControlTemplate TargetType="ListBox">
|
||||||
<hc:ScrollViewer x:Name="WrapScroll"
|
<hc:ScrollViewer x:Name="WrapScroll"
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalScrollBarVisibility="Hidden"
|
HorizontalScrollBarVisibility="Hidden"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
IsInertiaEnabled="True"
|
IsInertiaEnabled="True"
|
||||||
CanContentScroll="True"
|
CanContentScroll="True"
|
||||||
PreviewMouseWheel="IconListBox_MouseWheel"
|
PreviewMouseWheel="IconListBox_MouseWheel"
|
||||||
>
|
>
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderBrush}">
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderBrush}"
|
||||||
|
|
||||||
|
>
|
||||||
<ItemsPresenter/>
|
<ItemsPresenter/>
|
||||||
|
|
||||||
</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"
|
<component:VirtualizingWrapPanel VirtualizationMode="Recycling"
|
||||||
|
IsVirtualizing="True"
|
||||||
|
IsContainerVirtualizable="True"
|
||||||
|
VirtualizingPanel.ScrollUnit="Pixel"
|
||||||
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_70}}"
|
||||||
/>
|
/>
|
||||||
</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"
|
||||||
@@ -234,13 +247,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"
|
||||||
@@ -250,13 +263,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>
|
||||||
|
|
||||||
@@ -264,138 +277,32 @@
|
|||||||
</hc:DialogContainer>
|
</hc:DialogContainer>
|
||||||
</hc:Card>
|
</hc:Card>
|
||||||
|
|
||||||
|
|
||||||
<hc:Card x:Name="VerticalCard"
|
<hc:Card x:Name="VerticalCard"
|
||||||
Visibility="Hidden"
|
Visibility="Collapsed"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Effect="{DynamicResource EffectShadow2}"
|
Effect="{DynamicResource EffectShadow2}"
|
||||||
Margin="5,0,5,5" Grid.ColumnSpan="2"
|
Margin="5,0,5,5" Grid.ColumnSpan="2"
|
||||||
MouseLeftButtonDown="VerticalCard_MouseLeftButtonDown"
|
MouseLeftButtonDown="VerticalCard_MouseLeftButtonDown"
|
||||||
>
|
>
|
||||||
<hc:Card.Background>
|
<hc:Card.Background>
|
||||||
<SolidColorBrush Color="AliceBlue"
|
<SolidColorBrush Color="AliceBlue"
|
||||||
hc:GeometryEffect.GeometryEffect="20"
|
hc:GeometryEffect.GeometryEffect="20"
|
||||||
Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
|
Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
|
||||||
</hc:Card.Background>
|
</hc:Card.Background>
|
||||||
<hc:Card.BorderBrush>
|
<hc:Card.BorderBrush>
|
||||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
|
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
|
||||||
</hc:Card.BorderBrush>
|
</hc:Card.BorderBrush>
|
||||||
<Grid>
|
</hc:Card>
|
||||||
<WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling"
|
<hc:LoadingCircle x:Name="Loading_RightCard"
|
||||||
VirtualizingPanel.IsVirtualizing="True"
|
Width="45" Height="45"
|
||||||
VirtualizingPanel.IsContainerVirtualizable="True"
|
DotBorderBrush="White"
|
||||||
>
|
DotBorderThickness="2"
|
||||||
<UniformGrid x:Name="VerticalUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}">
|
Foreground="DarkGray"
|
||||||
<!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
|
Opacity="0.8"
|
||||||
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
|
DotDiameter="10"
|
||||||
BorderThickness="0"
|
Margin="-50,-150,0,0"
|
||||||
Padding="0,10,0,0"
|
Visibility="Collapsed"
|
||||||
x:Name="SearchListBox"
|
/>
|
||||||
SelectionChanged="SearchListBox_SelectionChanged"
|
|
||||||
>
|
|
||||||
<ListBox.Template>
|
|
||||||
<ControlTemplate TargetType="ListBox">
|
|
||||||
<hc:ScrollViewer Orientation="Vertical"
|
|
||||||
HorizontalScrollBarVisibility="Hidden"
|
|
||||||
VerticalScrollBarVisibility="Auto"
|
|
||||||
IsInertiaEnabled="True"
|
|
||||||
CanContentScroll="True"
|
|
||||||
PreviewMouseWheel="VerticalIconList_PreviewMouseWheel"
|
|
||||||
>
|
|
||||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderBrush}">
|
|
||||||
<ItemsPresenter/>
|
|
||||||
</Border>
|
|
||||||
</hc:ScrollViewer>
|
|
||||||
</ControlTemplate>
|
|
||||||
</ListBox.Template>
|
|
||||||
|
|
||||||
<ListBox.Background>
|
|
||||||
<SolidColorBrush Opacity="0"/>
|
|
||||||
</ListBox.Background>
|
|
||||||
|
|
||||||
<ListBox.Resources>
|
|
||||||
<ContextMenu x:Key="IconDialog" Width="200">
|
|
||||||
<MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
|
|
||||||
<MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
|
|
||||||
<MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
|
|
||||||
<MenuItem Header="添加系统项目" Click="AddSystemIcon"/>
|
|
||||||
<MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
|
|
||||||
<MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
|
|
||||||
</ContextMenu>
|
|
||||||
</ListBox.Resources>
|
|
||||||
|
|
||||||
<ListBox.ItemContainerStyle>
|
|
||||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource SearchListBoxItemStyle}">
|
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource IconDialog}"/>
|
|
||||||
</Style>
|
|
||||||
</ListBox.ItemContainerStyle>
|
|
||||||
|
|
||||||
<ListBox.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Background="#00FFFFFF"
|
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
|
|
||||||
Converter={StaticResource GetWidthByWWConvert},
|
|
||||||
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD}}"
|
|
||||||
/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ListBox.ItemsPanel>
|
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border CornerRadius="8">
|
|
||||||
<Border.Style>
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem }}}"
|
|
||||||
Value="True">
|
|
||||||
<Setter Property="Background">
|
|
||||||
<Setter.Value>
|
|
||||||
<SolidColorBrush Color="White" Opacity="0.68"/>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
<WrapPanel Tag="{Binding}"
|
|
||||||
Height="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.ImageHeight, Mode=OneWay}"
|
|
||||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.WindowWidth, Mode=OneWay,
|
|
||||||
Converter={StaticResource GetWidthByWWConvert},
|
|
||||||
ConverterParameter={x:Static cst:WidthTypeEnum.RIGHT_CARD_HALF}}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
hc:Poptip.HitMode="None"
|
|
||||||
hc:Poptip.Placement="BottomLeft"
|
|
||||||
Background="#00FFFFFF"
|
|
||||||
MouseEnter="SearchIcon_MouseEnter"
|
|
||||||
MouseLeave="SearchIcon_MouseLeave"
|
|
||||||
MouseLeftButtonDown="Icon_MouseLeftButtonDown"
|
|
||||||
MouseLeftButtonUp="Icon_MouseLeftButtonUp"
|
|
||||||
MouseMove="SearchIcon_MouseMove"
|
|
||||||
Margin="25,10,0,10"
|
|
||||||
>
|
|
||||||
<Image Style="{StaticResource ImageStyle}" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
||||||
<TextBlock
|
|
||||||
Margin="10,5,0,0"
|
|
||||||
MaxHeight="40"
|
|
||||||
FontSize="13"
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
TextTrimming="WordEllipsis"
|
|
||||||
TextAlignment="Left"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Foreground="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.TextColor}"
|
|
||||||
Text="{Binding Name}"/>
|
|
||||||
</WrapPanel>
|
|
||||||
</Border>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
|
|
||||||
<!--</hc:TransitioningContentControl>-->
|
|
||||||
</UniformGrid>
|
|
||||||
</WrapPanel>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</hc:Card>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
using GeekDesk.Control.Other;
|
using GeekDesk.Control.Other;
|
||||||
using GeekDesk.Control.Windows;
|
using GeekDesk.Control.Windows;
|
||||||
|
using GeekDesk.Plugins.EveryThing;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
|
using GeekDesk.ViewModel.Temp;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -35,7 +37,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)
|
||||||
@@ -124,16 +126,18 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void IconClick(object sender, MouseButtonEventArgs e)
|
private void IconClick(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!RunTimeStatus.SEARCH_BOX_HIDED_300) return;
|
||||||
|
|
||||||
if (appData.AppConfig.DoubleOpen && e.ClickCount >= 2)
|
if (appData.AppConfig.DoubleOpen && e.ClickCount >= 2)
|
||||||
{
|
{
|
||||||
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
||||||
if (icon.AdminStartUp)
|
if (icon.AdminStartUp)
|
||||||
{
|
{
|
||||||
StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
ProcessUtil.StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
else if (!appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
||||||
@@ -141,11 +145,11 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
||||||
if (icon.AdminStartUp)
|
if (icon.AdminStartUp)
|
||||||
{
|
{
|
||||||
StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
ProcessUtil.StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +163,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
private void IconAdminStart(object sender, RoutedEventArgs e)
|
private void IconAdminStart(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||||
StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
ProcessUtil.StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -170,231 +174,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
private void ShowInExplore(object sender, RoutedEventArgs e)
|
private void ShowInExplore(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||||
StartIconApp(icon, IconStartType.SHOW_IN_EXPLORE);
|
ProcessUtil.StartIconApp(icon, IconStartType.SHOW_IN_EXPLORE);
|
||||||
}
|
|
||||||
|
|
||||||
private void StartIconApp(IconInfo icon, IconStartType type, bool useRelativePath = false)
|
|
||||||
{
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Process p = new Process();
|
|
||||||
//using ()
|
|
||||||
//{
|
|
||||||
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))
|
|
||||||
{
|
|
||||||
StartSystemApp(startArg, type);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string path;
|
|
||||||
if (useRelativePath)
|
|
||||||
{
|
|
||||||
string fullPath = Path.Combine(Constants.APP_DIR, icon.RelativePath);
|
|
||||||
path = Path.GetFullPath(fullPath);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
path = icon.Path;
|
|
||||||
}
|
|
||||||
p.StartInfo.FileName = path;
|
|
||||||
if (!StringUtil.IsEmpty(startArg))
|
|
||||||
{
|
|
||||||
p.StartInfo.Arguments = startArg;
|
|
||||||
}
|
|
||||||
if (icon.IconType == IconType.OTHER)
|
|
||||||
{
|
|
||||||
if (!File.Exists(path) && !Directory.Exists(path))
|
|
||||||
{
|
|
||||||
//如果没有使用相对路径 那么使用相对路径启动一次
|
|
||||||
if (!useRelativePath)
|
|
||||||
{
|
|
||||||
StartIconApp(icon, type, true);
|
|
||||||
return;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(文件路径不存在或已删除)!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p.StartInfo.WorkingDirectory = path.Substring(0, path.LastIndexOf("\\"));
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case IconStartType.ADMIN_STARTUP:
|
|
||||||
p.StartInfo.Verb = "runas";
|
|
||||||
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
|
||||||
{
|
|
||||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
|
||||||
if (appData.AppConfig.MarginHide)
|
|
||||||
{
|
|
||||||
if (!MarginHide.IsMargin())
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;// c#好像不能case穿透
|
|
||||||
case IconStartType.DEFAULT_STARTUP:
|
|
||||||
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
|
||||||
{
|
|
||||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
|
||||||
if (appData.AppConfig.MarginHide)
|
|
||||||
{
|
|
||||||
if (!MarginHide.IsMargin())
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case IconStartType.SHOW_IN_EXPLORE:
|
|
||||||
p.StartInfo.FileName = "Explorer.exe";
|
|
||||||
p.StartInfo.Arguments = "/e,/select," + icon.Path;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
|
||||||
{
|
|
||||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
|
||||||
if (appData.AppConfig.MarginHide)
|
|
||||||
{
|
|
||||||
if (!MarginHide.IS_HIDE)
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p.Start();
|
|
||||||
p.Close();
|
|
||||||
p.Dispose();
|
|
||||||
if (useRelativePath)
|
|
||||||
{
|
|
||||||
//如果使用相对路径启动成功 那么重新设置程序绝对路径
|
|
||||||
icon.Path = path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
icon.Count++;
|
|
||||||
|
|
||||||
//隐藏搜索框
|
|
||||||
if (RunTimeStatus.SEARCH_BOX_SHOW)
|
|
||||||
{
|
|
||||||
MainWindow.mainWindow.HidedSearchBox();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
if (!useRelativePath)
|
|
||||||
{
|
|
||||||
StartIconApp(icon, type, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(可能为不支持的启动方式)!");
|
|
||||||
LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void StartSystemApp(string startArg, IconStartType type)
|
|
||||||
{
|
|
||||||
if (type == IconStartType.SHOW_IN_EXPLORE)
|
|
||||||
{
|
|
||||||
Growl.WarningGlobal("系统项目不支持打开文件位置操作!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (startArg)
|
|
||||||
{
|
|
||||||
case "Calculator":
|
|
||||||
Process.Start("calc.exe");
|
|
||||||
break;
|
|
||||||
case "Computer":
|
|
||||||
Process.Start("explorer.exe");
|
|
||||||
break;
|
|
||||||
case "GroupPolicy":
|
|
||||||
Process.Start("gpedit.msc");
|
|
||||||
break;
|
|
||||||
case "Notepad":
|
|
||||||
Process.Start("notepad");
|
|
||||||
break;
|
|
||||||
case "Network":
|
|
||||||
Process.Start("ncpa.cpl");
|
|
||||||
break;
|
|
||||||
case "RecycleBin":
|
|
||||||
Process.Start("shell:RecycleBinFolder");
|
|
||||||
break;
|
|
||||||
case "Registry":
|
|
||||||
Process.Start("regedit.exe");
|
|
||||||
break;
|
|
||||||
case "Mstsc":
|
|
||||||
if (type == IconStartType.ADMIN_STARTUP)
|
|
||||||
{
|
|
||||||
Process.Start("mstsc", "-admin");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Process.Start("mstsc");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "Control":
|
|
||||||
Process.Start("Control");
|
|
||||||
break;
|
|
||||||
case "CMD":
|
|
||||||
if (type == IconStartType.ADMIN_STARTUP)
|
|
||||||
{
|
|
||||||
using (Process process = new Process())
|
|
||||||
{
|
|
||||||
process.StartInfo.FileName = "cmd.exe";
|
|
||||||
process.StartInfo.Verb = "runas";
|
|
||||||
process.Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Process.Start("cmd");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "Services":
|
|
||||||
Process.Start("services.msc");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
|
||||||
if (appData.AppConfig.MarginHide)
|
|
||||||
{
|
|
||||||
if (!MarginHide.IS_HIDE)
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainWindow.HideApp();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -479,7 +259,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double width = appData.AppConfig.ImageWidth;
|
double width = appData.AppConfig.ImageWidth;
|
||||||
@@ -773,62 +553,14 @@ 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 = "锁定主面板";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SearchListBoxIndexAdd()
|
|
||||||
{
|
|
||||||
//控制移动后 鼠标即使在图标上也不显示popup
|
|
||||||
RunTimeStatus.MOUSE_MOVE_COUNT = 0;
|
|
||||||
MyPoptip.IsOpen = false;
|
|
||||||
|
|
||||||
if (SearchListBox.Items.Count > 0)
|
|
||||||
{
|
|
||||||
if (SearchListBox.SelectedIndex < SearchListBox.Items.Count - 1)
|
|
||||||
{
|
|
||||||
SearchListBox.SelectedIndex += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SearchListBoxIndexSub()
|
|
||||||
{
|
|
||||||
//控制移动后 鼠标即使在图标上也不显示popup
|
|
||||||
RunTimeStatus.MOUSE_MOVE_COUNT = 0;
|
|
||||||
MyPoptip.IsOpen = false;
|
|
||||||
|
|
||||||
if (SearchListBox.Items.Count > 0)
|
|
||||||
{
|
|
||||||
if (SearchListBox.SelectedIndex > 0)
|
|
||||||
{
|
|
||||||
SearchListBox.SelectedIndex -= 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void StartupSelectionItem()
|
|
||||||
{
|
|
||||||
if (SearchListBox.SelectedItem != null)
|
|
||||||
{
|
|
||||||
IconInfo icon = SearchListBox.SelectedItem as IconInfo;
|
|
||||||
if (icon.AdminStartUp)
|
|
||||||
{
|
|
||||||
StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
StartIconApp(icon, IconStartType.DEFAULT_STARTUP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SearchListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
SearchListBox.ScrollIntoView(SearchListBox.SelectedItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PDDialog_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
private void PDDialog_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -853,7 +585,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 菜单结果icon 列表鼠标滚轮预处理时间
|
/// 菜单结果icon 列表鼠标滚轮预处理时间
|
||||||
/// 主要使用自定义popup解决卡顿问题解决卡顿问题
|
/// 主要使用自定义popup解决卡顿问题解决卡顿问题
|
||||||
/// 以及滚动条收尾切换菜单
|
/// 以及滚动条首尾切换菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
@@ -865,7 +597,8 @@ 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;
|
||||||
|
|
||||||
@@ -898,7 +631,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;
|
||||||
@@ -937,105 +670,6 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 搜索结果icon 列表鼠标滚轮预处理时间
|
|
||||||
/// 主要使用自定义popup解决卡顿问题解决卡顿问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void VerticalIconList_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
|
||||||
{
|
|
||||||
//控制在滚动时不显示popup 否则会在低GPU性能机器上造成卡顿
|
|
||||||
MyPoptip.IsOpen = false;
|
|
||||||
if (RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
|
||||||
{
|
|
||||||
RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 500;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RunTimeStatus.ICONLIST_MOUSE_WHEEL = true;
|
|
||||||
|
|
||||||
new Thread(() =>
|
|
||||||
{
|
|
||||||
while (RunTimeStatus.MOUSE_WHEEL_WAIT_MS > 0)
|
|
||||||
{
|
|
||||||
Thread.Sleep(1);
|
|
||||||
RunTimeStatus.MOUSE_WHEEL_WAIT_MS -= 1;
|
|
||||||
}
|
|
||||||
if (RunTimeStatus.MOUSE_ENTER_ICON)
|
|
||||||
{
|
|
||||||
this.Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
MyPoptip.IsOpen = true;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
RunTimeStatus.MOUSE_WHEEL_WAIT_MS = 100;
|
|
||||||
RunTimeStatus.ICONLIST_MOUSE_WHEEL = false;
|
|
||||||
}).Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查询结果 ICON 鼠标进入事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void SearchIcon_MouseEnter(object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
//显示popup
|
|
||||||
RunTimeStatus.MOUSE_ENTER_ICON = true;
|
|
||||||
if (!RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
|
||||||
{
|
|
||||||
new Thread(() =>
|
|
||||||
{
|
|
||||||
this.Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
IconInfo info = (sender as Panel).Tag as IconInfo;
|
|
||||||
MyPoptipContent.Text = info.Content;
|
|
||||||
MyPoptip.VerticalOffset = 30;
|
|
||||||
Thread.Sleep(100);
|
|
||||||
if (!RunTimeStatus.ICONLIST_MOUSE_WHEEL && RunTimeStatus.MOUSE_MOVE_COUNT > 1)
|
|
||||||
{
|
|
||||||
MyPoptip.IsOpen = true;
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}).Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查询结果ICON鼠标离开事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void SearchIcon_MouseLeave(object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
RunTimeStatus.MOUSE_ENTER_ICON = false;
|
|
||||||
MyPoptip.IsOpen = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查询结果ICON鼠标移动事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void SearchIcon_MouseMove(object sender, MouseEventArgs e)
|
|
||||||
{
|
|
||||||
//控制首次刷新搜索结果后, 鼠标首次移动后显示popup
|
|
||||||
RunTimeStatus.MOUSE_MOVE_COUNT++;
|
|
||||||
|
|
||||||
//防止移动后不刷新popup content
|
|
||||||
IconInfo info = (sender as Panel).Tag as IconInfo;
|
|
||||||
MyPoptipContent.Text = info.Content;
|
|
||||||
MyPoptip.VerticalOffset = 30;
|
|
||||||
|
|
||||||
if (RunTimeStatus.MOUSE_MOVE_COUNT > 1 && !RunTimeStatus.ICONLIST_MOUSE_WHEEL)
|
|
||||||
{
|
|
||||||
MyPoptip.IsOpen = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// menu结果ICON鼠标移动事件
|
/// menu结果ICON鼠标移动事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1048,5 +682,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
MyPoptipContent.Text = info.Content;
|
MyPoptipContent.Text = info.Content;
|
||||||
MyPoptip.VerticalOffset = 30;
|
MyPoptip.VerticalOffset = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,10 +82,36 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
||||||
<Border CornerRadius="8" MouseRightButtonDown="DataGridRow_MouseRightButtonDown" Margin="0,0,0,5" BorderBrush="Black" BorderThickness="0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Border CornerRadius="8" MouseRightButtonDown="DataGridRow_MouseRightButtonDown" Margin="0,0,0,5" BorderBrush="Black" BorderThickness="0" SnapsToDevicePixels="True">
|
||||||
<Border.Style>
|
<Border.Style>
|
||||||
<Style TargetType="Border">
|
<Style TargetType="Border">
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.6"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Opacity)">
|
||||||
|
<DoubleAnimation To="1" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Opacity)">
|
||||||
|
<DoubleAnimation To="0.6" Duration="0:0:0.5"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="False">
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</Border.Style>
|
</Border.Style>
|
||||||
<SelectiveScrollingGrid>
|
<SelectiveScrollingGrid>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
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"
|
||||||
xmlns:local="clr-namespace:GeekDesk"
|
xmlns:local="clr-namespace:GeekDesk" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:AppConfig}"
|
||||||
Title="Setting"
|
Title="Setting"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using GeekDesk.Control.UserControls.Config;
|
using GeekDesk.Control.UserControls.Config;
|
||||||
using GeekDesk.Interface;
|
using GeekDesk.Interface;
|
||||||
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -34,7 +35,7 @@ namespace GeekDesk.Control.Windows
|
|||||||
//BG.Source = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
|
//BG.Source = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
|
||||||
this.DataContext = appConfig;
|
this.DataContext = appConfig;
|
||||||
RightCard.Content = about;
|
RightCard.Content = about;
|
||||||
this.Topmost = true;
|
WindowUtil.SetOwner(this, mainWindow);
|
||||||
this.mainWindow = mainWindow;
|
this.mainWindow = mainWindow;
|
||||||
UFG.Visibility = Visibility.Collapsed;
|
UFG.Visibility = Visibility.Collapsed;
|
||||||
UFG.Visibility = Visibility.Visible;
|
UFG.Visibility = Visibility.Visible;
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:GeekDesk.Control.Windows"
|
xmlns:local="clr-namespace:GeekDesk.Control.Windows"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
|
ResizeMode="NoResize"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
KeyDown="OnKeyDown"
|
KeyDown="OnKeyDown"
|
||||||
@@ -14,15 +16,49 @@
|
|||||||
Background="White"
|
Background="White"
|
||||||
Height="385"
|
Height="385"
|
||||||
Width="228">
|
Width="228">
|
||||||
<StackPanel>
|
<Grid>
|
||||||
|
<TextBlock Panel.ZIndex="1000" Text="❤❤❤"
|
||||||
<Border MouseDown="DragMove"
|
x:Name="CopySuccess"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndSlideFromBottom}, Duration=400, Event=None}"
|
||||||
|
xf:Animations.PrimaryBinding="{Binding CopyAnimation}"
|
||||||
|
Margin="138,300,0,0"
|
||||||
|
/>
|
||||||
|
<Button Height="32"
|
||||||
|
BorderThickness="0" Content="复 制"
|
||||||
|
Panel.ZIndex="999"
|
||||||
|
Margin="122,329,0,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Background="#BF8EF6"
|
||||||
|
Click="MyColorPicker_Confirmed"
|
||||||
|
VerticalAlignment="Top" Width="80"
|
||||||
|
>
|
||||||
|
<Button.Style>
|
||||||
|
<Style TargetType="Button" BasedOn="{StaticResource MyBtnStyle}">
|
||||||
|
</Style>
|
||||||
|
</Button.Style>
|
||||||
|
</Button>
|
||||||
|
<Button Height="32"
|
||||||
|
BorderThickness="0" Content="关 闭"
|
||||||
|
Panel.ZIndex="999" Margin="26,329,0,0"
|
||||||
|
Background="#EEEEEE"
|
||||||
|
Click="MyColorPicker_Canceled"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top" Width="80"
|
||||||
|
>
|
||||||
|
<Button.Style>
|
||||||
|
<Style TargetType="Button" BasedOn="{StaticResource MyBtnStyle}">
|
||||||
|
</Style>
|
||||||
|
</Button.Style>
|
||||||
|
</Button>
|
||||||
|
<StackPanel>
|
||||||
|
<Border MouseDown="DragMove"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
CornerRadius="8,8,0,0"
|
CornerRadius="8,8,0,0"
|
||||||
Height="20"
|
Height="20"
|
||||||
Background="White"
|
Background="White"
|
||||||
>
|
>
|
||||||
<Button Width="18" Height="18"
|
<Button Width="18" Height="18"
|
||||||
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
@@ -33,17 +69,15 @@
|
|||||||
MouseEnter="Button_MouseEnter"
|
MouseEnter="Button_MouseEnter"
|
||||||
MouseLeave="Button_MouseLeave"
|
MouseLeave="Button_MouseLeave"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
|
|
||||||
</Button>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<hc:ColorPicker HorizontalAlignment="Center"
|
</Button>
|
||||||
|
</Border>
|
||||||
|
<hc:ColorPicker HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
SelectedColorChanged="MyColorPicker_SelectedColorChanged"
|
SelectedColorChanged="MyColorPicker_SelectedColorChanged"
|
||||||
x:Name="MyColorPicker"
|
x:Name="MyColorPicker"
|
||||||
Confirmed="MyColorPicker_Confirmed"
|
|
||||||
Canceled="MyColorPicker_Canceled"
|
|
||||||
ToggleButton.Checked="MyColorPicker_Checked"/>
|
ToggleButton.Checked="MyColorPicker_Checked"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using GeekDesk.Interface;
|
using GeekDesk.Interface;
|
||||||
|
using GeekDesk.Util;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -14,10 +17,33 @@ namespace GeekDesk.Control.Windows
|
|||||||
public partial class GlobalColorPickerWindow : IWindowCommon
|
public partial class GlobalColorPickerWindow : IWindowCommon
|
||||||
{
|
{
|
||||||
PixelColorPickerWindow colorPickerWindow = null;
|
PixelColorPickerWindow colorPickerWindow = null;
|
||||||
|
|
||||||
|
class PrivateDataContext : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
private bool copyAnimation = false;
|
||||||
|
|
||||||
|
public bool CopyAnimation
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
copyAnimation = value;
|
||||||
|
OnPropertyChanged("CopyAnimation");
|
||||||
|
|
||||||
|
}
|
||||||
|
get { return copyAnimation; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
private void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
public GlobalColorPickerWindow()
|
public GlobalColorPickerWindow()
|
||||||
{
|
{
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.DataContext = new PrivateDataContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnKeyDown(object sender, KeyEventArgs e)
|
public void OnKeyDown(object sender, KeyEventArgs e)
|
||||||
@@ -35,14 +61,26 @@ namespace GeekDesk.Control.Windows
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void MyColorPicker_Canceled(object sender, EventArgs e)
|
private void MyColorPicker_Canceled(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
MyColorPickerClose();
|
MyColorPickerClose();
|
||||||
}
|
}
|
||||||
private void MyColorPicker_Confirmed(object sender, HandyControl.Data.FunctionEventArgs<Color> e)
|
private void MyColorPicker_Confirmed(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
CopySuccess.Visibility = Visibility.Visible;
|
||||||
|
PrivateDataContext pdc = this.DataContext as PrivateDataContext;
|
||||||
|
pdc.CopyAnimation = true;
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.Sleep(400);
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
pdc.CopyAnimation = false;
|
||||||
|
CopySuccess.Visibility = Visibility.Collapsed;
|
||||||
|
});
|
||||||
|
}).Start();
|
||||||
Color c = MyColorPicker.SelectedBrush.Color;
|
Color c = MyColorPicker.SelectedBrush.Color;
|
||||||
Clipboard.SetData(DataFormats.Text, string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B));
|
Clipboard.SetData(DataFormats.Text, string.Format("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -148,5 +186,28 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ICommand _hideCommand;
|
||||||
|
public ICommand HideCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_hideCommand == null)
|
||||||
|
{
|
||||||
|
_hideCommand = new RelayCommand(
|
||||||
|
p =>
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
p =>
|
||||||
|
{
|
||||||
|
//CopySuccess.Visibility = Visibility.Collapsed;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return _hideCommand;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</Border.Background>-->
|
</Border.Background>-->
|
||||||
<hc:DialogContainer>
|
<hc:DialogContainer>
|
||||||
<Grid MouseDown="DragMove">
|
<Grid MouseDown="DragMove">
|
||||||
<TextBox x:Name="CheckSettingUrl" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
|
<TextBox x:Name="CheckSettingUrl" Style="{StaticResource MyTextBoxStyle}" Visibility="Collapsed" Text="{Binding IsSettingUrl}" TextChanged="CheckSettingUrl_TextChanged"/>
|
||||||
<hc:TabControl x:Name="MyTabControl"
|
<hc:TabControl x:Name="MyTabControl"
|
||||||
IsAnimationEnabled="True"
|
IsAnimationEnabled="True"
|
||||||
SelectionChanged="TabControl_SelectionChanged"
|
SelectionChanged="TabControl_SelectionChanged"
|
||||||
@@ -75,9 +75,9 @@
|
|||||||
</hc:TabControl>
|
</hc:TabControl>
|
||||||
|
|
||||||
|
|
||||||
<Button Content="取消" Click="Close_Click" Margin="391,397.5,163,22.5"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="取消" Click="Close_Click" Margin="391,397.5,163,22.5" />
|
||||||
<Button Content="自定义设置" Click="CustomButton_Click" IsEnabled="False" Name="CustomButton" Style="{StaticResource Btn1}" Margin="447,397.5,71,22.5"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="自定义设置" Click="CustomButton_Click" IsEnabled="False" Name="CustomButton" Margin="447,397.5,71,22.5"/>
|
||||||
<Button Content="确定" Click="Confirm_Click" Style="{StaticResource Btn1}" Margin="534,397.5,20,22.5" />
|
<Button Style="{StaticResource MyBtnStyle}" Content="确定" Click="Confirm_Click" Margin="534,397.5,20,22.5" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</hc:DialogContainer>
|
</hc:DialogContainer>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="Black"
|
Background="Black"
|
||||||
|
ResizeMode="NoResize"
|
||||||
PreviewMouseMove="Window_PreviewMouseMove"
|
PreviewMouseMove="Window_PreviewMouseMove"
|
||||||
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
||||||
MouseRightButtonDown="Window_MouseRightButtonDown"
|
MouseRightButtonDown="Window_MouseRightButtonDown"
|
||||||
@@ -22,7 +23,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"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using GeekDesk.Util;
|
|||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
@@ -39,11 +38,12 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,19 +52,39 @@ namespace GeekDesk.Control.Windows
|
|||||||
|
|
||||||
this.WindowState = WindowState.Normal;//还原窗口(非最小化和最大化)
|
this.WindowState = WindowState.Normal;//还原窗口(非最小化和最大化)
|
||||||
|
|
||||||
this.Width = SystemParameters.VirtualScreenWidth;
|
var screens = Screen.AllScreens;
|
||||||
this.Height = SystemParameters.VirtualScreenHeight;
|
int allWidth = 0;
|
||||||
|
int allHeight = 0;
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
|
||||||
this.Left = SystemParameters.VirtualScreenLeft;
|
//获取缩放比例
|
||||||
this.Top = SystemParameters.VirtualScreenTop;
|
double scale = ScreenUtil.GetScreenScalingFactor();
|
||||||
|
|
||||||
|
foreach (var screen in screens)
|
||||||
|
{
|
||||||
|
var rect = screen.Bounds;
|
||||||
|
allWidth += rect.Width;
|
||||||
|
allHeight += rect.Height;
|
||||||
|
x = Math.Min(x, rect.X);
|
||||||
|
y = Math.Min(y, rect.Y);
|
||||||
|
}
|
||||||
|
//如果主显示器是最左边和最上边,则显示主显示器的缩放比例,反之则缩放比例不添加缩放比例
|
||||||
|
if (Screen.PrimaryScreen.Bounds.X != x || Screen.PrimaryScreen.Bounds.Y != y)
|
||||||
|
{
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Width = allWidth;
|
||||||
|
this.Height = allHeight;
|
||||||
|
|
||||||
|
this.Left = x;
|
||||||
|
this.Top = y;
|
||||||
|
|
||||||
DesktopBG.Width = this.Width;
|
DesktopBG.Width = this.Width;
|
||||||
DesktopBG.Height = this.Height;
|
DesktopBG.Height = this.Height;
|
||||||
this.Topmost = true;
|
this.Topmost = true;
|
||||||
|
|
||||||
//获取缩放比例
|
|
||||||
double scale = ScreenUtil.GetScreenScalingFactor();
|
|
||||||
|
|
||||||
bgBitmap = new System.Drawing.Bitmap(
|
bgBitmap = new System.Drawing.Bitmap(
|
||||||
(int)(Width * scale),
|
(int)(Width * scale),
|
||||||
(int)(Height * scale),
|
(int)(Height * scale),
|
||||||
@@ -74,8 +94,8 @@ namespace GeekDesk.Control.Windows
|
|||||||
using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bgBitmap))
|
using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bgBitmap))
|
||||||
{
|
{
|
||||||
g.CopyFromScreen(
|
g.CopyFromScreen(
|
||||||
0,
|
(int)this.Left,
|
||||||
0,
|
(int)this.Top,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
bgBitmap.Size
|
bgBitmap.Size
|
||||||
@@ -129,7 +149,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);
|
||||||
@@ -213,6 +233,7 @@ 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();
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
Width="510"
|
Width="510"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
Title=""
|
Title=""
|
||||||
|
ResizeMode="NoResize"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="Transparent" ShowInTaskbar="False"
|
Background="Transparent" ShowInTaskbar="False"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
@@ -44,12 +45,13 @@
|
|||||||
<TextBlock Text="待办任务:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="待办任务:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red" />
|
<TextBlock Text="*" Foreground="Red" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox x:Name="Title" Width="290" Text="{Binding Title, Mode=OneWay}" FontSize="14" />
|
<TextBox x:Name="Title" Style="{StaticResource MyTextBoxStyle}" Width="290" Text="{Binding Title, Mode=OneWay}" FontSize="14" />
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<TextBlock Text="待办详情:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="待办详情:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBox x:Name="Msg" TextWrapping="Wrap"
|
<TextBox x:Name="Msg" TextWrapping="Wrap"
|
||||||
|
Style="{StaticResource MyTextBoxStyle}"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Text="{Binding Msg, Mode=OneWay}"
|
Text="{Binding Msg, Mode=OneWay}"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
@@ -60,11 +62,11 @@
|
|||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
<TextBlock Text="运行方式:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="运行方式:" Style="{StaticResource LeftTB}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="1" Background="{DynamicResource SecondaryRegionBrush}"
|
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="1"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="指定时间"
|
Style="{StaticResource MyRadioBtnStyle}" Content="指定时间"
|
||||||
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=1}"/>
|
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=1}"/>
|
||||||
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Background="{DynamicResource SecondaryRegionBrush}" Tag="2"
|
<RadioButton Margin="10,0,0,0" Checked="ExecType_Checked" Tag="2"
|
||||||
Style="{StaticResource RadioButtonIcon}" Content="CRON表达式"
|
Style="{StaticResource MyRadioBtnStyle}" Content="CRON表达式"
|
||||||
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
|
IsChecked="{Binding ExecType, Mode=OneWay, Converter={StaticResource TodoTaskExecConvert}, ConverterParameter=2}"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
@@ -73,7 +75,11 @@
|
|||||||
<TextBlock Text="指定时间:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="指定时间:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red"/>
|
<TextBlock Text="*" Foreground="Red"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!" Width="200" Margin="1.6,0,0,0"/>
|
<hc:DateTimePicker x:Name="ExeTime" Text="{Binding ExeTime, Mode=OneWay}" ErrorStr="Error!" Width="200" Margin="1.6,0,0,0">
|
||||||
|
<hc:DateTimePicker.Background>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.7"/>
|
||||||
|
</hc:DateTimePicker.Background>
|
||||||
|
</hc:DateTimePicker>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
<hc:UniformSpacingPanel x:Name="CronPanel" Height="30" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel x:Name="CronPanel" Height="30" Visibility="Collapsed" Spacing="10" Grid.ColumnSpan="4" Margin="0,10,0,0">
|
||||||
@@ -81,7 +87,7 @@
|
|||||||
<TextBlock Text="CRON:" Style="{StaticResource LeftTB}"/>
|
<TextBlock Text="CRON:" Style="{StaticResource LeftTB}"/>
|
||||||
<TextBlock Text="*" Foreground="Red" />
|
<TextBlock Text="*" Foreground="Red" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox x:Name="Cron" Width="290" Text="{Binding Cron, Mode=OneWay}" FontSize="14" />
|
<TextBox x:Name="Cron" Style="{StaticResource MyTextBoxStyle}" Width="290" Text="{Binding Cron, Mode=OneWay}" FontSize="14" />
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,0" Grid.ColumnSpan="4">
|
||||||
<Button Content="保存" Style="{StaticResource Btn1}" Margin="320,6,-208,-10"
|
<Button Content="保存" Style="{StaticResource MyBtnStyle}" Margin="320,6,-208,-10"
|
||||||
Click="Save_Button_Click"/>
|
Click="Save_Button_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
Height="550"
|
Height="550"
|
||||||
Width="1000"
|
Width="1000"
|
||||||
Title="Task"
|
Title="Task"
|
||||||
|
ResizeMode="NoResize"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="Transparent" ShowInTaskbar="False"
|
Background="Transparent" ShowInTaskbar="False"
|
||||||
@@ -89,7 +90,7 @@
|
|||||||
<Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
|
<Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
|
||||||
<Button Content="新建待办"
|
<Button Content="新建待办"
|
||||||
Panel.ZIndex="1"
|
Panel.ZIndex="1"
|
||||||
Style="{StaticResource Btn1}"
|
Style="{StaticResource MyBtnStyle}"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="669,400,0,0"
|
Margin="669,400,0,0"
|
||||||
Click="CreateBacklog_BtnClick" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
Click="CreateBacklog_BtnClick" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
using GeekDesk.Interface;
|
using GeekDesk.Interface;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reactive.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
@@ -64,12 +69,21 @@ namespace GeekDesk.Control.Windows
|
|||||||
{
|
{
|
||||||
case "History":
|
case "History":
|
||||||
UFG.Visibility = Visibility.Collapsed;
|
UFG.Visibility = Visibility.Collapsed;
|
||||||
|
//排序历史待办 倒序
|
||||||
|
|
||||||
|
List<ToDoInfo> list = appData.HiToDoList.OrderByDescending(v=>v.DoneTime).ToList();
|
||||||
|
appData.HiToDoList.Clear();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
appData.HiToDoList.Add(item);
|
||||||
|
}
|
||||||
backlog.BacklogList.ItemsSource = appData.HiToDoList;
|
backlog.BacklogList.ItemsSource = appData.HiToDoList;
|
||||||
if (backlog.BacklogList.Items.Count > 0)
|
if (backlog.BacklogList.Items.Count > 0)
|
||||||
{
|
{
|
||||||
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;
|
||||||
@@ -110,9 +124,7 @@ 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())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Title=""
|
Title=""
|
||||||
|
ResizeMode="NoResize"
|
||||||
Background="Transparent" ShowInTaskbar="False"
|
Background="Transparent" ShowInTaskbar="False"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
KeyDown="OnKeyDown">
|
KeyDown="OnKeyDown">
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
<TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/>
|
<TextBlock Margin="10" x:Name="MsgTitle" TextWrapping="Wrap" FontSize="16" HorizontalAlignment="Left" Style="{DynamicResource TextBlockLargeBold}" Text="测试"/>
|
||||||
<Button HorizontalAlignment="Right" Margin="0,0,10,0"
|
<Button HorizontalAlignment="Right" Margin="0,0,10,0"
|
||||||
Content="去点个Star" Click="StarBtnClick"
|
Content="去点个Star" Click="StarBtnClick"
|
||||||
Style="{StaticResource Btn1}"
|
Style="{StaticResource MyBtnStyle}"
|
||||||
hc:IconElement.Geometry="M718.565517 863.126069c-7.344552 0-15.077517-2.189241-22.987034-6.285241L512 760.337655l-183.613793 96.503173c-18.785103 9.851586-37.499586 7.521103-48.16331-5.12-5.12-6.10869-10.557793-17.125517-7.485794-35.345656l35.063173-204.411586L159.249655 467.155862c-12.747034-12.393931-17.584552-27.153655-13.241379-40.430345 4.343172-13.312 16.913655-22.386759 34.568827-24.929103l205.223725-29.837242 91.806896-185.979586c7.874207-15.995586 20.409379-25.140966 34.392276-25.140965 13.947586 0 26.482759 9.145379 34.392276 25.140965l91.771586 185.979586 205.259035 29.837242c17.619862 2.577655 30.190345 11.652414 34.498206 24.964414 4.378483 13.27669-0.529655 28.001103-13.241379 40.430344l-148.51531 144.807725 35.063172 204.411586c3.10731 18.149517-2.365793 29.272276-7.485793 35.345655a32.273655 32.273655 0 0 1-25.176276 11.369931z"
|
hc:IconElement.Geometry="M718.565517 863.126069c-7.344552 0-15.077517-2.189241-22.987034-6.285241L512 760.337655l-183.613793 96.503173c-18.785103 9.851586-37.499586 7.521103-48.16331-5.12-5.12-6.10869-10.557793-17.125517-7.485794-35.345656l35.063173-204.411586L159.249655 467.155862c-12.747034-12.393931-17.584552-27.153655-13.241379-40.430345 4.343172-13.312 16.913655-22.386759 34.568827-24.929103l205.223725-29.837242 91.806896-185.979586c7.874207-15.995586 20.409379-25.140966 34.392276-25.140965 13.947586 0 26.482759 9.145379 34.392276 25.140965l91.771586 185.979586 205.259035 29.837242c17.619862 2.577655 30.190345 11.652414 34.498206 24.964414 4.378483 13.27669-0.529655 28.001103-13.241379 40.430344l-148.51531 144.807725 35.063172 204.411586c3.10731 18.149517-2.365793 29.272276-7.485793 35.345655a32.273655 32.273655 0 0 1-25.176276 11.369931z"
|
||||||
/>
|
/>
|
||||||
</hc:SimplePanel>
|
</hc:SimplePanel>
|
||||||
@@ -55,8 +56,8 @@
|
|||||||
</hc:Card.Footer>
|
</hc:Card.Footer>
|
||||||
</hc:Card>
|
</hc:Card>
|
||||||
<hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0">
|
<hc:UniformSpacingPanel Spacing="100" HorizontalAlignment="Center" Margin="0,10,0,0">
|
||||||
<Button Content="暂不更新" Click="Close_Click" Style="{StaticResource Btn1}"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="暂不更新" Click="Close_Click"/>
|
||||||
<Button Content="前往更新" Click="Confirm_Click" Style="{StaticResource Btn1}"/>
|
<Button Style="{StaticResource MyBtnStyle}" Content="前往更新" Click="Confirm_Click"/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,21 @@ namespace GeekDesk.Converts
|
|||||||
return config.WindowWidth - config.MenuCardWidth;
|
return config.WindowWidth - config.MenuCardWidth;
|
||||||
} else if (WidthTypeEnum.RIGHT_CARD_HALF == type)
|
} else if (WidthTypeEnum.RIGHT_CARD_HALF == type)
|
||||||
{
|
{
|
||||||
return (config.WindowWidth - config.MenuCardWidth) / 2;
|
return (config.WindowWidth - config.MenuCardWidth) * 0.618;
|
||||||
|
} else if (WidthTypeEnum.RIGHT_CARD_HALF_TEXT == type)
|
||||||
|
{
|
||||||
|
return (config.WindowWidth - config.MenuCardWidth) * 0.618 - config.ImageWidth - 20;
|
||||||
|
} else if (WidthTypeEnum.RIGHT_CARD_20 == type)
|
||||||
|
{
|
||||||
|
return (config.WindowWidth - config.MenuCardWidth) - 20;
|
||||||
|
}
|
||||||
|
else if (WidthTypeEnum.RIGHT_CARD_40 == type)
|
||||||
|
{
|
||||||
|
return (config.WindowWidth - config.MenuCardWidth) - 40;
|
||||||
|
}
|
||||||
|
else if (WidthTypeEnum.RIGHT_CARD_70 == type)
|
||||||
|
{
|
||||||
|
return (config.WindowWidth - config.MenuCardWidth) - 70;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config.WindowWidth;
|
return config.WindowWidth;
|
||||||
|
|||||||
29
Converts/SearchResWidth.cs
Normal file
29
Converts/SearchResWidth.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,14 +9,14 @@ namespace GeekDesk.Converts
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
if ((Visibility)value == Visibility.Visible)
|
if (parameter == null)
|
||||||
{
|
{
|
||||||
return true;
|
return (Visibility)value == Visibility.Visible;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return false;
|
return !((Visibility)value == Visibility.Visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
|||||||
25
CustomComponent/VirtualizingWrapPanel/ItemRange.cs
Normal file
25
CustomComponent/VirtualizingWrapPanel/ItemRange.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||||
|
{
|
||||||
|
public struct ItemRange
|
||||||
|
{
|
||||||
|
public int StartIndex { get; }
|
||||||
|
public int EndIndex { get; }
|
||||||
|
|
||||||
|
public ItemRange(int startIndex, int endIndex) : this()
|
||||||
|
{
|
||||||
|
StartIndex = startIndex;
|
||||||
|
EndIndex = endIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Contains(int itemIndex)
|
||||||
|
{
|
||||||
|
return itemIndex >= StartIndex && itemIndex <= EndIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
CustomComponent/VirtualizingWrapPanel/ScrollDirection.cs
Normal file
14
CustomComponent/VirtualizingWrapPanel/ScrollDirection.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||||
|
{
|
||||||
|
public enum ScrollDirection
|
||||||
|
{
|
||||||
|
Vertical,
|
||||||
|
Horizontal
|
||||||
|
}
|
||||||
|
}
|
||||||
28
CustomComponent/VirtualizingWrapPanel/SpacingMode.cs
Normal file
28
CustomComponent/VirtualizingWrapPanel/SpacingMode.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||||
|
{
|
||||||
|
public enum SpacingMode
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Spacing is disabled and all items will be arranged as closely as possible.
|
||||||
|
/// </summary>
|
||||||
|
None,
|
||||||
|
/// <summary>
|
||||||
|
/// The remaining space is evenly distributed between the items on a layout row, as well as the start and end of each row.
|
||||||
|
/// </summary>
|
||||||
|
Uniform,
|
||||||
|
/// <summary>
|
||||||
|
/// The remaining space is evenly distributed between the items on a layout row, excluding the start and end of each row.
|
||||||
|
/// </summary>
|
||||||
|
BetweenItemsOnly,
|
||||||
|
/// <summary>
|
||||||
|
/// The remaining space is evenly distributed between start and end of each row.
|
||||||
|
/// </summary>
|
||||||
|
StartAndEndOnly
|
||||||
|
}
|
||||||
|
}
|
||||||
492
CustomComponent/VirtualizingWrapPanel/VirtualizingPanelBase.cs
Normal file
492
CustomComponent/VirtualizingWrapPanel/VirtualizingPanelBase.cs
Normal file
@@ -0,0 +1,492 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||||
|
{
|
||||||
|
public abstract class VirtualizingPanelBase : VirtualizingPanel, IScrollInfo
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty ScrollLineDeltaProperty = DependencyProperty.Register(nameof(ScrollLineDelta), typeof(double), typeof(VirtualizingPanelBase), new FrameworkPropertyMetadata(16.0));
|
||||||
|
public static readonly DependencyProperty MouseWheelDeltaProperty = DependencyProperty.Register(nameof(MouseWheelDelta), typeof(double), typeof(VirtualizingPanelBase), new FrameworkPropertyMetadata(48.0));
|
||||||
|
public static readonly DependencyProperty ScrollLineDeltaItemProperty = DependencyProperty.Register(nameof(ScrollLineDeltaItem), typeof(int), typeof(VirtualizingPanelBase), new FrameworkPropertyMetadata(1));
|
||||||
|
public static readonly DependencyProperty MouseWheelDeltaItemProperty = DependencyProperty.Register(nameof(MouseWheelDeltaItem), typeof(int), typeof(VirtualizingPanelBase), new FrameworkPropertyMetadata(3));
|
||||||
|
private ScrollViewer scrollOwner;
|
||||||
|
|
||||||
|
public ScrollViewer GetScrollOwner()
|
||||||
|
{
|
||||||
|
return scrollOwner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetScrollOwner(ScrollViewer value)
|
||||||
|
{
|
||||||
|
scrollOwner = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanVerticallyScroll { get; set; }
|
||||||
|
public bool CanHorizontallyScroll { get; set; }
|
||||||
|
|
||||||
|
protected override bool CanHierarchicallyScrollAndVirtualizeCore => true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scroll line delta for pixel based scrolling. The default value is 16 dp.
|
||||||
|
/// </summary>
|
||||||
|
public double ScrollLineDelta { get => (double)GetValue(ScrollLineDeltaProperty); set => SetValue(ScrollLineDeltaProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse wheel delta for pixel based scrolling. The default value is 48 dp.
|
||||||
|
/// </summary>
|
||||||
|
public double MouseWheelDelta { get => (double)GetValue(MouseWheelDeltaProperty); set => SetValue(MouseWheelDeltaProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scroll line delta for item based scrolling. The default value is 1 item.
|
||||||
|
/// </summary>
|
||||||
|
public double ScrollLineDeltaItem { get => (int)GetValue(ScrollLineDeltaItemProperty); set => SetValue(ScrollLineDeltaItemProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Mouse wheel delta for item based scrolling. The default value is 3 items.
|
||||||
|
/// </summary>
|
||||||
|
public int MouseWheelDeltaItem { get => (int)GetValue(MouseWheelDeltaItemProperty); set => SetValue(MouseWheelDeltaItemProperty, value); }
|
||||||
|
|
||||||
|
protected ScrollUnit ScrollUnit => GetScrollUnit(ItemsControl);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The direction in which the panel scrolls when user turns the mouse wheel.
|
||||||
|
/// </summary>
|
||||||
|
protected ScrollDirection MouseWheelScrollDirection { get; set; } = ScrollDirection.Vertical;
|
||||||
|
|
||||||
|
|
||||||
|
protected bool IsVirtualizing => GetIsVirtualizing(ItemsControl);
|
||||||
|
|
||||||
|
protected VirtualizationMode VirtualizationMode => GetVirtualizationMode(ItemsControl);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if the panel is in VirtualizationMode.Recycling, otherwise false.
|
||||||
|
/// </summary>
|
||||||
|
protected bool IsRecycling => VirtualizationMode == VirtualizationMode.Recycling;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The cache length before and after the viewport.
|
||||||
|
/// </summary>
|
||||||
|
protected VirtualizationCacheLength CacheLength { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Unit of the cache length. Can be Pixel, Item or Page.
|
||||||
|
/// When the ItemsOwner is a group item it can only be pixel or item.
|
||||||
|
/// </summary>
|
||||||
|
protected VirtualizationCacheLengthUnit CacheLengthUnit { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The ItemsControl (e.g. ListView).
|
||||||
|
/// </summary>
|
||||||
|
protected ItemsControl ItemsControl => ItemsControl.GetItemsOwner(this);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The ItemsControl (e.g. ListView) or if the ItemsControl is grouping a GroupItem.
|
||||||
|
/// </summary>
|
||||||
|
protected DependencyObject ItemsOwner
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (ItemsOwner1 is null)
|
||||||
|
{
|
||||||
|
/* Use reflection to access internal method because the public
|
||||||
|
* GetItemsOwner method does always return the itmes control instead
|
||||||
|
* of the real items owner for example the group item when grouping */
|
||||||
|
MethodInfo getItemsOwnerInternalMethod = typeof(ItemsControl).GetMethod(
|
||||||
|
"GetItemsOwnerInternal",
|
||||||
|
BindingFlags.Static | BindingFlags.NonPublic,
|
||||||
|
null,
|
||||||
|
new Type[] { typeof(DependencyObject) },
|
||||||
|
null
|
||||||
|
);
|
||||||
|
ItemsOwner1 = (DependencyObject)getItemsOwnerInternalMethod.Invoke(null, new object[] { this });
|
||||||
|
}
|
||||||
|
return ItemsOwner1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private DependencyObject _itemsOwner;
|
||||||
|
|
||||||
|
protected ReadOnlyCollection<object> Items => ((ItemContainerGenerator)ItemContainerGenerator).Items;
|
||||||
|
|
||||||
|
protected new IRecyclingItemContainerGenerator ItemContainerGenerator
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_itemContainerGenerator is null)
|
||||||
|
{
|
||||||
|
/* Because of a bug in the framework the ItemContainerGenerator
|
||||||
|
* is null until InternalChildren accessed at least one time. */
|
||||||
|
var children = InternalChildren;
|
||||||
|
_itemContainerGenerator = (IRecyclingItemContainerGenerator)base.ItemContainerGenerator;
|
||||||
|
}
|
||||||
|
return _itemContainerGenerator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private IRecyclingItemContainerGenerator _itemContainerGenerator;
|
||||||
|
|
||||||
|
public double ExtentWidth => Extent.Width;
|
||||||
|
public double ExtentHeight => Extent.Height;
|
||||||
|
protected Size Extent { get; private set; } = new Size(0, 0);
|
||||||
|
|
||||||
|
public double HorizontalOffset => Offset.X;
|
||||||
|
public double VerticalOffset => Offset.Y;
|
||||||
|
protected Size Viewport { get; private set; } = new Size(0, 0);
|
||||||
|
|
||||||
|
public double ViewportWidth => Viewport.Width;
|
||||||
|
public double ViewportHeight => Viewport.Height;
|
||||||
|
protected Point Offset { get; private set; } = new Point(0, 0);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The range of items that a realized in viewport or cache.
|
||||||
|
/// </summary>
|
||||||
|
protected ItemRange ItemRange { get; set; }
|
||||||
|
public ScrollViewer ScrollOwner { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
public DependencyObject ItemsOwner1 { get => _itemsOwner; set => _itemsOwner = value; }
|
||||||
|
|
||||||
|
private Visibility previousVerticalScrollBarVisibility = Visibility.Collapsed;
|
||||||
|
private Visibility previousHorizontalScrollBarVisibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
protected virtual void UpdateScrollInfo(Size availableSize, Size extent)
|
||||||
|
{
|
||||||
|
bool invalidateScrollInfo = false;
|
||||||
|
|
||||||
|
if (extent != Extent)
|
||||||
|
{
|
||||||
|
Extent = extent;
|
||||||
|
invalidateScrollInfo = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (availableSize != Viewport)
|
||||||
|
{
|
||||||
|
Viewport = availableSize;
|
||||||
|
invalidateScrollInfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ViewportHeight != 0 && VerticalOffset != 0 && VerticalOffset + ViewportHeight + 1 >= ExtentHeight)
|
||||||
|
{
|
||||||
|
Offset = new Point(Offset.X, extent.Height - availableSize.Height);
|
||||||
|
invalidateScrollInfo = true;
|
||||||
|
}
|
||||||
|
if (ViewportWidth != 0 && HorizontalOffset != 0 && HorizontalOffset + ViewportWidth + 1 >= ExtentWidth)
|
||||||
|
{
|
||||||
|
Offset = new Point(extent.Width - availableSize.Width, Offset.Y);
|
||||||
|
invalidateScrollInfo = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invalidateScrollInfo)
|
||||||
|
{
|
||||||
|
GetScrollOwner()?.InvalidateScrollInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual Rect MakeVisible(Visual visual, Rect rectangle)
|
||||||
|
{
|
||||||
|
Point pos = visual.TransformToAncestor(this).Transform(Offset);
|
||||||
|
|
||||||
|
double scrollAmountX = 0;
|
||||||
|
double scrollAmountY = 0;
|
||||||
|
|
||||||
|
if (pos.X < Offset.X)
|
||||||
|
{
|
||||||
|
scrollAmountX = -(Offset.X - pos.X);
|
||||||
|
}
|
||||||
|
else if ((pos.X + rectangle.Width) > (Offset.X + Viewport.Width))
|
||||||
|
{
|
||||||
|
double notVisibleX = (pos.X + rectangle.Width) - (Offset.X + Viewport.Width);
|
||||||
|
double maxScrollX = pos.X - Offset.X; // keep left of the visual visible
|
||||||
|
scrollAmountX = Math.Min(notVisibleX, maxScrollX);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pos.Y < Offset.Y)
|
||||||
|
{
|
||||||
|
scrollAmountY = -(Offset.Y - pos.Y);
|
||||||
|
}
|
||||||
|
else if ((pos.Y + rectangle.Height) > (Offset.Y + Viewport.Height))
|
||||||
|
{
|
||||||
|
double notVisibleY = (pos.Y + rectangle.Height) - (Offset.Y + Viewport.Height);
|
||||||
|
double maxScrollY = pos.Y - Offset.Y; // keep top of the visual visible
|
||||||
|
scrollAmountY = Math.Min(notVisibleY, maxScrollY);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetHorizontalOffset(Offset.X + scrollAmountX);
|
||||||
|
SetVerticalOffset(Offset.Y + scrollAmountY);
|
||||||
|
|
||||||
|
double visibleRectWidth = Math.Min(rectangle.Width, Viewport.Width);
|
||||||
|
double visibleRectHeight = Math.Min(rectangle.Height, Viewport.Height);
|
||||||
|
|
||||||
|
return new Rect(scrollAmountX, scrollAmountY, visibleRectWidth, visibleRectHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
|
||||||
|
{
|
||||||
|
switch (args.Action)
|
||||||
|
{
|
||||||
|
case NotifyCollectionChangedAction.Remove:
|
||||||
|
case NotifyCollectionChangedAction.Replace:
|
||||||
|
RemoveInternalChildRange(args.Position.Index, args.ItemUICount);
|
||||||
|
break;
|
||||||
|
case NotifyCollectionChangedAction.Move:
|
||||||
|
RemoveInternalChildRange(args.OldPosition.Index, args.ItemUICount);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int GetItemIndexFromChildIndex(int childIndex)
|
||||||
|
{
|
||||||
|
var generatorPosition = GetGeneratorPositionFromChildIndex(childIndex);
|
||||||
|
return ItemContainerGenerator.IndexFromGeneratorPosition(generatorPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual GeneratorPosition GetGeneratorPositionFromChildIndex(int childIndex)
|
||||||
|
{
|
||||||
|
return new GeneratorPosition(childIndex, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Size MeasureOverride(Size availableSize)
|
||||||
|
{
|
||||||
|
/* Sometimes when scrolling the scrollbar gets hidden without any reason. In this case the "IsMeasureValid"
|
||||||
|
* property of the ScrollOwner is false. To prevent a infinite circle the mesasure call is ignored. */
|
||||||
|
if (GetScrollOwner() != null)
|
||||||
|
{
|
||||||
|
bool verticalScrollBarGotHidden = GetScrollOwner().VerticalScrollBarVisibility == ScrollBarVisibility.Auto
|
||||||
|
&& GetScrollOwner().ComputedVerticalScrollBarVisibility != Visibility.Visible
|
||||||
|
&& GetScrollOwner().ComputedVerticalScrollBarVisibility != previousVerticalScrollBarVisibility;
|
||||||
|
|
||||||
|
bool horizontalScrollBarGotHidden = GetScrollOwner().HorizontalScrollBarVisibility == ScrollBarVisibility.Auto
|
||||||
|
&& GetScrollOwner().ComputedHorizontalScrollBarVisibility != Visibility.Visible
|
||||||
|
&& GetScrollOwner().ComputedHorizontalScrollBarVisibility != previousHorizontalScrollBarVisibility;
|
||||||
|
|
||||||
|
previousVerticalScrollBarVisibility = GetScrollOwner().ComputedVerticalScrollBarVisibility;
|
||||||
|
previousHorizontalScrollBarVisibility = GetScrollOwner().ComputedHorizontalScrollBarVisibility;
|
||||||
|
|
||||||
|
if (!GetScrollOwner().IsMeasureValid && verticalScrollBarGotHidden || horizontalScrollBarGotHidden)
|
||||||
|
{
|
||||||
|
return availableSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var groupItem = ItemsOwner as IHierarchicalVirtualizationAndScrollInfo;
|
||||||
|
|
||||||
|
Size extent;
|
||||||
|
Size desiredSize;
|
||||||
|
|
||||||
|
if (groupItem != null)
|
||||||
|
{
|
||||||
|
/* If the ItemsOwner is a group item the availableSize is ifinity.
|
||||||
|
* Therfore the vieport size provided by the group item is used. */
|
||||||
|
var viewportSize = groupItem.Constraints.Viewport.Size;
|
||||||
|
var headerSize = groupItem.HeaderDesiredSizes.PixelSize;
|
||||||
|
double availableWidth = Math.Max(viewportSize.Width - 5, 0); // left margin of 5 dp
|
||||||
|
double availableHeight = Math.Max(viewportSize.Height - headerSize.Height, 0);
|
||||||
|
availableSize = new Size(availableWidth, availableHeight);
|
||||||
|
|
||||||
|
extent = CalculateExtent(availableSize);
|
||||||
|
|
||||||
|
desiredSize = new Size(extent.Width, extent.Height);
|
||||||
|
|
||||||
|
Extent = extent;
|
||||||
|
Offset = groupItem.Constraints.Viewport.Location;
|
||||||
|
Viewport = groupItem.Constraints.Viewport.Size;
|
||||||
|
CacheLength = groupItem.Constraints.CacheLength;
|
||||||
|
CacheLengthUnit = groupItem.Constraints.CacheLengthUnit; // can be Item or Pixel
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
extent = CalculateExtent(availableSize);
|
||||||
|
double desiredWidth = Math.Min(availableSize.Width, extent.Width);
|
||||||
|
double desiredHeight = Math.Min(availableSize.Height, extent.Height);
|
||||||
|
desiredSize = new Size(desiredWidth, desiredHeight);
|
||||||
|
|
||||||
|
UpdateScrollInfo(desiredSize, extent);
|
||||||
|
CacheLength = GetCacheLength(ItemsOwner);
|
||||||
|
CacheLengthUnit = GetCacheLengthUnit(ItemsOwner); // can be Page, Item or Pixel
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemRange = UpdateItemRange();
|
||||||
|
|
||||||
|
RealizeItems();
|
||||||
|
VirtualizeItems();
|
||||||
|
|
||||||
|
return desiredSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Realizes visible and cached items.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void RealizeItems()
|
||||||
|
{
|
||||||
|
var startPosition = ItemContainerGenerator.GeneratorPositionFromIndex(ItemRange.StartIndex);
|
||||||
|
|
||||||
|
int childIndex = startPosition.Offset == 0 ? startPosition.Index : startPosition.Index + 1;
|
||||||
|
|
||||||
|
using (ItemContainerGenerator.StartAt(startPosition, GeneratorDirection.Forward, true))
|
||||||
|
{
|
||||||
|
for (int i = ItemRange.StartIndex; i <= ItemRange.EndIndex; i++, childIndex++)
|
||||||
|
{
|
||||||
|
UIElement child = (UIElement)ItemContainerGenerator.GenerateNext(out bool isNewlyRealized);
|
||||||
|
if (isNewlyRealized || /*recycled*/!InternalChildren.Contains(child))
|
||||||
|
{
|
||||||
|
if (childIndex >= InternalChildren.Count)
|
||||||
|
{
|
||||||
|
AddInternalChild(child);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InsertInternalChild(childIndex, child);
|
||||||
|
}
|
||||||
|
ItemContainerGenerator.PrepareItemContainer(child);
|
||||||
|
|
||||||
|
child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child is IHierarchicalVirtualizationAndScrollInfo groupItem)
|
||||||
|
{
|
||||||
|
groupItem.Constraints = new HierarchicalVirtualizationConstraints(
|
||||||
|
new VirtualizationCacheLength(0),
|
||||||
|
VirtualizationCacheLengthUnit.Item,
|
||||||
|
new Rect(0, 0, ViewportWidth, ViewportHeight));
|
||||||
|
child.Measure(new Size(ViewportWidth, ViewportHeight));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Virtualizes (cleanups) no longer visible or cached items.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void VirtualizeItems()
|
||||||
|
{
|
||||||
|
for (int childIndex = InternalChildren.Count - 1; childIndex >= 0; childIndex--)
|
||||||
|
{
|
||||||
|
var generatorPosition = GetGeneratorPositionFromChildIndex(childIndex);
|
||||||
|
|
||||||
|
int itemIndex = ItemContainerGenerator.IndexFromGeneratorPosition(generatorPosition);
|
||||||
|
|
||||||
|
if (itemIndex != -1 && !ItemRange.Contains(itemIndex))
|
||||||
|
{
|
||||||
|
if (VirtualizationMode == VirtualizationMode.Recycling)
|
||||||
|
{
|
||||||
|
ItemContainerGenerator.Recycle(generatorPosition, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ItemContainerGenerator.Remove(generatorPosition, 1);
|
||||||
|
}
|
||||||
|
RemoveInternalChildRange(childIndex, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Calculates the extent that would be needed to show all items.
|
||||||
|
/// </summary>
|
||||||
|
protected abstract Size CalculateExtent(Size availableSize);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Calculates the item range that is visible in the viewport or cached.
|
||||||
|
/// </summary>
|
||||||
|
protected abstract ItemRange UpdateItemRange();
|
||||||
|
|
||||||
|
public void SetVerticalOffset(double offset)
|
||||||
|
{
|
||||||
|
if (offset < 0 || Viewport.Height >= Extent.Height)
|
||||||
|
{
|
||||||
|
offset = 0;
|
||||||
|
}
|
||||||
|
else if (offset + Viewport.Height >= Extent.Height)
|
||||||
|
{
|
||||||
|
offset = Extent.Height - Viewport.Height;
|
||||||
|
}
|
||||||
|
Offset = new Point(Offset.X, offset);
|
||||||
|
GetScrollOwner()?.InvalidateScrollInfo();
|
||||||
|
InvalidateMeasure();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetHorizontalOffset(double offset)
|
||||||
|
{
|
||||||
|
if (offset < 0 || Viewport.Width >= Extent.Width)
|
||||||
|
{
|
||||||
|
offset = 0;
|
||||||
|
}
|
||||||
|
else if (offset + Viewport.Width >= Extent.Width)
|
||||||
|
{
|
||||||
|
offset = Extent.Width - Viewport.Width;
|
||||||
|
}
|
||||||
|
Offset = new Point(offset, Offset.Y);
|
||||||
|
GetScrollOwner()?.InvalidateScrollInfo();
|
||||||
|
InvalidateMeasure();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void ScrollVertical(double amount)
|
||||||
|
{
|
||||||
|
SetVerticalOffset(VerticalOffset + amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void ScrollHorizontal(double amount)
|
||||||
|
{
|
||||||
|
SetHorizontalOffset(HorizontalOffset + amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LineUp() => ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? -ScrollLineDelta : GetLineUpScrollAmount());
|
||||||
|
public void LineDown() => ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? ScrollLineDelta : GetLineDownScrollAmount());
|
||||||
|
public void LineLeft() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? -ScrollLineDelta : GetLineLeftScrollAmount());
|
||||||
|
public void LineRight() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? ScrollLineDelta : GetLineRightScrollAmount());
|
||||||
|
|
||||||
|
public void MouseWheelUp()
|
||||||
|
{
|
||||||
|
if (MouseWheelScrollDirection == ScrollDirection.Vertical)
|
||||||
|
{
|
||||||
|
ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? -MouseWheelDelta : GetMouseWheelUpScrollAmount());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MouseWheelLeft();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MouseWheelDown()
|
||||||
|
{
|
||||||
|
if (MouseWheelScrollDirection == ScrollDirection.Vertical)
|
||||||
|
{
|
||||||
|
ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? MouseWheelDelta : GetMouseWheelDownScrollAmount());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MouseWheelRight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MouseWheelLeft() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? -MouseWheelDelta : GetMouseWheelLeftScrollAmount());
|
||||||
|
public void MouseWheelRight() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? MouseWheelDelta : GetMouseWheelRightScrollAmount());
|
||||||
|
|
||||||
|
public void PageUp() => ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? -ViewportHeight : GetPageUpScrollAmount());
|
||||||
|
public void PageDown() => ScrollVertical(ScrollUnit == ScrollUnit.Pixel ? ViewportHeight : GetPageDownScrollAmount());
|
||||||
|
public void PageLeft() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? -ViewportHeight : GetPageLeftScrollAmount());
|
||||||
|
public void PageRight() => ScrollHorizontal(ScrollUnit == ScrollUnit.Pixel ? ViewportHeight : GetPageRightScrollAmount());
|
||||||
|
|
||||||
|
protected abstract double GetLineUpScrollAmount();
|
||||||
|
protected abstract double GetLineDownScrollAmount();
|
||||||
|
protected abstract double GetLineLeftScrollAmount();
|
||||||
|
protected abstract double GetLineRightScrollAmount();
|
||||||
|
|
||||||
|
protected abstract double GetMouseWheelUpScrollAmount();
|
||||||
|
protected abstract double GetMouseWheelDownScrollAmount();
|
||||||
|
protected abstract double GetMouseWheelLeftScrollAmount();
|
||||||
|
protected abstract double GetMouseWheelRightScrollAmount();
|
||||||
|
|
||||||
|
protected abstract double GetPageUpScrollAmount();
|
||||||
|
protected abstract double GetPageDownScrollAmount();
|
||||||
|
protected abstract double GetPageLeftScrollAmount();
|
||||||
|
protected abstract double GetPageRightScrollAmount();
|
||||||
|
}
|
||||||
|
}
|
||||||
474
CustomComponent/VirtualizingWrapPanel/VirtualizingWrapPanel.cs
Normal file
474
CustomComponent/VirtualizingWrapPanel/VirtualizingWrapPanel.cs
Normal file
@@ -0,0 +1,474 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows;
|
||||||
|
using GeekDesk.CustomComponent.VirtualizingWrapPanel;
|
||||||
|
|
||||||
|
namespace GeekDesk.CustomComponent.VirtualizingWrapPanel
|
||||||
|
{
|
||||||
|
public class VirtualizingWrapPanel : VirtualizingPanelBase
|
||||||
|
{
|
||||||
|
#region Deprecated properties
|
||||||
|
|
||||||
|
[Obsolete("Use SpacingMode")]
|
||||||
|
public static readonly DependencyProperty IsSpacingEnabledProperty = DependencyProperty.Register(nameof(IsSpacingEnabled), typeof(bool), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsMeasure));
|
||||||
|
|
||||||
|
[Obsolete("Use IsSpacingEnabled")]
|
||||||
|
public bool SpacingEnabled { get => IsSpacingEnabled; set => IsSpacingEnabled = value; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value that specifies whether the items are distributed evenly across the width (horizontal orientation)
|
||||||
|
/// or height (vertical orientation). The default value is true.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("Use SpacingMode")]
|
||||||
|
public bool IsSpacingEnabled { get => (bool)GetValue(IsSpacingEnabledProperty); set => SetValue(IsSpacingEnabledProperty, value); }
|
||||||
|
|
||||||
|
[Obsolete("Use ItemSize")]
|
||||||
|
public Size ChildrenSize { get => ItemSize; set => ItemSize = value; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public static readonly DependencyProperty SpacingModeProperty = DependencyProperty.Register(nameof(SpacingMode), typeof(SpacingMode), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(SpacingMode.Uniform, FrameworkPropertyMetadataOptions.AffectsMeasure));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(nameof(Orientation), typeof(Orientation), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(Orientation.Vertical, FrameworkPropertyMetadataOptions.AffectsMeasure, (obj, args) => ((VirtualizingWrapPanel)obj).Orientation_Changed()));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty ItemSizeProperty = DependencyProperty.Register(nameof(ItemSize), typeof(Size), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(Size.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty StretchItemsProperty = DependencyProperty.Register(nameof(StretchItems), typeof(bool), typeof(VirtualizingWrapPanel), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsArrange));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the spacing mode used when arranging the items. The default value is <see cref="SpacingMode.Uniform"/>.
|
||||||
|
/// </summary>
|
||||||
|
public SpacingMode SpacingMode { get => (SpacingMode)GetValue(SpacingModeProperty); set => SetValue(SpacingModeProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value that specifies the orientation in which items are arranged. The default value is <see cref="Orientation.Vertical"/>.
|
||||||
|
/// </summary>
|
||||||
|
public Orientation Orientation { get => (Orientation)GetValue(OrientationProperty); set => SetValue(OrientationProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value that specifies the size of the items. The default value is <see cref="Size.Empty"/>.
|
||||||
|
/// If the value is <see cref="Size.Empty"/> the size of the items gots measured by the first realized item.
|
||||||
|
/// </summary>
|
||||||
|
public Size ItemSize { get => (Size)GetValue(ItemSizeProperty); set => SetValue(ItemSizeProperty, value); }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value that specifies if the items get stretched to fill up remaining space. The default value is false.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The MaxWidth and MaxHeight properties of the ItemContainerStyle can be used to limit the stretching.
|
||||||
|
/// In this case the use of the remaining space will be determined by the SpacingMode property.
|
||||||
|
/// </remarks>
|
||||||
|
public bool StretchItems { get => (bool)GetValue(StretchItemsProperty); set => SetValue(StretchItemsProperty, value); }
|
||||||
|
|
||||||
|
protected Size childSize;
|
||||||
|
|
||||||
|
protected int rowCount;
|
||||||
|
|
||||||
|
protected int itemsPerRowCount;
|
||||||
|
|
||||||
|
private void Orientation_Changed()
|
||||||
|
{
|
||||||
|
MouseWheelScrollDirection = Orientation == Orientation.Vertical ? ScrollDirection.Vertical : ScrollDirection.Horizontal;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Size MeasureOverride(Size availableSize)
|
||||||
|
{
|
||||||
|
UpdateChildSize(availableSize);
|
||||||
|
return base.MeasureOverride(availableSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateChildSize(Size availableSize)
|
||||||
|
{
|
||||||
|
if (ItemsOwner is IHierarchicalVirtualizationAndScrollInfo groupItem
|
||||||
|
&& VirtualizingPanel.GetIsVirtualizingWhenGrouping(ItemsControl))
|
||||||
|
{
|
||||||
|
if (Orientation == Orientation.Vertical)
|
||||||
|
{
|
||||||
|
availableSize.Width = groupItem.Constraints.Viewport.Size.Width;
|
||||||
|
availableSize.Width = Math.Max(availableSize.Width - (Margin.Left + Margin.Right), 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
availableSize.Height = groupItem.Constraints.Viewport.Size.Height;
|
||||||
|
availableSize.Height = Math.Max(availableSize.Height - (Margin.Top + Margin.Bottom), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ItemSize != Size.Empty)
|
||||||
|
{
|
||||||
|
childSize = ItemSize;
|
||||||
|
}
|
||||||
|
else if (InternalChildren.Count != 0)
|
||||||
|
{
|
||||||
|
childSize = InternalChildren[0].DesiredSize;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
childSize = CalculateChildSize(availableSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (double.IsInfinity(GetWidth(availableSize)))
|
||||||
|
{
|
||||||
|
itemsPerRowCount = Items.Count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
itemsPerRowCount = Math.Max(1, (int)Math.Floor(GetWidth(availableSize) / GetWidth(childSize)));
|
||||||
|
}
|
||||||
|
|
||||||
|
rowCount = (int)Math.Ceiling((double)Items.Count / itemsPerRowCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Size CalculateChildSize(Size availableSize)
|
||||||
|
{
|
||||||
|
if (Items.Count == 0)
|
||||||
|
{
|
||||||
|
return new Size(0, 0);
|
||||||
|
}
|
||||||
|
var startPosition = ItemContainerGenerator.GeneratorPositionFromIndex(0);
|
||||||
|
using (ItemContainerGenerator.StartAt(startPosition, GeneratorDirection.Forward, true))
|
||||||
|
{
|
||||||
|
var child = (UIElement)ItemContainerGenerator.GenerateNext();
|
||||||
|
AddInternalChild(child);
|
||||||
|
ItemContainerGenerator.PrepareItemContainer(child);
|
||||||
|
child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
||||||
|
return child.DesiredSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Size CalculateExtent(Size availableSize)
|
||||||
|
{
|
||||||
|
double extentWidth = IsSpacingEnabled && SpacingMode != SpacingMode.None && !double.IsInfinity(GetWidth(availableSize))
|
||||||
|
? GetWidth(availableSize)
|
||||||
|
: GetWidth(childSize) * itemsPerRowCount;
|
||||||
|
|
||||||
|
if (ItemsOwner is IHierarchicalVirtualizationAndScrollInfo groupItem)
|
||||||
|
{
|
||||||
|
if (Orientation == Orientation.Vertical)
|
||||||
|
{
|
||||||
|
extentWidth = Math.Max(extentWidth - (Margin.Left + Margin.Right), 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
extentWidth = Math.Max(extentWidth - (Margin.Top + Margin.Bottom), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double extentHeight = GetHeight(childSize) * rowCount;
|
||||||
|
return CreateSize(extentWidth, extentHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void CalculateSpacing(Size finalSize, out double innerSpacing, out double outerSpacing)
|
||||||
|
{
|
||||||
|
Size childSize = CalculateChildArrangeSize(finalSize);
|
||||||
|
|
||||||
|
double finalWidth = GetWidth(finalSize);
|
||||||
|
|
||||||
|
double totalItemsWidth = Math.Min(GetWidth(childSize) * itemsPerRowCount, finalWidth);
|
||||||
|
double unusedWidth = finalWidth - totalItemsWidth;
|
||||||
|
|
||||||
|
SpacingMode spacingMode = IsSpacingEnabled ? SpacingMode : SpacingMode.None;
|
||||||
|
|
||||||
|
switch (spacingMode)
|
||||||
|
{
|
||||||
|
case SpacingMode.Uniform:
|
||||||
|
innerSpacing = outerSpacing = unusedWidth / (itemsPerRowCount + 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SpacingMode.BetweenItemsOnly:
|
||||||
|
innerSpacing = unusedWidth / Math.Max(itemsPerRowCount - 1, 1);
|
||||||
|
outerSpacing = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SpacingMode.StartAndEndOnly:
|
||||||
|
innerSpacing = 0;
|
||||||
|
outerSpacing = unusedWidth / 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SpacingMode.None:
|
||||||
|
default:
|
||||||
|
innerSpacing = 0;
|
||||||
|
outerSpacing = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Size ArrangeOverride(Size finalSize)
|
||||||
|
{
|
||||||
|
double offsetX = GetX(Offset);
|
||||||
|
double offsetY = GetY(Offset);
|
||||||
|
|
||||||
|
/* When the items owner is a group item offset is handled by the parent panel. */
|
||||||
|
if (ItemsOwner is IHierarchicalVirtualizationAndScrollInfo groupItem)
|
||||||
|
{
|
||||||
|
offsetY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Size childSize = CalculateChildArrangeSize(finalSize);
|
||||||
|
|
||||||
|
CalculateSpacing(finalSize, out double innerSpacing, out double outerSpacing);
|
||||||
|
|
||||||
|
for (int childIndex = 0; childIndex < InternalChildren.Count; childIndex++)
|
||||||
|
{
|
||||||
|
UIElement child = InternalChildren[childIndex];
|
||||||
|
|
||||||
|
int itemIndex = GetItemIndexFromChildIndex(childIndex);
|
||||||
|
|
||||||
|
int columnIndex = itemIndex % itemsPerRowCount;
|
||||||
|
int rowIndex = itemIndex / itemsPerRowCount;
|
||||||
|
|
||||||
|
double x = outerSpacing + columnIndex * (GetWidth(childSize) + innerSpacing);
|
||||||
|
double y = rowIndex * GetHeight(childSize);
|
||||||
|
|
||||||
|
if (GetHeight(finalSize) == 0.0)
|
||||||
|
{
|
||||||
|
/* When the parent panel is grouping and a cached group item is not
|
||||||
|
* in the viewport it has no valid arrangement. That means that the
|
||||||
|
* height/width is 0. Therefore the items should not be visible so
|
||||||
|
* that they are not falsely displayed. */
|
||||||
|
child.Arrange(new Rect(0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
child.Arrange(CreateRect(x - offsetX, y - offsetY, childSize.Width, childSize.Height));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return finalSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Size CalculateChildArrangeSize(Size finalSize)
|
||||||
|
{
|
||||||
|
if (StretchItems)
|
||||||
|
{
|
||||||
|
if (Orientation == Orientation.Vertical)
|
||||||
|
{
|
||||||
|
double childMaxWidth = ReadItemContainerStyle(MaxWidthProperty, double.PositiveInfinity);
|
||||||
|
double maxPossibleChildWith = finalSize.Width / itemsPerRowCount;
|
||||||
|
double childWidth = Math.Min(maxPossibleChildWith, childMaxWidth);
|
||||||
|
return new Size(childWidth, childSize.Height);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double childMaxHeight = ReadItemContainerStyle(MaxHeightProperty, double.PositiveInfinity);
|
||||||
|
double maxPossibleChildHeight = finalSize.Height / itemsPerRowCount;
|
||||||
|
double childHeight = Math.Min(maxPossibleChildHeight, childMaxHeight);
|
||||||
|
return new Size(childSize.Width, childHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return childSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private T ReadItemContainerStyle<T>(DependencyProperty property, T fallbackValue)
|
||||||
|
{
|
||||||
|
var value = ItemsControl.ItemContainerStyle?.Setters.OfType<Setter>()
|
||||||
|
.FirstOrDefault(setter => setter.Property == property)?.Value;
|
||||||
|
return (T)(value ?? fallbackValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ItemRange UpdateItemRange()
|
||||||
|
{
|
||||||
|
if (!IsVirtualizing)
|
||||||
|
{
|
||||||
|
return new ItemRange(0, Items.Count - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int startIndex;
|
||||||
|
int endIndex;
|
||||||
|
|
||||||
|
if (ItemsOwner is IHierarchicalVirtualizationAndScrollInfo groupItem)
|
||||||
|
{
|
||||||
|
if (!VirtualizingPanel.GetIsVirtualizingWhenGrouping(ItemsControl))
|
||||||
|
{
|
||||||
|
return new ItemRange(0, Items.Count - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var offset = new Point(Offset.X, groupItem.Constraints.Viewport.Location.Y);
|
||||||
|
|
||||||
|
int offsetRowIndex;
|
||||||
|
double offsetInPixel;
|
||||||
|
|
||||||
|
int rowCountInViewport;
|
||||||
|
|
||||||
|
if (ScrollUnit == ScrollUnit.Item)
|
||||||
|
{
|
||||||
|
offsetRowIndex = GetY(offset) >= 1 ? (int)GetY(offset) - 1 : 0; // ignore header
|
||||||
|
offsetInPixel = offsetRowIndex * GetHeight(childSize);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
offsetInPixel = Math.Min(Math.Max(GetY(offset) - GetHeight(groupItem.HeaderDesiredSizes.PixelSize), 0), GetHeight(Extent));
|
||||||
|
offsetRowIndex = GetRowIndex(offsetInPixel);
|
||||||
|
}
|
||||||
|
|
||||||
|
double viewportHeight = Math.Min(GetHeight(Viewport), Math.Max(GetHeight(Extent) - offsetInPixel, 0));
|
||||||
|
|
||||||
|
rowCountInViewport = (int)Math.Ceiling((offsetInPixel + viewportHeight) / GetHeight(childSize)) - (int)Math.Floor(offsetInPixel / GetHeight(childSize));
|
||||||
|
|
||||||
|
startIndex = offsetRowIndex * itemsPerRowCount;
|
||||||
|
endIndex = Math.Min(((offsetRowIndex + rowCountInViewport) * itemsPerRowCount) - 1, Items.Count - 1);
|
||||||
|
|
||||||
|
if (CacheLengthUnit == VirtualizationCacheLengthUnit.Pixel)
|
||||||
|
{
|
||||||
|
double cacheBeforeInPixel = Math.Min(CacheLength.CacheBeforeViewport, offsetInPixel);
|
||||||
|
double cacheAfterInPixel = Math.Min(CacheLength.CacheAfterViewport, GetHeight(Extent) - viewportHeight - offsetInPixel);
|
||||||
|
int rowCountInCacheBefore = (int)(cacheBeforeInPixel / GetHeight(childSize));
|
||||||
|
int rowCountInCacheAfter = ((int)Math.Ceiling((offsetInPixel + viewportHeight + cacheAfterInPixel) / GetHeight(childSize))) - (int)Math.Ceiling((offsetInPixel + viewportHeight) / GetHeight(childSize));
|
||||||
|
startIndex = Math.Max(startIndex - rowCountInCacheBefore * itemsPerRowCount, 0);
|
||||||
|
endIndex = Math.Min(endIndex + rowCountInCacheAfter * itemsPerRowCount, Items.Count - 1);
|
||||||
|
}
|
||||||
|
else if (CacheLengthUnit == VirtualizationCacheLengthUnit.Item)
|
||||||
|
{
|
||||||
|
startIndex = Math.Max(startIndex - (int)CacheLength.CacheBeforeViewport, 0);
|
||||||
|
endIndex = Math.Min(endIndex + (int)CacheLength.CacheAfterViewport, Items.Count - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double viewportSartPos = GetY(Offset);
|
||||||
|
double viewportEndPos = GetY(Offset) + GetHeight(Viewport);
|
||||||
|
|
||||||
|
if (CacheLengthUnit == VirtualizationCacheLengthUnit.Pixel)
|
||||||
|
{
|
||||||
|
viewportSartPos = Math.Max(viewportSartPos - CacheLength.CacheBeforeViewport, 0);
|
||||||
|
viewportEndPos = Math.Min(viewportEndPos + CacheLength.CacheAfterViewport, GetHeight(Extent));
|
||||||
|
}
|
||||||
|
|
||||||
|
int startRowIndex = GetRowIndex(viewportSartPos);
|
||||||
|
startIndex = startRowIndex * itemsPerRowCount;
|
||||||
|
|
||||||
|
int endRowIndex = GetRowIndex(viewportEndPos);
|
||||||
|
endIndex = Math.Min(endRowIndex * itemsPerRowCount + (itemsPerRowCount - 1), Items.Count - 1);
|
||||||
|
|
||||||
|
if (CacheLengthUnit == VirtualizationCacheLengthUnit.Page)
|
||||||
|
{
|
||||||
|
int itemsPerPage = endIndex - startIndex + 1;
|
||||||
|
startIndex = Math.Max(startIndex - (int)CacheLength.CacheBeforeViewport * itemsPerPage, 0);
|
||||||
|
endIndex = Math.Min(endIndex + (int)CacheLength.CacheAfterViewport * itemsPerPage, Items.Count - 1);
|
||||||
|
}
|
||||||
|
else if (CacheLengthUnit == VirtualizationCacheLengthUnit.Item)
|
||||||
|
{
|
||||||
|
startIndex = Math.Max(startIndex - (int)CacheLength.CacheBeforeViewport, 0);
|
||||||
|
endIndex = Math.Min(endIndex + (int)CacheLength.CacheAfterViewport, Items.Count - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ItemRange(startIndex, endIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetRowIndex(double location)
|
||||||
|
{
|
||||||
|
int calculatedRowIndex = (int)Math.Floor(location / GetHeight(childSize));
|
||||||
|
int maxRowIndex = (int)Math.Ceiling((double)Items.Count / (double)itemsPerRowCount);
|
||||||
|
return Math.Max(Math.Min(calculatedRowIndex, maxRowIndex), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void BringIndexIntoView(int index)
|
||||||
|
{
|
||||||
|
if (index < 0 || index >= Items.Count)
|
||||||
|
{
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(index), $"The argument {nameof(index)} must be >= 0 and < the number of items.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemsPerRowCount == 0)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var offset = (index / itemsPerRowCount) * GetHeight(childSize);
|
||||||
|
|
||||||
|
if (Orientation == Orientation.Horizontal)
|
||||||
|
{
|
||||||
|
SetHorizontalOffset(offset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetVerticalOffset(offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetLineUpScrollAmount()
|
||||||
|
{
|
||||||
|
return -Math.Min(childSize.Height * ScrollLineDeltaItem, Viewport.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetLineDownScrollAmount()
|
||||||
|
{
|
||||||
|
return Math.Min(childSize.Height * ScrollLineDeltaItem, Viewport.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetLineLeftScrollAmount()
|
||||||
|
{
|
||||||
|
return -Math.Min(childSize.Width * ScrollLineDeltaItem, Viewport.Width);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetLineRightScrollAmount()
|
||||||
|
{
|
||||||
|
return Math.Min(childSize.Width * ScrollLineDeltaItem, Viewport.Width);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetMouseWheelUpScrollAmount()
|
||||||
|
{
|
||||||
|
return -Math.Min(childSize.Height * MouseWheelDeltaItem, Viewport.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetMouseWheelDownScrollAmount()
|
||||||
|
{
|
||||||
|
return Math.Min(childSize.Height * MouseWheelDeltaItem, Viewport.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetMouseWheelLeftScrollAmount()
|
||||||
|
{
|
||||||
|
return -Math.Min(childSize.Width * MouseWheelDeltaItem, Viewport.Width);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetMouseWheelRightScrollAmount()
|
||||||
|
{
|
||||||
|
return Math.Min(childSize.Width * MouseWheelDeltaItem, Viewport.Width);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetPageUpScrollAmount()
|
||||||
|
{
|
||||||
|
return -Viewport.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetPageDownScrollAmount()
|
||||||
|
{
|
||||||
|
return Viewport.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetPageLeftScrollAmount()
|
||||||
|
{
|
||||||
|
return -Viewport.Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override double GetPageRightScrollAmount()
|
||||||
|
{
|
||||||
|
return Viewport.Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* orientation aware helper methods */
|
||||||
|
|
||||||
|
protected double GetX(Point point) => Orientation == Orientation.Vertical ? point.X : point.Y;
|
||||||
|
protected double GetY(Point point) => Orientation == Orientation.Vertical ? point.Y : point.X;
|
||||||
|
|
||||||
|
protected double GetWidth(Size size) => Orientation == Orientation.Vertical ? size.Width : size.Height;
|
||||||
|
protected double GetHeight(Size size) => Orientation == Orientation.Vertical ? size.Height : size.Width;
|
||||||
|
|
||||||
|
protected Size CreateSize(double width, double height) => Orientation == Orientation.Vertical ? new Size(width, height) : new Size(height, width);
|
||||||
|
protected Rect CreateRect(double x, double y, double width, double height) => Orientation == Orientation.Vertical ? new Rect(x, y, width, height) : new Rect(y, x, width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>x64</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\GeekDesk\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
@@ -61,14 +61,13 @@
|
|||||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<StartupObject>
|
<StartupObject>GeekDesk.App</StartupObject>
|
||||||
</StartupObject>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SignManifests>false</SignManifests>
|
<SignManifests>false</SignManifests>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Taskbar.ico</ApplicationIcon>
|
<ApplicationIcon>Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetZone>LocalIntranet</TargetZone>
|
<TargetZone>LocalIntranet</TargetZone>
|
||||||
@@ -89,6 +88,9 @@
|
|||||||
<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>
|
||||||
@@ -106,6 +108,7 @@
|
|||||||
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Configuration.Install" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
<HintPath>packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
@@ -129,6 +132,7 @@
|
|||||||
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Remoting" />
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
|
<Reference Include="System.ServiceProcess" />
|
||||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -145,6 +149,9 @@
|
|||||||
<Reference Include="System.Xaml">
|
<Reference Include="System.Xaml">
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="WindowsAPICodePack.Shell.CommonFileDialogs, Version=1.1.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\WindowsAPICodePack.Shell.CommonFileDialogs.1.1.5\lib\net452\WindowsAPICodePack.Shell.CommonFileDialogs.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
@@ -165,6 +172,7 @@
|
|||||||
<Compile Include="Constant\IconType.cs" />
|
<Compile Include="Constant\IconType.cs" />
|
||||||
<Compile Include="Constant\CommonEnum.cs" />
|
<Compile Include="Constant\CommonEnum.cs" />
|
||||||
<Compile Include="Constant\IconStartType.cs" />
|
<Compile Include="Constant\IconStartType.cs" />
|
||||||
|
<Compile Include="Constant\MenuType.cs" />
|
||||||
<Compile Include="Constant\PasswordType.cs" />
|
<Compile Include="Constant\PasswordType.cs" />
|
||||||
<Compile Include="Constant\RunTimeStatus.cs" />
|
<Compile Include="Constant\RunTimeStatus.cs" />
|
||||||
<Compile Include="Constant\SearchType.cs" />
|
<Compile Include="Constant\SearchType.cs" />
|
||||||
@@ -194,6 +202,9 @@
|
|||||||
<Compile Include="Control\Other\IconInfoUrlDialog.xaml.cs">
|
<Compile Include="Control\Other\IconInfoUrlDialog.xaml.cs">
|
||||||
<DependentUpon>IconInfoUrlDialog.xaml</DependentUpon>
|
<DependentUpon>IconInfoUrlDialog.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Control\Other\SearchResControl.xaml.cs">
|
||||||
|
<DependentUpon>SearchResControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Control\UserControls\Config\OtherControl.xaml.cs">
|
<Compile Include="Control\UserControls\Config\OtherControl.xaml.cs">
|
||||||
<DependentUpon>OtherControl.xaml</DependentUpon>
|
<DependentUpon>OtherControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -250,11 +261,12 @@
|
|||||||
</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\GetWidthByWWConvert.cs" />
|
<Compile Include="Converts\SearchResWidth.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" />
|
||||||
@@ -263,15 +275,21 @@
|
|||||||
<Compile Include="Converts\UpdateTypeConvert.cs" />
|
<Compile Include="Converts\UpdateTypeConvert.cs" />
|
||||||
<Compile Include="Converts\ReverseBoolConvert.cs" />
|
<Compile Include="Converts\ReverseBoolConvert.cs" />
|
||||||
<Compile Include="Converts\Visibility2BooleanConverter.cs" />
|
<Compile Include="Converts\Visibility2BooleanConverter.cs" />
|
||||||
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.cs" />
|
<Compile Include="CustomComponent\DraggAnimatedPanel\DraggAnimatedPanel.cs" />
|
||||||
<Compile Include="DraggAnimatedPanel\DraggAnimatedPanel.Drag.cs" />
|
<Compile Include="CustomComponent\DraggAnimatedPanel\DraggAnimatedPanel.Drag.cs" />
|
||||||
<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\ViewModel\SecondsDataContext.cs" />
|
<Compile Include="Plugins\EveryThing\Constant\EveryThingConst.cs" />
|
||||||
|
<Compile Include="Plugins\EveryThing\EveryThing32.cs" />
|
||||||
|
<Compile Include="Plugins\EveryThing\EveryThing64.cs" />
|
||||||
|
<Compile Include="Plugins\EveryThing\EveryThingUtil.cs" />
|
||||||
|
<Compile Include="Plugins\ShowSeconds\Common\Constants.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" />
|
||||||
@@ -280,12 +298,17 @@
|
|||||||
<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\FileWatcher.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="ViewModel\Temp\GuideInfoList.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" />
|
||||||
@@ -297,6 +320,8 @@
|
|||||||
<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\ProcessUtil.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" />
|
||||||
@@ -306,6 +331,13 @@
|
|||||||
<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="CustomComponent\VirtualizingWrapPanel\ItemRange.cs" />
|
||||||
|
<Compile Include="CustomComponent\VirtualizingWrapPanel\SpacingMode.cs" />
|
||||||
|
<Compile Include="CustomComponent\VirtualizingWrapPanel\VirtualizingPanelBase.cs" />
|
||||||
|
<Compile Include="CustomComponent\VirtualizingWrapPanel\VirtualizingWrapPanel.cs" />
|
||||||
|
<Compile Include="Util\WindowsThumbnailProvider.cs" />
|
||||||
|
<Compile Include="Util\WindowUtil.cs" />
|
||||||
|
<Compile Include="CustomComponent\VirtualizingWrapPanel\ScrollDirection.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" />
|
||||||
@@ -344,6 +376,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Control\Other\SearchResControl.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Include="Control\UserControls\Config\OtherControl.xaml">
|
<Page Include="Control\UserControls\Config\OtherControl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -466,6 +502,18 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<Resource Include="Resource\Iconfont\iconfont.json" />
|
<Resource Include="Resource\Iconfont\iconfont.json" />
|
||||||
<None Include="app.manifest" />
|
<None Include="app.manifest" />
|
||||||
|
<None Include="Plugins\EveryThing\32\Everything.ini">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="Plugins\EveryThing\32\Everything.lng">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="Plugins\EveryThing\64\Everything.ini">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="Plugins\EveryThing\64\Everything.lng">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="Properties\app.manifest" />
|
<None Include="Properties\app.manifest" />
|
||||||
<None Include="Update.json" />
|
<None Include="Update.json" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
@@ -534,6 +582,28 @@
|
|||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Logo.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Plugins\EveryThing\lib\Everything32.dll">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="Plugins\EveryThing\lib\Everything64.dll">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<WCFMetadata Include="Connected Services\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Plugins\EveryThing\32\Everything.exe">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Plugins\EveryThing\64\Everything.exe">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
@@ -561,7 +631,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>; Move all assemblies and related files to lib folder
|
<PostBuildEvent>; Move all assemblies and related files to lib folder
|
||||||
ROBOCOPY "$(TargetDir) " "$(TargetDir)lib\ " /XF Data *.exe *.config *.manifest /XD lib logs bak /E /IS /MOVE
|
ROBOCOPY "$(TargetDir) " "$(TargetDir)lib\ " /XF Data *.exe *.config *.manifest /XD "$(TargetDir)lib" plugins logs bak /E /IS /MOVE
|
||||||
|
ROBOCOPY "$(TargetDir) " "$(TargetDir)lib\ " *.dll /XD "$(TargetDir)lib" /E /S /MOVE
|
||||||
if %25errorlevel%25 leq 4 exit 0 else exit %25errorlevel%25</PostBuildEvent>
|
if %25errorlevel%25 leq 4 exit 0 else exit %25errorlevel%25</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
201
LICENSE
Normal file
201
LICENSE
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
- 这是个人开发的程序,任何人可任意修改和免费使用(未做较大功能性改动不允许修改赞赏码,重新修改发布需注明出处)
|
|
||||||
- 商用需联系作者
|
|
||||||
194
MainWindow.xaml
194
MainWindow.xaml
@@ -11,6 +11,7 @@
|
|||||||
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||||
x:Name="AppWindow"
|
x:Name="AppWindow"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel"
|
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel"
|
||||||
|
xmlns:my="clr-namespace:GeekDesk.Util"
|
||||||
d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
|
d:DataContext="{d:DesignInstance Type=viewmodel:AppData}"
|
||||||
Title="GeekDesk_Main_8400A17AEEF7C029"
|
Title="GeekDesk_Main_8400A17AEEF7C029"
|
||||||
MinWidth="600"
|
MinWidth="600"
|
||||||
@@ -27,23 +28,24 @@
|
|||||||
MouseDown="MainWindow_MouseDown"
|
MouseDown="MainWindow_MouseDown"
|
||||||
MouseEnter="MainWindow_MouseEnter"
|
MouseEnter="MainWindow_MouseEnter"
|
||||||
GotFocus="Window_GotFocus"
|
GotFocus="Window_GotFocus"
|
||||||
Loaded="Window_Loaded"
|
Loaded="Window_Loaded"
|
||||||
|
SourceInitialized="Window_SourceInitialized"
|
||||||
|
Topmost="{Binding AppConfig.AlwaysTopmost}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<RoutedUICommand x:Key="SearchHotKeyDown" Text="SearchHotKeyDown"/>
|
<RoutedUICommand x:Key="SearchHotKeyDown" Text="SearchHotKeyDown"/>
|
||||||
|
|
||||||
<cvt:MenuWidthConvert x:Key="MenuWidthConvert"/>
|
<cvt:MenuWidthConvert x:Key="MenuWidthConvert"/>
|
||||||
<cvt:OpcityConvert x:Key="OpcityConvert"/>
|
<cvt:OpcityConvert x:Key="OpcityConvert"/>
|
||||||
<cvt:IntToCornerRadius x:Key="IntToCornerRadius"/>
|
<cvt:IntToCornerRadius x:Key="IntToCornerRadius"/>
|
||||||
<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="23"/>
|
||||||
</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>
|
||||||
@@ -52,10 +54,95 @@
|
|||||||
</Window.CommandBindings>
|
</Window.CommandBindings>
|
||||||
|
|
||||||
<!--Opacity="{Binding AppConfig.PannelOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"-->
|
<!--Opacity="{Binding AppConfig.PannelOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"-->
|
||||||
<Border Margin="20" CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"
|
<Grid>
|
||||||
|
<!--遮罩层border 用于引导提示-->
|
||||||
|
<Border Margin="20"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
MouseDown="DragMove"
|
||||||
|
CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=OneWay, Converter={StaticResource IntToCornerRadius}}"
|
||||||
|
BorderThickness="0"
|
||||||
|
x:Name="GrayBorder"
|
||||||
|
Panel.ZIndex="888"
|
||||||
|
>
|
||||||
|
<Border.Background>
|
||||||
|
<SolidColorBrush Color="Gray" Opacity="0.9"/>
|
||||||
|
</Border.Background>
|
||||||
|
|
||||||
|
<!--<hc:Poptip.Instance>
|
||||||
|
<hc:Poptip PlacementType="Top" IsOpen="False" HitMode="None">
|
||||||
|
<hc:Poptip.ContentTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Border Background="White" Width="300" Height="150">
|
||||||
|
<TextBlock Text="这是一个测测试"/>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</hc:Poptip.ContentTemplate>
|
||||||
|
</hc:Poptip>
|
||||||
|
</hc:Poptip.Instance>-->
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<hc:Card x:Name="GuideCard" Width="300" Height="180" Panel.ZIndex="888"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
HorizontalAlignment="Left" Visibility="Collapsed">
|
||||||
|
<hc:Card.Background>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.85"/>
|
||||||
|
</hc:Card.Background>
|
||||||
|
<!--Card 的内容部分-->
|
||||||
|
<Border CornerRadius="4,4,0,0" Width="300" Height="100">
|
||||||
|
<TextBlock TextWrapping="Wrap"
|
||||||
|
x:Name="GuideText"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
LineHeight="22"
|
||||||
|
FontSize="14"
|
||||||
|
Text=""/>
|
||||||
|
</Border>
|
||||||
|
<!--Card 的尾部部分-->
|
||||||
|
<hc:Card.Footer>
|
||||||
|
<Grid>
|
||||||
|
<StackPanel Margin="10" Width="150" Height="50" HorizontalAlignment="Left">
|
||||||
|
<!--Card 的一级内容-->
|
||||||
|
<WrapPanel>
|
||||||
|
<TextBlock TextWrapping="Wrap"
|
||||||
|
x:Name="GuideTitle1"
|
||||||
|
Style="{DynamicResource TextBlockLargeBold}"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="引导提示"
|
||||||
|
FontSize="20"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
|
<TextBlock TextWrapping="Wrap"
|
||||||
|
x:Name="GuideNum"
|
||||||
|
Style="{DynamicResource TextBlockLargeBold}"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="1"
|
||||||
|
FontSize="20"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
|
</WrapPanel>
|
||||||
|
<!--Card 的二级内容-->
|
||||||
|
<TextBlock TextWrapping="NoWrap"
|
||||||
|
x:Name="GuideTitle2"
|
||||||
|
Style="{DynamicResource TextBlockDefault}"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="快捷方式创建"
|
||||||
|
Margin="0,6,0,0"
|
||||||
|
FontSize="14"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
|
<hc:UniformSpacingPanel HorizontalAlignment="Right">
|
||||||
|
<Button Style="{StaticResource MyBtnStyle}" x:Name="PreviewGuideBtn" Click="PreviewGuideBtn_Click" Margin="0,0,20,0" Content="上一步"/>
|
||||||
|
<Button Style="{StaticResource MyBtnStyle}" x:Name="NextGuideBtn" Click="NextGuideBtn_Click" Margin="0,0,20,0" Content="下一步"/>
|
||||||
|
</hc:UniformSpacingPanel>
|
||||||
|
</Grid>
|
||||||
|
</hc:Card.Footer>
|
||||||
|
</hc:Card>
|
||||||
|
|
||||||
|
|
||||||
|
<Border Margin="20" CornerRadius="{Binding AppConfig.PannelCornerRadius, Mode=TwoWay, Converter={StaticResource IntToCornerRadius}}"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
|
Panel.ZIndex="1"
|
||||||
x:Name="BGBorder"
|
x:Name="BGBorder"
|
||||||
|
Background="AliceBlue"
|
||||||
hc:Dialog.Token="MainWindowDialog"
|
hc:Dialog.Token="MainWindowDialog"
|
||||||
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=None}"
|
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=None}"
|
||||||
xf:Animations.PrimaryBinding="{Binding AppConfig.IsShow, Mode=OneWay}"
|
xf:Animations.PrimaryBinding="{Binding AppConfig.IsShow, Mode=OneWay}"
|
||||||
@@ -64,38 +151,51 @@
|
|||||||
xf:Animations.SecondaryCompletionCommand="{Binding HideCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
|
xf:Animations.SecondaryCompletionCommand="{Binding HideCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
|
||||||
xf:Animations.AllowOpacityReset="False"
|
xf:Animations.AllowOpacityReset="False"
|
||||||
>
|
>
|
||||||
<Border.Effect>
|
<Border.Effect>
|
||||||
<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" MouseDown="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="280"></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="HideBox" Visibility="Hidden" Panel.ZIndex="2"/>
|
|
||||||
|
|
||||||
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" x:Name="ShowBox" Visibility="Hidden" Panel.ZIndex="2"/>
|
||||||
|
<CheckBox Style="{StaticResource MyCheckBoxStyle}" 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"/>
|
||||||
|
<StackPanel HorizontalAlignment="Center" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowAskGrowl" Grid.Column="1" Grid.Row="1"/>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
|
<DockPanel Grid.Row="0" Grid.Column="0" MouseDown="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" Margin="10,0,0,0" Width="94" Height="30" HorizontalAlignment="Left"/>
|
<Image Visibility="{Binding AppConfig.TitleLogoVisible}"
|
||||||
|
Source="/Resource/Image/TitleLogo.png"
|
||||||
|
RenderOptions.BitmapScalingMode="HighQuality"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
Width="200"
|
||||||
|
Height="30"
|
||||||
|
Opacity="0.8"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" Grid.Column="2" MouseMove="DragMove">
|
<DockPanel Grid.Row="0" Grid.Column="2" MouseDown="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 x:Name="MainBtnPanel" 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"
|
||||||
@@ -108,12 +208,13 @@
|
|||||||
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>
|
<MenuItem Header="新手引导" Click="Guide_Click"/>
|
||||||
</Button.ContextMenu>
|
</ContextMenu>
|
||||||
|
</Button.ContextMenu>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Background="Transparent"
|
<Button Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
@@ -132,7 +233,36 @@
|
|||||||
<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="5" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
|
||||||
|
|
||||||
|
<Border x:Name="SearchResContainer" Panel.ZIndex="2"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right" MaxWidth="200"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
CornerRadius="8"
|
||||||
|
Margin="0,20,40,0"
|
||||||
|
>
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border" >
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.6"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="MaxWidth" Value="300"/>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<WrapPanel Margin="8">
|
||||||
|
<TextBlock Opacity="0.6" Text="g:"/>
|
||||||
|
<TextBlock x:Name="GeekDeskSearchTotal" Opacity="0.6" Text="0"/>
|
||||||
|
<TextBlock Opacity="0.6" Text="+"/>
|
||||||
|
<TextBlock Opacity="0.6" Text="e:"/>
|
||||||
|
<TextBlock x:Name="EverythingSearchCount" Opacity="0.6" Text="0"/>
|
||||||
|
<TextBlock Opacity="0.6" Text=" of "/>
|
||||||
|
<TextBlock x:Name="EverythingSearchTotal" Opacity="0.6" Text="0"/>
|
||||||
|
</WrapPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!--搜索输入框-->
|
<!--搜索输入框-->
|
||||||
<TextBox Panel.ZIndex="2" Grid.Row="0" Grid.Column="1"
|
<TextBox Panel.ZIndex="2" Grid.Row="0" Grid.Column="1"
|
||||||
@@ -143,10 +273,15 @@
|
|||||||
FontSize="16"
|
FontSize="16"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
TextChanged="SearchBox_TextChanged"
|
TextChanged="SearchBox_TextChanged"
|
||||||
/>
|
Style="{StaticResource MyTextBoxStyle}"
|
||||||
|
>
|
||||||
|
<TextBox.Background>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.5" />
|
||||||
|
</TextBox.Background>
|
||||||
|
</TextBox>
|
||||||
|
|
||||||
|
|
||||||
<hc:NotifyIcon Icon="/Taskbar.ico" Click="NotifyIcon_Click" x:Name="BarIcon"
|
<hc:NotifyIcon Icon="/Logo.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">
|
||||||
@@ -165,9 +300,12 @@
|
|||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
using GeekDesk.Constant;
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Control.Other;
|
||||||
using GeekDesk.Control.UserControls.Config;
|
using GeekDesk.Control.UserControls.Config;
|
||||||
using GeekDesk.Control.UserControls.PannelCard;
|
using GeekDesk.Control.UserControls.PannelCard;
|
||||||
using GeekDesk.Control.Windows;
|
using GeekDesk.Control.Windows;
|
||||||
using GeekDesk.Interface;
|
using GeekDesk.Interface;
|
||||||
using GeekDesk.MyThread;
|
using GeekDesk.MyThread;
|
||||||
|
using GeekDesk.Plugins.EveryThing;
|
||||||
|
using GeekDesk.Plugins.EveryThing.Constant;
|
||||||
using GeekDesk.Task;
|
using GeekDesk.Task;
|
||||||
using GeekDesk.Util;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.ViewModel;
|
using GeekDesk.ViewModel;
|
||||||
@@ -14,12 +17,20 @@ using ShowSeconds;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Shell;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using static GeekDesk.Util.ShowWindowFollowMouse;
|
using static GeekDesk.Util.ShowWindowFollowMouse;
|
||||||
|
|
||||||
@@ -32,14 +43,19 @@ namespace GeekDesk
|
|||||||
public partial class MainWindow : Window, IWindowCommon
|
public partial class MainWindow : Window, IWindowCommon
|
||||||
{
|
{
|
||||||
|
|
||||||
public static AppData appData = CommonCode.GetAppDataByFile();
|
public static AppData appData;
|
||||||
public static ToDoInfoWindow toDoInfoWindow;
|
public static ToDoInfoWindow toDoInfoWindow;
|
||||||
public static int hotKeyId = -1;
|
public static int hotKeyId = -1;
|
||||||
public static int toDoHotKeyId = -1;
|
public static int toDoHotKeyId = -1;
|
||||||
public static int colorPickerHotKeyId = -1;
|
public static int colorPickerHotKeyId = -1;
|
||||||
public static MainWindow mainWindow;
|
public static MainWindow mainWindow;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static bool dataFileExist = true;
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
|
||||||
//加载数据
|
//加载数据
|
||||||
LoadData();
|
LoadData();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -47,9 +63,6 @@ namespace GeekDesk
|
|||||||
//用于其他类访问
|
//用于其他类访问
|
||||||
mainWindow = this;
|
mainWindow = this;
|
||||||
|
|
||||||
//置于顶层
|
|
||||||
this.Topmost = true;
|
|
||||||
|
|
||||||
//执行待办提醒
|
//执行待办提醒
|
||||||
ToDoTask.BackLogCheck();
|
ToDoTask.BackLogCheck();
|
||||||
|
|
||||||
@@ -62,7 +75,16 @@ namespace GeekDesk
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_SourceInitialized(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//禁用窗口最大化
|
||||||
|
WindowUtil.DisableMaxWindow(this);
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -72,9 +94,12 @@ namespace GeekDesk
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void SearchHotKeyDown(object sender, CanExecuteRoutedEventArgs e)
|
private void SearchHotKeyDown(object sender, CanExecuteRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (appData.AppConfig.SearchType == SearchType.HOT_KEY)
|
if (appData.AppConfig.SearchType == SearchType.HOT_KEY && !RunTimeStatus.SEARCH_BOX_SHOW)
|
||||||
{
|
{
|
||||||
ShowSearchBox();
|
ShowSearchBox();
|
||||||
|
} else if (RunTimeStatus.SEARCH_BOX_SHOW)
|
||||||
|
{
|
||||||
|
HidedSearchBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +112,9 @@ namespace GeekDesk
|
|||||||
RightCard.VisibilitySearchCard(Visibility.Visible);
|
RightCard.VisibilitySearchCard(Visibility.Visible);
|
||||||
SearchBox.Width = 400;
|
SearchBox.Width = 400;
|
||||||
SearchBox.Focus();
|
SearchBox.Focus();
|
||||||
|
|
||||||
|
//执行一遍a查询
|
||||||
|
//SearchBox_TextChanged(null, null);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 搜索开始
|
/// 搜索开始
|
||||||
@@ -95,9 +123,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();
|
||||||
@@ -113,33 +141,113 @@ namespace GeekDesk
|
|||||||
RightCard.MyPoptip.IsOpen = false;
|
RightCard.MyPoptip.IsOpen = false;
|
||||||
|
|
||||||
string inputText = SearchBox.Text.ToLower();
|
string inputText = SearchBox.Text.ToLower();
|
||||||
RightCard.VerticalUFG.Visibility = Visibility.Collapsed;
|
|
||||||
if (!string.IsNullOrEmpty(inputText))
|
if (!string.IsNullOrEmpty(inputText))
|
||||||
{
|
{
|
||||||
SearchIconList.IconList.Clear();
|
RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME = 300;
|
||||||
ObservableCollection<MenuInfo> menuList = appData.MenuList;
|
if (!RunTimeStatus.EVERYTHING_NEW_SEARCH)
|
||||||
foreach (MenuInfo menu in menuList)
|
{
|
||||||
{
|
RunTimeStatus.EVERYTHING_NEW_SEARCH = true;
|
||||||
ObservableCollection<IconInfo> iconList = menu.IconList;
|
//显示搜索结果列表
|
||||||
foreach (IconInfo icon in iconList)
|
RightCard.VisibilitySearchCard(Visibility.Visible);
|
||||||
|
//暂时隐藏条目信息
|
||||||
|
SearchResContainer.Visibility = Visibility.Collapsed;
|
||||||
|
//显示加载条
|
||||||
|
RightCard.Loading_RightCard.Visibility = Visibility.Visible;
|
||||||
|
object obj = RightCard.VerticalCard.Content;
|
||||||
|
if (obj != null)
|
||||||
{
|
{
|
||||||
string pyName = Pinyin.GetInitials(icon.Name).ToLower();
|
SearchResControl control = obj as SearchResControl;
|
||||||
if (icon.Name.Contains(inputText) || pyName.Contains(inputText))
|
control.VerticalUFG.Visibility = Visibility.Collapsed;
|
||||||
{
|
|
||||||
SearchIconList.IconList.Add(icon);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
SearchDelay();
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//隐藏条目信息
|
||||||
|
SearchResContainer.Visibility = Visibility.Collapsed;
|
||||||
|
//清空查询结果
|
||||||
|
object obj = RightCard.VerticalCard.Content;
|
||||||
|
if (obj != null)
|
||||||
|
{
|
||||||
|
SearchResControl control = obj as SearchResControl;
|
||||||
|
control.VerticalUFG.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SearchDelay()
|
||||||
|
{
|
||||||
|
|
||||||
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
SearchIconList.IconList.Clear();
|
|
||||||
}
|
while (RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME > 0)
|
||||||
if (RightCard.SearchListBox.Items.Count > 0)
|
{
|
||||||
{
|
Thread.Sleep(10);
|
||||||
RightCard.SearchListBox.SelectedIndex = 0;
|
RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME -= 10;
|
||||||
}
|
}
|
||||||
RightCard.VerticalUFG.Visibility = Visibility.Visible;
|
RunTimeStatus.EVERYTHING_NEW_SEARCH = false;
|
||||||
|
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
string inputText = SearchBox.Text.ToLower().Trim();
|
||||||
|
if (string.IsNullOrEmpty(inputText))
|
||||||
|
{
|
||||||
|
RightCard.Loading_RightCard.Visibility = Visibility.Collapsed;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
ObservableCollection<IconInfo> resList = new ObservableCollection<IconInfo>();
|
||||||
|
|
||||||
|
if (appData.AppConfig.EnableEveryThing == true)
|
||||||
|
{
|
||||||
|
ObservableCollection<IconInfo> iconBakList = EveryThingUtil.Search(inputText);
|
||||||
|
foreach (IconInfo icon in iconBakList)
|
||||||
|
{
|
||||||
|
resList.Add(icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int geekDeskCount = 0;
|
||||||
|
//GeekDesk数据搜索
|
||||||
|
ObservableCollection<MenuInfo> menuList = appData.MenuList;
|
||||||
|
foreach (MenuInfo menu in menuList)
|
||||||
|
{
|
||||||
|
ObservableCollection<IconInfo> iconList = menu.IconList;
|
||||||
|
foreach (IconInfo icon in iconList)
|
||||||
|
{
|
||||||
|
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
|
||||||
|
string pyName = Pinyin.GetInitials(icon.Name).ToLower();
|
||||||
|
if (icon.Name.Contains(inputText) || pyName.Contains(inputText))
|
||||||
|
{
|
||||||
|
geekDeskCount++;
|
||||||
|
resList.Add(icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
if (appData.AppConfig.EnableEveryThing == true)
|
||||||
|
{
|
||||||
|
int everythingTotal = Convert.ToInt32(EveryThingUtil.Everything_GetNumResults());
|
||||||
|
GeekDeskSearchTotal.Text = Convert.ToString(geekDeskCount);
|
||||||
|
EverythingSearchCount.Text = Convert.ToString(resList.Count - geekDeskCount);
|
||||||
|
EverythingSearchTotal.Text = Convert.ToString(everythingTotal + geekDeskCount);
|
||||||
|
SearchResContainer.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
SearchResControl control = new SearchResControl(resList);
|
||||||
|
RightCard.VerticalCard.Content = control;
|
||||||
|
//关闭加载效果
|
||||||
|
RightCard.Loading_RightCard.Visibility = Visibility.Collapsed;
|
||||||
|
});
|
||||||
|
}).Start();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -147,15 +255,33 @@ namespace GeekDesk
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void HidedSearchBox()
|
public void HidedSearchBox()
|
||||||
{
|
{
|
||||||
RunTimeStatus.SEARCH_BOX_SHOW = false;
|
RunTimeStatus.EVERYTHING_NEW_SEARCH = true;
|
||||||
SearchBox.TextChanged -= SearchBox_TextChanged;
|
RunTimeStatus.SEARCH_BOX_HIDED_300 = false;
|
||||||
SearchBox.Clear();
|
new Thread(() =>
|
||||||
SearchBox.TextChanged += SearchBox_TextChanged;
|
{
|
||||||
SearchBox.Width = 0;
|
Thread.Sleep(300);
|
||||||
SearchIconList.IconList.Clear();
|
RunTimeStatus.SEARCH_BOX_HIDED_300 = true;
|
||||||
RightCard.VisibilitySearchCard(Visibility.Collapsed);
|
}).Start();
|
||||||
Keyboard.Focus(SearchBox);
|
new Thread(() =>
|
||||||
App.DoEvents();
|
{
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
RunTimeStatus.EVERYTHING_NEW_SEARCH = false;
|
||||||
|
}).Start();
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
this.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
Keyboard.Focus(SearchBox);
|
||||||
|
RunTimeStatus.SEARCH_BOX_SHOW = false;
|
||||||
|
SearchBox.TextChanged -= SearchBox_TextChanged;
|
||||||
|
SearchBox.Clear();
|
||||||
|
SearchBox.TextChanged += SearchBox_TextChanged;
|
||||||
|
SearchBox.Width = 0;
|
||||||
|
SearchResContainer.Visibility = Visibility.Collapsed;
|
||||||
|
RightCard.VerticalCard.Content = null;
|
||||||
|
RightCard.VisibilitySearchCard(Visibility.Collapsed);
|
||||||
|
});
|
||||||
|
}).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -164,6 +290,11 @@ namespace GeekDesk
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
|
//判断数据文件是否存在 如果不存在那么是第一次打开程序
|
||||||
|
dataFileExist = File.Exists(Constants.DATA_FILE_PATH);
|
||||||
|
|
||||||
|
appData = CommonCode.GetAppDataByFile();
|
||||||
|
|
||||||
this.DataContext = appData;
|
this.DataContext = appData;
|
||||||
if (appData.MenuList.Count == 0)
|
if (appData.MenuList.Count == 0)
|
||||||
{
|
{
|
||||||
@@ -181,8 +312,6 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -217,11 +346,20 @@ namespace GeekDesk
|
|||||||
}
|
}
|
||||||
|
|
||||||
//注册鼠标监听事件
|
//注册鼠标监听事件
|
||||||
if (appData.AppConfig.MouseMiddleShow || appData.AppConfig.SecondsWindow==true)
|
if (appData.AppConfig.MouseMiddleShow)
|
||||||
{
|
{
|
||||||
MouseHookThread.Hook();
|
MouseHookThread.Hook();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//显秒插件
|
||||||
|
if (appData.AppConfig.SecondsWindow == true)
|
||||||
|
{
|
||||||
|
SecondsWindow.ShowWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
//监听实时文件夹菜单
|
||||||
|
FileWatcher.EnableLinkMenuWatcher(appData);
|
||||||
|
|
||||||
|
|
||||||
//更新线程开启 检测更新
|
//更新线程开启 检测更新
|
||||||
UpdateThread.Update();
|
UpdateThread.Update();
|
||||||
@@ -232,9 +370,28 @@ namespace GeekDesk
|
|||||||
//毛玻璃 暂时未解决阴影问题
|
//毛玻璃 暂时未解决阴影问题
|
||||||
//BlurGlassUtil.EnableBlur(this);
|
//BlurGlassUtil.EnableBlur(this);
|
||||||
|
|
||||||
|
//设置归属桌面 解决桌面覆盖程序界面的bug
|
||||||
|
WindowUtil.SetOwner(this, WindowUtil.GetDesktopHandle(this, DesktopLayer.Progman));
|
||||||
|
|
||||||
|
if (appData.AppConfig.EnableEveryThing == true)
|
||||||
|
{
|
||||||
|
//开启EveryThing插件
|
||||||
|
EveryThingUtil.EnableEveryThing();
|
||||||
|
}
|
||||||
|
|
||||||
|
Keyboard.Focus(SearchBox);
|
||||||
|
|
||||||
MessageUtil.ChangeWindowMessageFilter(MessageUtil.WM_COPYDATA, 1);
|
MessageUtil.ChangeWindowMessageFilter(MessageUtil.WM_COPYDATA, 1);
|
||||||
|
|
||||||
|
|
||||||
|
if (!dataFileExist)
|
||||||
|
{
|
||||||
|
Guide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 注册当前窗口的热键
|
/// 注册当前窗口的热键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -246,9 +403,17 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
hotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
hotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
||||||
{
|
{
|
||||||
|
if (RunTimeStatus.MAIN_HOT_KEY_DOWN) return;
|
||||||
|
RunTimeStatus.MAIN_HOT_KEY_DOWN = true;
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.Sleep(RunTimeStatus.MAIN_HOT_KEY_TIME);
|
||||||
|
RunTimeStatus.MAIN_HOT_KEY_DOWN = false;
|
||||||
|
}).Start();
|
||||||
|
|
||||||
if (MotionControl.hotkeyFinished)
|
if (MotionControl.hotkeyFinished)
|
||||||
{
|
{
|
||||||
if (mainWindow.Visibility == Visibility.Collapsed || mainWindow.Opacity == 0 || MarginHide.IS_HIDE)
|
if (CheckShouldShowApp())
|
||||||
{
|
{
|
||||||
ShowApp();
|
ShowApp();
|
||||||
}
|
}
|
||||||
@@ -262,7 +427,8 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
|
HandyControl.Controls.Growl.Success("GeekDesk快捷键注册成功(" + appData.AppConfig.HotkeyStr + ")!", "HotKeyGrowl");
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -305,7 +471,7 @@ namespace GeekDesk
|
|||||||
HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
|
HandyControl.Controls.Growl.Success("新建待办任务快捷键注册成功(" + appData.AppConfig.ToDoHotkeyStr + ")!", "HotKeyGrowl");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
@@ -366,28 +532,9 @@ namespace GeekDesk
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DragMove(object sender, MouseEventArgs e)
|
private void DragMove(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (e.LeftButton == MouseButtonState.Pressed)
|
if (e.LeftButton == MouseButtonState.Pressed)
|
||||||
{
|
{
|
||||||
var windowMode = this.ResizeMode;
|
|
||||||
if (this.ResizeMode != ResizeMode.NoResize)
|
|
||||||
{
|
|
||||||
this.ResizeMode = ResizeMode.NoResize;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.UpdateLayout();
|
|
||||||
|
|
||||||
|
|
||||||
/* 当点击拖拽区域的时候,让窗口跟着移动
|
|
||||||
(When clicking the drag area, make the window follow) */
|
|
||||||
DragMove();
|
DragMove();
|
||||||
|
|
||||||
if (this.ResizeMode != windowMode)
|
|
||||||
{
|
|
||||||
this.ResizeMode = windowMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.UpdateLayout();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,6 +598,7 @@ namespace GeekDesk
|
|||||||
ShowWindowFollowMouse.Show(mainWindow, MousePosition.CENTER, 0, 0);
|
ShowWindowFollowMouse.Show(mainWindow, MousePosition.CENTER, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MainWindow.mainWindow.Activate();
|
MainWindow.mainWindow.Activate();
|
||||||
mainWindow.Show();
|
mainWindow.Show();
|
||||||
//mainWindow.Visibility = Visibility.Visible;
|
//mainWindow.Visibility = Visibility.Visible;
|
||||||
@@ -475,7 +623,8 @@ 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);
|
||||||
}
|
}
|
||||||
@@ -492,7 +641,7 @@ namespace GeekDesk
|
|||||||
appData.AppConfig.IsShow = null;
|
appData.AppConfig.IsShow = null;
|
||||||
HideAppVis();
|
HideAppVis();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void HideAppVis()
|
private static void HideAppVis()
|
||||||
@@ -506,7 +655,7 @@ namespace GeekDesk
|
|||||||
mainWindow.Visibility = Visibility.Collapsed;
|
mainWindow.Visibility = Visibility.Collapsed;
|
||||||
//if (!MarginHide.IS_HIDE)
|
//if (!MarginHide.IS_HIDE)
|
||||||
//{
|
//{
|
||||||
|
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
@@ -568,7 +717,7 @@ namespace GeekDesk
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void NotifyIcon_Click(object sender, RoutedEventArgs e)
|
private void NotifyIcon_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (this.Visibility == Visibility.Collapsed || this.Opacity == 0)
|
if (CheckShouldShowApp())
|
||||||
{
|
{
|
||||||
ShowApp();
|
ShowApp();
|
||||||
}
|
}
|
||||||
@@ -578,6 +727,14 @@ namespace GeekDesk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool CheckShouldShowApp()
|
||||||
|
{
|
||||||
|
return mainWindow.Visibility == Visibility.Collapsed
|
||||||
|
|| mainWindow.Opacity == 0
|
||||||
|
|| MarginHide.IS_HIDE
|
||||||
|
|| !WindowUtil.WindowIsTop(mainWindow);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右键任务栏图标 设置
|
/// 右键任务栏图标 设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -666,6 +823,10 @@ namespace GeekDesk
|
|||||||
appData.AppConfig.WindowWidth = this.Width;
|
appData.AppConfig.WindowWidth = this.Width;
|
||||||
appData.AppConfig.WindowHeight = this.Height;
|
appData.AppConfig.WindowHeight = this.Height;
|
||||||
}
|
}
|
||||||
|
if (guideRun)
|
||||||
|
{
|
||||||
|
Guide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -677,10 +838,14 @@ 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();
|
||||||
}
|
}
|
||||||
|
if (appData.AppConfig.EnableEveryThing == true)
|
||||||
|
{
|
||||||
|
EveryThingUtil.DisableEveryThing();
|
||||||
|
}
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -723,23 +888,28 @@ 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
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
if (e.Key == Key.Down || e.Key == Key.Tab)
|
if (e.Key == Key.Down || e.Key == Key.Tab)
|
||||||
{
|
{
|
||||||
RightCard.SearchListBoxIndexAdd();
|
SearchResControl res = RightCard.VerticalCard.Content as SearchResControl;
|
||||||
} else if (e.Key == Key.Up)
|
res.SearchListBoxIndexAdd();
|
||||||
{
|
|
||||||
RightCard.SearchListBoxIndexSub();
|
|
||||||
} else if (e.Key == Key.Enter)
|
|
||||||
{
|
|
||||||
RightCard.StartupSelectionItem();
|
|
||||||
}
|
}
|
||||||
}
|
else if (e.Key == Key.Up)
|
||||||
|
{
|
||||||
|
SearchResControl res = RightCard.VerticalCard.Content as SearchResControl;
|
||||||
|
res.SearchListBoxIndexSub();
|
||||||
|
}
|
||||||
|
else if (e.Key == Key.Enter)
|
||||||
|
{
|
||||||
|
SearchResControl res = RightCard.VerticalCard.Content as SearchResControl;
|
||||||
|
res.StartupSelectionItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -793,9 +963,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)
|
||||||
@@ -876,7 +1046,123 @@ namespace GeekDesk
|
|||||||
return hwnd;
|
return hwnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 新手引导
|
||||||
|
|
||||||
|
private int guideIndex = 0;
|
||||||
|
private bool guideRun = false;
|
||||||
|
private void Guide()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
guideRun = true;
|
||||||
|
//防止影响主程序进程
|
||||||
|
if (CheckShouldShowApp())
|
||||||
|
{
|
||||||
|
ShowApp();
|
||||||
|
}
|
||||||
|
GrayBorder.Visibility = Visibility.Visible;
|
||||||
|
GuideSwitch(guideIndex);
|
||||||
|
GuideCard.Visibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
catch (Exception) { guideRun = false; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void GuideSwitch(int index)
|
||||||
|
{
|
||||||
|
guideIndex = index;
|
||||||
|
GuideNum.Text = Convert.ToString(index + 1);
|
||||||
|
GuideTitle1.Text = GuideInfoList.mainWindowGuideList[index].Title1;
|
||||||
|
GuideTitle2.Text = GuideInfoList.mainWindowGuideList[index].Title2;
|
||||||
|
GuideText.Text = GuideInfoList.mainWindowGuideList[index].GuideText;
|
||||||
|
|
||||||
|
if (index == 0)
|
||||||
|
{
|
||||||
|
PreviewGuideBtn.Visibility = Visibility.Collapsed;
|
||||||
|
NextGuideBtn.Content = "下一步";
|
||||||
|
} else if (index > 0 && index < GuideInfoList.mainWindowGuideList.Count - 1)
|
||||||
|
{
|
||||||
|
PreviewGuideBtn.Visibility = Visibility.Visible;
|
||||||
|
NextGuideBtn.Content = "下一步";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
NextGuideBtn.Content = "完成";
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (index)
|
||||||
|
{
|
||||||
|
default: //0 //右侧列表区域
|
||||||
|
|
||||||
|
Point point = RightCard.TransformToAncestor(this).Transform(new Point(0, 0));
|
||||||
|
//内部中上
|
||||||
|
GrayBoderClip(point.X, point.Y, RightCard.ActualWidth, RightCard.ActualHeight,
|
||||||
|
new Thickness(point.X + RightCard.ActualWidth / 2 - GuideCard.ActualWidth / 2, point.Y, 0, 0));
|
||||||
|
break;
|
||||||
|
case 1: //左侧菜单
|
||||||
|
Point leftCardPoint = LeftCard.TransformToAncestor(this).Transform(new Point(0, 0));
|
||||||
|
GrayBoderClip(leftCardPoint.X , leftCardPoint.Y , LeftCard.ActualWidth, LeftCard.ActualHeight,
|
||||||
|
// 外部中下侧
|
||||||
|
new Thickness(leftCardPoint.X + LeftCard.ActualWidth,
|
||||||
|
leftCardPoint.Y + LeftCard.ActualHeight / 2 - GuideCard.ActualHeight / 2, 0, 0));
|
||||||
|
break;
|
||||||
|
case 2: //头部拖拽栏
|
||||||
|
GrayBoderClip(0, 0, this.Width, 50,
|
||||||
|
// 外部中下侧
|
||||||
|
new Thickness(this.Width / 2 - GuideCard.ActualWidth / 2, 50, 0, 0));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Point mainBtnPoint = MainBtnPanel.TransformToAncestor(this).Transform(new Point(0, 0));
|
||||||
|
GrayBoderClip(mainBtnPoint.X, mainBtnPoint.Y, MainBtnPanel.ActualWidth, MainBtnPanel.ActualHeight,
|
||||||
|
// 外部左下侧
|
||||||
|
new Thickness(mainBtnPoint.X - GuideCard.Width,
|
||||||
|
mainBtnPoint.Y, 0, 0));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void GrayBoderClip(double x, double y, double w, double h, Thickness margin)
|
||||||
|
{
|
||||||
|
PathGeometry borGeometry = new PathGeometry();
|
||||||
|
|
||||||
|
RectangleGeometry rg = new RectangleGeometry();
|
||||||
|
rg.Rect = new Rect(0, 0, this.Width, this.Height);
|
||||||
|
borGeometry = Geometry.Combine(borGeometry, rg, GeometryCombineMode.Union, null);
|
||||||
|
GrayBorder.Clip = borGeometry;
|
||||||
|
|
||||||
|
RectangleGeometry rg1 = new RectangleGeometry();
|
||||||
|
rg1.Rect = new Rect(x - 20, y - 20, w, h);
|
||||||
|
borGeometry = Geometry.Combine(borGeometry, rg1, GeometryCombineMode.Exclude, null);
|
||||||
|
GuideCard.Margin = margin;
|
||||||
|
GrayBorder.Clip = borGeometry;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PreviewGuideBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
int index = Convert.ToInt32(GuideNum.Text.ToString()) - 1;
|
||||||
|
int previewIndex = index - 1;
|
||||||
|
GuideSwitch(previewIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NextGuideBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if ("完成".Equals(NextGuideBtn.Content.ToString())) {
|
||||||
|
GrayBorder.Visibility = Visibility.Collapsed;
|
||||||
|
GuideCard.Visibility = Visibility.Collapsed;
|
||||||
|
guideIndex = 0;
|
||||||
|
guideRun = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int index = Convert.ToInt32(GuideNum.Text.ToString()) - 1;
|
||||||
|
int nextIndex = index + 1;
|
||||||
|
GuideSwitch(nextIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void Guide_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Guide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ 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;
|
||||||
@@ -31,24 +30,16 @@ 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)
|
||||||
@@ -105,7 +96,8 @@ namespace GeekDesk.MyThread
|
|||||||
dispatcher = null;
|
dispatcher = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex)
|
||||||
|
{
|
||||||
LogUtil.WriteErrorLog(ex, "关闭hook出错");
|
LogUtil.WriteErrorLog(ex, "关闭hook出错");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace GeekDesk.MyThread
|
|||||||
foreach (MenuInfo mi in menuList)
|
foreach (MenuInfo mi in menuList)
|
||||||
{
|
{
|
||||||
ObservableCollection<IconInfo> iconList = mi.IconList;
|
ObservableCollection<IconInfo> iconList = mi.IconList;
|
||||||
|
if (iconList == null) continue;
|
||||||
foreach (IconInfo icon in iconList)
|
foreach (IconInfo icon in iconList)
|
||||||
{
|
{
|
||||||
if (icon == null) continue;
|
if (icon == null) continue;
|
||||||
@@ -36,7 +37,8 @@ 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相对路径出错!");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,23 @@ namespace GeekDesk.MyThread
|
|||||||
if (!StringUtil.IsEmpty(updateInfo))
|
if (!StringUtil.IsEmpty(updateInfo))
|
||||||
{
|
{
|
||||||
JObject jo = JObject.Parse(updateInfo);
|
JObject jo = JObject.Parse(updateInfo);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (jo["statisticUrl"] != null)
|
||||||
|
{
|
||||||
|
string statisticUrl = jo["statisticUrl"].ToString();
|
||||||
|
if (!string.IsNullOrEmpty(statisticUrl))
|
||||||
|
{
|
||||||
|
//用户统计 只通过uuid统计用户数量 不收集任何信息
|
||||||
|
statisticUrl += "?uuid=" + CommonCode.GetUniqueUUID();
|
||||||
|
HttpUtil.Get(statisticUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception){}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string onlineVersion = jo["version"].ToString();
|
string onlineVersion = jo["version"].ToString();
|
||||||
if (onlineVersion.CompareTo(nowVersion) > 0)
|
if (onlineVersion.CompareTo(nowVersion) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
Plugins/EveryThing/32/Everything.exe
Normal file
BIN
Plugins/EveryThing/32/Everything.exe
Normal file
Binary file not shown.
740
Plugins/EveryThing/32/Everything.ini
Normal file
740
Plugins/EveryThing/32/Everything.ini
Normal file
@@ -0,0 +1,740 @@
|
|||||||
|
; Please make sure Everything is not running before modifying this file.
|
||||||
|
[Everything]
|
||||||
|
run_as_admin=0
|
||||||
|
allow_http_server=1
|
||||||
|
allow_etp_server=1
|
||||||
|
window_x=130
|
||||||
|
window_y=130
|
||||||
|
window_wide=794
|
||||||
|
window_high=664
|
||||||
|
maximized=0
|
||||||
|
minimized=0
|
||||||
|
fullscreen=0
|
||||||
|
ontop=0
|
||||||
|
bring_into_view=1
|
||||||
|
alpha=255
|
||||||
|
match_whole_word=0
|
||||||
|
match_path=0
|
||||||
|
match_case=0
|
||||||
|
match_diacritics=0
|
||||||
|
match_regex=0
|
||||||
|
view=0
|
||||||
|
thumbnail_size=64
|
||||||
|
thumbnail_fill=0
|
||||||
|
min_thumbnail_size=32
|
||||||
|
max_thumbnail_size=256
|
||||||
|
medium_thumbnail_size=64
|
||||||
|
large_thumbnail_size=128
|
||||||
|
extra_large_thumbnail_size=256
|
||||||
|
thumbnail_load_size=0
|
||||||
|
thumbnail_overlay_icon=1
|
||||||
|
shell_max_path=0
|
||||||
|
allow_multiple_windows=0
|
||||||
|
allow_multiple_instances=0
|
||||||
|
run_in_background=1
|
||||||
|
show_in_taskbar=1
|
||||||
|
show_tray_icon=0
|
||||||
|
minimize_to_tray=0
|
||||||
|
toggle_window_from_tray_icon=0
|
||||||
|
alternate_row_color=0
|
||||||
|
show_mouseover=0
|
||||||
|
check_for_updates_on_startup=0
|
||||||
|
beta_updates=0
|
||||||
|
show_highlighted_search_terms=1
|
||||||
|
text_size=0
|
||||||
|
hide_empty_search_results=0
|
||||||
|
clear_selection_on_search=1
|
||||||
|
show_focus_on_search=0
|
||||||
|
new_window_key=0
|
||||||
|
show_window_key=0
|
||||||
|
toggle_window_key=0
|
||||||
|
language=0
|
||||||
|
show_selected_item_in_statusbar=1
|
||||||
|
statusbar_selected_item_format=
|
||||||
|
show_size_in_statusbar=0
|
||||||
|
statusbar_size_format=0
|
||||||
|
open_folder_command2=
|
||||||
|
open_file_command2=
|
||||||
|
open_path_command2=
|
||||||
|
explore_command2=
|
||||||
|
explore_path_command2=
|
||||||
|
window_title_format=
|
||||||
|
taskbar_notification_title_format=
|
||||||
|
instance_name=
|
||||||
|
translucent_selection_rectangle_alpha=70
|
||||||
|
min_zoom=-6
|
||||||
|
max_zoom=27
|
||||||
|
context_menu_type=0
|
||||||
|
context_menu_shell_extensions=1
|
||||||
|
auto_include_fixed_volumes=1
|
||||||
|
auto_include_removable_volumes=0
|
||||||
|
auto_remove_offline_ntfs_volumes=1
|
||||||
|
auto_remove_moved_ntfs_volumes=1
|
||||||
|
auto_include_fixed_refs_volumes=1
|
||||||
|
auto_include_removable_refs_volumes=0
|
||||||
|
auto_remove_offline_refs_volumes=1
|
||||||
|
auto_remove_moved_refs_volumes=1
|
||||||
|
find_mount_points_on_removable_volumes=0
|
||||||
|
scan_volume_drive_letters=1
|
||||||
|
last_export_type=0
|
||||||
|
max_threads=0
|
||||||
|
reuse_threads=1
|
||||||
|
find_subfolders_and_files_max_threads=0
|
||||||
|
single_parent_context_menu=0
|
||||||
|
auto_size_1=512
|
||||||
|
auto_size_2=640
|
||||||
|
auto_size_3=768
|
||||||
|
auto_size_aspect_ratio_x=9
|
||||||
|
auto_size_aspect_ratio_y=7
|
||||||
|
auto_size_width_only=0
|
||||||
|
auto_size_path_x=1
|
||||||
|
auto_size_path_y=2
|
||||||
|
sticky_vscroll_bottom=1
|
||||||
|
last_options_page=0
|
||||||
|
draw_focus_rect=1
|
||||||
|
date_format=
|
||||||
|
time_format=
|
||||||
|
listview_item_high=0
|
||||||
|
single_click_open=0
|
||||||
|
underline_icon_titles=0
|
||||||
|
icons_only=0
|
||||||
|
icon_shell_extensions=1
|
||||||
|
auto_scroll_repeat_delay=250
|
||||||
|
auto_scroll_repeat_rate=50
|
||||||
|
open_many_files_warning_threshold=16
|
||||||
|
set_foreground_window_attach_thread_input=0
|
||||||
|
debug=0
|
||||||
|
debug_log=0
|
||||||
|
verbose=0
|
||||||
|
lvm=1
|
||||||
|
ipc=1
|
||||||
|
home_match_case=0
|
||||||
|
home_match_whole_word=0
|
||||||
|
home_match_path=0
|
||||||
|
home_match_diacritics=0
|
||||||
|
home_regex=0
|
||||||
|
home_search=1
|
||||||
|
home_filter=0
|
||||||
|
home_sort=0
|
||||||
|
home_view=0
|
||||||
|
home_index=1
|
||||||
|
allow_multiple_windows_from_tray=0
|
||||||
|
single_click_tray=0
|
||||||
|
close_on_execute=0
|
||||||
|
double_click_path=0
|
||||||
|
update_display_after_scroll=0
|
||||||
|
update_display_after_mask=1
|
||||||
|
auto_scroll_view=0
|
||||||
|
double_quote_copy_as_path=0
|
||||||
|
snap=0
|
||||||
|
snaplen=10
|
||||||
|
rename_select_filepart_only=0
|
||||||
|
rename_move_caret_to_selection_end=0
|
||||||
|
rename_nav=0
|
||||||
|
search_edit_move_caret_to_selection_end=0
|
||||||
|
search_edit_drag_accept_files=0
|
||||||
|
select_search_on_mouse_click=1
|
||||||
|
focus_search_on_activate=0
|
||||||
|
reset_vscroll_on_search=1
|
||||||
|
wrap_focus=0
|
||||||
|
load_icon_priority=0
|
||||||
|
load_thumbnail_priority=0
|
||||||
|
load_fileinfo_priority=0
|
||||||
|
always_request_all_fileinfo=0
|
||||||
|
header_high=0
|
||||||
|
hide_on_close=0
|
||||||
|
max_hidden_windows=0
|
||||||
|
winmm=0
|
||||||
|
menu_escape_amp=1
|
||||||
|
menu_folders=0
|
||||||
|
menu_folder_separator=
|
||||||
|
menu_items_per_column=0
|
||||||
|
new_inherit=1
|
||||||
|
full_row_select=0
|
||||||
|
tray_show_command_line=
|
||||||
|
dpi=96
|
||||||
|
ctrl_mouse_wheel_action=1
|
||||||
|
lvm_scroll=1
|
||||||
|
allow_open=1
|
||||||
|
allow_context_menu=1
|
||||||
|
allow_delete=1
|
||||||
|
allow_rename=1
|
||||||
|
allow_cut=1
|
||||||
|
allow_copy=1
|
||||||
|
allow_paste=1
|
||||||
|
allow_drag_drop=1
|
||||||
|
allow_window_message_filter_dragdrop=0
|
||||||
|
auto_column_widths=0
|
||||||
|
hotkey_explorer_path_search=0
|
||||||
|
hotkey_user_notification_state=0
|
||||||
|
get_key_name_text=1
|
||||||
|
paste_new_line_op=0
|
||||||
|
esc_cancel_action=1
|
||||||
|
fast_ascii_search=1
|
||||||
|
match_path_when_search_contains_path_separator=1
|
||||||
|
allow_literal_operators=0
|
||||||
|
allow_round_bracket_parenthesis=0
|
||||||
|
expand_environment_variables=0
|
||||||
|
search_as_you_type=1
|
||||||
|
always_update_query_on_search_parameter_change=0
|
||||||
|
convert_forward_slash_to_backslash=0
|
||||||
|
match_whole_filename_when_using_wildcards=1
|
||||||
|
operator_precedence=0
|
||||||
|
replace_exact_trailing_star_dot_star_with_star=1
|
||||||
|
allow_exclamation_point_not=1
|
||||||
|
search_command_prefix=
|
||||||
|
auto_complete_search_command=1
|
||||||
|
double_buffer=1
|
||||||
|
search=
|
||||||
|
show_number_of_results_with_selection=0
|
||||||
|
date_descending_first=0
|
||||||
|
size_descending_first=0
|
||||||
|
size_format=2
|
||||||
|
alpha_select=0
|
||||||
|
tooltips=1
|
||||||
|
listview_tooltips=1
|
||||||
|
show_detailed_listview_tooltips=1
|
||||||
|
rtl_listview_edit=0
|
||||||
|
force_path_ltr_order=1
|
||||||
|
force_path_left_align=1
|
||||||
|
date_time_order=0
|
||||||
|
date_time_align=1
|
||||||
|
size_align=3
|
||||||
|
invert_layout=0
|
||||||
|
update_layout_on_input_language_change=0
|
||||||
|
control_shift_action=3
|
||||||
|
change_search_rtl_reading_action=3
|
||||||
|
invert_layout_action=3
|
||||||
|
bookmark_remember_case=1
|
||||||
|
bookmark_remember_wholeword=1
|
||||||
|
bookmark_remember_path=1
|
||||||
|
bookmark_remember_diacritic=1
|
||||||
|
bookmark_remember_regex=1
|
||||||
|
bookmark_remember_sort=1
|
||||||
|
bookmark_remember_view=1
|
||||||
|
bookmark_remember_filter=1
|
||||||
|
bookmark_remember_index=1
|
||||||
|
bookmark_remember_search=1
|
||||||
|
bookmark_organize_x=0
|
||||||
|
bookmark_organize_y=0
|
||||||
|
bookmark_organize_wide=0
|
||||||
|
bookmark_organize_high=0
|
||||||
|
exclude_list_enabled=1
|
||||||
|
exclude_hidden_files_and_folders=0
|
||||||
|
exclude_system_files_and_folders=0
|
||||||
|
include_only_files=
|
||||||
|
exclude_files=
|
||||||
|
db_location=
|
||||||
|
db_multi_user_filename=0
|
||||||
|
db_compress=0
|
||||||
|
index_size=1
|
||||||
|
fast_size_sort=1
|
||||||
|
index_date_created=0
|
||||||
|
fast_date_created_sort=0
|
||||||
|
index_date_modified=1
|
||||||
|
fast_date_modified_sort=1
|
||||||
|
index_date_accessed=0
|
||||||
|
fast_date_accessed_sort=0
|
||||||
|
index_attributes=0
|
||||||
|
fast_attributes_sort=0
|
||||||
|
index_folder_size=0
|
||||||
|
fast_path_sort=1
|
||||||
|
fast_extension_sort=0
|
||||||
|
extended_information_cache_monitor=1
|
||||||
|
db_update_thread_priority=-15
|
||||||
|
index_recent_changes=1
|
||||||
|
refs_file_id_extd_directory_info_buffer_size=0
|
||||||
|
folder_update_thread_mode_background=0
|
||||||
|
folder_update_rescan_asap=1
|
||||||
|
monitor_thread_mode_background=1
|
||||||
|
monitor_retry_delay=30000
|
||||||
|
monitor_update_delay=1000
|
||||||
|
monitor_pause=0
|
||||||
|
usn_record_filter=0xffffffff
|
||||||
|
cancel_delay=0x000003e8
|
||||||
|
allow_ntfs_open_file_by_id=1
|
||||||
|
always_update_folder_recent_change=0
|
||||||
|
editor_x=0
|
||||||
|
editor_y=0
|
||||||
|
editor_wide=0
|
||||||
|
editor_high=0
|
||||||
|
editor_maximized=0
|
||||||
|
file_list_relative_paths=0
|
||||||
|
rename_x=0
|
||||||
|
rename_y=0
|
||||||
|
rename_wide=0
|
||||||
|
rename_high=0
|
||||||
|
rename_match_case=0
|
||||||
|
rename_regex=0
|
||||||
|
advanced_copy_to_x=0
|
||||||
|
advanced_copy_to_y=0
|
||||||
|
advanced_copy_to_wide=0
|
||||||
|
advanced_copy_to_high=0
|
||||||
|
advanced_copy_to_match_case=0
|
||||||
|
advanced_copy_to_regex=0
|
||||||
|
advanced_move_to_x=0
|
||||||
|
advanced_move_to_y=0
|
||||||
|
advanced_move_to_wide=0
|
||||||
|
advanced_move_to_high=0
|
||||||
|
advanced_move_to_match_case=0
|
||||||
|
advanced_move_to_regex=0
|
||||||
|
advanced_search_x=0
|
||||||
|
advanced_search_y=0
|
||||||
|
advanced_search_wide=0
|
||||||
|
advanced_search_high=0
|
||||||
|
advanced_search_page_y_offset=0
|
||||||
|
advanced_search_focus_id=0
|
||||||
|
advanced_search_warnings=1
|
||||||
|
max_recv_size=8388608
|
||||||
|
display_full_path_name=0
|
||||||
|
size_tiny=10240
|
||||||
|
size_small=102400
|
||||||
|
size_medium=1048576
|
||||||
|
size_large=16777216
|
||||||
|
size_huge=134217728
|
||||||
|
themed_toolbar=1
|
||||||
|
show_copy_name=2
|
||||||
|
show_copy_path=2
|
||||||
|
show_copy_full_name=2
|
||||||
|
show_open_path=2
|
||||||
|
show_explore=2
|
||||||
|
show_explore_path=2
|
||||||
|
copy_path_folder_append_backslash=0
|
||||||
|
custom_verb01=
|
||||||
|
custom_verb02=
|
||||||
|
custom_verb03=
|
||||||
|
custom_verb04=
|
||||||
|
custom_verb05=
|
||||||
|
custom_verb06=
|
||||||
|
custom_verb07=
|
||||||
|
custom_verb08=
|
||||||
|
custom_verb09=
|
||||||
|
custom_verb10=
|
||||||
|
custom_verb11=
|
||||||
|
custom_verb12=
|
||||||
|
filters_visible=0
|
||||||
|
filters_wide=128
|
||||||
|
filters_right_align=1
|
||||||
|
filters_tab_stop=0
|
||||||
|
filter=
|
||||||
|
filter_everything_name=
|
||||||
|
filter_organize_x=0
|
||||||
|
filter_organize_y=0
|
||||||
|
filter_organize_wide=0
|
||||||
|
filter_organize_high=0
|
||||||
|
preview_visible=0
|
||||||
|
preview_x=640
|
||||||
|
preview_tab_stop=0
|
||||||
|
preview_mag_filter=0
|
||||||
|
preview_min_filter=0
|
||||||
|
preview_fill=0
|
||||||
|
show_preview_handlers_in_preview_pane=0
|
||||||
|
preview_load_size=0
|
||||||
|
preview_context=0x00000000
|
||||||
|
preview_release_handler_on_clear=0
|
||||||
|
sort=Run Count
|
||||||
|
sort_ascending=0
|
||||||
|
always_keep_sort=0
|
||||||
|
index=0
|
||||||
|
index_file_list=
|
||||||
|
index_etp_server=
|
||||||
|
index_link_type=1
|
||||||
|
status_bar_visible=1
|
||||||
|
select_search_on_focus_mode=1
|
||||||
|
select_search_on_set_mode=2
|
||||||
|
search_history_enabled=0
|
||||||
|
run_history_enabled=1
|
||||||
|
search_history_days_to_keep=90
|
||||||
|
run_history_days_to_keep=90
|
||||||
|
search_history_keep_forever=1
|
||||||
|
run_history_keep_forever=1
|
||||||
|
search_history_always_suggest=0
|
||||||
|
search_history_always_suggest_extend_toolbar=0
|
||||||
|
search_history_visible_count_max=12
|
||||||
|
search_history_always_suggest_visible_count_max=1
|
||||||
|
search_history_show_all_max=256
|
||||||
|
search_history_suggestion_max=256
|
||||||
|
search_history_show_all_sort=2
|
||||||
|
search_history_suggestion_sort=1
|
||||||
|
search_history_show_above=0
|
||||||
|
search_history_sort=2
|
||||||
|
search_history_sort_ascending=0
|
||||||
|
search_history_x=0
|
||||||
|
search_history_y=0
|
||||||
|
search_history_wide=0
|
||||||
|
search_history_high=0
|
||||||
|
search_history_column_search_wide=208
|
||||||
|
search_history_column_search_order=0
|
||||||
|
search_history_column_count_wide=128
|
||||||
|
search_history_column_count_order=1
|
||||||
|
search_history_column_date_wide=128
|
||||||
|
search_history_column_date_order=2
|
||||||
|
etp_server_enabled=0
|
||||||
|
etp_server_bindings=
|
||||||
|
etp_server_port=21
|
||||||
|
etp_server_username=
|
||||||
|
etp_server_password=
|
||||||
|
etp_server_welcome_message=
|
||||||
|
etp_server_log_file_name=
|
||||||
|
etp_server_logging_enabled=0
|
||||||
|
etp_server_log_max_size=4194304
|
||||||
|
etp_server_log_delta_size=524288
|
||||||
|
etp_server_allow_file_download=1
|
||||||
|
ftp_allow_port=1
|
||||||
|
ftp_check_data_connection_ip=1
|
||||||
|
http_server_enabled=0
|
||||||
|
http_server_bindings=
|
||||||
|
http_title_format=
|
||||||
|
http_server_port=80
|
||||||
|
http_server_username=
|
||||||
|
http_server_password=
|
||||||
|
http_server_home=
|
||||||
|
http_server_default_page=
|
||||||
|
http_server_log_file_name=
|
||||||
|
http_server_logging_enabled=0
|
||||||
|
http_server_log_max_size=4194304
|
||||||
|
http_server_log_delta_size=524288
|
||||||
|
http_server_allow_file_download=1
|
||||||
|
http_server_items_per_page=32
|
||||||
|
http_server_show_drive_labels=0
|
||||||
|
http_server_strings=
|
||||||
|
http_server_header=
|
||||||
|
service_pipe_name=
|
||||||
|
name_column_pos=0
|
||||||
|
name_column_width=256
|
||||||
|
path_column_visible=1
|
||||||
|
path_column_pos=1
|
||||||
|
path_column_width=256
|
||||||
|
size_column_visible=1
|
||||||
|
size_column_pos=2
|
||||||
|
size_column_width=96
|
||||||
|
extension_column_visible=0
|
||||||
|
extension_column_pos=3
|
||||||
|
extension_column_width=96
|
||||||
|
type_column_visible=0
|
||||||
|
type_column_pos=4
|
||||||
|
type_column_width=96
|
||||||
|
last_write_time_column_visible=1
|
||||||
|
last_write_time_column_pos=3
|
||||||
|
last_write_time_column_width=153
|
||||||
|
creation_time_column_visible=0
|
||||||
|
creation_time_column_pos=6
|
||||||
|
creation_time_column_width=153
|
||||||
|
date_accessed_column_visible=0
|
||||||
|
date_accessed_column_pos=7
|
||||||
|
date_accessed_column_width=153
|
||||||
|
attribute_column_visible=0
|
||||||
|
attribute_column_pos=8
|
||||||
|
attribute_column_width=70
|
||||||
|
date_recently_changed_column_visible=0
|
||||||
|
date_recently_changed_column_pos=9
|
||||||
|
date_recently_changed_column_width=153
|
||||||
|
run_count_column_visible=0
|
||||||
|
run_count_column_pos=10
|
||||||
|
run_count_column_width=96
|
||||||
|
date_run_column_visible=0
|
||||||
|
date_run_column_pos=11
|
||||||
|
date_run_column_width=153
|
||||||
|
file_list_filename_column_visible=0
|
||||||
|
file_list_filename_column_pos=12
|
||||||
|
file_list_filename_column_width=96
|
||||||
|
translucent_selection_rectangle_background_color=
|
||||||
|
translucent_selection_rectangle_border_color=
|
||||||
|
thumbnail_mouseover_border_color=
|
||||||
|
preview_background_color=
|
||||||
|
ntfs_volume_guids="\\\\?\\Volume{6afe1915-0a0b-4e59-96bc-666ff914ea4f}","\\\\?\\Volume{71be44cf-e03a-462f-a9c8-b53c16e002a4}"
|
||||||
|
ntfs_volume_paths="C:","D:"
|
||||||
|
ntfs_volume_roots="",""
|
||||||
|
ntfs_volume_includes=1,1
|
||||||
|
ntfs_volume_load_recent_changes=0,0
|
||||||
|
ntfs_volume_include_onlys="",""
|
||||||
|
ntfs_volume_monitors=1,1
|
||||||
|
refs_volume_guids=
|
||||||
|
refs_volume_paths=
|
||||||
|
refs_volume_roots=
|
||||||
|
refs_volume_includes=
|
||||||
|
refs_volume_load_recent_changes=
|
||||||
|
refs_volume_include_onlys=
|
||||||
|
refs_volume_monitors=
|
||||||
|
filelists=
|
||||||
|
filelist_monitor_changes=
|
||||||
|
folders=
|
||||||
|
folder_monitor_changes=
|
||||||
|
folder_buffer_size_list=
|
||||||
|
folder_rescan_if_full_list=
|
||||||
|
folder_update_types=
|
||||||
|
folder_update_days=
|
||||||
|
folder_update_ats=
|
||||||
|
folder_update_intervals=
|
||||||
|
folder_update_interval_types=
|
||||||
|
exclude_folders=
|
||||||
|
connect_history_hosts=
|
||||||
|
connect_history_ports=
|
||||||
|
connect_history_usernames=
|
||||||
|
connect_history_link_types=
|
||||||
|
etp_client_rewrite_patterns=
|
||||||
|
etp_client_rewrite_substitutions=
|
||||||
|
file_new_search_window_keys=334
|
||||||
|
file_open_file_list_keys=335
|
||||||
|
file_close_file_list_keys=
|
||||||
|
file_close_keys=343,27
|
||||||
|
file_export_keys=339
|
||||||
|
file_copy_full_name_to_clipboard_keys=9539
|
||||||
|
file_copy_path_to_clipboard_keys=
|
||||||
|
file_set_run_count_keys=
|
||||||
|
file_create_shortcut_keys=
|
||||||
|
file_delete_keys=8238
|
||||||
|
file_delete_permanently_keys=9262
|
||||||
|
file_edit_keys=
|
||||||
|
file_open_keys=8205
|
||||||
|
file_open_selection_and_close_everything_keys=
|
||||||
|
file_explore_path_keys=
|
||||||
|
file_open_new_keys=
|
||||||
|
file_open_path_keys=8461
|
||||||
|
file_open_with_keys=
|
||||||
|
file_open_with_default_verb_keys=
|
||||||
|
file_play_keys=
|
||||||
|
file_preview_keys=
|
||||||
|
file_print_keys=
|
||||||
|
file_print_to_keys=
|
||||||
|
file_properties_keys=8717
|
||||||
|
file_read_extended_information_keys=8517
|
||||||
|
file_rename_keys=8305
|
||||||
|
file_run_as_keys=
|
||||||
|
file_exit_keys=337
|
||||||
|
file_copy_name_to_clipboard_keys=
|
||||||
|
file_open_selection_and_do_not_close_everything_keys=
|
||||||
|
file_open_most_run_keys=
|
||||||
|
file_open_last_run_keys=
|
||||||
|
file_custom_verb_1_keys=
|
||||||
|
file_custom_verb_2_keys=
|
||||||
|
file_custom_verb_3_keys=
|
||||||
|
file_custom_verb_4_keys=
|
||||||
|
file_custom_verb_5_keys=
|
||||||
|
file_custom_verb_6_keys=
|
||||||
|
file_custom_verb_7_keys=
|
||||||
|
file_custom_verb_8_keys=
|
||||||
|
file_custom_verb_9_keys=
|
||||||
|
file_custom_verb_10_keys=
|
||||||
|
file_custom_verb_11_keys=
|
||||||
|
file_custom_verb_12_keys=
|
||||||
|
indexes_folders_rescan_all_now_keys=
|
||||||
|
indexes_force_rebuild_keys=
|
||||||
|
edit_cut_keys=8536
|
||||||
|
edit_copy_keys=8515,8493
|
||||||
|
edit_paste_keys=8534,9261
|
||||||
|
edit_select_all_keys=8513
|
||||||
|
edit_invert_selection_keys=
|
||||||
|
edit_copy_to_folder_keys=
|
||||||
|
edit_move_to_folder_keys=
|
||||||
|
edit_advanced_advanced_copy_to_folder_keys=
|
||||||
|
edit_advanced_advanced_move_to_folder_keys=
|
||||||
|
view_filters_keys=
|
||||||
|
view_preview_keys=592
|
||||||
|
view_status_bar_keys=
|
||||||
|
view_details_keys=1334
|
||||||
|
view_medium_thumbnails_keys=1331
|
||||||
|
view_large_thumbnails_keys=1330
|
||||||
|
view_extra_large_thumbnails_keys=1329
|
||||||
|
view_increase_thumbnail_size_keys=1467
|
||||||
|
view_decrease_thumbnail_size_keys=1469
|
||||||
|
view_window_size_small_keys=561
|
||||||
|
view_window_size_medium_keys=562
|
||||||
|
view_window_size_large_keys=563
|
||||||
|
view_window_size_auto_fit_keys=564
|
||||||
|
view_zoom_zoom_in_keys=443
|
||||||
|
view_zoom_zoom_out_keys=445
|
||||||
|
view_zoom_reset_keys=304,352
|
||||||
|
view_go_to_back_keys=549,166
|
||||||
|
view_go_to_forward_keys=551,167
|
||||||
|
view_go_to_home_keys=548
|
||||||
|
view_go_to_show_all_history_keys=1352,328
|
||||||
|
view_sort_by_name_keys=305
|
||||||
|
view_sort_by_path_keys=306
|
||||||
|
view_sort_by_size_keys=307
|
||||||
|
view_sort_by_extension_keys=308
|
||||||
|
view_sort_by_type_keys=309
|
||||||
|
view_sort_by_date_modified_keys=310
|
||||||
|
view_sort_by_date_created_keys=311
|
||||||
|
view_sort_by_attributes_keys=312
|
||||||
|
view_sort_by_file_list_filename_keys=
|
||||||
|
view_sort_by_run_count_keys=
|
||||||
|
view_sort_by_date_run_keys=
|
||||||
|
view_sort_by_date_recently_changed_keys=313
|
||||||
|
view_sort_by_date_accessed_keys=
|
||||||
|
view_sort_by_ascending_keys=
|
||||||
|
view_sort_by_descending_keys=
|
||||||
|
view_refresh_keys=116
|
||||||
|
view_fullscreen_keys=122
|
||||||
|
view_toggle_ltrrtl_direction_keys=
|
||||||
|
view_on_top_never_keys=
|
||||||
|
view_on_top_always_keys=
|
||||||
|
view_on_top_while_searching_keys=
|
||||||
|
search_match_case_keys=329
|
||||||
|
search_match_whole_word_keys=322
|
||||||
|
search_match_path_keys=341
|
||||||
|
search_match_diacritics_keys=333
|
||||||
|
search_enable_regex_keys=338
|
||||||
|
search_advanced_search_keys=
|
||||||
|
search_add_to_filters_keys=
|
||||||
|
search_organize_filters_keys=1350
|
||||||
|
bookmarks_add_to_bookmarks_keys=324
|
||||||
|
bookmarks_organize_bookmarks_keys=1346
|
||||||
|
tools_options_keys=336
|
||||||
|
tools_console_keys=448
|
||||||
|
tools_file_list_editor_keys=
|
||||||
|
tools_connect_to_etp_server_keys=
|
||||||
|
tools_disconnect_from_etp_server_keys=
|
||||||
|
help_everything_help_keys=112
|
||||||
|
help_search_syntax_keys=
|
||||||
|
help_regex_syntax_keys=
|
||||||
|
help_command_line_options_keys=
|
||||||
|
help_everything_website_keys=
|
||||||
|
help_check_for_updates_keys=
|
||||||
|
help_about_everything_keys=368
|
||||||
|
help_donate_keys=
|
||||||
|
search_edit_focus_search_edit_keys=326,114,580
|
||||||
|
search_edit_delete_previous_word_keys=4360
|
||||||
|
search_edit_auto_complete_search_keys=4384
|
||||||
|
search_edit_show_search_history_keys=
|
||||||
|
search_edit_show_all_search_history_keys=4646,4648
|
||||||
|
result_list_item_up_keys=8230,4134
|
||||||
|
result_list_item_down_keys=8232,4136
|
||||||
|
result_list_page_up_keys=8225,4129
|
||||||
|
result_list_page_down_keys=8226,4130
|
||||||
|
result_list_start_of_list_keys=8228
|
||||||
|
result_list_end_of_list_keys=8227
|
||||||
|
result_list_item_up_extend_keys=9254,5158
|
||||||
|
result_list_item_down_extend_keys=9256,5160
|
||||||
|
result_list_page_up_extend_keys=9249,5153
|
||||||
|
result_list_page_down_extend_keys=9250,5154
|
||||||
|
result_list_start_of_list_extend_keys=9252
|
||||||
|
result_list_end_of_list_extend_keys=9251
|
||||||
|
result_list_focus_up_keys=8486,4390
|
||||||
|
result_list_focus_down_keys=8488,4392
|
||||||
|
result_list_focus_page_up_keys=8481,4385
|
||||||
|
result_list_focus_page_down_keys=8482,4386
|
||||||
|
result_list_focus_start_of_list_keys=8484
|
||||||
|
result_list_focus_end_of_list_keys=8483
|
||||||
|
result_list_focus_up_extend_keys=9510,5414
|
||||||
|
result_list_focus_down_extend_keys=9512,5416
|
||||||
|
result_list_focus_page_up_extend_keys=9505,5409
|
||||||
|
result_list_focus_page_down_extend_keys=9506,5410
|
||||||
|
result_list_focus_start_of_list_extend_keys=9508
|
||||||
|
result_list_focus_end_of_list_extend_keys=9507
|
||||||
|
result_list_focus_result_list_keys=
|
||||||
|
result_list_focus_highest_run_count_result_keys=
|
||||||
|
result_list_focus_last_run_result_keys=
|
||||||
|
result_list_toggle_path_column_keys=
|
||||||
|
result_list_toggle_size_column_keys=
|
||||||
|
result_list_toggle_extension_column_keys=
|
||||||
|
result_list_toggle_type_column_keys=
|
||||||
|
result_list_toggle_date_modified_column_keys=
|
||||||
|
result_list_toggle_date_created_column_keys=
|
||||||
|
result_list_toggle_attributes_column_keys=
|
||||||
|
result_list_toggle_file_list_filename_column_keys=
|
||||||
|
result_list_toggle_run_count_column_keys=
|
||||||
|
result_list_toggle_date_recently_changed_column_keys=
|
||||||
|
result_list_toggle_date_accessed_column_keys=
|
||||||
|
result_list_toggle_date_run_column_keys=
|
||||||
|
result_list_size_all_columns_to_fit_keys=8555
|
||||||
|
result_list_size_result_list_to_fit_keys=
|
||||||
|
result_list_context_menu_keys=9337
|
||||||
|
result_list_scroll_left_or_thumbnail_left_keys=8229
|
||||||
|
result_list_scroll_right_or_thumbnail_right_keys=8231
|
||||||
|
result_list_scroll_page_left_or_thumbnail_focus_left_keys=8485
|
||||||
|
result_list_scroll_page_right_or_thumbnail_focus_right_keys=8487
|
||||||
|
result_list_left_extend_keys=9253
|
||||||
|
result_list_right_extend_keys=9255
|
||||||
|
result_list_focus_left_extend_keys=9509
|
||||||
|
result_list_focus_right_extend_keys=9511
|
||||||
|
result_list_select_focus_keys=8224
|
||||||
|
result_list_toggle_focus_selection_keys=8480
|
||||||
|
result_list_copy_as_csv_keys=
|
||||||
|
preview_focus_preview_keys=
|
||||||
|
result_list_font=
|
||||||
|
result_list_font_size=
|
||||||
|
search_edit_font=
|
||||||
|
search_edit_font_size=
|
||||||
|
status_bar_font=
|
||||||
|
status_bar_font_size=
|
||||||
|
header_font=
|
||||||
|
header_font_size=
|
||||||
|
normal_background_color=
|
||||||
|
normal_foreground_color=
|
||||||
|
normal_bold=
|
||||||
|
highlighted_background_color=
|
||||||
|
highlighted_foreground_color=
|
||||||
|
highlighted_bold=
|
||||||
|
current_sort_background_color=
|
||||||
|
current_sort_foreground_color=
|
||||||
|
current_sort_bold=
|
||||||
|
current_sort_highlighted_background_color=
|
||||||
|
current_sort_highlighted_foreground_color=
|
||||||
|
current_sort_highlighted_bold=
|
||||||
|
selected_background_color=
|
||||||
|
selected_foreground_color=
|
||||||
|
selected_bold=
|
||||||
|
selected_highlighted_background_color=
|
||||||
|
selected_highlighted_foreground_color=
|
||||||
|
selected_highlighted_bold=
|
||||||
|
selected_inactive_background_color=
|
||||||
|
selected_inactive_foreground_color=
|
||||||
|
selected_inactive_bold=
|
||||||
|
selected_inactive_highlighted_background_color=
|
||||||
|
selected_inactive_highlighted_foreground_color=
|
||||||
|
selected_inactive_highlighted_bold=
|
||||||
|
drop_target_background_color=
|
||||||
|
drop_target_foreground_color=
|
||||||
|
drop_target_bold=
|
||||||
|
drop_target_highlighted_background_color=
|
||||||
|
drop_target_highlighted_foreground_color=
|
||||||
|
drop_target_highlighted_bold=
|
||||||
|
mouseover_background_color=
|
||||||
|
mouseover_foreground_color=
|
||||||
|
mouseover_bold=
|
||||||
|
mouseover_highlighted_background_color=
|
||||||
|
mouseover_highlighted_foreground_color=
|
||||||
|
mouseover_highlighted_bold=
|
||||||
|
mouseover_current_sort_background_color=
|
||||||
|
mouseover_current_sort_foreground_color=
|
||||||
|
mouseover_current_sort_bold=
|
||||||
|
mouseover_current_sort_highlighted_background_color=
|
||||||
|
mouseover_current_sort_highlighted_foreground_color=
|
||||||
|
mouseover_current_sort_highlighted_bold=
|
||||||
|
alternate_row_background_color=
|
||||||
|
alternate_row_foreground_color=
|
||||||
|
alternate_row_bold=
|
||||||
|
alternate_row_highlighted_background_color=
|
||||||
|
alternate_row_highlighted_foreground_color=
|
||||||
|
alternate_row_highlighted_bold=
|
||||||
|
current_sort_alternate_row_background_color=
|
||||||
|
current_sort_alternate_row_foreground_color=
|
||||||
|
current_sort_alternate_row_bold=
|
||||||
|
current_sort_alternate_row_highlighted_background_color=
|
||||||
|
current_sort_alternate_row_highlighted_foreground_color=
|
||||||
|
current_sort_alternate_row_highlighted_bold=
|
||||||
|
hot_background_color=
|
||||||
|
hot_foreground_color=
|
||||||
|
hot_bold=
|
||||||
|
hot_highlighted_background_color=
|
||||||
|
hot_highlighted_foreground_color=
|
||||||
|
hot_highlighted_bold=
|
||||||
|
selected_hot_background_color=
|
||||||
|
selected_hot_foreground_color=
|
||||||
|
selected_hot_bold=
|
||||||
|
selected_hot_highlighted_background_color=
|
||||||
|
selected_hot_highlighted_foreground_color=
|
||||||
|
selected_hot_highlighted_bold=
|
||||||
|
selected_inactive_hot_background_color=
|
||||||
|
selected_inactive_hot_foreground_color=
|
||||||
|
selected_inactive_hot_bold=
|
||||||
|
selected_inactive_hot_highlighted_background_color=
|
||||||
|
selected_inactive_hot_highlighted_foreground_color=
|
||||||
|
selected_inactive_hot_highlighted_bold=
|
||||||
|
thumbnail_mouseover_background_color=
|
||||||
|
thumbnail_mouseover_foreground_color=
|
||||||
|
thumbnail_mouseover_bold=
|
||||||
|
thumbnail_mouseover_highlighted_background_color=
|
||||||
|
thumbnail_mouseover_highlighted_foreground_color=
|
||||||
|
thumbnail_mouseover_highlighted_bold=
|
||||||
BIN
Plugins/EveryThing/32/Everything.lng
Normal file
BIN
Plugins/EveryThing/32/Everything.lng
Normal file
Binary file not shown.
BIN
Plugins/EveryThing/64/Everything.exe
Normal file
BIN
Plugins/EveryThing/64/Everything.exe
Normal file
Binary file not shown.
740
Plugins/EveryThing/64/Everything.ini
Normal file
740
Plugins/EveryThing/64/Everything.ini
Normal file
@@ -0,0 +1,740 @@
|
|||||||
|
; Please make sure Everything is not running before modifying this file.
|
||||||
|
[Everything]
|
||||||
|
run_as_admin=0
|
||||||
|
allow_http_server=1
|
||||||
|
allow_etp_server=1
|
||||||
|
window_x=130
|
||||||
|
window_y=130
|
||||||
|
window_wide=794
|
||||||
|
window_high=664
|
||||||
|
maximized=0
|
||||||
|
minimized=0
|
||||||
|
fullscreen=0
|
||||||
|
ontop=0
|
||||||
|
bring_into_view=1
|
||||||
|
alpha=255
|
||||||
|
match_whole_word=0
|
||||||
|
match_path=0
|
||||||
|
match_case=0
|
||||||
|
match_diacritics=0
|
||||||
|
match_regex=0
|
||||||
|
view=0
|
||||||
|
thumbnail_size=64
|
||||||
|
thumbnail_fill=0
|
||||||
|
min_thumbnail_size=32
|
||||||
|
max_thumbnail_size=256
|
||||||
|
medium_thumbnail_size=64
|
||||||
|
large_thumbnail_size=128
|
||||||
|
extra_large_thumbnail_size=256
|
||||||
|
thumbnail_load_size=0
|
||||||
|
thumbnail_overlay_icon=1
|
||||||
|
shell_max_path=0
|
||||||
|
allow_multiple_windows=0
|
||||||
|
allow_multiple_instances=0
|
||||||
|
run_in_background=1
|
||||||
|
show_in_taskbar=1
|
||||||
|
show_tray_icon=0
|
||||||
|
minimize_to_tray=0
|
||||||
|
toggle_window_from_tray_icon=0
|
||||||
|
alternate_row_color=0
|
||||||
|
show_mouseover=0
|
||||||
|
check_for_updates_on_startup=0
|
||||||
|
beta_updates=0
|
||||||
|
show_highlighted_search_terms=1
|
||||||
|
text_size=0
|
||||||
|
hide_empty_search_results=0
|
||||||
|
clear_selection_on_search=1
|
||||||
|
show_focus_on_search=0
|
||||||
|
new_window_key=0
|
||||||
|
show_window_key=0
|
||||||
|
toggle_window_key=0
|
||||||
|
language=0
|
||||||
|
show_selected_item_in_statusbar=1
|
||||||
|
statusbar_selected_item_format=
|
||||||
|
show_size_in_statusbar=0
|
||||||
|
statusbar_size_format=0
|
||||||
|
open_folder_command2=
|
||||||
|
open_file_command2=
|
||||||
|
open_path_command2=
|
||||||
|
explore_command2=
|
||||||
|
explore_path_command2=
|
||||||
|
window_title_format=
|
||||||
|
taskbar_notification_title_format=
|
||||||
|
instance_name=
|
||||||
|
translucent_selection_rectangle_alpha=70
|
||||||
|
min_zoom=-6
|
||||||
|
max_zoom=27
|
||||||
|
context_menu_type=0
|
||||||
|
context_menu_shell_extensions=1
|
||||||
|
auto_include_fixed_volumes=1
|
||||||
|
auto_include_removable_volumes=0
|
||||||
|
auto_remove_offline_ntfs_volumes=1
|
||||||
|
auto_remove_moved_ntfs_volumes=1
|
||||||
|
auto_include_fixed_refs_volumes=1
|
||||||
|
auto_include_removable_refs_volumes=0
|
||||||
|
auto_remove_offline_refs_volumes=1
|
||||||
|
auto_remove_moved_refs_volumes=1
|
||||||
|
find_mount_points_on_removable_volumes=0
|
||||||
|
scan_volume_drive_letters=1
|
||||||
|
last_export_type=0
|
||||||
|
max_threads=0
|
||||||
|
reuse_threads=1
|
||||||
|
find_subfolders_and_files_max_threads=0
|
||||||
|
single_parent_context_menu=0
|
||||||
|
auto_size_1=512
|
||||||
|
auto_size_2=640
|
||||||
|
auto_size_3=768
|
||||||
|
auto_size_aspect_ratio_x=9
|
||||||
|
auto_size_aspect_ratio_y=7
|
||||||
|
auto_size_width_only=0
|
||||||
|
auto_size_path_x=1
|
||||||
|
auto_size_path_y=2
|
||||||
|
sticky_vscroll_bottom=1
|
||||||
|
last_options_page=0
|
||||||
|
draw_focus_rect=1
|
||||||
|
date_format=
|
||||||
|
time_format=
|
||||||
|
listview_item_high=0
|
||||||
|
single_click_open=0
|
||||||
|
underline_icon_titles=0
|
||||||
|
icons_only=0
|
||||||
|
icon_shell_extensions=1
|
||||||
|
auto_scroll_repeat_delay=250
|
||||||
|
auto_scroll_repeat_rate=50
|
||||||
|
open_many_files_warning_threshold=16
|
||||||
|
set_foreground_window_attach_thread_input=0
|
||||||
|
debug=0
|
||||||
|
debug_log=0
|
||||||
|
verbose=0
|
||||||
|
lvm=1
|
||||||
|
ipc=1
|
||||||
|
home_match_case=0
|
||||||
|
home_match_whole_word=0
|
||||||
|
home_match_path=0
|
||||||
|
home_match_diacritics=0
|
||||||
|
home_regex=0
|
||||||
|
home_search=1
|
||||||
|
home_filter=0
|
||||||
|
home_sort=0
|
||||||
|
home_view=0
|
||||||
|
home_index=1
|
||||||
|
allow_multiple_windows_from_tray=0
|
||||||
|
single_click_tray=0
|
||||||
|
close_on_execute=0
|
||||||
|
double_click_path=0
|
||||||
|
update_display_after_scroll=0
|
||||||
|
update_display_after_mask=1
|
||||||
|
auto_scroll_view=0
|
||||||
|
double_quote_copy_as_path=0
|
||||||
|
snap=0
|
||||||
|
snaplen=10
|
||||||
|
rename_select_filepart_only=0
|
||||||
|
rename_move_caret_to_selection_end=0
|
||||||
|
rename_nav=0
|
||||||
|
search_edit_move_caret_to_selection_end=0
|
||||||
|
search_edit_drag_accept_files=0
|
||||||
|
select_search_on_mouse_click=1
|
||||||
|
focus_search_on_activate=0
|
||||||
|
reset_vscroll_on_search=1
|
||||||
|
wrap_focus=0
|
||||||
|
load_icon_priority=0
|
||||||
|
load_thumbnail_priority=0
|
||||||
|
load_fileinfo_priority=0
|
||||||
|
always_request_all_fileinfo=0
|
||||||
|
header_high=0
|
||||||
|
hide_on_close=0
|
||||||
|
max_hidden_windows=0
|
||||||
|
winmm=0
|
||||||
|
menu_escape_amp=1
|
||||||
|
menu_folders=0
|
||||||
|
menu_folder_separator=
|
||||||
|
menu_items_per_column=0
|
||||||
|
new_inherit=1
|
||||||
|
full_row_select=0
|
||||||
|
tray_show_command_line=
|
||||||
|
dpi=96
|
||||||
|
ctrl_mouse_wheel_action=1
|
||||||
|
lvm_scroll=1
|
||||||
|
allow_open=1
|
||||||
|
allow_context_menu=1
|
||||||
|
allow_delete=1
|
||||||
|
allow_rename=1
|
||||||
|
allow_cut=1
|
||||||
|
allow_copy=1
|
||||||
|
allow_paste=1
|
||||||
|
allow_drag_drop=1
|
||||||
|
allow_window_message_filter_dragdrop=0
|
||||||
|
auto_column_widths=0
|
||||||
|
hotkey_explorer_path_search=0
|
||||||
|
hotkey_user_notification_state=0
|
||||||
|
get_key_name_text=1
|
||||||
|
paste_new_line_op=0
|
||||||
|
esc_cancel_action=1
|
||||||
|
fast_ascii_search=1
|
||||||
|
match_path_when_search_contains_path_separator=1
|
||||||
|
allow_literal_operators=0
|
||||||
|
allow_round_bracket_parenthesis=0
|
||||||
|
expand_environment_variables=0
|
||||||
|
search_as_you_type=1
|
||||||
|
always_update_query_on_search_parameter_change=0
|
||||||
|
convert_forward_slash_to_backslash=0
|
||||||
|
match_whole_filename_when_using_wildcards=1
|
||||||
|
operator_precedence=0
|
||||||
|
replace_exact_trailing_star_dot_star_with_star=1
|
||||||
|
allow_exclamation_point_not=1
|
||||||
|
search_command_prefix=
|
||||||
|
auto_complete_search_command=1
|
||||||
|
double_buffer=1
|
||||||
|
search=
|
||||||
|
show_number_of_results_with_selection=0
|
||||||
|
date_descending_first=0
|
||||||
|
size_descending_first=0
|
||||||
|
size_format=2
|
||||||
|
alpha_select=0
|
||||||
|
tooltips=1
|
||||||
|
listview_tooltips=1
|
||||||
|
show_detailed_listview_tooltips=1
|
||||||
|
rtl_listview_edit=0
|
||||||
|
force_path_ltr_order=1
|
||||||
|
force_path_left_align=1
|
||||||
|
date_time_order=0
|
||||||
|
date_time_align=1
|
||||||
|
size_align=3
|
||||||
|
invert_layout=0
|
||||||
|
update_layout_on_input_language_change=0
|
||||||
|
control_shift_action=3
|
||||||
|
change_search_rtl_reading_action=3
|
||||||
|
invert_layout_action=3
|
||||||
|
bookmark_remember_case=1
|
||||||
|
bookmark_remember_wholeword=1
|
||||||
|
bookmark_remember_path=1
|
||||||
|
bookmark_remember_diacritic=1
|
||||||
|
bookmark_remember_regex=1
|
||||||
|
bookmark_remember_sort=1
|
||||||
|
bookmark_remember_view=1
|
||||||
|
bookmark_remember_filter=1
|
||||||
|
bookmark_remember_index=1
|
||||||
|
bookmark_remember_search=1
|
||||||
|
bookmark_organize_x=0
|
||||||
|
bookmark_organize_y=0
|
||||||
|
bookmark_organize_wide=0
|
||||||
|
bookmark_organize_high=0
|
||||||
|
exclude_list_enabled=1
|
||||||
|
exclude_hidden_files_and_folders=0
|
||||||
|
exclude_system_files_and_folders=0
|
||||||
|
include_only_files=
|
||||||
|
exclude_files=
|
||||||
|
db_location=
|
||||||
|
db_multi_user_filename=0
|
||||||
|
db_compress=0
|
||||||
|
index_size=1
|
||||||
|
fast_size_sort=1
|
||||||
|
index_date_created=0
|
||||||
|
fast_date_created_sort=0
|
||||||
|
index_date_modified=1
|
||||||
|
fast_date_modified_sort=1
|
||||||
|
index_date_accessed=0
|
||||||
|
fast_date_accessed_sort=0
|
||||||
|
index_attributes=0
|
||||||
|
fast_attributes_sort=0
|
||||||
|
index_folder_size=0
|
||||||
|
fast_path_sort=1
|
||||||
|
fast_extension_sort=0
|
||||||
|
extended_information_cache_monitor=1
|
||||||
|
db_update_thread_priority=-15
|
||||||
|
index_recent_changes=1
|
||||||
|
refs_file_id_extd_directory_info_buffer_size=0
|
||||||
|
folder_update_thread_mode_background=0
|
||||||
|
folder_update_rescan_asap=1
|
||||||
|
monitor_thread_mode_background=1
|
||||||
|
monitor_retry_delay=30000
|
||||||
|
monitor_update_delay=1000
|
||||||
|
monitor_pause=0
|
||||||
|
usn_record_filter=0xffffffff
|
||||||
|
cancel_delay=0x000003e8
|
||||||
|
allow_ntfs_open_file_by_id=1
|
||||||
|
always_update_folder_recent_change=0
|
||||||
|
editor_x=0
|
||||||
|
editor_y=0
|
||||||
|
editor_wide=0
|
||||||
|
editor_high=0
|
||||||
|
editor_maximized=0
|
||||||
|
file_list_relative_paths=0
|
||||||
|
rename_x=0
|
||||||
|
rename_y=0
|
||||||
|
rename_wide=0
|
||||||
|
rename_high=0
|
||||||
|
rename_match_case=0
|
||||||
|
rename_regex=0
|
||||||
|
advanced_copy_to_x=0
|
||||||
|
advanced_copy_to_y=0
|
||||||
|
advanced_copy_to_wide=0
|
||||||
|
advanced_copy_to_high=0
|
||||||
|
advanced_copy_to_match_case=0
|
||||||
|
advanced_copy_to_regex=0
|
||||||
|
advanced_move_to_x=0
|
||||||
|
advanced_move_to_y=0
|
||||||
|
advanced_move_to_wide=0
|
||||||
|
advanced_move_to_high=0
|
||||||
|
advanced_move_to_match_case=0
|
||||||
|
advanced_move_to_regex=0
|
||||||
|
advanced_search_x=0
|
||||||
|
advanced_search_y=0
|
||||||
|
advanced_search_wide=0
|
||||||
|
advanced_search_high=0
|
||||||
|
advanced_search_page_y_offset=0
|
||||||
|
advanced_search_focus_id=0
|
||||||
|
advanced_search_warnings=1
|
||||||
|
max_recv_size=8388608
|
||||||
|
display_full_path_name=0
|
||||||
|
size_tiny=10240
|
||||||
|
size_small=102400
|
||||||
|
size_medium=1048576
|
||||||
|
size_large=16777216
|
||||||
|
size_huge=134217728
|
||||||
|
themed_toolbar=1
|
||||||
|
show_copy_name=2
|
||||||
|
show_copy_path=2
|
||||||
|
show_copy_full_name=2
|
||||||
|
show_open_path=2
|
||||||
|
show_explore=2
|
||||||
|
show_explore_path=2
|
||||||
|
copy_path_folder_append_backslash=0
|
||||||
|
custom_verb01=
|
||||||
|
custom_verb02=
|
||||||
|
custom_verb03=
|
||||||
|
custom_verb04=
|
||||||
|
custom_verb05=
|
||||||
|
custom_verb06=
|
||||||
|
custom_verb07=
|
||||||
|
custom_verb08=
|
||||||
|
custom_verb09=
|
||||||
|
custom_verb10=
|
||||||
|
custom_verb11=
|
||||||
|
custom_verb12=
|
||||||
|
filters_visible=0
|
||||||
|
filters_wide=128
|
||||||
|
filters_right_align=1
|
||||||
|
filters_tab_stop=0
|
||||||
|
filter=
|
||||||
|
filter_everything_name=
|
||||||
|
filter_organize_x=0
|
||||||
|
filter_organize_y=0
|
||||||
|
filter_organize_wide=0
|
||||||
|
filter_organize_high=0
|
||||||
|
preview_visible=0
|
||||||
|
preview_x=640
|
||||||
|
preview_tab_stop=0
|
||||||
|
preview_mag_filter=0
|
||||||
|
preview_min_filter=0
|
||||||
|
preview_fill=0
|
||||||
|
show_preview_handlers_in_preview_pane=0
|
||||||
|
preview_load_size=0
|
||||||
|
preview_context=0x00000000
|
||||||
|
preview_release_handler_on_clear=0
|
||||||
|
sort=Run Count
|
||||||
|
sort_ascending=0
|
||||||
|
always_keep_sort=0
|
||||||
|
index=0
|
||||||
|
index_file_list=
|
||||||
|
index_etp_server=
|
||||||
|
index_link_type=1
|
||||||
|
status_bar_visible=1
|
||||||
|
select_search_on_focus_mode=1
|
||||||
|
select_search_on_set_mode=2
|
||||||
|
search_history_enabled=0
|
||||||
|
run_history_enabled=1
|
||||||
|
search_history_days_to_keep=90
|
||||||
|
run_history_days_to_keep=90
|
||||||
|
search_history_keep_forever=1
|
||||||
|
run_history_keep_forever=1
|
||||||
|
search_history_always_suggest=0
|
||||||
|
search_history_always_suggest_extend_toolbar=0
|
||||||
|
search_history_visible_count_max=12
|
||||||
|
search_history_always_suggest_visible_count_max=1
|
||||||
|
search_history_show_all_max=256
|
||||||
|
search_history_suggestion_max=256
|
||||||
|
search_history_show_all_sort=2
|
||||||
|
search_history_suggestion_sort=1
|
||||||
|
search_history_show_above=0
|
||||||
|
search_history_sort=2
|
||||||
|
search_history_sort_ascending=0
|
||||||
|
search_history_x=0
|
||||||
|
search_history_y=0
|
||||||
|
search_history_wide=0
|
||||||
|
search_history_high=0
|
||||||
|
search_history_column_search_wide=208
|
||||||
|
search_history_column_search_order=0
|
||||||
|
search_history_column_count_wide=128
|
||||||
|
search_history_column_count_order=1
|
||||||
|
search_history_column_date_wide=128
|
||||||
|
search_history_column_date_order=2
|
||||||
|
etp_server_enabled=0
|
||||||
|
etp_server_bindings=
|
||||||
|
etp_server_port=21
|
||||||
|
etp_server_username=
|
||||||
|
etp_server_password=
|
||||||
|
etp_server_welcome_message=
|
||||||
|
etp_server_log_file_name=
|
||||||
|
etp_server_logging_enabled=0
|
||||||
|
etp_server_log_max_size=4194304
|
||||||
|
etp_server_log_delta_size=524288
|
||||||
|
etp_server_allow_file_download=1
|
||||||
|
ftp_allow_port=1
|
||||||
|
ftp_check_data_connection_ip=1
|
||||||
|
http_server_enabled=0
|
||||||
|
http_server_bindings=
|
||||||
|
http_title_format=
|
||||||
|
http_server_port=80
|
||||||
|
http_server_username=
|
||||||
|
http_server_password=
|
||||||
|
http_server_home=
|
||||||
|
http_server_default_page=
|
||||||
|
http_server_log_file_name=
|
||||||
|
http_server_logging_enabled=0
|
||||||
|
http_server_log_max_size=4194304
|
||||||
|
http_server_log_delta_size=524288
|
||||||
|
http_server_allow_file_download=1
|
||||||
|
http_server_items_per_page=32
|
||||||
|
http_server_show_drive_labels=0
|
||||||
|
http_server_strings=
|
||||||
|
http_server_header=
|
||||||
|
service_pipe_name=
|
||||||
|
name_column_pos=0
|
||||||
|
name_column_width=256
|
||||||
|
path_column_visible=1
|
||||||
|
path_column_pos=1
|
||||||
|
path_column_width=256
|
||||||
|
size_column_visible=1
|
||||||
|
size_column_pos=2
|
||||||
|
size_column_width=96
|
||||||
|
extension_column_visible=0
|
||||||
|
extension_column_pos=3
|
||||||
|
extension_column_width=96
|
||||||
|
type_column_visible=0
|
||||||
|
type_column_pos=4
|
||||||
|
type_column_width=96
|
||||||
|
last_write_time_column_visible=1
|
||||||
|
last_write_time_column_pos=3
|
||||||
|
last_write_time_column_width=153
|
||||||
|
creation_time_column_visible=0
|
||||||
|
creation_time_column_pos=6
|
||||||
|
creation_time_column_width=153
|
||||||
|
date_accessed_column_visible=0
|
||||||
|
date_accessed_column_pos=7
|
||||||
|
date_accessed_column_width=153
|
||||||
|
attribute_column_visible=0
|
||||||
|
attribute_column_pos=8
|
||||||
|
attribute_column_width=70
|
||||||
|
date_recently_changed_column_visible=0
|
||||||
|
date_recently_changed_column_pos=9
|
||||||
|
date_recently_changed_column_width=153
|
||||||
|
run_count_column_visible=0
|
||||||
|
run_count_column_pos=10
|
||||||
|
run_count_column_width=96
|
||||||
|
date_run_column_visible=0
|
||||||
|
date_run_column_pos=11
|
||||||
|
date_run_column_width=153
|
||||||
|
file_list_filename_column_visible=0
|
||||||
|
file_list_filename_column_pos=12
|
||||||
|
file_list_filename_column_width=96
|
||||||
|
translucent_selection_rectangle_background_color=
|
||||||
|
translucent_selection_rectangle_border_color=
|
||||||
|
thumbnail_mouseover_border_color=
|
||||||
|
preview_background_color=
|
||||||
|
ntfs_volume_guids="\\\\?\\Volume{6afe1915-0a0b-4e59-96bc-666ff914ea4f}","\\\\?\\Volume{71be44cf-e03a-462f-a9c8-b53c16e002a4}"
|
||||||
|
ntfs_volume_paths="C:","D:"
|
||||||
|
ntfs_volume_roots="",""
|
||||||
|
ntfs_volume_includes=1,1
|
||||||
|
ntfs_volume_load_recent_changes=0,0
|
||||||
|
ntfs_volume_include_onlys="",""
|
||||||
|
ntfs_volume_monitors=1,1
|
||||||
|
refs_volume_guids=
|
||||||
|
refs_volume_paths=
|
||||||
|
refs_volume_roots=
|
||||||
|
refs_volume_includes=
|
||||||
|
refs_volume_load_recent_changes=
|
||||||
|
refs_volume_include_onlys=
|
||||||
|
refs_volume_monitors=
|
||||||
|
filelists=
|
||||||
|
filelist_monitor_changes=
|
||||||
|
folders=
|
||||||
|
folder_monitor_changes=
|
||||||
|
folder_buffer_size_list=
|
||||||
|
folder_rescan_if_full_list=
|
||||||
|
folder_update_types=
|
||||||
|
folder_update_days=
|
||||||
|
folder_update_ats=
|
||||||
|
folder_update_intervals=
|
||||||
|
folder_update_interval_types=
|
||||||
|
exclude_folders=
|
||||||
|
connect_history_hosts=
|
||||||
|
connect_history_ports=
|
||||||
|
connect_history_usernames=
|
||||||
|
connect_history_link_types=
|
||||||
|
etp_client_rewrite_patterns=
|
||||||
|
etp_client_rewrite_substitutions=
|
||||||
|
file_new_search_window_keys=334
|
||||||
|
file_open_file_list_keys=335
|
||||||
|
file_close_file_list_keys=
|
||||||
|
file_close_keys=343,27
|
||||||
|
file_export_keys=339
|
||||||
|
file_copy_full_name_to_clipboard_keys=9539
|
||||||
|
file_copy_path_to_clipboard_keys=
|
||||||
|
file_set_run_count_keys=
|
||||||
|
file_create_shortcut_keys=
|
||||||
|
file_delete_keys=8238
|
||||||
|
file_delete_permanently_keys=9262
|
||||||
|
file_edit_keys=
|
||||||
|
file_open_keys=8205
|
||||||
|
file_open_selection_and_close_everything_keys=
|
||||||
|
file_explore_path_keys=
|
||||||
|
file_open_new_keys=
|
||||||
|
file_open_path_keys=8461
|
||||||
|
file_open_with_keys=
|
||||||
|
file_open_with_default_verb_keys=
|
||||||
|
file_play_keys=
|
||||||
|
file_preview_keys=
|
||||||
|
file_print_keys=
|
||||||
|
file_print_to_keys=
|
||||||
|
file_properties_keys=8717
|
||||||
|
file_read_extended_information_keys=8517
|
||||||
|
file_rename_keys=8305
|
||||||
|
file_run_as_keys=
|
||||||
|
file_exit_keys=337
|
||||||
|
file_copy_name_to_clipboard_keys=
|
||||||
|
file_open_selection_and_do_not_close_everything_keys=
|
||||||
|
file_open_most_run_keys=
|
||||||
|
file_open_last_run_keys=
|
||||||
|
file_custom_verb_1_keys=
|
||||||
|
file_custom_verb_2_keys=
|
||||||
|
file_custom_verb_3_keys=
|
||||||
|
file_custom_verb_4_keys=
|
||||||
|
file_custom_verb_5_keys=
|
||||||
|
file_custom_verb_6_keys=
|
||||||
|
file_custom_verb_7_keys=
|
||||||
|
file_custom_verb_8_keys=
|
||||||
|
file_custom_verb_9_keys=
|
||||||
|
file_custom_verb_10_keys=
|
||||||
|
file_custom_verb_11_keys=
|
||||||
|
file_custom_verb_12_keys=
|
||||||
|
indexes_folders_rescan_all_now_keys=
|
||||||
|
indexes_force_rebuild_keys=
|
||||||
|
edit_cut_keys=8536
|
||||||
|
edit_copy_keys=8515,8493
|
||||||
|
edit_paste_keys=8534,9261
|
||||||
|
edit_select_all_keys=8513
|
||||||
|
edit_invert_selection_keys=
|
||||||
|
edit_copy_to_folder_keys=
|
||||||
|
edit_move_to_folder_keys=
|
||||||
|
edit_advanced_advanced_copy_to_folder_keys=
|
||||||
|
edit_advanced_advanced_move_to_folder_keys=
|
||||||
|
view_filters_keys=
|
||||||
|
view_preview_keys=592
|
||||||
|
view_status_bar_keys=
|
||||||
|
view_details_keys=1334
|
||||||
|
view_medium_thumbnails_keys=1331
|
||||||
|
view_large_thumbnails_keys=1330
|
||||||
|
view_extra_large_thumbnails_keys=1329
|
||||||
|
view_increase_thumbnail_size_keys=1467
|
||||||
|
view_decrease_thumbnail_size_keys=1469
|
||||||
|
view_window_size_small_keys=561
|
||||||
|
view_window_size_medium_keys=562
|
||||||
|
view_window_size_large_keys=563
|
||||||
|
view_window_size_auto_fit_keys=564
|
||||||
|
view_zoom_zoom_in_keys=443
|
||||||
|
view_zoom_zoom_out_keys=445
|
||||||
|
view_zoom_reset_keys=304,352
|
||||||
|
view_go_to_back_keys=549,166
|
||||||
|
view_go_to_forward_keys=551,167
|
||||||
|
view_go_to_home_keys=548
|
||||||
|
view_go_to_show_all_history_keys=1352,328
|
||||||
|
view_sort_by_name_keys=305
|
||||||
|
view_sort_by_path_keys=306
|
||||||
|
view_sort_by_size_keys=307
|
||||||
|
view_sort_by_extension_keys=308
|
||||||
|
view_sort_by_type_keys=309
|
||||||
|
view_sort_by_date_modified_keys=310
|
||||||
|
view_sort_by_date_created_keys=311
|
||||||
|
view_sort_by_attributes_keys=312
|
||||||
|
view_sort_by_file_list_filename_keys=
|
||||||
|
view_sort_by_run_count_keys=
|
||||||
|
view_sort_by_date_run_keys=
|
||||||
|
view_sort_by_date_recently_changed_keys=313
|
||||||
|
view_sort_by_date_accessed_keys=
|
||||||
|
view_sort_by_ascending_keys=
|
||||||
|
view_sort_by_descending_keys=
|
||||||
|
view_refresh_keys=116
|
||||||
|
view_fullscreen_keys=122
|
||||||
|
view_toggle_ltrrtl_direction_keys=
|
||||||
|
view_on_top_never_keys=
|
||||||
|
view_on_top_always_keys=
|
||||||
|
view_on_top_while_searching_keys=
|
||||||
|
search_match_case_keys=329
|
||||||
|
search_match_whole_word_keys=322
|
||||||
|
search_match_path_keys=341
|
||||||
|
search_match_diacritics_keys=333
|
||||||
|
search_enable_regex_keys=338
|
||||||
|
search_advanced_search_keys=
|
||||||
|
search_add_to_filters_keys=
|
||||||
|
search_organize_filters_keys=1350
|
||||||
|
bookmarks_add_to_bookmarks_keys=324
|
||||||
|
bookmarks_organize_bookmarks_keys=1346
|
||||||
|
tools_options_keys=336
|
||||||
|
tools_console_keys=448
|
||||||
|
tools_file_list_editor_keys=
|
||||||
|
tools_connect_to_etp_server_keys=
|
||||||
|
tools_disconnect_from_etp_server_keys=
|
||||||
|
help_everything_help_keys=112
|
||||||
|
help_search_syntax_keys=
|
||||||
|
help_regex_syntax_keys=
|
||||||
|
help_command_line_options_keys=
|
||||||
|
help_everything_website_keys=
|
||||||
|
help_check_for_updates_keys=
|
||||||
|
help_about_everything_keys=368
|
||||||
|
help_donate_keys=
|
||||||
|
search_edit_focus_search_edit_keys=326,114,580
|
||||||
|
search_edit_delete_previous_word_keys=4360
|
||||||
|
search_edit_auto_complete_search_keys=4384
|
||||||
|
search_edit_show_search_history_keys=
|
||||||
|
search_edit_show_all_search_history_keys=4646,4648
|
||||||
|
result_list_item_up_keys=8230,4134
|
||||||
|
result_list_item_down_keys=8232,4136
|
||||||
|
result_list_page_up_keys=8225,4129
|
||||||
|
result_list_page_down_keys=8226,4130
|
||||||
|
result_list_start_of_list_keys=8228
|
||||||
|
result_list_end_of_list_keys=8227
|
||||||
|
result_list_item_up_extend_keys=9254,5158
|
||||||
|
result_list_item_down_extend_keys=9256,5160
|
||||||
|
result_list_page_up_extend_keys=9249,5153
|
||||||
|
result_list_page_down_extend_keys=9250,5154
|
||||||
|
result_list_start_of_list_extend_keys=9252
|
||||||
|
result_list_end_of_list_extend_keys=9251
|
||||||
|
result_list_focus_up_keys=8486,4390
|
||||||
|
result_list_focus_down_keys=8488,4392
|
||||||
|
result_list_focus_page_up_keys=8481,4385
|
||||||
|
result_list_focus_page_down_keys=8482,4386
|
||||||
|
result_list_focus_start_of_list_keys=8484
|
||||||
|
result_list_focus_end_of_list_keys=8483
|
||||||
|
result_list_focus_up_extend_keys=9510,5414
|
||||||
|
result_list_focus_down_extend_keys=9512,5416
|
||||||
|
result_list_focus_page_up_extend_keys=9505,5409
|
||||||
|
result_list_focus_page_down_extend_keys=9506,5410
|
||||||
|
result_list_focus_start_of_list_extend_keys=9508
|
||||||
|
result_list_focus_end_of_list_extend_keys=9507
|
||||||
|
result_list_focus_result_list_keys=
|
||||||
|
result_list_focus_highest_run_count_result_keys=
|
||||||
|
result_list_focus_last_run_result_keys=
|
||||||
|
result_list_toggle_path_column_keys=
|
||||||
|
result_list_toggle_size_column_keys=
|
||||||
|
result_list_toggle_extension_column_keys=
|
||||||
|
result_list_toggle_type_column_keys=
|
||||||
|
result_list_toggle_date_modified_column_keys=
|
||||||
|
result_list_toggle_date_created_column_keys=
|
||||||
|
result_list_toggle_attributes_column_keys=
|
||||||
|
result_list_toggle_file_list_filename_column_keys=
|
||||||
|
result_list_toggle_run_count_column_keys=
|
||||||
|
result_list_toggle_date_recently_changed_column_keys=
|
||||||
|
result_list_toggle_date_accessed_column_keys=
|
||||||
|
result_list_toggle_date_run_column_keys=
|
||||||
|
result_list_size_all_columns_to_fit_keys=8555
|
||||||
|
result_list_size_result_list_to_fit_keys=
|
||||||
|
result_list_context_menu_keys=9337
|
||||||
|
result_list_scroll_left_or_thumbnail_left_keys=8229
|
||||||
|
result_list_scroll_right_or_thumbnail_right_keys=8231
|
||||||
|
result_list_scroll_page_left_or_thumbnail_focus_left_keys=8485
|
||||||
|
result_list_scroll_page_right_or_thumbnail_focus_right_keys=8487
|
||||||
|
result_list_left_extend_keys=9253
|
||||||
|
result_list_right_extend_keys=9255
|
||||||
|
result_list_focus_left_extend_keys=9509
|
||||||
|
result_list_focus_right_extend_keys=9511
|
||||||
|
result_list_select_focus_keys=8224
|
||||||
|
result_list_toggle_focus_selection_keys=8480
|
||||||
|
result_list_copy_as_csv_keys=
|
||||||
|
preview_focus_preview_keys=
|
||||||
|
result_list_font=
|
||||||
|
result_list_font_size=
|
||||||
|
search_edit_font=
|
||||||
|
search_edit_font_size=
|
||||||
|
status_bar_font=
|
||||||
|
status_bar_font_size=
|
||||||
|
header_font=
|
||||||
|
header_font_size=
|
||||||
|
normal_background_color=
|
||||||
|
normal_foreground_color=
|
||||||
|
normal_bold=
|
||||||
|
highlighted_background_color=
|
||||||
|
highlighted_foreground_color=
|
||||||
|
highlighted_bold=
|
||||||
|
current_sort_background_color=
|
||||||
|
current_sort_foreground_color=
|
||||||
|
current_sort_bold=
|
||||||
|
current_sort_highlighted_background_color=
|
||||||
|
current_sort_highlighted_foreground_color=
|
||||||
|
current_sort_highlighted_bold=
|
||||||
|
selected_background_color=
|
||||||
|
selected_foreground_color=
|
||||||
|
selected_bold=
|
||||||
|
selected_highlighted_background_color=
|
||||||
|
selected_highlighted_foreground_color=
|
||||||
|
selected_highlighted_bold=
|
||||||
|
selected_inactive_background_color=
|
||||||
|
selected_inactive_foreground_color=
|
||||||
|
selected_inactive_bold=
|
||||||
|
selected_inactive_highlighted_background_color=
|
||||||
|
selected_inactive_highlighted_foreground_color=
|
||||||
|
selected_inactive_highlighted_bold=
|
||||||
|
drop_target_background_color=
|
||||||
|
drop_target_foreground_color=
|
||||||
|
drop_target_bold=
|
||||||
|
drop_target_highlighted_background_color=
|
||||||
|
drop_target_highlighted_foreground_color=
|
||||||
|
drop_target_highlighted_bold=
|
||||||
|
mouseover_background_color=
|
||||||
|
mouseover_foreground_color=
|
||||||
|
mouseover_bold=
|
||||||
|
mouseover_highlighted_background_color=
|
||||||
|
mouseover_highlighted_foreground_color=
|
||||||
|
mouseover_highlighted_bold=
|
||||||
|
mouseover_current_sort_background_color=
|
||||||
|
mouseover_current_sort_foreground_color=
|
||||||
|
mouseover_current_sort_bold=
|
||||||
|
mouseover_current_sort_highlighted_background_color=
|
||||||
|
mouseover_current_sort_highlighted_foreground_color=
|
||||||
|
mouseover_current_sort_highlighted_bold=
|
||||||
|
alternate_row_background_color=
|
||||||
|
alternate_row_foreground_color=
|
||||||
|
alternate_row_bold=
|
||||||
|
alternate_row_highlighted_background_color=
|
||||||
|
alternate_row_highlighted_foreground_color=
|
||||||
|
alternate_row_highlighted_bold=
|
||||||
|
current_sort_alternate_row_background_color=
|
||||||
|
current_sort_alternate_row_foreground_color=
|
||||||
|
current_sort_alternate_row_bold=
|
||||||
|
current_sort_alternate_row_highlighted_background_color=
|
||||||
|
current_sort_alternate_row_highlighted_foreground_color=
|
||||||
|
current_sort_alternate_row_highlighted_bold=
|
||||||
|
hot_background_color=
|
||||||
|
hot_foreground_color=
|
||||||
|
hot_bold=
|
||||||
|
hot_highlighted_background_color=
|
||||||
|
hot_highlighted_foreground_color=
|
||||||
|
hot_highlighted_bold=
|
||||||
|
selected_hot_background_color=
|
||||||
|
selected_hot_foreground_color=
|
||||||
|
selected_hot_bold=
|
||||||
|
selected_hot_highlighted_background_color=
|
||||||
|
selected_hot_highlighted_foreground_color=
|
||||||
|
selected_hot_highlighted_bold=
|
||||||
|
selected_inactive_hot_background_color=
|
||||||
|
selected_inactive_hot_foreground_color=
|
||||||
|
selected_inactive_hot_bold=
|
||||||
|
selected_inactive_hot_highlighted_background_color=
|
||||||
|
selected_inactive_hot_highlighted_foreground_color=
|
||||||
|
selected_inactive_hot_highlighted_bold=
|
||||||
|
thumbnail_mouseover_background_color=
|
||||||
|
thumbnail_mouseover_foreground_color=
|
||||||
|
thumbnail_mouseover_bold=
|
||||||
|
thumbnail_mouseover_highlighted_background_color=
|
||||||
|
thumbnail_mouseover_highlighted_foreground_color=
|
||||||
|
thumbnail_mouseover_highlighted_bold=
|
||||||
BIN
Plugins/EveryThing/64/Everything.lng
Normal file
BIN
Plugins/EveryThing/64/Everything.lng
Normal file
Binary file not shown.
66
Plugins/EveryThing/Constant/EveryThingConst.cs
Normal file
66
Plugins/EveryThing/Constant/EveryThingConst.cs
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Plugins.EveryThing.Constant
|
||||||
|
{
|
||||||
|
public class EveryThingConst
|
||||||
|
{
|
||||||
|
|
||||||
|
public const int EVERYTHING_OK = 0;
|
||||||
|
public const int EVERYTHING_ERROR_MEMORY = 1;
|
||||||
|
public const int EVERYTHING_ERROR_IPC = 2;
|
||||||
|
public const int EVERYTHING_ERROR_REGISTERCLASSEX = 3;
|
||||||
|
public const int EVERYTHING_ERROR_CREATEWINDOW = 4;
|
||||||
|
public const int EVERYTHING_ERROR_CREATETHREAD = 5;
|
||||||
|
public const int EVERYTHING_ERROR_INVALIDINDEX = 6;
|
||||||
|
public const int EVERYTHING_ERROR_INVALIDCALL = 7;
|
||||||
|
public const int EVERYTHING_REQUEST_FILE_NAME = 0x00000001;
|
||||||
|
public const int EVERYTHING_REQUEST_PATH = 0x00000002;
|
||||||
|
public const int EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME = 0x00000004;
|
||||||
|
public const int EVERYTHING_REQUEST_EXTENSION = 0x00000008;
|
||||||
|
public const int EVERYTHING_REQUEST_SIZE = 0x00000010;
|
||||||
|
public const int EVERYTHING_REQUEST_DATE_CREATED = 0x00000020;
|
||||||
|
public const int EVERYTHING_REQUEST_DATE_MODIFIED = 0x00000040;
|
||||||
|
public const int EVERYTHING_REQUEST_DATE_ACCESSED = 0x00000080;
|
||||||
|
public const int EVERYTHING_REQUEST_ATTRIBUTES = 0x00000100;
|
||||||
|
public const int EVERYTHING_REQUEST_FILE_LIST_FILE_NAME = 0x00000200;
|
||||||
|
public const int EVERYTHING_REQUEST_RUN_COUNT = 0x00000400;
|
||||||
|
public const int EVERYTHING_REQUEST_DATE_RUN = 0x00000800;
|
||||||
|
public const int EVERYTHING_REQUEST_DATE_RECENTLY_CHANGED = 0x00001000;
|
||||||
|
public const int EVERYTHING_REQUEST_HIGHLIGHTED_FILE_NAME = 0x00002000;
|
||||||
|
public const int EVERYTHING_REQUEST_HIGHLIGHTED_PATH = 0x00004000;
|
||||||
|
public const int EVERYTHING_REQUEST_HIGHLIGHTED_FULL_PATH_AND_FILE_NAME = 0x00008000;
|
||||||
|
public const int EVERYTHING_SORT_NAME_ASCENDING = 1;
|
||||||
|
public const int EVERYTHING_SORT_NAME_DESCENDING = 2;
|
||||||
|
public const int EVERYTHING_SORT_PATH_ASCENDING = 3;
|
||||||
|
public const int EVERYTHING_SORT_PATH_DESCENDING = 4;
|
||||||
|
public const int EVERYTHING_SORT_SIZE_ASCENDING = 5;
|
||||||
|
public const int EVERYTHING_SORT_SIZE_DESCENDING = 6;
|
||||||
|
public const int EVERYTHING_SORT_EXTENSION_ASCENDING = 7;
|
||||||
|
public const int EVERYTHING_SORT_EXTENSION_DESCENDING = 8;
|
||||||
|
public const int EVERYTHING_SORT_TYPE_NAME_ASCENDING = 9;
|
||||||
|
public const int EVERYTHING_SORT_TYPE_NAME_DESCENDING = 10;
|
||||||
|
public const int EVERYTHING_SORT_DATE_CREATED_ASCENDING = 11;
|
||||||
|
public const int EVERYTHING_SORT_DATE_CREATED_DESCENDING = 12;
|
||||||
|
public const int EVERYTHING_SORT_DATE_MODIFIED_ASCENDING = 13;
|
||||||
|
public const int EVERYTHING_SORT_DATE_MODIFIED_DESCENDING = 14;
|
||||||
|
public const int EVERYTHING_SORT_ATTRIBUTES_ASCENDING = 15;
|
||||||
|
public const int EVERYTHING_SORT_ATTRIBUTES_DESCENDING = 16;
|
||||||
|
public const int EVERYTHING_SORT_FILE_LIST_FILENAME_ASCENDING = 17;
|
||||||
|
public const int EVERYTHING_SORT_FILE_LIST_FILENAME_DESCENDING = 18;
|
||||||
|
public const int EVERYTHING_SORT_RUN_COUNT_ASCENDING = 19;
|
||||||
|
public const int EVERYTHING_SORT_RUN_COUNT_DESCENDING = 20;
|
||||||
|
public const int EVERYTHING_SORT_DATE_RECENTLY_CHANGED_ASCENDING = 21;
|
||||||
|
public const int EVERYTHING_SORT_DATE_RECENTLY_CHANGED_DESCENDING = 22;
|
||||||
|
public const int EVERYTHING_SORT_DATE_ACCESSED_ASCENDING = 23;
|
||||||
|
public const int EVERYTHING_SORT_DATE_ACCESSED_DESCENDING = 24;
|
||||||
|
public const int EVERYTHING_SORT_DATE_RUN_ASCENDING = 25;
|
||||||
|
public const int EVERYTHING_SORT_DATE_RUN_DESCENDING = 26;
|
||||||
|
public const int EVERYTHING_TARGET_MACHINE_X86 = 1;
|
||||||
|
public const int EVERYTHING_TARGET_MACHINE_X64 = 2;
|
||||||
|
public const int EVERYTHING_TARGET_MACHINE_ARM = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
126
Plugins/EveryThing/EveryThing32.cs
Normal file
126
Plugins/EveryThing/EveryThing32.cs
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Plugins.EveryThing
|
||||||
|
{
|
||||||
|
public class EveryThing32
|
||||||
|
{
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern UInt32 Everything_SetSearchW(string lpSearchString);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetMatchPath(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetMatchCase(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetMatchWholeWord(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetRegex(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetMax(UInt32 dwMax);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetOffset(UInt32 dwOffset);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetMatchPath();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetMatchCase();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetMatchWholeWord();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetRegex();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetMax();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetOffset();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern IntPtr Everything_GetSearchW();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetLastError();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_Query(bool bWait);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SortResultsByPath();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumFileResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumFolderResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotFileResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotFolderResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_IsVolumeResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_IsFolderResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_IsFileResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern void Everything_GetResultFullPathName(UInt32 nIndex, StringBuilder lpString, UInt32 nMaxCount);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_Reset();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultFileName(UInt32 nIndex);
|
||||||
|
|
||||||
|
// Everything 1.4
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetSort(UInt32 dwSortType);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetSort();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultListSort();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern void Everything_SetRequestFlags(UInt32 dwRequestFlags);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetRequestFlags();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultListRequestFlags();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultExtension(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultSize(UInt32 nIndex, out long lpFileSize);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateCreated(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateModified(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateAccessed(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultAttributes(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultFileListFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultRunCount(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateRun(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateRecentlyChanged(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedPath(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedFullPathAndFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_GetRunCountFromFileName(string lpFileName);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_SetRunCountFromFileName(string lpFileName, UInt32 dwRunCount);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern UInt32 Everything_IncRunCountFromFileName(string lpFileName);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
|
||||||
|
public static extern bool Everything_Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
126
Plugins/EveryThing/EveryThing64.cs
Normal file
126
Plugins/EveryThing/EveryThing64.cs
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Plugins.EveryThing
|
||||||
|
{
|
||||||
|
public class EveryThing64
|
||||||
|
{
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern UInt32 Everything_SetSearchW(string lpSearchString);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetMatchPath(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetMatchCase(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetMatchWholeWord(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetRegex(bool bEnable);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetMax(UInt32 dwMax);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetOffset(UInt32 dwOffset);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetMatchPath();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetMatchCase();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetMatchWholeWord();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetRegex();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetMax();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetOffset();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern IntPtr Everything_GetSearchW();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetLastError();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_Query(bool bWait);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SortResultsByPath();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumFileResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumFolderResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetNumResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotFileResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotFolderResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetTotResults();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_IsVolumeResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_IsFolderResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_IsFileResult(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern void Everything_GetResultFullPathName(UInt32 nIndex, StringBuilder lpString, UInt32 nMaxCount);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_Reset();
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultFileName(UInt32 nIndex);
|
||||||
|
|
||||||
|
// Everything 1.4
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetSort(UInt32 dwSortType);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetSort();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultListSort();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern void Everything_SetRequestFlags(UInt32 dwRequestFlags);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetRequestFlags();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultListRequestFlags();
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultExtension(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultSize(UInt32 nIndex, out long lpFileSize);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateCreated(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateModified(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateAccessed(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultAttributes(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultFileListFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetResultRunCount(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateRun(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_GetResultDateRecentlyChanged(UInt32 nIndex, out long lpFileTime);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedPath(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll", CharSet = CharSet.Unicode)]
|
||||||
|
public static extern IntPtr Everything_GetResultHighlightedFullPathAndFileName(UInt32 nIndex);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_GetRunCountFromFileName(string lpFileName);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_SetRunCountFromFileName(string lpFileName, UInt32 dwRunCount);
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern UInt32 Everything_IncRunCountFromFileName(string lpFileName);
|
||||||
|
|
||||||
|
[DllImport(@"lib\Plugins\EveryThing\lib\Everything64.dll")]
|
||||||
|
public static extern bool Everything_Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
347
Plugins/EveryThing/EveryThingUtil.cs
Normal file
347
Plugins/EveryThing/EveryThingUtil.cs
Normal file
@@ -0,0 +1,347 @@
|
|||||||
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.Plugins.EveryThing.Constant;
|
||||||
|
using GeekDesk.Util;
|
||||||
|
using GeekDesk.ViewModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Configuration.Install;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.ServiceProcess;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Plugins.EveryThing
|
||||||
|
{
|
||||||
|
|
||||||
|
public class EveryThingUtil
|
||||||
|
{
|
||||||
|
|
||||||
|
//每次加载20条
|
||||||
|
private static long pageCount = 20;
|
||||||
|
private static UInt32 ui = 0;
|
||||||
|
|
||||||
|
public static void EnableEveryThing(int delayTime = 2000)
|
||||||
|
{
|
||||||
|
string pluginsPath = Constants.PLUGINS_PATH;
|
||||||
|
|
||||||
|
bool Is64Bit = Environment.Is64BitOperatingSystem;
|
||||||
|
string everyThingPath = pluginsPath + "/EveryThing/" + (Is64Bit ? 64 : 32) + "/EveryThing.exe";
|
||||||
|
string installUtilPath = "C:\\Windows\\Microsoft.NET\\Framework"+ (Is64Bit ? "64" : "") + "\\v4.0.30319\\InstallUtil.exe";
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Thread.Sleep(delayTime);
|
||||||
|
|
||||||
|
//判断EveryThing服务是否存在
|
||||||
|
ServiceController sc = GetService("Everything");
|
||||||
|
if (sc != null)
|
||||||
|
{
|
||||||
|
//判断是否启动
|
||||||
|
if (sc.Status != ServiceControllerStatus.StartPending
|
||||||
|
&& sc.Status != ServiceControllerStatus.Running)
|
||||||
|
{
|
||||||
|
//启动服务
|
||||||
|
EveryThingService(ServiceType.START);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
//安装服务
|
||||||
|
EveryThingService(ServiceType.INSTALL);
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(2000);
|
||||||
|
|
||||||
|
if (GetService("Everything") != null)
|
||||||
|
{
|
||||||
|
//启动程序
|
||||||
|
Process exeProcess = new Process();
|
||||||
|
exeProcess.StartInfo.FileName = everyThingPath;
|
||||||
|
exeProcess.Start();
|
||||||
|
int waitTime = 5000;
|
||||||
|
while (true && waitTime > 0)
|
||||||
|
{
|
||||||
|
Thread.Sleep(100);
|
||||||
|
waitTime -= 100;
|
||||||
|
exeProcess.CloseMainWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}).Start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ServiceType
|
||||||
|
{
|
||||||
|
START,
|
||||||
|
STOP,
|
||||||
|
INSTALL,
|
||||||
|
UNINSTALL
|
||||||
|
}
|
||||||
|
private static void EveryThingService(ServiceType type)
|
||||||
|
{
|
||||||
|
string pluginsPath = Constants.PLUGINS_PATH;
|
||||||
|
bool Is64Bit = Environment.Is64BitOperatingSystem;
|
||||||
|
string everyThingPath = pluginsPath + "/EveryThing/" + (Is64Bit ? 64 : 32) + "/EveryThing.exe";
|
||||||
|
|
||||||
|
Process p = new Process();
|
||||||
|
p.StartInfo.FileName = everyThingPath;
|
||||||
|
string arg;
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
p.StartInfo.Verb = "runas";
|
||||||
|
arg = "-start-service";
|
||||||
|
break;
|
||||||
|
case ServiceType.STOP:
|
||||||
|
arg = "-stop-service";
|
||||||
|
break;
|
||||||
|
case ServiceType.INSTALL:
|
||||||
|
p.StartInfo.Verb = "runas";
|
||||||
|
arg = "-install-service";
|
||||||
|
break;
|
||||||
|
case ServiceType.UNINSTALL:
|
||||||
|
arg = "-uninstall-service";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
p.StartInfo.Arguments = arg;
|
||||||
|
p.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static ServiceController GetService(string serviceName)
|
||||||
|
{
|
||||||
|
ServiceController[] services = ServiceController.GetServices();
|
||||||
|
foreach (ServiceController s in services)
|
||||||
|
{
|
||||||
|
if (s.ServiceName.ToLower().Equals(serviceName.ToLower()))
|
||||||
|
{
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void DisableEveryThing(bool uninstall = false)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
EveryThing64.Everything_Exit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThing32.Everything_Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) { }
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (GetService("Everything") != null)
|
||||||
|
{
|
||||||
|
if (uninstall)
|
||||||
|
{
|
||||||
|
EveryThingService(ServiceType.UNINSTALL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThingService(ServiceType.STOP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static bool HasNext()
|
||||||
|
{
|
||||||
|
return ui < Everything_GetNumResults();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static ObservableCollection<IconInfo> Search(string text)
|
||||||
|
{
|
||||||
|
ui = 0;
|
||||||
|
//EveryThing全盘搜索
|
||||||
|
Everything_Reset();
|
||||||
|
EveryThingUtil.Everything_SetSearchW(text);
|
||||||
|
EveryThingUtil.Everything_SetRequestFlags(
|
||||||
|
EveryThingConst.EVERYTHING_REQUEST_FILE_NAME
|
||||||
|
| EveryThingConst.EVERYTHING_REQUEST_PATH
|
||||||
|
| EveryThingConst.EVERYTHING_REQUEST_DATE_MODIFIED
|
||||||
|
| EveryThingConst.EVERYTHING_REQUEST_SIZE);
|
||||||
|
EveryThingUtil.Everything_SetSort(
|
||||||
|
EveryThingConst.EVERYTHING_SORT_TYPE_NAME_DESCENDING
|
||||||
|
| EveryThingConst.EVERYTHING_SORT_RUN_COUNT_DESCENDING
|
||||||
|
| EveryThingConst.EVERYTHING_SORT_DATE_MODIFIED_DESCENDING
|
||||||
|
);
|
||||||
|
EveryThingUtil.Everything_Query(true);
|
||||||
|
return NextPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObservableCollection<IconInfo> NextPage()
|
||||||
|
{
|
||||||
|
if (ui == 0)
|
||||||
|
{
|
||||||
|
pageCount = 40;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
pageCount = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
string filePath;
|
||||||
|
const int bufsize = 260;
|
||||||
|
StringBuilder buf = new StringBuilder(bufsize);
|
||||||
|
ObservableCollection<IconInfo> iconBakList = new ObservableCollection<IconInfo>();
|
||||||
|
for (long count = 0; ui < Everything_GetNumResults() && count < pageCount; count++, ui++)
|
||||||
|
{
|
||||||
|
buf.Clear();
|
||||||
|
EveryThingUtil.Everything_GetResultFullPathName(ui, buf, bufsize);
|
||||||
|
filePath = buf.ToString();
|
||||||
|
|
||||||
|
string tempPath = filePath;
|
||||||
|
|
||||||
|
string ext = "";
|
||||||
|
if (!ImageUtil.IsSystemItem(filePath))
|
||||||
|
{
|
||||||
|
ext = System.IO.Path.GetExtension(filePath).ToLower();
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (".lnk".Equals(ext))
|
||||||
|
//{
|
||||||
|
|
||||||
|
// string targetPath = FileUtil.GetTargetPathByLnk(filePath);
|
||||||
|
// if (targetPath != null)
|
||||||
|
// {
|
||||||
|
// filePath = targetPath;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
string name = System.IO.Path.GetFileNameWithoutExtension(tempPath);
|
||||||
|
if (string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(tempPath))
|
||||||
|
{
|
||||||
|
name = tempPath.Substring(tempPath.LastIndexOf("\\"));
|
||||||
|
}
|
||||||
|
|
||||||
|
IconInfo iconInfo = new IconInfo
|
||||||
|
{
|
||||||
|
Path_NoWrite = filePath,
|
||||||
|
LnkPath_NoWrite = tempPath,
|
||||||
|
BitmapImage_NoWrite = ImageUtil.GetBitmapIconByUnknownPath(filePath),
|
||||||
|
StartArg_NoWrite = FileUtil.GetArgByLnk(tempPath),
|
||||||
|
Name_NoWrite = name,
|
||||||
|
};
|
||||||
|
|
||||||
|
//缓存信息 异步加载图标
|
||||||
|
iconBakList.Add(iconInfo);
|
||||||
|
}
|
||||||
|
return iconBakList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static UInt32 Everything_SetSearchW(string lpSearchString)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
return EveryThing64.Everything_SetSearchW(lpSearchString);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return EveryThing32.Everything_SetSearchW(lpSearchString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Everything_SetRequestFlags(UInt32 dwRequestFlags)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
EveryThing64.Everything_SetRequestFlags(dwRequestFlags);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThing32.Everything_SetRequestFlags(dwRequestFlags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Everything_SetSort(UInt32 dwSortType)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
EveryThing64.Everything_SetSort(dwSortType);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThing32.Everything_SetSort(dwSortType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool Everything_Query(bool bWait)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
return EveryThing64.Everything_Query(bWait);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return EveryThing32.Everything_Query(bWait);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static UInt32 Everything_GetNumResults()
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
return EveryThing64.Everything_GetNumResults();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return EveryThing32.Everything_GetNumResults();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void Everything_GetResultFullPathName(UInt32 nIndex, StringBuilder lpString, UInt32 nMaxCount)
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
EveryThing64.Everything_GetResultFullPathName(nIndex, lpString, nMaxCount);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThing32.Everything_GetResultFullPathName(nIndex, lpString, nMaxCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Everything_Reset()
|
||||||
|
{
|
||||||
|
if (Environment.Is64BitOperatingSystem)
|
||||||
|
{
|
||||||
|
EveryThing64.Everything_Reset();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EveryThing32.Everything_Reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Plugins/EveryThing/lib/Everything32.dll
Normal file
BIN
Plugins/EveryThing/lib/Everything32.dll
Normal file
Binary file not shown.
BIN
Plugins/EveryThing/lib/Everything64.dll
Normal file
BIN
Plugins/EveryThing/lib/Everything64.dll
Normal file
Binary file not shown.
39
Plugins/ShowSeconds/Common/Constants.cs
Normal file
39
Plugins/ShowSeconds/Common/Constants.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
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),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +1,19 @@
|
|||||||
<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="ShowSeconds_Main_8400A17AEEF7C029"
|
Title=""
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="Transparent"
|
Background="Transparent" ShowInTaskbar="False"
|
||||||
ShowInTaskbar="False"
|
Focusable="True"
|
||||||
Focusable="True"
|
|
||||||
Loaded="Window_Loaded"
|
Loaded="Window_Loaded"
|
||||||
ShowActivated="False"
|
>
|
||||||
>
|
|
||||||
|
|
||||||
<Grid Margin="20">
|
<Grid Margin="20">
|
||||||
<Grid.Effect>
|
<Grid.Effect>
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
using GeekDesk;
|
using GeekDesk.Util;
|
||||||
using GeekDesk.MyThread;
|
using Gma.System.MouseKeyHook;
|
||||||
|
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;
|
||||||
@@ -18,11 +17,14 @@ 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.Interop;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
using GeekDesk.MyThread;
|
||||||
|
using GeekDesk;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
namespace ShowSeconds
|
namespace ShowSeconds
|
||||||
{
|
{
|
||||||
@@ -32,40 +34,15 @@ namespace ShowSeconds
|
|||||||
public partial class SecondsWindow : Window
|
public partial class SecondsWindow : Window
|
||||||
{
|
{
|
||||||
|
|
||||||
private static Color beforeColor;
|
private System.Drawing.Color beforeColor;
|
||||||
private static Color topBeforeColor;
|
private System.Drawing.Color topBeforeColor;
|
||||||
|
|
||||||
//dark theam
|
private bool expandClock = true; //是否展开时钟
|
||||||
private readonly static System.Windows.Media.SolidColorBrush darkBG
|
private System.Windows.Forms.Timer timer;
|
||||||
= 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 = 800;
|
private static int sleepTime = 1000;
|
||||||
public SecondsWindow()
|
public SecondsWindow()
|
||||||
{
|
{
|
||||||
SecondsDataContext dc = new SecondsDataContext
|
SecondsDataContext dc = new SecondsDataContext
|
||||||
@@ -74,9 +51,16 @@ 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"]);
|
||||||
@@ -87,157 +71,34 @@ namespace ShowSeconds
|
|||||||
{
|
{
|
||||||
lProportion = 0.82;
|
lProportion = 0.82;
|
||||||
tProportion = 0.03;
|
tProportion = 0.03;
|
||||||
sleepTime = 800;
|
sleepTime = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitializeComponent();
|
BGBorder.Background = scb;
|
||||||
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() + ":" +
|
||||||
@@ -245,11 +106,10 @@ 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)
|
||||||
@@ -262,57 +122,186 @@ namespace ShowSeconds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Color GetBottomBeforeColor()
|
private void SecondsHookSetFuc(object sender, MouseEventExtArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (e.Button == System.Windows.Forms.MouseButtons.Left)
|
||||||
|
{
|
||||||
|
if (ScreenUtil.IsPrimaryFullScreen()) return;
|
||||||
|
|
||||||
|
App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e1) { }
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 Color GetTopBeforeColor()
|
private static System.Drawing.Color GetTopBeforeColor()
|
||||||
{
|
{
|
||||||
return GetColor(1751, 693);
|
return GetColor(1751, 693);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Color GetColor(int w2, int h2)
|
private static System.Drawing.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;
|
||||||
double scale = ScreenUtil.GetScreenScalingFactor();
|
System.Drawing.Point p = new System.Drawing.Point((int)(w2 / w * width), (int)(h2 / h * height));
|
||||||
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
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)
|
private static int CalculateLight(System.Drawing.Color color)
|
||||||
{
|
{
|
||||||
if (msg == MessageUtil.WM_COPYDATA)
|
int[] colorArr = new int[] { color.R, color.G, color.B };
|
||||||
{
|
|
||||||
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;
|
||||||
@@ -325,43 +314,5 @@ 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">设备上下文环境被检索的窗口的句柄,如果该值为NULL,GetDC则检索整个屏幕的设备上下文环境。</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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
//通过使用 "*",如下所示:
|
//通过使用 "*",如下所示:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.5.1.0")]
|
[assembly: AssemblyVersion("2.5.1.3")]
|
||||||
[assembly: AssemblyFileVersion("2.5.1.0")]
|
[assembly: AssemblyFileVersion("2.5.1.3")]
|
||||||
|
|||||||
@@ -19,15 +19,15 @@
|
|||||||
</Style.Setters>
|
</Style.Setters>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<LinearGradientBrush x:Key="BtnBG" Opacity="0.97">
|
<LinearGradientBrush x:Key="BtnBG" Opacity="0.7">
|
||||||
<GradientStop Color="White" Offset="0"/>
|
<GradientStop Color="White" Offset="0"/>
|
||||||
<GradientStop Color="White" Offset="1"/>
|
<GradientStop Color="White" Offset="1"/>
|
||||||
</LinearGradientBrush>
|
</LinearGradientBrush>
|
||||||
|
|
||||||
<!--按钮样式-->
|
<!--按钮样式-->
|
||||||
<Style x:Key="Btn1" TargetType="Button" BasedOn="{StaticResource ButtonInfo}">
|
<Style x:Key="MyBtnStyle" TargetType="Button" BasedOn="{StaticResource ButtonInfo}">
|
||||||
<Setter Property="Background" Value="{StaticResource BtnBG}"/>
|
<Setter Property="Background" Value="{StaticResource BtnBG}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
<Setter Property="BorderBrush">
|
<Setter Property="BorderBrush">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<SolidColorBrush Color="#E5E5E2"/>
|
<SolidColorBrush Color="#E5E5E2"/>
|
||||||
@@ -36,7 +36,50 @@
|
|||||||
<Setter Property="Foreground" Value="Black"/>
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" Value="#E5E5E2"/>
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<LinearGradientBrush Opacity="1">
|
||||||
|
<GradientStop Color="White" Offset="0"/>
|
||||||
|
<GradientStop Color="White" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Opacity" Value="1"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<!--CheckBox样式-->
|
||||||
|
<Style x:Key="MyCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource CheckBoxBaseStyle}">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.6">
|
||||||
|
<GradientStop Color="#FF9EA3A6"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.6">
|
||||||
|
<GradientStop Color="#FF9EA3A6"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0" Opacity="0.7">
|
||||||
|
<GradientStop Color="#FF9EA3A6"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -57,4 +100,40 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--radio btn style-->
|
||||||
|
<Style x:Key="MyRadioBtnStyle" TargetType="RadioButton" BasedOn="{StaticResource RadioButtonIcon}">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.7"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="1"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
|
<!--text box style-->
|
||||||
|
<Style x:Key="MyTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource TextBoxBaseStyle}">
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.7"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 101 KiB |
31
Task/ShowSecondTask.cs
Normal file
31
Task/ShowSecondTask.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,18 +34,22 @@ namespace GeekDesk.Task
|
|||||||
{
|
{
|
||||||
App.Current.Dispatcher.Invoke((Action)(() =>
|
App.Current.Dispatcher.Invoke((Action)(() =>
|
||||||
{
|
{
|
||||||
if (MainWindow.appData.ToDoList.Count > 0)
|
try
|
||||||
{
|
{
|
||||||
string nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
if (MainWindow.appData.ToDoList.Count > 0)
|
||||||
ObservableCollection<ToDoInfo> exeBacklogList = MainWindow.appData.ToDoList;
|
|
||||||
foreach (ToDoInfo info in exeBacklogList)
|
|
||||||
{
|
{
|
||||||
if (info.ExeTime.CompareTo(nowTime) == -1 && !activityBacklog.ContainsKey(info))
|
string nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
ObservableCollection<ToDoInfo> exeBacklogList = MainWindow.appData.ToDoList;
|
||||||
|
foreach (ToDoInfo info in exeBacklogList)
|
||||||
{
|
{
|
||||||
activityBacklog.Add(info, Notification.Show(new BacklogNotificatin(info), ShowAnimation.Fade, true));
|
if (info.ExeTime.CompareTo(nowTime) == -1 && !activityBacklog.ContainsKey(info))
|
||||||
|
{
|
||||||
|
activityBacklog.Add(info, Notification.Show(new BacklogNotificatin(info), ShowAnimation.Fade, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e1) { }
|
||||||
//ClearMemory();
|
//ClearMemory();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -60,7 +64,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 内存回收
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"title": "GeekDesk版本更新",
|
"title": "GeekDesk版本更新",
|
||||||
"subTitle": "V2.5.12",
|
"subTitle": "V2.5.14",
|
||||||
"msgTitle": "本次更新内容如下",
|
"msgTitle": "本次更新内容如下",
|
||||||
"msg": "['求Star,求Star', '集成Win11显秒插件', '崩溃问题修复', '现在在右侧栏(快捷图标区域)也可以鼠标滚轮切换菜单了', '缩放屏幕截图问题修复(感谢@1062406901提的PR)', '其它已知问题修复']",
|
"msg": "['好久不见, 别来无恙, 辞职回老家了, 突然换了新环境有点不适应, 目前还处于工作中的迷茫期, 祝我们大家全都前程似锦', 'GeekDesk准备冲击一下Gitee GVP, 希望大家能给我点一下码云(Gitee)和GitHub的star❤❤❤', '之后我会抽时间编写一下开发者文档, 方便大家更清楚的了解项目结构, 从而有更多的人参与进来开发(一直没有编写是因为太懒了), 不多说了, 看下这次更新内容吧', '集成Everything搜索,设置-->其它-->勾选Everything插件开启', '增加了关联文件夹功能, 右键点击左侧栏-->新建关联菜单', '增加强制置顶开关,设置-->显示设置-->勾选/取消 置于顶层', '右侧栏图标列表增加了自适应列宽, 不会出现图标显示一半的情况了', '简单添加了新手引导提示', '加密菜单bug修复 By @1062406901', '多显示器拾色器bug修复 By @1062406901', '拖动图标到菜单的异常修复 By @Hsxxxxxx', '优化部分UI', '其它bug修复及功能优化','关注微信公众号\\'抓几个娃\\'可以第一时间收到更新通知(公众号也是佛系维护, 希望能关注的人多一点吧, 让作者这个穷B挣口饭吃)']",
|
||||||
"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.12"
|
"statisticUrl": "http://43.138.23.39:8989/bookerService/geekDeskController/userCountStatistic",
|
||||||
|
"version": "2.5.14"
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,6 @@ namespace GeekDesk.Util
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LinearGradientBrush lgb = new LinearGradientBrush();
|
LinearGradientBrush lgb = new LinearGradientBrush();
|
||||||
lgb.Opacity = (double)(Math.Round((decimal)(appConfig.BgOpacity / 100.00), 2));
|
|
||||||
GradientStop gs = new GradientStop
|
GradientStop gs = new GradientStop
|
||||||
{
|
{
|
||||||
Color = (Color)ColorConverter.ConvertFromString(appConfig.GradientBGParam.Color1),
|
Color = (Color)ColorConverter.ConvertFromString(appConfig.GradientBGParam.Color1),
|
||||||
@@ -60,6 +59,7 @@ namespace GeekDesk.Util
|
|||||||
Offset = 1
|
Offset = 1
|
||||||
};
|
};
|
||||||
lgb.GradientStops.Add(gs2);
|
lgb.GradientStops.Add(gs2);
|
||||||
|
lgb.Opacity = (double)(Math.Round((decimal)(appConfig.BgOpacity / 100.00), 2));
|
||||||
MainWindow.mainWindow.BGBorder.Background = lgb;
|
MainWindow.mainWindow.BGBorder.Background = lgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,14 @@ namespace GeekDesk.Util
|
|||||||
{
|
{
|
||||||
BinaryFormatter bf = new BinaryFormatter();
|
BinaryFormatter bf = new BinaryFormatter();
|
||||||
appData = bf.Deserialize(fs) as AppData;
|
appData = bf.Deserialize(fs) as AppData;
|
||||||
|
|
||||||
|
//将菜单密码写入文件
|
||||||
|
if (!string.IsNullOrEmpty(appData.AppConfig.MenuPassword))
|
||||||
|
{
|
||||||
|
SavePassword(appData.AppConfig.MenuPassword);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (File.Exists(Constants.DATA_FILE_BAK_PATH))
|
if (File.Exists(Constants.DATA_FILE_BAK_PATH))
|
||||||
@@ -69,20 +75,22 @@ 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;
|
||||||
@@ -122,6 +130,41 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GeneraterUUID()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!File.Exists(Constants.UUID_FILE_BAK_PATH) || string.IsNullOrEmpty(GetUniqueUUID()))
|
||||||
|
{
|
||||||
|
using (StreamWriter sw = new StreamWriter(Constants.UUID_FILE_BAK_PATH))
|
||||||
|
{
|
||||||
|
string uuid = Guid.NewGuid().ToString() + "-" + Constants.MY_UUID;
|
||||||
|
sw.Write(uuid);
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception) { }
|
||||||
|
return "ERROR_UUID_GeneraterUUID_" + Constants.MY_UUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetUniqueUUID()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (File.Exists(Constants.UUID_FILE_BAK_PATH))
|
||||||
|
{
|
||||||
|
using (StreamReader reader = new StreamReader(Constants.UUID_FILE_BAK_PATH))
|
||||||
|
{
|
||||||
|
return reader.ReadToEnd().Trim();
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
return GeneraterUUID();
|
||||||
|
}
|
||||||
|
} catch(Exception) { }
|
||||||
|
return "ERROR_UUID_GetUniqueUUID_" + Constants.MY_UUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void BakAppData()
|
public static void BakAppData()
|
||||||
{
|
{
|
||||||
@@ -142,7 +185,7 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据路径获取文件图标等信息
|
/// 根据路径获取文件图标等信息
|
||||||
@@ -244,7 +287,8 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -252,33 +296,38 @@ namespace GeekDesk.Util
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void SortIconList()
|
public static void SortIconList()
|
||||||
{
|
{
|
||||||
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM)
|
try
|
||||||
{
|
{
|
||||||
ObservableCollection<MenuInfo> menuList = MainWindow.appData.MenuList;
|
if (MainWindow.appData.AppConfig.IconSortType != SortType.CUSTOM)
|
||||||
//List<IconInfo> list = new List<IconInfo>(menuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList);
|
|
||||||
List<IconInfo> list;
|
|
||||||
foreach (MenuInfo menuInfo in menuList)
|
|
||||||
{
|
{
|
||||||
list = new List<IconInfo>(menuInfo.IconList);
|
ObservableCollection<MenuInfo> menuList = MainWindow.appData.MenuList;
|
||||||
switch (MainWindow.appData.AppConfig.IconSortType)
|
//List<IconInfo> list = new List<IconInfo>(menuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList);
|
||||||
|
List<IconInfo> list;
|
||||||
|
foreach (MenuInfo menuInfo in menuList)
|
||||||
{
|
{
|
||||||
case SortType.COUNT_UP:
|
list = new List<IconInfo>(menuInfo.IconList);
|
||||||
list.Sort((x, y) => x.Count.CompareTo(y.Count));
|
switch (MainWindow.appData.AppConfig.IconSortType)
|
||||||
break;
|
{
|
||||||
case SortType.COUNT_LOW:
|
case SortType.COUNT_UP:
|
||||||
list.Sort((x, y) => y.Count.CompareTo(x.Count));
|
list.Sort((x, y) => x.Count.CompareTo(y.Count));
|
||||||
break;
|
break;
|
||||||
case SortType.NAME_UP:
|
case SortType.COUNT_LOW:
|
||||||
list.Sort((x, y) => x.Name.CompareTo(y.Name));
|
list.Sort((x, y) => y.Count.CompareTo(x.Count));
|
||||||
break;
|
break;
|
||||||
case SortType.NAME_LOW:
|
case SortType.NAME_UP:
|
||||||
list.Sort((x, y) => y.Name.CompareTo(x.Name));
|
list.Sort((x, y) => x.Name.CompareTo(y.Name));
|
||||||
break;
|
break;
|
||||||
|
case SortType.NAME_LOW:
|
||||||
|
list.Sort((x, y) => y.Name.CompareTo(x.Name));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
menuInfo.IconList = new ObservableCollection<IconInfo>(list);
|
||||||
}
|
}
|
||||||
menuInfo.IconList = new ObservableCollection<IconInfo>(list);
|
MainWindow.appData.AppConfig.SelectedMenuIcons = MainWindow.appData.MenuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList;
|
||||||
}
|
}
|
||||||
MainWindow.appData.AppConfig.SelectedMenuIcons = MainWindow.appData.MenuList[MainWindow.appData.AppConfig.SelectedMenuIndex].IconList;
|
|
||||||
}
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.IO;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using File = System.IO.File;
|
||||||
|
|
||||||
namespace GeekDesk.Util
|
namespace GeekDesk.Util
|
||||||
{
|
{
|
||||||
@@ -45,17 +46,22 @@ namespace GeekDesk.Util
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetArgByLnk(string filePath)
|
public static string GetArgByLnk(string filePath)
|
||||||
{
|
{
|
||||||
|
//return "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WshShell shell = new WshShell();
|
WshShell shell = new WshShell();
|
||||||
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(filePath);
|
if (File.Exists(filePath))
|
||||||
return shortcut.Arguments;
|
{
|
||||||
|
object shortcutObj = shell.CreateShortcut(filePath);
|
||||||
|
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shortcutObj;
|
||||||
|
return shortcut.Arguments;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LogUtil.WriteErrorLog(e, "获取启动参数失败! filePath=" + filePath);
|
//LogUtil.WriteErrorLog(e, "获取启动参数失败! filePath=" + filePath);
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -172,7 +178,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
|||||||
174
Util/FileWatcher.cs
Normal file
174
Util/FileWatcher.cs
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
using GeekDesk.ViewModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Util
|
||||||
|
{
|
||||||
|
public class FileWatcher
|
||||||
|
{
|
||||||
|
public static Dictionary<FileSystemWatcher, MenuInfo> linkMenuMap = new Dictionary<FileSystemWatcher, MenuInfo>();
|
||||||
|
/// <summary>
|
||||||
|
/// 实时文件夹监听
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
public static void LinkMenuWatcher(MenuInfo menuInfo)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileSystemWatcher fileSystemWatcher = new FileSystemWatcher
|
||||||
|
{
|
||||||
|
Path = menuInfo.LinkPath,
|
||||||
|
};
|
||||||
|
linkMenuMap.Add(fileSystemWatcher, menuInfo);
|
||||||
|
fileSystemWatcher.EnableRaisingEvents = true;
|
||||||
|
fileSystemWatcher.Changed += LinkIcon_Changed;
|
||||||
|
fileSystemWatcher.Deleted += LinkIcon_Deleted;
|
||||||
|
fileSystemWatcher.Created += LinkIcon_Created;
|
||||||
|
fileSystemWatcher.Renamed += LinkIcon_Renamed;
|
||||||
|
} catch (Exception e)
|
||||||
|
{
|
||||||
|
LogUtil.WriteErrorLog(e, "添加LinkMenu监听异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void LinkIcon_Renamed(object sender, RenamedEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = getIconInfoByPath(sender, e.OldFullPath);
|
||||||
|
iconInfo.Name = e.Name;
|
||||||
|
iconInfo.Path = e.FullPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void LinkIcon_Changed(object sender, FileSystemEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = getIconInfoByPath(sender, e.FullPath);
|
||||||
|
if (iconInfo != null)
|
||||||
|
{
|
||||||
|
IconInfo newIconInfo = CommonCode.GetIconInfoByPath(e.FullPath);
|
||||||
|
iconInfo.BitmapImage = newIconInfo.BitmapImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private static void LinkIcon_Deleted(object sender, FileSystemEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = getIconInfoByPath(sender, e.FullPath);
|
||||||
|
App.Current.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
linkMenuMap[sender as FileSystemWatcher].IconList.Remove(iconInfo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
private static void LinkIcon_Created(object sender, FileSystemEventArgs e)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = CommonCode.GetIconInfoByPath(e.FullPath);
|
||||||
|
App.Current.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
linkMenuMap[sender as FileSystemWatcher].IconList.Add(iconInfo);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IconInfo getIconInfoByPath(object sender, string path)
|
||||||
|
{
|
||||||
|
MenuInfo menuInfo = linkMenuMap[sender as FileSystemWatcher];
|
||||||
|
foreach (IconInfo iconInfo in menuInfo.IconList)
|
||||||
|
{
|
||||||
|
if (iconInfo.Path.Equals(path))
|
||||||
|
{
|
||||||
|
return iconInfo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开启所有菜单监听
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="appData"></param>
|
||||||
|
public static void EnableLinkMenuWatcher(AppData appData)
|
||||||
|
{
|
||||||
|
foreach (MenuInfo menuInfo in appData.MenuList)
|
||||||
|
{
|
||||||
|
if (menuInfo.MenuType == Constant.MenuType.LINK)
|
||||||
|
{
|
||||||
|
LinkMenuWatcher(menuInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RefreshLinkMenuIcon(appData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void RefreshLinkMenuIcon(AppData appData)
|
||||||
|
{
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
foreach (MenuInfo menuInfo in appData.MenuList)
|
||||||
|
{
|
||||||
|
if (menuInfo.MenuType == Constant.MenuType.LINK)
|
||||||
|
{
|
||||||
|
DirectoryInfo dirInfo = new DirectoryInfo(menuInfo.LinkPath);
|
||||||
|
FileSystemInfo[] fileInfos = dirInfo.GetFileSystemInfos();
|
||||||
|
|
||||||
|
ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
||||||
|
foreach (FileSystemInfo fileInfo in fileInfos)
|
||||||
|
{
|
||||||
|
IconInfo iconInfo = CommonCode.GetIconInfoByPath_NoWrite(fileInfo.FullName);
|
||||||
|
iconList.Add(iconInfo);
|
||||||
|
}
|
||||||
|
App.Current.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
foreach (IconInfo iconInfo in iconList)
|
||||||
|
{
|
||||||
|
menuInfo.IconList = null;
|
||||||
|
menuInfo.IconList = iconList;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 移除菜单监听
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="menuInfo"></param>
|
||||||
|
public static void RemoveLinkMenuWatcher(MenuInfo menuInfo)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
foreach (FileSystemWatcher watcher in linkMenuMap.Keys)
|
||||||
|
{
|
||||||
|
if (linkMenuMap[watcher] == menuInfo)
|
||||||
|
{
|
||||||
|
//释放资源
|
||||||
|
watcher.Changed -= LinkIcon_Changed;
|
||||||
|
watcher.Created -= LinkIcon_Created;
|
||||||
|
watcher.Deleted -= LinkIcon_Deleted;
|
||||||
|
watcher.Renamed -= LinkIcon_Renamed;
|
||||||
|
watcher.EnableRaisingEvents = false;
|
||||||
|
watcher.Dispose();
|
||||||
|
linkMenuMap.Remove(watcher);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
//nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ namespace GeekDesk.Util
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static BitmapImage ByteArrToImage(byte[] array)
|
public static BitmapImage ByteArrToImage(byte[] array)
|
||||||
{
|
{
|
||||||
|
if (array == null) return null;
|
||||||
using (var ms = new System.IO.MemoryStream(array))
|
using (var ms = new System.IO.MemoryStream(array))
|
||||||
{
|
{
|
||||||
BitmapImage image = new BitmapImage();
|
BitmapImage image = new BitmapImage();
|
||||||
@@ -39,6 +40,7 @@ namespace GeekDesk.Util
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static byte[] BitmapImageToByte(BitmapImage bi)
|
public static byte[] BitmapImageToByte(BitmapImage bi)
|
||||||
{
|
{
|
||||||
|
if (bi == null) return null;
|
||||||
using (MemoryStream memStream = new MemoryStream())
|
using (MemoryStream memStream = new MemoryStream())
|
||||||
{
|
{
|
||||||
PngBitmapEncoder encoder = new PngBitmapEncoder();
|
PngBitmapEncoder encoder = new PngBitmapEncoder();
|
||||||
@@ -119,6 +121,34 @@ namespace GeekDesk.Util
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static BitmapImage GetBitmapIconByUnknownPath(string path)
|
||||||
|
{
|
||||||
|
//string base64 = ImageUtil.FileImageToBase64(path, System.Drawing.Imaging.ImageFormat.Png);
|
||||||
|
string ext = "";
|
||||||
|
if (!ImageUtil.IsSystemItem(path))
|
||||||
|
{
|
||||||
|
ext = System.IO.Path.GetExtension(path).ToLower();
|
||||||
|
}
|
||||||
|
|
||||||
|
string iconPath = null;
|
||||||
|
if (".lnk".Equals(ext))
|
||||||
|
{
|
||||||
|
|
||||||
|
string targetPath = FileUtil.GetTargetPathByLnk(path);
|
||||||
|
iconPath = FileUtil.GetIconPathByLnk(path);
|
||||||
|
if (targetPath != null)
|
||||||
|
{
|
||||||
|
path = targetPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtil.IsEmpty(iconPath))
|
||||||
|
{
|
||||||
|
iconPath = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ImageUtil.GetBitmapIconByPath(iconPath);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -174,48 +204,56 @@ namespace GeekDesk.Util
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Image img = Image.FromFile(filePath);
|
FileInfo file = new FileInfo(filePath);
|
||||||
if (img.Width <= tWidth && img.Height <= tHeight)
|
if (file.Exists && file.Length > 0
|
||||||
|
&& !System.IO.Path.GetExtension(filePath).Contains("psd"))
|
||||||
{
|
{
|
||||||
return GetBitmapImageByFile(filePath);
|
Image img = Image.FromFile(filePath);
|
||||||
}
|
if (img.Width <= tWidth && img.Height <= tHeight)
|
||||||
else
|
|
||||||
{
|
|
||||||
Bitmap loBMP = new Bitmap(filePath);
|
|
||||||
ImageFormat loFormat = loBMP.RawFormat;
|
|
||||||
|
|
||||||
decimal lnRatio;
|
|
||||||
int lnNewWidth;
|
|
||||||
int lnNewHeight;
|
|
||||||
if (loBMP.Width > loBMP.Height)
|
|
||||||
{
|
{
|
||||||
lnRatio = (decimal)tWidth / loBMP.Width;
|
return GetBitmapImageByFile(filePath);
|
||||||
lnNewWidth = tWidth;
|
|
||||||
decimal lnTemp = loBMP.Height * lnRatio;
|
|
||||||
lnNewHeight = (int)lnTemp;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lnRatio = (decimal)tHeight / loBMP.Height;
|
Bitmap loBMP = new Bitmap(filePath);
|
||||||
lnNewHeight = tHeight;
|
ImageFormat loFormat = loBMP.RawFormat;
|
||||||
decimal lnTemp = loBMP.Width * lnRatio;
|
|
||||||
lnNewWidth = (int)lnTemp;
|
decimal lnRatio;
|
||||||
}
|
int lnNewWidth;
|
||||||
Bitmap bmpOut = new Bitmap(lnNewWidth, lnNewHeight);
|
int lnNewHeight;
|
||||||
Graphics g = Graphics.FromImage(bmpOut);
|
if (loBMP.Width > loBMP.Height)
|
||||||
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
|
{
|
||||||
g.FillRectangle(System.Drawing.Brushes.White, 0, 0, lnNewWidth, lnNewHeight);
|
lnRatio = (decimal)tWidth / loBMP.Width;
|
||||||
g.DrawImage(loBMP, 0, 0, lnNewWidth, lnNewHeight);
|
lnNewWidth = tWidth;
|
||||||
loBMP.Dispose();
|
decimal lnTemp = loBMP.Height * lnRatio;
|
||||||
string tempPath = Constants.APP_DIR + "\\temp";
|
lnNewHeight = (int)lnTemp;
|
||||||
if (File.Exists(tempPath))
|
}
|
||||||
{
|
else
|
||||||
|
{
|
||||||
|
lnRatio = (decimal)tHeight / loBMP.Height;
|
||||||
|
lnNewHeight = tHeight;
|
||||||
|
decimal lnTemp = loBMP.Width * lnRatio;
|
||||||
|
lnNewWidth = (int)lnTemp;
|
||||||
|
}
|
||||||
|
Bitmap bmpOut = new Bitmap(lnNewWidth, lnNewHeight);
|
||||||
|
Graphics g = Graphics.FromImage(bmpOut);
|
||||||
|
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
|
||||||
|
g.FillRectangle(System.Drawing.Brushes.White, 0, 0, lnNewWidth, lnNewHeight);
|
||||||
|
g.DrawImage(loBMP, 0, 0, lnNewWidth, lnNewHeight);
|
||||||
|
loBMP.Dispose();
|
||||||
|
string tempPath = Constants.APP_DIR + "\\temp";
|
||||||
|
if (File.Exists(tempPath))
|
||||||
|
{
|
||||||
|
File.Delete(tempPath);
|
||||||
|
}
|
||||||
|
bmpOut.Save(tempPath, loFormat);
|
||||||
|
BitmapImage bm = GetBitmapImageByFile(tempPath);
|
||||||
File.Delete(tempPath);
|
File.Delete(tempPath);
|
||||||
|
return bm;
|
||||||
}
|
}
|
||||||
bmpOut.Save(tempPath, loFormat);
|
} else
|
||||||
BitmapImage bm = GetBitmapImageByFile(tempPath);
|
{
|
||||||
File.Delete(tempPath);
|
return Base64ToBitmapImage(Constants.DEFAULT_IMG_IMAGE_BASE64);
|
||||||
return bm;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -335,14 +373,18 @@ namespace GeekDesk.Util
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string strExt = Path.GetExtension(path).Substring(1);
|
string ext = Path.GetExtension(path);
|
||||||
string suffixs = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,avif";
|
if (!string.IsNullOrEmpty(ext))
|
||||||
string[] suffixArr = suffixs.Split(',');
|
|
||||||
foreach (string suffix in suffixArr)
|
|
||||||
{
|
{
|
||||||
if (suffix.Equals(strExt, StringComparison.InvariantCultureIgnoreCase))
|
string strExt = Path.GetExtension(path).Substring(1);
|
||||||
|
string suffixs = "bmp,jpg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp,avif";
|
||||||
|
string[] suffixArr = suffixs.Split(',');
|
||||||
|
foreach (string suffix in suffixArr)
|
||||||
{
|
{
|
||||||
return true;
|
if (suffix.Equals(strExt, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
277
Util/ProcessUtil.cs
Normal file
277
Util/ProcessUtil.cs
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
using GeekDesk.Constant;
|
||||||
|
using GeekDesk.ViewModel;
|
||||||
|
using HandyControl.Controls;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Util
|
||||||
|
{
|
||||||
|
public class ProcessUtil
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public static void StartIconApp(IconInfo icon, IconStartType type, bool useRelativePath = false)
|
||||||
|
{
|
||||||
|
App.Current.Dispatcher.Invoke(() =>
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (Process p = new Process())
|
||||||
|
{
|
||||||
|
string startArg = icon.StartArg;
|
||||||
|
|
||||||
|
if (startArg != null && Constants.SYSTEM_ICONS.ContainsKey(startArg))
|
||||||
|
{
|
||||||
|
StartSystemApp(startArg, type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string path;
|
||||||
|
if (useRelativePath)
|
||||||
|
{
|
||||||
|
string fullPath = Path.Combine(Constants.APP_DIR, icon.RelativePath);
|
||||||
|
path = Path.GetFullPath(fullPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
path = icon.Path;
|
||||||
|
}
|
||||||
|
p.StartInfo.FileName = path;
|
||||||
|
if (!StringUtil.IsEmpty(startArg))
|
||||||
|
{
|
||||||
|
p.StartInfo.Arguments = startArg;
|
||||||
|
}
|
||||||
|
if (icon.IconType == IconType.OTHER)
|
||||||
|
{
|
||||||
|
if (!File.Exists(path) && !Directory.Exists(path))
|
||||||
|
{
|
||||||
|
//如果没有使用相对路径 那么使用相对路径启动一次
|
||||||
|
if (!useRelativePath)
|
||||||
|
{
|
||||||
|
StartIconApp(icon, type, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(文件路径不存在或已删除)!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p.StartInfo.WorkingDirectory = path.Substring(0, path.LastIndexOf("\\"));
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case IconStartType.ADMIN_STARTUP:
|
||||||
|
//p.StartInfo.Arguments = "1";//启动参数
|
||||||
|
p.StartInfo.Verb = "runas";
|
||||||
|
//p.StartInfo.CreateNoWindow = false; //设置显示窗口
|
||||||
|
p.StartInfo.UseShellExecute = true;//不使用操作系统外壳程序启动进程
|
||||||
|
//p.StartInfo.ErrorDialog = false;
|
||||||
|
if (MainWindow.appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
||||||
|
{
|
||||||
|
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||||
|
if (MainWindow.appData.AppConfig.MarginHide)
|
||||||
|
{
|
||||||
|
if (!MarginHide.IsMargin())
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;// c#好像不能case穿透
|
||||||
|
case IconStartType.DEFAULT_STARTUP:
|
||||||
|
if (MainWindow.appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
||||||
|
{
|
||||||
|
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||||
|
if (MainWindow.appData.AppConfig.MarginHide)
|
||||||
|
{
|
||||||
|
if (!MarginHide.IsMargin())
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IconStartType.SHOW_IN_EXPLORE:
|
||||||
|
p.StartInfo.FileName = "Explorer.exe";
|
||||||
|
p.StartInfo.Arguments = "/e,/select," + icon.Path;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (MainWindow.appData.AppConfig.AppHideType == AppHideType.START_EXE && !RunTimeStatus.LOCK_APP_PANEL)
|
||||||
|
{
|
||||||
|
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||||
|
if (MainWindow.appData.AppConfig.MarginHide)
|
||||||
|
{
|
||||||
|
if (!MarginHide.IS_HIDE)
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p.Start();
|
||||||
|
if (useRelativePath)
|
||||||
|
{
|
||||||
|
//如果使用相对路径启动成功 那么重新设置程序绝对路径
|
||||||
|
icon.Path = path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
icon.Count++;
|
||||||
|
|
||||||
|
//隐藏搜索框
|
||||||
|
if (RunTimeStatus.SEARCH_BOX_SHOW)
|
||||||
|
{
|
||||||
|
MainWindow.mainWindow.HidedSearchBox();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
if (!useRelativePath)
|
||||||
|
{
|
||||||
|
StartIconApp(icon, type, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(可能为不支持的启动方式)!");
|
||||||
|
LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static void StartSystemApp(string startArg, IconStartType type)
|
||||||
|
{
|
||||||
|
if (type == IconStartType.SHOW_IN_EXPLORE)
|
||||||
|
{
|
||||||
|
Growl.WarningGlobal("系统项目不支持打开文件位置操作!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (startArg)
|
||||||
|
{
|
||||||
|
case "Calculator":
|
||||||
|
Process.Start("calc.exe");
|
||||||
|
break;
|
||||||
|
case "Computer":
|
||||||
|
Process.Start("explorer.exe");
|
||||||
|
break;
|
||||||
|
case "GroupPolicy":
|
||||||
|
Process.Start("gpedit.msc");
|
||||||
|
break;
|
||||||
|
case "Notepad":
|
||||||
|
Process.Start("notepad");
|
||||||
|
break;
|
||||||
|
case "Network":
|
||||||
|
Process.Start("ncpa.cpl");
|
||||||
|
break;
|
||||||
|
case "RecycleBin":
|
||||||
|
Process.Start("shell:RecycleBinFolder");
|
||||||
|
break;
|
||||||
|
case "Registry":
|
||||||
|
Process.Start("regedit.exe");
|
||||||
|
break;
|
||||||
|
case "Mstsc":
|
||||||
|
if (type == IconStartType.ADMIN_STARTUP)
|
||||||
|
{
|
||||||
|
Process.Start("mstsc", "-admin");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Process.Start("mstsc");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "Control":
|
||||||
|
Process.Start("Control");
|
||||||
|
break;
|
||||||
|
case "CMD":
|
||||||
|
if (type == IconStartType.ADMIN_STARTUP)
|
||||||
|
{
|
||||||
|
using (Process process = new Process())
|
||||||
|
{
|
||||||
|
process.StartInfo.FileName = "cmd.exe";
|
||||||
|
process.StartInfo.Verb = "runas";
|
||||||
|
process.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Process.Start("cmd");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "Services":
|
||||||
|
Process.Start("services.msc");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//如果开启了贴边隐藏 则窗体不贴边才隐藏窗口
|
||||||
|
if (MainWindow.appData.AppConfig.MarginHide)
|
||||||
|
{
|
||||||
|
if (!MarginHide.IS_HIDE)
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainWindow.HideApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
private enum ProcessAccessFlags : uint
|
||||||
|
{
|
||||||
|
QueryLimitedInformation = 0x00001000
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("kernel32.dll", SetLastError = true)]
|
||||||
|
private static extern bool QueryFullProcessImageName(
|
||||||
|
[In] IntPtr hProcess,
|
||||||
|
[In] int dwFlags,
|
||||||
|
[Out] StringBuilder lpExeName,
|
||||||
|
ref int lpdwSize);
|
||||||
|
|
||||||
|
[DllImport("kernel32.dll", SetLastError = true)]
|
||||||
|
private static extern IntPtr OpenProcess(
|
||||||
|
ProcessAccessFlags processAccess,
|
||||||
|
bool bInheritHandle,
|
||||||
|
int processId);
|
||||||
|
|
||||||
|
public static String GetProcessFilename(Process p)
|
||||||
|
{
|
||||||
|
int capacity = 2000;
|
||||||
|
StringBuilder builder = new StringBuilder(capacity);
|
||||||
|
IntPtr ptr = OpenProcess(ProcessAccessFlags.QueryLimitedInformation, false, p.Id);
|
||||||
|
if (!QueryFullProcessImageName(ptr, 0, builder, ref capacity))
|
||||||
|
{
|
||||||
|
return String.Empty;
|
||||||
|
}
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
167
Util/WindowUtil.cs
Normal file
167
Util/WindowUtil.cs
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Windows.Interop;
|
||||||
|
|
||||||
|
namespace GeekDesk.Util
|
||||||
|
{
|
||||||
|
public class WindowUtil
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum GetWindowCmd : uint
|
||||||
|
{
|
||||||
|
GW_HWNDFIRST = 0,
|
||||||
|
GW_HWNDLAST = 1,
|
||||||
|
GW_HWNDNEXT = 2,
|
||||||
|
GW_HWNDPREV = 3,
|
||||||
|
GW_OWNER = 4,
|
||||||
|
GW_CHILD = 5,
|
||||||
|
GW_ENABLEDPOPUP = 6
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum SetWindowPosFlags
|
||||||
|
{
|
||||||
|
SWP_NOSIZE = 0x0001,
|
||||||
|
SWP_NOMOVE = 0x0002,
|
||||||
|
SWP_NOZORDER = 0x0004,
|
||||||
|
SWP_NOREDRAW = 0x0008,
|
||||||
|
SWP_NOACTIVATE = 0x0010,
|
||||||
|
SWP_FRAMECHANGED = 0x0020,
|
||||||
|
SWP_SHOWWINDOW = 0x0040,
|
||||||
|
SWP_HIDEWINDOW = 0x0080,
|
||||||
|
SWP_NOCOPYBITS = 0x0100,
|
||||||
|
SWP_NOOWNERZORDER = 0x0200,
|
||||||
|
SWP_NOSENDCHANGING = 0x0400
|
||||||
|
}
|
||||||
|
|
||||||
|
//取得前台窗口句柄函数
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr GetForegroundWindow();
|
||||||
|
//取得桌面窗口句柄函数
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr GetDesktopWindow();
|
||||||
|
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||||
|
private static extern IntPtr FindWindow(string className, string windowName);
|
||||||
|
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||||
|
private static extern IntPtr GetWindow(HandleRef hWnd, int nCmd);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr SetParent(IntPtr child, IntPtr parent);
|
||||||
|
[DllImport("user32.dll", EntryPoint = "GetDCEx", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||||
|
private static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr hrgnClip, int flags);
|
||||||
|
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||||
|
private static extern bool SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, int x, int y, int cx, int cy, int flags);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int ReleaseDC(IntPtr window, IntPtr handle);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||||
|
|
||||||
|
|
||||||
|
private const int GWL_STYLE = -16;
|
||||||
|
private const int WS_MAXIMIZEBOX = 0x10000;
|
||||||
|
public static void DisableMaxWindow(Window window)
|
||||||
|
{
|
||||||
|
var hwnd = new WindowInteropHelper(window).Handle;
|
||||||
|
var value = GetWindowLong(hwnd, GWL_STYLE);
|
||||||
|
SetWindowLong(hwnd, GWL_STYLE, (int)(value & ~WS_MAXIMIZEBOX));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void SetOwner(Window window, Window parentWindow)
|
||||||
|
{
|
||||||
|
SetOwner(window, new WindowInteropHelper(parentWindow).Handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetOwner(Window window, IntPtr parentHandle)
|
||||||
|
{
|
||||||
|
WindowInteropHelper helper = new WindowInteropHelper(window);
|
||||||
|
helper.Owner = parentHandle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="window"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool WindowIsTop(Window window)
|
||||||
|
{
|
||||||
|
IntPtr handle = new WindowInteropHelper(window).Handle;
|
||||||
|
IntPtr deskHandle = GetDesktopHandle(window, DesktopLayer.Progman);
|
||||||
|
IntPtr topHandle = GetForegroundWindow();
|
||||||
|
//暂时不能正确获取桌面handle 但发现焦点在桌面时 window title为空
|
||||||
|
string windowTitle = GetWindowTitle(topHandle);
|
||||||
|
return topHandle.Equals(handle) || topHandle.Equals(deskHandle) || string.IsNullOrEmpty(windowTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetWindowTitle(IntPtr handle)
|
||||||
|
{
|
||||||
|
const int nChars = 256;
|
||||||
|
StringBuilder Buff = new StringBuilder(nChars);
|
||||||
|
if (GetWindowText(handle, Buff, nChars) > 0)
|
||||||
|
{
|
||||||
|
return Buff.ToString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public const int GW_CHILD = 5;
|
||||||
|
|
||||||
|
public static IntPtr GetDesktopHandle(Window window, DesktopLayer layer)
|
||||||
|
{
|
||||||
|
HandleRef hWnd;
|
||||||
|
IntPtr hDesktop = new IntPtr();
|
||||||
|
switch (layer)
|
||||||
|
{
|
||||||
|
case DesktopLayer.Progman:
|
||||||
|
hDesktop = FindWindow("Progman", null);//第一层桌面
|
||||||
|
break;
|
||||||
|
case DesktopLayer.SHELLDLL:
|
||||||
|
hDesktop = FindWindow("Progman", null);//第一层桌面
|
||||||
|
hWnd = new HandleRef(window, hDesktop);
|
||||||
|
hDesktop = GetWindow(hWnd, GW_CHILD);//第2层桌面
|
||||||
|
break;
|
||||||
|
case DesktopLayer.FolderView:
|
||||||
|
hDesktop = FindWindow("Progman", null);//第一层桌面
|
||||||
|
hWnd = new HandleRef(window, hDesktop);
|
||||||
|
hDesktop = GetWindow(hWnd, GW_CHILD);//第2层桌面
|
||||||
|
hWnd = new HandleRef(window, hDesktop);
|
||||||
|
hDesktop = GetWindow(hWnd, GW_CHILD);//第3层桌面
|
||||||
|
hWnd = new HandleRef(window, hDesktop);
|
||||||
|
hDesktop = GetWindow(hWnd, GW_CHILD);//第4层桌面
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return hDesktop;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DesktopLayer
|
||||||
|
{
|
||||||
|
Progman = 0,
|
||||||
|
SHELLDLL = 1,
|
||||||
|
FolderView = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -105,6 +105,39 @@ namespace GeekDesk.ViewModel
|
|||||||
|
|
||||||
private bool? secondsWindow; //秒数窗口 默认打开
|
private bool? secondsWindow; //秒数窗口 默认打开
|
||||||
|
|
||||||
|
private bool? enableEveryThing;
|
||||||
|
|
||||||
|
private bool? alwaysTopmost;
|
||||||
|
|
||||||
|
|
||||||
|
public bool? AlwaysTopmost
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (alwaysTopmost == null) alwaysTopmost = false;
|
||||||
|
return alwaysTopmost;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
alwaysTopmost = value;
|
||||||
|
OnPropertyChanged("AlwaysTopmost");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool? EnableEveryThing
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (enableEveryThing == null) enableEveryThing = false;
|
||||||
|
return enableEveryThing;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
enableEveryThing = value;
|
||||||
|
OnPropertyChanged("EnableEveryThing");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region GetSet
|
#region GetSet
|
||||||
|
|
||||||
public bool? SecondsWindow
|
public bool? SecondsWindow
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ namespace GeekDesk.ViewModel
|
|||||||
{
|
{
|
||||||
bitmapImage = value;
|
bitmapImage = value;
|
||||||
ImageByteArr_NoWrite = ImageUtil.BitmapImageToByte(bitmapImage);
|
ImageByteArr_NoWrite = ImageUtil.BitmapImageToByte(bitmapImage);
|
||||||
|
OnPropertyChanged("BitmapImage_NoWrite");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +347,10 @@ namespace GeekDesk.ViewModel
|
|||||||
private void OnPropertyChanged(string propertyName)
|
private void OnPropertyChanged(string propertyName)
|
||||||
{
|
{
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_PATH);
|
if (propertyName!=null && propertyName.Contains("NoWrite"))
|
||||||
|
{
|
||||||
|
CommonCode.SaveAppData(MainWindow.appData, Constants.DATA_FILE_PATH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,36 @@ namespace GeekDesk.ViewModel
|
|||||||
private string geometryColor; //几何图标颜色
|
private string geometryColor; //几何图标颜色
|
||||||
private ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
private ObservableCollection<IconInfo> iconList = new ObservableCollection<IconInfo>();
|
||||||
private bool isEncrypt; //是否加密
|
private bool isEncrypt; //是否加密
|
||||||
|
private MenuType menuType; //菜单类型 普通, 关联
|
||||||
|
private string linkPath; //关联路径
|
||||||
|
|
||||||
|
|
||||||
|
public string LinkPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return linkPath;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
linkPath = value;
|
||||||
|
OnPropertyChanged("LinkPath");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuType MenuType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return menuType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
menuType = value;
|
||||||
|
OnPropertyChanged("MenuType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsEncrypt
|
public bool IsEncrypt
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace GeekDesk.ViewModel.Temp
|
|||||||
//gradientBGParams = (ObservableCollection<GradientBGParam>)ConfigurationManager.GetSection("SystemBGs")
|
//gradientBGParams = (ObservableCollection<GradientBGParam>)ConfigurationManager.GetSection("SystemBGs")
|
||||||
gradientBGParams = new ObservableCollection<GradientBGParam>
|
gradientBGParams = new ObservableCollection<GradientBGParam>
|
||||||
{
|
{
|
||||||
new GradientBGParam("魅惑妖术", "#FFDDE1", "#EE9CA7"),
|
new GradientBGParam("魅惑妖术", "#EE9CA7", "#FFDDE1"),
|
||||||
new GradientBGParam ("森林之友", "#EBF7E3", "#A8E4C0"),
|
new GradientBGParam ("森林之友", "#EBF7E3", "#A8E4C0"),
|
||||||
new GradientBGParam("完美谢幕", "#D76D77", "#FFAF7B")
|
new GradientBGParam("完美谢幕", "#D76D77", "#FFAF7B")
|
||||||
};
|
};
|
||||||
|
|||||||
79
ViewModel/Temp/GuideInfoList.cs
Normal file
79
ViewModel/Temp/GuideInfoList.cs
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GeekDesk.Util
|
||||||
|
{
|
||||||
|
public class GuideInfoList
|
||||||
|
{
|
||||||
|
|
||||||
|
public static ObservableCollection<GuideInfo> mainWindowGuideList = new ObservableCollection<GuideInfo>();
|
||||||
|
|
||||||
|
static GuideInfoList()
|
||||||
|
{
|
||||||
|
GuideInfo guideInfo = new GuideInfo
|
||||||
|
{
|
||||||
|
Title1 = "引导提示",
|
||||||
|
Title2 = "图标列表区",
|
||||||
|
GuideText = "右侧高亮区域是图标列表区, 将文件拖动到图标列表区将自动创建快捷方式, 或者鼠标右键单击添加系统项目"
|
||||||
|
};
|
||||||
|
mainWindowGuideList.Add(guideInfo);
|
||||||
|
|
||||||
|
guideInfo = new GuideInfo
|
||||||
|
{
|
||||||
|
Title1 = "引导提示",
|
||||||
|
Title2 = "菜单栏",
|
||||||
|
GuideText = "左侧高亮区域是菜单栏, 右键单击左侧区域可以创建菜单, 右键单击菜单可以对菜单进行操作"
|
||||||
|
};
|
||||||
|
mainWindowGuideList.Add(guideInfo);
|
||||||
|
|
||||||
|
guideInfo = new GuideInfo
|
||||||
|
{
|
||||||
|
Title1 = "引导提示",
|
||||||
|
Title2 = "拖动区域",
|
||||||
|
GuideText = "左键按住上部高亮区域可以拖动程序窗体"
|
||||||
|
};
|
||||||
|
mainWindowGuideList.Add(guideInfo);
|
||||||
|
|
||||||
|
guideInfo = new GuideInfo
|
||||||
|
{
|
||||||
|
Title1 = "引导提示",
|
||||||
|
Title2 = "设置和关闭",
|
||||||
|
GuideText = "高亮区域的两个按钮分别是设置和关闭按钮, 你可以点击设置按钮重新打开引导提示, 设置窗口中可自定义开启或关闭众多功能, 赶紧探索使用吧"
|
||||||
|
};
|
||||||
|
|
||||||
|
mainWindowGuideList.Add(guideInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GuideInfo
|
||||||
|
{
|
||||||
|
private string title1;
|
||||||
|
private string title2;
|
||||||
|
private string guideText;
|
||||||
|
|
||||||
|
public string Title1 { get; set; }
|
||||||
|
public string Title2 { get; set; }
|
||||||
|
public string GuideText { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum GuidePopOffect
|
||||||
|
{
|
||||||
|
TOP,
|
||||||
|
INNER_TOP,
|
||||||
|
LEFT,
|
||||||
|
INNER_LEFT,
|
||||||
|
CENTER,
|
||||||
|
RIGHT,
|
||||||
|
INNER_RIGHT,
|
||||||
|
BOTTOM,
|
||||||
|
INNER_BOTTOM
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,8 +21,15 @@ namespace GeekDesk.ViewModel.Temp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RemoveAll()
|
||||||
|
{
|
||||||
|
while (IconList.Count > 0)
|
||||||
|
{
|
||||||
|
IconList.RemoveAt(IconList.Count - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static event PropertyChangedEventHandler PropertyChanged;
|
private static event PropertyChangedEventHandler PropertyChanged;
|
||||||
private static void OnPropertyChanged(string propertyName)
|
private static void OnPropertyChanged(string propertyName)
|
||||||
{
|
{
|
||||||
PropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
|
PropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
|
||||||
|
|||||||
32
app.manifest
32
app.manifest
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
<security>
|
<security>
|
||||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
@@ -18,48 +18,41 @@
|
|||||||
-->
|
-->
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
</requestedPrivileges>
|
</requestedPrivileges>
|
||||||
|
<applicationRequestMinimum>
|
||||||
|
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||||
|
<PermissionSet ID="Custom" SameSite="site" />
|
||||||
|
</applicationRequestMinimum>
|
||||||
</security>
|
</security>
|
||||||
</trustInfo>
|
</trustInfo>
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||||
Windows 版本的列表。取消评论适当的元素,
|
Windows 版本的列表。取消评论适当的元素,
|
||||||
Windows 将自动选择最兼容的环境。 -->
|
Windows 将自动选择最兼容的环境。 -->
|
||||||
|
|
||||||
<!-- Windows Vista -->
|
<!-- Windows Vista -->
|
||||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||||
|
|
||||||
<!-- Windows 7 -->
|
<!-- Windows 7 -->
|
||||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||||
|
|
||||||
<!-- Windows 8 -->
|
<!-- Windows 8 -->
|
||||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||||
|
|
||||||
<!-- Windows 8.1 -->
|
<!-- Windows 8.1 -->
|
||||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||||
|
|
||||||
<!-- Windows 10 -->
|
<!-- Windows 10 -->
|
||||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
</compatibility>
|
</compatibility>
|
||||||
|
|
||||||
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||||
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||||
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
||||||
在其 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">
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
<windowsSettings>
|
||||||
<windowsSettings>
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
|
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
|
</windowsSettings>
|
||||||
</windowsSettings>
|
</application>
|
||||||
</application>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||||
<!--
|
<!--
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -75,5 +68,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
-->
|
||||||
|
</assembly>
|
||||||
</assembly>
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<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" />
|
||||||
@@ -18,5 +19,6 @@
|
|||||||
<package id="System.Reactive" version="5.0.0" targetFramework="net472" />
|
<package id="System.Reactive" version="5.0.0" targetFramework="net472" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||||
|
<package id="WindowsAPICodePack.Shell.CommonFileDialogs" version="1.1.5" targetFramework="net472" />
|
||||||
<package id="XamlFlair.WPF" version="1.2.13" targetFramework="net472" />
|
<package id="XamlFlair.WPF" version="1.2.13" targetFramework="net472" />
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user