👥 菜单删除增加询问确认
This commit is contained in:
@@ -219,6 +219,10 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void DeleteMenu(object sender, RoutedEventArgs e)
|
private void DeleteMenu(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
HandyControl.Controls.Growl.Ask("确认删除此菜单吗?", isConfirmed =>
|
||||||
|
{
|
||||||
|
if (isConfirmed)
|
||||||
{
|
{
|
||||||
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
||||||
if (appData.MenuList.Count == 1)
|
if (appData.MenuList.Count == 1)
|
||||||
@@ -242,6 +246,9 @@ namespace GeekDesk.Control.UserControls.PannelCard
|
|||||||
appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
|
appData.AppConfig.SelectedMenuIndex = MenuListBox.SelectedIndex;
|
||||||
appData.AppConfig.SelectedMenuIcons = appData.MenuList[index].IconList;
|
appData.AppConfig.SelectedMenuIcons = appData.MenuList[index].IconList;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}, "MainWindowAskGrowl");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 编辑菜单失焦或者敲下Enter键时保存修改后的菜单
|
/// 编辑菜单失焦或者敲下Enter键时保存修改后的菜单
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
<CheckBox x:Name="HideBox" Visibility="Hidden" Panel.ZIndex="2"/>
|
<CheckBox x:Name="HideBox" Visibility="Hidden" Panel.ZIndex="2"/>
|
||||||
|
|
||||||
<StackPanel HorizontalAlignment="Right" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowGrowl" Grid.Column="1" Grid.Row="1"/>
|
<StackPanel HorizontalAlignment="Right" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowGrowl" Grid.Column="1" Grid.Row="1"/>
|
||||||
|
<StackPanel HorizontalAlignment="Center" Panel.ZIndex="99" hc:Growl.GrowlParent="False" hc:Growl.Token="MainWindowAskGrowl" Grid.Column="1" Grid.Row="1"/>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
|
<DockPanel Grid.Row="0" Grid.Column="0" MouseMove="DragMove">
|
||||||
<DockPanel.Background>
|
<DockPanel.Background>
|
||||||
|
|||||||
Reference in New Issue
Block a user