🎉 集成everything
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user