6 Commits

Author SHA1 Message Date
liufei
4c5c88769f 🐛 修复无法点击切换菜单的bug 2022-05-27 16:17:02 +08:00
liufei
c310fd441f 📝 更新信息 2022-05-27 15:23:27 +08:00
liufei
12ac544e42 📝 更新信息 2022-05-27 15:08:34 +08:00
liufei
f868eb77b6 2.4.16 补丁版本 2022-05-27 14:55:53 +08:00
liufei
f56991410b 🐛 修复无法修改菜单名称的问题 2022-05-27 11:19:54 +08:00
liufei
9cbbd6cf45 🐛 修复通过任务栏图标打开拾色器, 菜单消失问题 2022-05-27 10:48:34 +08:00
8 changed files with 73 additions and 35 deletions

View File

@@ -49,7 +49,7 @@
</assemblyBinding>
</runtime>
<appSettings>
<add key="Version" value="2.4.15" />
<add key="Version" value="2.4.16" />
<add key="GitHubUrl" value="https://github.com/BookerLiu/GeekDesk" />
<add key="GiteeUrl" value="https://gitee.com/BookerLiu/GeekDesk/tree/master" />
<add key="GitHubUpdateUrl" value="https://raw.githubusercontent.com/BookerLiu/GeekDesk/master/Update.json" />

View File

@@ -18,11 +18,12 @@
<Setter Property="Margin" Value="0,0,0,1"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Opacity="0"/>
<SolidColorBrush Color="Black" Opacity="0.01"/>
</Setter.Value>
</Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<EventSetter Event="MouseEnter" Handler="Menu_MouseEnter"/>
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_MouseDown"/>
<!--<EventSetter Event="Unselected" Handler="Lbi_Unselected"/>-->
<Style.Triggers>
<MultiTrigger>
@@ -45,7 +46,11 @@
</BeginStoryboard>
</MultiTrigger.ExitActions>
<MultiTrigger.Setters>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="Black" Opacity="0.01"/>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="Black"/>
</MultiTrigger.Setters>
</MultiTrigger>
@@ -133,7 +138,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Tag="{Binding}" MouseDown="ListBoxItem_MouseDown">
<StackPanel Tag="{Binding}">
<TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
HorizontalAlignment="Left"
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"

View File

@@ -25,7 +25,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
//是否正在修改菜单
private static bool IS_EDIT = false;
public bool IS_EDIT = false;
public LeftCardControl()
{
@@ -205,9 +205,9 @@ namespace GeekDesk.Control.UserControls.PannelCard
/// <param name="e"></param>
private void RenameMenu(object sender, RoutedEventArgs e)
{
IS_EDIT = true;
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
menuInfo.MenuEdit = (int)Visibility.Visible;
IS_EDIT = true;
}
/// <summary>
@@ -276,6 +276,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
menuInfo.MenuEdit = Visibility.Collapsed;
}
IS_EDIT = false;
//为了解决无法修改菜单的问题
MainWindow.mainWindow.SearchBox.Focus();
MenuListBox.SelectedIndex = menuSelectIndexTemp;
}
}
@@ -309,6 +311,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
private void Menu_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (IS_EDIT) return;
//设置对应菜单的图标列表
if (MenuListBox.SelectedIndex == -1)
{
@@ -359,8 +362,31 @@ namespace GeekDesk.Control.UserControls.PannelCard
{
MainWindow.mainWindow.HidedSearchBox();
}
ListBoxItem lbi = sender as ListBoxItem;
MenuInfo mi = lbi.DataContext as MenuInfo;
int index = MenuListBox.Items.IndexOf(mi);
MenuListBox.SelectedIndex = index;
}
///// <summary>
///// 点击菜单后 隐藏搜索框
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//private void ListBoxItemPanel_MouseDown(object sender, MouseButtonEventArgs e)
//{
// if (RunTimeStatus.SEARCH_BOX_SHOW)
// {
// MainWindow.mainWindow.HidedSearchBox();
// }
// MenuInfo mi = (sender as StackPanel).Tag as MenuInfo;
// int index = MenuListBox.Items.IndexOf(mi);
// MenuListBox.SelectedIndex = index;
//}
/// <summary>
/// 隐藏搜索框
/// </summary>

View File

@@ -81,15 +81,25 @@ namespace GeekDesk.Control.Windows
if (window == null || !window.Activate())
{
window = new GlobalColorPickerWindow();
window.Opacity = 0;
App.DoEvents();
window.Show();
}
window.Hide();
GlobalColorPickerWindow thisWindow = (GlobalColorPickerWindow)window;
if (thisWindow.colorPickerWindow == null || !thisWindow.colorPickerWindow.Activate())
new Thread(() =>
{
thisWindow.colorPickerWindow = new PixelColorPickerWindow(thisWindow.MyColorPicker);
}
thisWindow.colorPickerWindow.Show();
Thread.Sleep(200);
App.Current.Dispatcher.Invoke(() =>
{
GlobalColorPickerWindow thisWindow = (GlobalColorPickerWindow)window;
if (thisWindow.colorPickerWindow == null || !thisWindow.colorPickerWindow.Activate())
{
thisWindow.colorPickerWindow = new PixelColorPickerWindow(thisWindow.MyColorPicker);
}
thisWindow.colorPickerWindow.Show();
});
}).Start();
}
public static void Show()
@@ -98,6 +108,7 @@ namespace GeekDesk.Control.Windows
{
window = new GlobalColorPickerWindow();
}
window.Opacity = 1;
window.Show();
Keyboard.Focus(window);
}

View File

@@ -125,7 +125,7 @@
</DockPanel>
<uc:LeftCardControl Grid.Row="1" Grid.Column="0"/>
<uc:LeftCardControl x:Name="LeftCard" Grid.Row="1" Grid.Column="0"/>
<!--分割线-->
<GridSplitter Opacity="0" Grid.Row="1" Grid.Column="0" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
@@ -141,11 +141,9 @@
TextChanged="SearchBox_TextChanged"
/>
<uc:RightCardControl x:Name="RightCard" Grid.Row="1" Grid.Column="1"/>
<hc:NotifyIcon Icon="/Taskbar.ico" Click="NotifyIcon_Click" x:Name="BarIcon"
MouseRightButtonDown="BarIcon_MouseRightButtonDown"
Visibility="{Binding AppConfig.ShowBarIcon, Mode=TwoWay, Converter={StaticResource Boolean2VisibilityConverter}}">
<hc:NotifyIcon Icon="/Taskbar.ico" Click="NotifyIcon_Click" x:Name="BarIcon"
Visibility="{Binding AppConfig.ShowBarIcon, Mode=TwoWay, Converter={StaticResource Boolean2VisibilityConverter}}">
<hc:NotifyIcon.ContextMenu>
<ContextMenu Width="130" x:Name="TaskbarContextMenu">
<MenuItem Header="打开面板" Click="ShowApp"/>
@@ -158,8 +156,10 @@
<MenuItem Header="退出" Click="ExitApp"/>
</ContextMenu>
</hc:NotifyIcon.ContextMenu>
</hc:NotifyIcon>
<uc:RightCardControl x:Name="RightCard" Grid.Row="1" Grid.Column="1"/>
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
</Grid>
</Border>

View File

@@ -1,5 +1,6 @@
using GeekDesk.Constant;
using GeekDesk.Control.UserControls.Config;
using GeekDesk.Control.UserControls.PannelCard;
using GeekDesk.Control.Windows;
using GeekDesk.Interface;
using GeekDesk.MyThread;
@@ -718,29 +719,24 @@ namespace GeekDesk
/// <param name="e"></param>
private void ColorPicker(object sender, RoutedEventArgs e)
{
TaskbarContextMenu.Visibility = Visibility.Collapsed;
App.DoEvents();
TaskbarContextMenu.IsOpen = false;
GlobalColorPickerWindow.CreateNoShow();
}
/// <summary>
/// 防止点击拾色器后无法显示菜单的问题
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BarIcon_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
TaskbarContextMenu.Visibility = Visibility.Visible;
}
private void Window_GotFocus(object sender, RoutedEventArgs e)
{
Keyboard.Focus(SearchBox);
if (!LeftCard.IS_EDIT)
{
//if判断是为了能够使修改菜单时 菜单能够获得焦点
Keyboard.Focus(SearchBox);
}
}
private void AppWindow_Deactivated(object sender, EventArgs e)
{
AppWindowLostFocus();
}
}
}

View File

@@ -49,5 +49,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.1.5")]
[assembly: AssemblyFileVersion("2.4.1.5")]
[assembly: AssemblyVersion("2.4.1.6")]
[assembly: AssemblyFileVersion("2.4.1.6")]

View File

@@ -1,9 +1,9 @@
{
"title": "GeekDesk版本更新",
"subTitle": "V2.4.15",
"subTitle": "V2.4.16",
"msgTitle": "本次更新内容如下",
"msg": "['PS:又一次的更新, 虽然还有很多需求没有完成, 但仍然耗费了我大量的精力, 没有点Star的兄弟萌, 求个免费Star(GitHub国内某些用户可能进不去), 再给我一点更新的动力!','增加纯色/渐变色背景','增加/优化拾色器功能','增加主面板Logo开关','优化待办任务,现在待办任务快捷键不再是新建待办窗口','增加鼠标滚轮切换菜单功能(需要鼠标指针在菜单栏)','优化搜索功能,增加 快捷键搜索/按键即搜 可选操作','优化贴边隐藏动画, 纵享丝滑了属于是兄弟萌', '其它已知问题修复']",
"githubUrl": "https://github.com/Demo-Liu/GeekDesk/releases",
"msg": "['兄弟萌求Star, 求Star, 由于功能越来越多, 之后的更新我会测试一周再发布, 尽量做到没有BUG, 见谅', '这个版本没有功能性改变, 主要是为了修复上个版本的bug', '修复无法修改菜单名称的问题', '修复通过任务栏图标打开拾色器, 图标菜单消失问题']",
"githubUrl": "https://github.com/BookerLiu/GeekDesk/releases",
"giteeUrl": "https://gitee.com/BookerLiu/GeekDesk/releases",
"version": "2.4.15"
"version": "2.4.16"
}