搜索Item功能优化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DraggAnimatedPanelExample;
|
||||
using GeekDesk.Constant;
|
||||
using GeekDesk.Control.Windows;
|
||||
using GeekDesk.MyThread;
|
||||
using GeekDesk.Util;
|
||||
@@ -111,13 +112,6 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
}
|
||||
}
|
||||
|
||||
//////菜单点击事件
|
||||
//private void MenuClick(object sender, MouseButtonEventArgs e)
|
||||
//{
|
||||
// //设置对应菜单的图标列表
|
||||
// MenuInfo mi = (MenuInfo)(((StackPanel)sender).Tag);
|
||||
// appData.AppConfig.SelectedMenuIcons = mi.IconList;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 当修改菜单元素可见时 设置原菜单为不可见 并且不可选中
|
||||
|
||||
@@ -137,14 +137,17 @@
|
||||
</Grid>
|
||||
</hc:Card>
|
||||
|
||||
<hc:Card
|
||||
x:Name="VerticalCard"
|
||||
<hc:Card x:Name="VerticalCard"
|
||||
Visibility="Hidden"
|
||||
BorderThickness="1"
|
||||
Effect="{DynamicResource EffectShadow2}"
|
||||
Margin="5,0,5,5" Grid.ColumnSpan="2">
|
||||
Margin="5,0,5,5" Grid.ColumnSpan="2"
|
||||
MouseLeftButtonDown="VerticalCard_MouseLeftButtonDown"
|
||||
>
|
||||
<hc:Card.Background>
|
||||
<SolidColorBrush Color="AliceBlue" hc:GeometryEffect.GeometryEffect="20" Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
|
||||
<SolidColorBrush Color="AliceBlue"
|
||||
hc:GeometryEffect.GeometryEffect="20"
|
||||
Opacity="{Binding AppConfig.CardOpacity, Mode=TwoWay, Converter={StaticResource OpcityConvert}}"/>
|
||||
</hc:Card.Background>
|
||||
<hc:Card.BorderBrush>
|
||||
<SolidColorBrush Color="#FFFFFFFF" Opacity="0"/>
|
||||
@@ -180,11 +183,19 @@
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Background="#00FFFFFF"
|
||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.MenuCardWidth, Mode=OneWay, Converter={StaticResource SearchResWidth}, ConverterParameter=1}"
|
||||
/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<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.MenuCardWidth, Mode=OneWay, Converter={StaticResource SearchResWidth}}"
|
||||
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type Window}},Path=DataContext.AppConfig.MenuCardWidth, Mode=OneWay, Converter={StaticResource SearchResWidth}, ConverterParameter=2}"
|
||||
HorizontalAlignment="Left"
|
||||
hc:Poptip.HitMode="None"
|
||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
}
|
||||
else if (!appData.AppConfig.DoubleOpen && e.ClickCount == 1)
|
||||
{
|
||||
IconInfo icon = (IconInfo)((SimpleStackPanel)sender).Tag;
|
||||
IconInfo icon = (IconInfo)((Panel)sender).Tag;
|
||||
if (icon.AdminStartUp)
|
||||
{
|
||||
StartIconApp(icon, IconStartType.ADMIN_STARTUP);
|
||||
@@ -261,6 +261,12 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
}
|
||||
}
|
||||
icon.Count++;
|
||||
|
||||
//隐藏搜索框
|
||||
if (RunTimeStatus.SEARCH_BOX_SHOW)
|
||||
{
|
||||
MainWindow.mainWindow.HidedSearchBox();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -584,5 +590,18 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 搜索Card点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void VerticalCard_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
//隐藏搜索框
|
||||
if (RunTimeStatus.SEARCH_BOX_SHOW)
|
||||
{
|
||||
MainWindow.mainWindow.HidedSearchBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user