代码清理/拾色器功能/部分程序优化

This commit is contained in:
liufei
2022-05-20 15:39:52 +08:00
parent 5cfaf9a37d
commit d01a27b827
83 changed files with 1320 additions and 627 deletions

View File

@@ -1,7 +1,6 @@
using DraggAnimatedPanelExample;
using GeekDesk.Constant;
using GeekDesk.Control.Windows;
using GeekDesk.MyThread;
using GeekDesk.Util;
using GeekDesk.ViewModel;
using System;
@@ -10,10 +9,8 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
namespace GeekDesk.Control.UserControls.PannelCard
{
@@ -33,7 +30,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
public LeftCardControl()
{
InitializeComponent();
this.Loaded += (s, e) =>
{
@@ -44,7 +41,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
private void SetMenuListBoxItemEvent()
{
{
int size = MenuListBox.Items.Count;
for (int i = 0; i < size; i++)
{
@@ -87,7 +84,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
}
}
DelegateCommand<int[]> _swap;
DelegateCommand<int[]> _swap;
public DelegateCommand<int[]> SwapCommand
{
@@ -333,7 +330,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{
if (appData.AppConfig.HoverMenu && !IS_EDIT)
{
new Thread(() =>
Thread t = new Thread(() =>
{
Thread.Sleep(200);
this.Dispatcher.Invoke(() =>
@@ -345,7 +342,9 @@ namespace GeekDesk.Control.UserControls.PannelCard
MenuListBox.SelectedIndex = index;
}
});
}).Start();
});
t.IsBackground = true;
t.Start();
}
}
@@ -356,7 +355,8 @@ namespace GeekDesk.Control.UserControls.PannelCard
/// <param name="e"></param>
private void ListBoxItem_MouseDown(object sender, MouseButtonEventArgs e)
{
if (RunTimeStatus.SEARCH_BOX_SHOW) {
if (RunTimeStatus.SEARCH_BOX_SHOW)
{
MainWindow.mainWindow.HidedSearchBox();
}
}

View File

@@ -176,7 +176,7 @@
VirtualizingPanel.IsContainerVirtualizable="True"
>
<UniformGrid x:Name="VerticalUFG">
<hc:TransitioningContentControl TransitionMode="Fade">
<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">
<ListBox ItemsSource="{Binding Source={StaticResource SearchIconList},Path=IconList}"
BorderThickness="0"
Padding="0,10,0,0"

View File

@@ -9,13 +9,11 @@ using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
namespace GeekDesk.Control.UserControls.PannelCard
{
@@ -422,12 +420,31 @@ namespace GeekDesk.Control.UserControls.PannelCard
double height = appData.AppConfig.ImageHeight;
width += width * 0.15;
height += height * 0.15;
ImgStoryBoard(sender, (int)width, (int)height, 1, true);
Thread t = new Thread(() =>
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
ImgStoryBoard(sender, (int)width, (int)height, 1, true);
}));
});
t.IsBackground = true;
t.Start();
}
private void StackPanel_MouseLeave(object sender, MouseEventArgs e)
{
ImgStoryBoard(sender, appData.AppConfig.ImageWidth, appData.AppConfig.ImageHeight, 220);
Thread t = new Thread(() =>
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
ImgStoryBoard(sender, appData.AppConfig.ImageWidth, appData.AppConfig.ImageHeight, 260);
}));
});
t.IsBackground = true;
t.Start();
}
@@ -491,6 +508,7 @@ namespace GeekDesk.Control.UserControls.PannelCard
{
ThreadStart ts = new ThreadStart(crs.Remove);
System.Threading.Thread t = new System.Threading.Thread(ts);
t.IsBackground = true;
t.Start();
}
else