样式微调, 修复重新打开中间呼出功能失效
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<!--左侧栏-->
|
<!--左侧栏-->
|
||||||
<hc:Card x:Name="MyCard"
|
<hc:Card x:Name="MyCard"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Effect="{DynamicResource EffectShadow2}"
|
Effect="{DynamicResource EffectShadow2}"
|
||||||
Margin="5,0,0,5"
|
Margin="5,0,0,5"
|
||||||
>
|
>
|
||||||
@@ -88,6 +88,7 @@
|
|||||||
</hc:Card.ContextMenu>
|
</hc:Card.ContextMenu>
|
||||||
<WrapPanel Orientation="Horizontal">
|
<WrapPanel Orientation="Horizontal">
|
||||||
<ListBox x:Name="MenuListBox"
|
<ListBox x:Name="MenuListBox"
|
||||||
|
Padding="2,3,0,2"
|
||||||
ItemsSource="{Binding MenuList}"
|
ItemsSource="{Binding MenuList}"
|
||||||
Tag="{Binding AppConfig.MenuCardWidth}"
|
Tag="{Binding AppConfig.MenuCardWidth}"
|
||||||
BorderThickness="0" Foreground="{x:Null}"
|
BorderThickness="0" Foreground="{x:Null}"
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
<MenuItem Header="重命名" Click="RenameMenu" Tag="{Binding}"/>
|
<MenuItem Header="重命名" Click="RenameMenu" Tag="{Binding}"/>
|
||||||
<MenuItem Header="修改图标" Click="EditMenuGeometry" Tag="{Binding}"/>
|
<MenuItem Header="修改图标" Click="EditMenuGeometry" Tag="{Binding}"/>
|
||||||
<MenuItem Header="删除" Click="DeleteMenu" Tag="{Binding}"/>
|
<MenuItem Header="删除" Click="DeleteMenu" Tag="{Binding}"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</ListBox.Resources>
|
</ListBox.Resources>
|
||||||
|
|
||||||
<ListBox.ItemContainerStyle>
|
<ListBox.ItemContainerStyle>
|
||||||
@@ -115,14 +116,14 @@
|
|||||||
|
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<DraggAnimatedPanel:DraggAnimatedPanel ItemsHeight="33" ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=10}" HorizontalAlignment="Center" VerticalAlignment="Top" SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
<DraggAnimatedPanel:DraggAnimatedPanel ItemsHeight="33" ItemsWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=10}" HorizontalAlignment="Center" VerticalAlignment="Top" SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
<StackPanel MouseLeftButtonDown="MenuClick" MouseRightButtonDown="MenuClick" Tag="{Binding}">
|
||||||
<TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
|
<TextBox 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"
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
||||||
Visibility="{Binding MenuEdit}"/>
|
Visibility="{Binding MenuEdit}"/>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Background="Transparent"
|
<Button Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
hc:IconElement.Geometry="{Binding MenuGeometry}"
|
hc:IconElement.Geometry="{Binding MenuGeometry}"
|
||||||
|
|||||||
@@ -50,9 +50,13 @@
|
|||||||
<MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
|
<MenuItem Header="添加URL项目" Click="AddUrlIcon"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</hc:Card.ContextMenu>
|
</hc:Card.ContextMenu>
|
||||||
<WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.IsContainerVirtualizable="True">
|
<WrapPanel Orientation="Horizontal" VirtualizingPanel.VirtualizationMode="Recycling"
|
||||||
|
VirtualizingPanel.IsVirtualizing="True"
|
||||||
|
VirtualizingPanel.IsContainerVirtualizable="True"
|
||||||
|
>
|
||||||
<ListBox x:Name="IconListBox" ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=TwoWay}"
|
<ListBox x:Name="IconListBox" ItemsSource="{Binding AppConfig.SelectedMenuIcons, Mode=TwoWay}"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
|
Padding="0,10,0,0"
|
||||||
>
|
>
|
||||||
<ListBox.Background>
|
<ListBox.Background>
|
||||||
<SolidColorBrush Opacity="0"/>
|
<SolidColorBrush Opacity="0"/>
|
||||||
|
|||||||
@@ -483,10 +483,13 @@ namespace GeekDesk
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void ReStartApp(object sender, RoutedEventArgs e)
|
private void ReStartApp(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
MouseHookThread.Dispose();
|
if (appData.AppConfig.MouseMiddleShow)
|
||||||
|
{
|
||||||
|
MouseHookThread.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
Process p = new Process();
|
Process p = new Process();
|
||||||
p.StartInfo.FileName = Constants.APP_DIR + Constants.MY_NAME + ".exe";
|
p.StartInfo.FileName = Constants.APP_DIR + "GeekDesk.exe";
|
||||||
p.StartInfo.WorkingDirectory = Constants.APP_DIR;
|
p.StartInfo.WorkingDirectory = Constants.APP_DIR;
|
||||||
p.Start();
|
p.Start();
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace GeekDesk.Thread
|
|||||||
public class MouseHookThread
|
public class MouseHookThread
|
||||||
{
|
{
|
||||||
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
private static AppConfig appConfig = MainWindow.appData.AppConfig;
|
||||||
private static IKeyboardMouseEvents m_GlobalHook = Hook.GlobalEvents();
|
private static IKeyboardMouseEvents m_GlobalHook = null;
|
||||||
private static Dispatcher dispatcher;
|
private static Dispatcher dispatcher;
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +24,7 @@ namespace GeekDesk.Thread
|
|||||||
{
|
{
|
||||||
//使用dispatcher来单独监听UI线程 防止程序卡顿
|
//使用dispatcher来单独监听UI线程 防止程序卡顿
|
||||||
dispatcher = DispatcherBuild.Build();
|
dispatcher = DispatcherBuild.Build();
|
||||||
|
m_GlobalHook = Hook.GlobalEvents();
|
||||||
dispatcher.Invoke((Action)(() =>
|
dispatcher.Invoke((Action)(() =>
|
||||||
{
|
{
|
||||||
m_GlobalHook.MouseDownExt += M_GlobalHook_MouseDownExt;
|
m_GlobalHook.MouseDownExt += M_GlobalHook_MouseDownExt;
|
||||||
|
|||||||
Reference in New Issue
Block a user