待办任务提示,资源管理器菜单功能
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<hc:SimplePanel Margin="20">
|
||||
<StackPanel >
|
||||
<TextBlock Text="程序设置" />
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,5,0,0">
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
|
||||
<CheckBox x:Name="SelfStartUpBox" Content="开机自启动" IsChecked="{Binding SelfStartUp}" Click="SelfStartUpBox_Click">
|
||||
<CheckBox.Background>
|
||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||
@@ -26,8 +26,21 @@
|
||||
</CheckBox.Background>
|
||||
</CheckBox>
|
||||
</hc:UniformSpacingPanel>
|
||||
<TextBlock Text="更新源" Margin="0,20,0,0"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,5,0,0">
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,6,0,0">
|
||||
<CheckBox Content="性能模式" IsChecked="{Binding PMModel}"
|
||||
hc:Poptip.HitMode="None"
|
||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||
hc:Poptip.Content="开启性能模式将取消图标动画效果"
|
||||
hc:Poptip.Placement="TopLeft">
|
||||
<CheckBox.Background>
|
||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||
<GradientStop Color="#FF9EA3A6"/>
|
||||
</LinearGradientBrush>
|
||||
</CheckBox.Background>
|
||||
</CheckBox>
|
||||
</hc:UniformSpacingPanel>
|
||||
<TextBlock Text="更新源" Margin="0,25,0,0"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="20,8,0,0">
|
||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}"
|
||||
Style="{StaticResource RadioButtonIcon}" Content="Gitee"
|
||||
hc:IconElement.Geometry="{StaticResource Gitee}"
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
</ListBox.Background>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<DraggAnimatedPanel:DraggAnimatedPanel ItemsHeight="95"
|
||||
ItemsWidth="95"
|
||||
<DraggAnimatedPanel:DraggAnimatedPanel ItemsHeight="110"
|
||||
ItemsWidth="110"
|
||||
Background="#00FFFFFF"
|
||||
HorizontalAlignment="Center"
|
||||
SwapCommand="{Binding SwapCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
@@ -65,7 +65,7 @@
|
||||
<ContextMenu x:Key="IconDialog" Width="200">
|
||||
<MenuItem Header="管理员方式运行" Click="IconAdminStart" Tag="{Binding}"/>
|
||||
<MenuItem Header="打开文件所在位置" Click="ShowInExplore" Tag="{Binding}"/>
|
||||
<!--<MenuItem Header="资源管理器菜单" Click="MenuItem_Click" Tag="{Binding}"/>-->
|
||||
<MenuItem Header="资源管理器菜单" Click="SystemContextMenu" Tag="{Binding}"/>
|
||||
<MenuItem Header="属性" Click="PropertyConfig" Tag="{Binding}"/>
|
||||
<MenuItem Header="从列表移除" Click="RemoveIcon" Tag="{Binding}"/>
|
||||
</ContextMenu>
|
||||
@@ -80,15 +80,15 @@
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Tag="{Binding}"
|
||||
Height="95"
|
||||
Width="95"
|
||||
Height="110"
|
||||
Width="110"
|
||||
HorizontalAlignment="Center"
|
||||
hc:Poptip.HitMode="None"
|
||||
hc:Poptip.IsOpen="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||
hc:Poptip.Content="{Binding Content}"
|
||||
hc:Poptip.Placement="BottomLeft"
|
||||
Background="#00FFFFFF"
|
||||
MouseLeftButtonDown="IconClick"
|
||||
MouseLeftButtonUp="IconClick"
|
||||
MouseEnter="StackPanel_MouseEnter"
|
||||
MouseLeave="StackPanel_MouseLeave"
|
||||
>
|
||||
|
||||
@@ -203,13 +203,16 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
appData.MenuList[appData.AppConfig.SelectedMenuIndex].IconList.Remove((IconInfo)((MenuItem)sender).Tag);
|
||||
}
|
||||
|
||||
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
||||
private void SystemContextMenu(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
IconInfo icon = (IconInfo)((MenuItem)sender).Tag;
|
||||
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explorer.exe");
|
||||
psi.Arguments = "/e,/select," + icon.Path;
|
||||
System.Diagnostics.Process.Start(psi);
|
||||
DirectoryInfo[] folders = new DirectoryInfo[1];
|
||||
folders[0] = new DirectoryInfo(icon.Path);
|
||||
ShellContextMenu scm = new ShellContextMenu();
|
||||
System.Drawing.Point p = System.Windows.Forms.Cursor.Position;
|
||||
p.X -= 80;
|
||||
p.Y -= 80;
|
||||
scm.ShowContextMenu(folders, p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -236,6 +239,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
private void ImgStroyBoard(object sender, int height, int width, int milliseconds)
|
||||
{
|
||||
|
||||
if (appData.AppConfig.PMModel) return;
|
||||
|
||||
StackPanel sp = sender as StackPanel;
|
||||
|
||||
Image img = sp.Children[0] as Image;
|
||||
@@ -255,6 +260,5 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
||||
img.BeginAnimation(HeightProperty, heightAnimation);
|
||||
img.BeginAnimation(WidthProperty, widthAnimation);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user