🎉 集成everything

This commit is contained in:
BookerLiu
2023-03-31 09:06:04 +08:00
parent d0547da214
commit a18a66352c
24 changed files with 610 additions and 1641 deletions

View File

@@ -60,5 +60,15 @@
public static int MOUSE_MOVE_COUNT = 0;
/// <summary>
/// everything 新的键入搜索
/// </summary>
public static bool EVERYTHING_NEW_SEARCH = false;
/// <summary>
/// 键入多少毫秒后 没有新的键入开启搜索
/// </summary>
public static int EVERYTHING_SEARCH_DELAY_TIME = 300;
}
}

View File

@@ -10,6 +10,7 @@ namespace GeekDesk.Constant
{
LEFT_CARD = 0, //左侧托盘宽度
RIGHT_CARD = 1, //右侧托盘宽度
RIGHT_CARD_HALF = 2 //右侧托盘宽度的一半
RIGHT_CARD_HALF = 2, //右侧托盘宽度的一半
RIGHT_CARD_HALF_TEXT = 3, //右侧托盘宽度的一半 再减去左侧图像宽度
}
}

View File

@@ -48,10 +48,11 @@
<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:Poptip.Instance>
<hc:Poptip PlacementType="Top">
<hc:Poptip PlacementType="Top" >
<hc:Poptip.Content>
<Image x:Name="PublicWeChat" Width="150" Height="150" />
</hc:Poptip.Content>
</hc:Poptip>
</hc:Poptip.Instance>
</hc:Shield>

View File

@@ -33,9 +33,8 @@
hc:Poptip.HitMode="None"
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
hc:Poptip.Content="开启性能模式将取消图标动画效果"
hc:Poptip.Placement="LeftTop"
hc:Poptip.VerticalOffset="-35"
hc:Poptip.HorizontalOffset="-15">
hc:Poptip.Placement="Top"
>
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
@@ -49,9 +48,20 @@
hc:Poptip.HitMode="None"
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
hc:Poptip.Content="仅Win11有效"
hc:Poptip.Placement="LeftTop"
hc:Poptip.VerticalOffset="-35"
hc:Poptip.HorizontalOffset="-1">
hc:Poptip.Placement="Top"
>
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
</LinearGradientBrush>
</CheckBox.Background>
</CheckBox>
<CheckBox Content="EveryThing搜索" 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"
>
<CheckBox.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
<GradientStop Color="#FF9EA3A6"/>
@@ -116,10 +126,8 @@
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
<Button Content="备份数据"
hc:Poptip.Content="当数据文件损坏时, 以便能够恢复部分数据 (损坏时将有操作提示)"
hc:Poptip.Placement="LeftTop"
hc:Poptip.Placement="Top"
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
hc:Poptip.VerticalOffset="-35"
hc:Poptip.HorizontalOffset="-15"
Style="{StaticResource Btn1}"
Click="BakDataFile"/>
</hc:UniformSpacingPanel>

View File

@@ -1,5 +1,6 @@
using GeekDesk.Constant;
using GeekDesk.MyThread;
using GeekDesk.Plugins.EveryThing;
using GeekDesk.Util;
using GeekDesk.ViewModel;
using ShowSeconds;
@@ -186,7 +187,20 @@ namespace GeekDesk.Control.UserControls.Config
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();
} else
{
EveryThingUtil.DisableEveryThing();
}
}
}
}

View File

@@ -100,9 +100,7 @@
hc:Poptip.HitMode="None"
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
hc:Poptip.Content="{Binding GradientBGParam.Name, Converter={StaticResource StringAppendConvert}, ConverterParameter=当前设置: \{\}}"
hc:Poptip.Placement="LeftTop"
hc:Poptip.VerticalOffset="-35"
hc:Poptip.HorizontalOffset="-15"
hc:Poptip.Placement="Top"
Click="SysBG_Click"
/>
</StackPanel>

View File

@@ -28,6 +28,11 @@
<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>
<Style x:Key="MyListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Template">
@@ -281,19 +286,23 @@
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
</hc:Card.BorderBrush>
<Grid>
<WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsContainerVirtualizable="True"
<WrapPanel Orientation="Horizontal"
Margin="10"
>
<UniformGrid x:Name="VerticalUFG" xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}">
<UniformGrid x:Name="VerticalUFG"
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeIn}, OffsetY= -10, Event=Visibility}"
>
<!--<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">-->
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
BorderThickness="0"
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList, Mode=OneWay}"
VirtualizingStackPanel.VirtualizationMode="Recycling" VirtualizingStackPanel.IsVirtualizing="True"
BorderThickness="0"
Padding="0,10,0,0"
x:Name="SearchListBox"
SelectionChanged="SearchListBox_SelectionChanged"
>
<ListBox.Template>
<ControlTemplate TargetType="ListBox">
<hc:ScrollViewer
@@ -302,6 +311,7 @@
IsInertiaEnabled="True"
CanContentScroll="True"
PreviewMouseWheel="VerticalIconList_PreviewMouseWheel"
ScrollChanged="VerticalCard_ScrollChanged"
>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderBrush}">
<ItemsPresenter/>
@@ -333,7 +343,7 @@
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Background="#00FFFFFF"
<VirtualizingStackPanel Orientation="Vertical" 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}}"
@@ -360,7 +370,6 @@
</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}}"
@@ -376,17 +385,29 @@
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}"/>
<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>

View File

@@ -2,8 +2,10 @@
using GeekDesk.Constant;
using GeekDesk.Control.Other;
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.ObjectModel;
@@ -850,7 +852,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
/// <summary>
/// 菜单结果icon 列表鼠标滚轮预处理时间
/// 主要使用自定义popup解决卡顿问题解决卡顿问题
/// 以及滚动条尾切换菜单
/// 以及滚动条尾切换菜单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@@ -1046,5 +1048,49 @@ namespace GeekDesk.Control.UserControls.PannelCard
MyPoptipContent.Text = info.Content;
MyPoptip.VerticalOffset = 30;
}
private void VerticalCard_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
if (appData.AppConfig.EnableEveryThing == true && EveryThingUtil.hasNext())
{
HandyControl.Controls.ScrollViewer sv = sender as HandyControl.Controls.ScrollViewer;
if (sv.ExtentHeight - (sv.ActualHeight + sv.VerticalOffset) < 200 && EveryThingUtil.hasNext())
{
string[] split = MainWindow.mainWindow.TotalMsgBtn.Content.ToString().Split(' ');
long count = Convert.ToInt64(split[0]);
ObservableCollection<IconInfo> iconBakList = EveryThingUtil.NextPage();
count += iconBakList.Count;
this.Dispatcher.Invoke(() =>
{
MainWindow.mainWindow.TotalMsgBtn.Content = count + " of " + split[split.Length - 1];
foreach (IconInfo icon in iconBakList)
{
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
SearchIconList.IconList.Add(icon);
}
});
//异步加载图标
if (iconBakList != null && iconBakList.Count > 0)
{
ThreadPool.QueueUserWorkItem(state =>
{
foreach (IconInfo icon in iconBakList)
{
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
this.Dispatcher.Invoke(() =>
{
icon.BitmapImage_NoWrite = ImageUtil.GetBitmapIconByUnknownPath(icon.Path);
});
}
});
}
}
}
}
}
}

View File

@@ -26,7 +26,10 @@ namespace GeekDesk.Converts
return config.WindowWidth - config.MenuCardWidth;
} else if (WidthTypeEnum.RIGHT_CARD_HALF == type)
{
return (config.WindowWidth - config.MenuCardWidth) / 2;
return (config.WindowWidth - config.MenuCardWidth) * 0.8;
} else if (WidthTypeEnum.RIGHT_CARD_HALF_TEXT == type)
{
return (config.WindowWidth - config.MenuCardWidth) * 0.8 - config.ImageWidth - 20;
}
return config.WindowWidth;

View File

@@ -85,8 +85,8 @@
<Reference Include="Gma.System.MouseKeyHook, Version=5.6.130.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\MouseKeyHook.5.6.0\lib\net40\Gma.System.MouseKeyHook.dll</HintPath>
</Reference>
<Reference Include="HandyControl, Version=3.4.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
<HintPath>packages\HandyControl.3.4.0\lib\net472\HandyControl.dll</HintPath>
<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>
</Reference>
<Reference Include="KeyMouseHook, Version=1.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\KeyMouseHook.1.0.6\lib\net40\KeyMouseHook.dll</HintPath>
@@ -487,15 +487,9 @@
</EmbeddedResource>
<Resource Include="Resource\Iconfont\iconfont.json" />
<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>

View File

@@ -70,6 +70,8 @@
</Border.Effect>
<hc:DialogContainer Focusable="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" MouseMove="DragMove"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
@@ -79,6 +81,9 @@
<ColumnDefinition x:Name="RightColumn" Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox x:Name="ShowBox" Visibility="Hidden" Panel.ZIndex="2"/>
<CheckBox x:Name="HideBox" Visibility="Hidden" Panel.ZIndex="2"/>
@@ -135,6 +140,26 @@
<!--分割线-->
<GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
<Button x:Name="TotalMsgBtn" Panel.ZIndex="2"
Visibility="Hidden"
Grid.Row="1" Grid.Column="1"
HorizontalAlignment="Right" MaxWidth="200"
VerticalAlignment="Top"
Margin="0,20,40,0"
>
<Button.Content>0 of 0</Button.Content>
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource Btn1}">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="White" Opacity="0.6"/>
</Setter.Value>
</Setter>
<Setter Property="MaxWidth" Value="300"/>
</Style>
</Button.Style>
</Button>
<!--搜索输入框-->
<TextBox Panel.ZIndex="2" Grid.Row="0" Grid.Column="1"
x:Name="SearchBox"

View File

@@ -24,6 +24,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shell;
using System.Windows.Threading;
using static GeekDesk.Util.ShowWindowFollowMouse;
@@ -95,6 +96,9 @@ namespace GeekDesk
RightCard.VisibilitySearchCard(Visibility.Visible);
SearchBox.Width = 400;
SearchBox.Focus();
//执行一遍a查询
SearchBox_TextChanged(null, null);
}
/// <summary>
/// 搜索开始
@@ -124,109 +128,114 @@ namespace GeekDesk
RightCard.VerticalUFG.Visibility = Visibility.Collapsed;
if (!string.IsNullOrEmpty(inputText))
{
searchDelayHelper.DelayExecute(inputText);
}
else
RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME = 300;
if (!RunTimeStatus.EVERYTHING_NEW_SEARCH)
{
RunTimeStatus.EVERYTHING_NEW_SEARCH = true;
SearchDelay(null, null);
}
} else
{
SearchIconList.IconList.Clear();
new Thread(() =>
{
this.Dispatcher.Invoke(() =>
{
SearchIconList.RemoveAll();
});
}).Start();
}
}
private void SearchDelay(object sender, EventArgs args)
{
this.Dispatcher.Invoke(() =>
new Thread(() =>
{
SearchIconList.IconList.Clear();
DelayHelper dh = sender as DelayHelper;
string inpuText = dh.Source as string;
//GeekDesk数据搜索
ObservableCollection<MenuInfo> menuList = appData.MenuList;
foreach (MenuInfo menu in menuList)
while (RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME > 0)
{
ObservableCollection<IconInfo> iconList = menu.IconList;
foreach (IconInfo icon in iconList)
{
string pyName = Pinyin.GetInitials(icon.Name).ToLower();
if (icon.Name.Contains(inpuText) || pyName.Contains(inpuText))
{
SearchIconList.IconList.Add(icon);
}
}
Thread.Sleep(10);
RunTimeStatus.EVERYTHING_SEARCH_DELAY_TIME -= 10;
}
RunTimeStatus.EVERYTHING_NEW_SEARCH = false;
new Thread(() =>
this.Dispatcher.Invoke(() =>
{
//EveryThing全盘搜索
EveryThing64.Everything_SetSearchW(inpuText);
EveryThing64.Everything_SetRequestFlags(
EveryThingConst.EVERYTHING_REQUEST_FILE_NAME
| EveryThingConst.EVERYTHING_REQUEST_PATH
| EveryThingConst.EVERYTHING_REQUEST_DATE_MODIFIED
| EveryThingConst.EVERYTHING_REQUEST_SIZE);
EveryThing64.Everything_SetSort(13);
EveryThing64.Everything_QueryW(true);
UInt32 ui = 0;
string filePath;
const int bufsize = 260;
StringBuilder buf = new StringBuilder(bufsize);
for (int i = 0; ui < EveryThing64.Everything_GetNumResults() && i < 10; i++, ui++)
if (SearchIconList.IconList.Count > 0)
{
buf.Clear();
EveryThing64.Everything_GetResultFullPathName(ui, buf, bufsize);
filePath = buf.ToString();
SearchIconList.RemoveAll();
}
//DelayHelper dh = sender as DelayHelper;
//string inpuText = dh.Source as string;
string inputText = SearchBox.Text.ToLower().Trim();
string tempPath = filePath;
//string base64 = ImageUtil.FileImageToBase64(path, System.Drawing.Imaging.ImageFormat.Png);
string ext = "";
if (!ImageUtil.IsSystemItem(filePath))
int count = 0;
//GeekDesk数据搜索
ObservableCollection<MenuInfo> menuList = appData.MenuList;
foreach (MenuInfo menu in menuList)
{
ObservableCollection<IconInfo> iconList = menu.IconList;
foreach (IconInfo icon in iconList)
{
ext = System.IO.Path.GetExtension(filePath).ToLower();
}
string iconPath = null;
if (".lnk".Equals(ext))
{
string targetPath = FileUtil.GetTargetPathByLnk(filePath);
iconPath = FileUtil.GetIconPathByLnk(filePath);
if (targetPath != null)
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
string pyName = Pinyin.GetInitials(icon.Name).ToLower();
if (icon.Name.Contains(inputText) || pyName.Contains(inputText))
{
filePath = targetPath;
SearchIconList.IconList.Add(icon);
count++;
}
}
IconInfo iconInfo = new IconInfo
{
Path_NoWrite = filePath,
LnkPath_NoWrite = tempPath,
BitmapImage_NoWrite = null,
StartArg_NoWrite = FileUtil.GetArgByLnk(tempPath),
Name_NoWrite = System.IO.Path.GetFileNameWithoutExtension(tempPath),
};
//IconInfo iconInfo = CommonCode.GetIconInfoByPath_NoWrite(filePath);
this.Dispatcher.Invoke(() =>
{
SearchIconList.IconList.Add(iconInfo);
});
}
}).Start();
if (RightCard.SearchListBox.Items.Count > 0)
{
RightCard.SearchListBox.SelectedIndex = 0;
}
RightCard.VerticalUFG.Visibility = Visibility.Visible;
});
if (appData.AppConfig.EnableEveryThing == true)
{
new Thread(() =>
{
//EveryThing全盘搜索
ObservableCollection<IconInfo> iconBakList = EveryThingUtil.Search(inputText);
count += iconBakList.Count;
this.Dispatcher.Invoke(() =>
{
TotalMsgBtn.Visibility = Visibility.Visible;
TotalMsgBtn.Content = count + " of " + Convert.ToInt64(EveryThingUtil.Everything_GetNumResults());
foreach (IconInfo icon in iconBakList)
{
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
SearchIconList.IconList.Add(icon);
}
});
//异步加载图标
if (iconBakList != null && iconBakList.Count > 0)
{
new Thread(() =>
{
foreach (IconInfo icon in iconBakList)
{
if (RunTimeStatus.EVERYTHING_NEW_SEARCH) return;
this.Dispatcher.Invoke(() =>
{
icon.BitmapImage_NoWrite = ImageUtil.GetBitmapIconByUnknownPath(icon.Path);
});
}
}).Start();
}
}).Start();
}
if (RightCard.SearchListBox.Items.Count > 0)
{
RightCard.SearchListBox.SelectedIndex = 0;
}
RightCard.VerticalUFG.Visibility = Visibility.Visible;
});
}).Start();
}
/// <summary>
@@ -234,15 +243,34 @@ namespace GeekDesk
/// </summary>
public void HidedSearchBox()
{
RunTimeStatus.EVERYTHING_NEW_SEARCH = true;
new Thread(() =>
{
Thread.Sleep(1000);
RunTimeStatus.EVERYTHING_NEW_SEARCH = false;
}).Start();
Keyboard.Focus(SearchBox);
RunTimeStatus.SEARCH_BOX_SHOW = false;
SearchBox.TextChanged -= SearchBox_TextChanged;
SearchBox.Clear();
SearchBox.TextChanged += SearchBox_TextChanged;
SearchBox.Width = 0;
SearchIconList.IconList.Clear();
TotalMsgBtn.Content = "0 of 0";
TotalMsgBtn.Visibility = Visibility.Hidden;
RightCard.VisibilitySearchCard(Visibility.Collapsed);
Keyboard.Focus(SearchBox);
App.DoEvents();
SearchIconList.RemoveAll();
//App.DoEvents();
//new Thread(() =>
//{
// this.Dispatcher.Invoke(() =>
// {
// });
//}).Start();
}
@@ -329,9 +357,15 @@ namespace GeekDesk
//开启延迟搜索 优化搜索功能
searchDelayHelper.Idled += SearchDelay;
//开启EveryThing插件
EveryThingUtil.StartEveryThing(Constants.PLUGINS_PATH);
if (appData.AppConfig.EnableEveryThing == true)
{
//开启EveryThing插件
EveryThingUtil.EnableEveryThing();
}
Keyboard.Focus(SearchBox);
MessageUtil.ChangeWindowMessageFilter(MessageUtil.WM_COPYDATA, 1);
}
@@ -784,6 +818,10 @@ namespace GeekDesk
{
MouseHookThread.Dispose();
}
if (appData.AppConfig.EnableEveryThing == true)
{
EveryThingUtil.DisableEveryThing();
}
Application.Current.Shutdown();
}
/// <summary>

View File

@@ -1,740 +0,0 @@
; 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=617
window_y=182
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=0
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=GeekDesk_EveryThing
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=2
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=1
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=1
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=1
size_descending_first=1
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=0
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=

View File

@@ -1,740 +0,0 @@
; 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=0
window_y=0
window_wide=0
window_high=0
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=0
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=GeekDesk_EveryThing
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=2
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=1
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=1
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=1
size_descending_first=1
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=0
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=

View File

@@ -119,5 +119,8 @@ namespace GeekDesk.Plugins.EveryThing
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();
}
}

View File

@@ -119,5 +119,8 @@ namespace GeekDesk.Plugins.EveryThing
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();
}
}

View File

@@ -1,35 +1,270 @@
using System;
using GeekDesk.Constant;
using GeekDesk.Plugins.EveryThing.Constant;
using GeekDesk.Util;
using GeekDesk.ViewModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace GeekDesk.Plugins.EveryThing
{
public class EveryThingUtil
{
//检查是否是由GeekDesk启动的EveryThing
private static bool IsByGeekDesk = true;
//每次加载20条
private static long pageCount = 20;
private static UInt32 ui = 0;
public static void StartEveryThing(String pluginsPath)
public static void EnableEveryThing()
{
bool Is64Bit = Environment.Is64BitOperatingSystem;
string pluginPath = pluginsPath + "/EveryThing/" + (Is64Bit ? 64 : 32) + "/EveryThing.exe";
string pluginsPath = Constants.PLUGINS_PATH;
//启动服务
using (Process p = new Process())
bool Is64Bit = Environment.Is64BitOperatingSystem;
string everyThingPath = pluginsPath + "/EveryThing/" + (Is64Bit ? 64 : 32) + "/EveryThing.exe";
new Thread(() =>
{
p.StartInfo.FileName = pluginPath;
p.StartInfo.UseShellExecute = true;
p.StartInfo.Arguments = " -svc";
p.Start();
Thread.Sleep(2000);
//判断EveryThing服务是否已启动
bool enabled = false;
Process[] processList = Process.GetProcesses();
foreach (System.Diagnostics.Process process in processList)
{
if (process.ProcessName.ToUpper().Equals("EVERYTHING"))
{
enabled = true;
IsByGeekDesk = false;
break;
}
}
if (!enabled)
{
//启动服务
using (Process p = new Process())
{
p.StartInfo.FileName = everyThingPath;
p.StartInfo.UseShellExecute = true;
p.StartInfo.Verb = "runas";
p.StartInfo.Arguments = " -svc";
p.Start();
}
}
Thread.Sleep(2000);
processList = Process.GetProcesses();
//启动程序
using (Process p = new Process())
{
p.StartInfo.FileName = everyThingPath;
p.Start();
int waitTime = 3000;
while (true && waitTime > 0)
{
Thread.Sleep(100);
waitTime -= 100;
p.CloseMainWindow();
}
}
}).Start();
}
public static void DisableEveryThing()
{
if (IsByGeekDesk)
{
if (Environment.Is64BitOperatingSystem)
{
EveryThing64.Everything_Exit();
} else
{
EveryThing32.Everything_Exit();
}
}
//启动程序
using (Process p = new Process())
}
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(13);
EveryThingUtil.Everything_QueryW(true);
return NextPage();
}
public static ObservableCollection<IconInfo> NextPage()
{
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++)
{
p.StartInfo.FileName = pluginPath;
p.Start();
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))
{
name = tempPath.Substring(tempPath.LastIndexOf("\\"));
}
IconInfo iconInfo = new IconInfo
{
Path_NoWrite = filePath,
LnkPath_NoWrite = tempPath,
BitmapImage_NoWrite = null,
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_QueryW(bool bWait)
{
if (Environment.Is64BitOperatingSystem)
{
return EveryThing64.Everything_QueryW(bWait);
}
else
{
return EveryThing32.Everything_QueryW(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();
}
}
}
}

View File

@@ -255,6 +255,7 @@ namespace GeekDesk.Util
/// <summary>
/// 排序图标
/// </summary>

View File

@@ -121,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>

View File

@@ -105,6 +105,23 @@ namespace GeekDesk.ViewModel
private bool? secondsWindow; //秒数窗口 默认打开
private bool? enableEveryThing;
public bool? EnableEveryThing
{
get
{
if (enableEveryThing == null) enableEveryThing = false;
return enableEveryThing;
}
set
{
enableEveryThing = value;
OnPropertyChanged("EnableEveryThing");
}
}
#region GetSet
public bool? SecondsWindow

View File

@@ -283,6 +283,7 @@ namespace GeekDesk.ViewModel
{
bitmapImage = value;
ImageByteArr_NoWrite = ImageUtil.BitmapImageToByte(bitmapImage);
OnPropertyChanged("BitmapImage_NoWrite");
}
}
@@ -346,7 +347,10 @@ namespace GeekDesk.ViewModel
private void OnPropertyChanged(string 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);
}
}

View File

@@ -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)
{
PropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
@@ -18,48 +18,41 @@
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
@@ -75,5 +68,4 @@
</dependentAssembly>
</dependency>
-->
</assembly>
</assembly>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.6" targetFramework="net452" requireReinstallation="true" />
<package id="HandyControl" version="3.4.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.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" />