下班 还有一些小问题 1.0版本就可以发布了
This commit is contained in:
57
Control/UserControls/Backlog/BacklogControl.xaml
Normal file
57
Control/UserControls/Backlog/BacklogControl.xaml
Normal file
@@ -0,0 +1,57 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.Backlog.BacklogControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
Background="AliceBlue"
|
||||
>
|
||||
|
||||
<hc:SimplePanel Margin="20">
|
||||
<Grid>
|
||||
<DataGrid x:Name="BacklogList"
|
||||
HeadersVisibility="All"
|
||||
AutoGenerateColumns="False"
|
||||
ItemsSource="{Binding}"
|
||||
IsReadOnly="True"
|
||||
Initialized="DataGridMenu_Initialized"
|
||||
>
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu x:Name="Menu" Width="120">
|
||||
<MenuItem Header="详情" Click="DetailMenu_Click"/>
|
||||
<MenuItem Header="删除" Click="DeleteMenu_Click"/>
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource DataGridRowStyle}">
|
||||
<EventSetter Event="MouseRightButtonUp" Handler="DataGridRow_MouseRightButtonUp" />
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource DataGridColumnHeaderStyle}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
|
||||
<DataGrid.Background>
|
||||
<SolidColorBrush Color="AliceBlue"/>
|
||||
</DataGrid.Background>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="120" Binding="{Binding Title}" Header="待办任务"/>
|
||||
<DataGridTextColumn Width="210" Binding="{Binding Msg}" Header="待办详情"/>
|
||||
<DataGridTextColumn Width="147" Binding="{Binding ExeTime}" Header="待办时间"/>
|
||||
<DataGridTextColumn Width="147" Binding="{Binding DoneTime}" Header="完成时间"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<StackPanel hc:Growl.GrowlParent="True" hc:Growl.Token="DeleteConfirm" VerticalAlignment="Center" Margin="0,10,10,50"/>
|
||||
</Grid>
|
||||
</hc:SimplePanel>
|
||||
</UserControl>
|
||||
72
Control/UserControls/Backlog/BacklogControl.xaml.cs
Normal file
72
Control/UserControls/Backlog/BacklogControl.xaml.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using GeekDesk.Control.Windows;
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.ViewModel;
|
||||
using HandyControl.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls.Backlog
|
||||
{
|
||||
/// <summary>
|
||||
/// BacklogControl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class BacklogControl : UserControl
|
||||
{
|
||||
private AppData appData = MainWindow.appData;
|
||||
public BacklogControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void DeleteMenu_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BacklogInfo info = BacklogList.SelectedItem as BacklogInfo;
|
||||
Growl.Ask("确认删除吗?", isConfirmed =>
|
||||
{
|
||||
if (isConfirmed)
|
||||
{
|
||||
appData.ExeBacklogList.Remove(info);
|
||||
CommonCode.SaveAppData(MainWindow.appData);
|
||||
}
|
||||
return true;
|
||||
}, "DeleteConfirm");
|
||||
}
|
||||
|
||||
private void DetailMenu_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BacklogInfo info = BacklogList.SelectedItem as BacklogInfo;
|
||||
BacklogInfoWindow.ShowDetail(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 禁用设置按钮右键菜单
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void DataGridMenu_Initialized(object sender, EventArgs e)
|
||||
{
|
||||
BacklogList.ContextMenu = null;
|
||||
}
|
||||
|
||||
|
||||
private void DataGridRow_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
BacklogList.SelectedIndex = ((DataGridRow)sender).GetIndex();
|
||||
Menu.IsOpen = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.AboutControl"
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.Config.AboutControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
Background="AliceBlue"
|
||||
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls
|
||||
namespace GeekDesk.Control.UserControls.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// AboutControl.xaml 的交互逻辑
|
||||
@@ -1,4 +1,4 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.MotionControl"
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.Config.MotionControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
@@ -1,4 +1,5 @@
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.Control.Windows;
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.ViewModel;
|
||||
using GlobalHotKey;
|
||||
using HandyControl.Data;
|
||||
@@ -19,7 +20,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls
|
||||
namespace GeekDesk.Control.UserControls.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 动作设置
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.ThemeControl"
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.Config.ThemeControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.Config"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
mc:Ignorable="d"
|
||||
Background="AliceBlue"
|
||||
@@ -16,7 +16,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls
|
||||
namespace GeekDesk.Control.UserControls.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// MotionControl.xaml 的交互逻辑
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.LeftCardControl"
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.PannelCard.LeftCardControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
||||
@@ -83,8 +83,9 @@
|
||||
<ContextMenu x:Key="menuDialog" Width="200">
|
||||
<MenuItem Header="新建菜单" Click="CreateMenu"/>
|
||||
<MenuItem Header="重命名" Click="RenameMenu" Tag="{Binding}"/>
|
||||
<MenuItem Header="修改图标" Click="EditMenuGeometry" Tag="{Binding}"/>
|
||||
<MenuItem Header="删除" Click="DeleteMenu" Tag="{Binding}"/>
|
||||
</ContextMenu>
|
||||
</ContextMenu>
|
||||
</ListBox.Resources>
|
||||
|
||||
<ListBox.ItemContainerStyle>
|
||||
@@ -116,19 +117,26 @@
|
||||
IsVisibleChanged="MenuEditWhenVisibilityChanged"
|
||||
Visibility="{Binding MenuEdit}"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Background="Transparent"
|
||||
<!--<Button Background="Transparent"
|
||||
BorderThickness="0"
|
||||
hc:IconElement.Geometry="M438.857143 548.571429a36.571429 36.571429 0 0 1 36.571428 36.571428v256a36.571429 36.571429 0 0 1-36.571428 36.571429H182.857143a36.571429 36.571429 0 0 1-36.571429-36.571429v-256a36.571429 36.571429 0 0 1 36.571429-36.571428h256z m402.285714 0a36.571429 36.571429 0 0 1 36.571429 36.571428v256a36.571429 36.571429 0 0 1-36.571429 36.571429h-256a36.571429 36.571429 0 0 1-36.571428-36.571429v-256a36.571429 36.571429 0 0 1 36.571428-36.571428h256z m-438.857143 73.142857H219.428571v182.857143h182.857143v-182.857143z m402.285715 0h-182.857143v182.857143h182.857143v-182.857143zM438.857143 146.285714a36.571429 36.571429 0 0 1 36.571428 36.571429v256a36.571429 36.571429 0 0 1-36.571428 36.571428H182.857143a36.571429 36.571429 0 0 1-36.571429-36.571428V182.857143a36.571429 36.571429 0 0 1 36.571429-36.571429h256z m402.285714 0a36.571429 36.571429 0 0 1 36.571429 36.571429v256a36.571429 36.571429 0 0 1-36.571429 36.571428h-256a36.571429 36.571429 0 0 1-36.571428-36.571428V182.857143a36.571429 36.571429 0 0 1 36.571428-36.571429h256zM402.285714 219.428571H219.428571v182.857143h182.857143V219.428571z m402.285715 0h-182.857143v182.857143h182.857143V219.428571z"
|
||||
hc:IconElement.Geometry="{StaticResource test}"
|
||||
hc:IconElement.Height="18"
|
||||
hc:IconElement.Width="18"
|
||||
/>
|
||||
<TextBlock Text="{Binding MenuName}"
|
||||
/>-->
|
||||
<!--<Button Background="Transparent" BorderThickness="0" Height="10" Width="10">
|
||||
<Canvas>
|
||||
<Path Fill="#92E3C3" Data="M391.68 957.44h-66.56v-158.4128H66.56v-66.56h258.56v-174.08H66.56v-66.56h258.56V307.2h66.56l-0.0512 184.6272h240.6912V307.2h66.56l-0.0512 184.6272H957.44v307.2h-258.6112V957.44h-66.4576l-0.0512-158.4128H391.6288V957.44z m-0.0512-224.9728h240.6912v-174.08H391.6288v174.08z m565.8112-174.08h-258.6112v174.08H957.44v-174.08z"/>
|
||||
<Path Fill="#5D7092" Data="M51.2 51.2h921.6v256H51.2z"/>
|
||||
<Path Fill="#5D7092" Data="M921.6 0a102.4 102.4 0 0 1 102.4 102.4v819.2a102.4 102.4 0 0 1-102.4 102.4H102.4a102.4 102.4 0 0 1-102.4-102.4V102.4a102.4 102.4 0 0 1 102.4-102.4h819.2z m0 66.56H102.4a35.84 35.84 0 0 0-35.5328 30.976L66.56 102.4v819.2a35.84 35.84 0 0 0 30.976 35.5328L102.4 957.44h819.2a35.84 35.84 0 0 0 35.5328-30.976L957.44 921.6V102.4a35.84 35.84 0 0 0-30.976-35.5328L921.6 66.56z"/>
|
||||
</Canvas>
|
||||
</Button>-->
|
||||
<TextBlock Text="" Style="{StaticResource MyIcon}"/>
|
||||
<TextBlock Text="{Binding MenuName}"
|
||||
VerticalAlignment="Center"
|
||||
IsVisibleChanged="MenuWhenVisibilityChanged"
|
||||
Visibility="{Binding NotMenuEdit}"
|
||||
/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
@@ -17,7 +17,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls
|
||||
namespace GeekDesk.Control.UserControls.PannelCard
|
||||
{
|
||||
/// <summary>
|
||||
/// LeftCardControl.xaml 的交互逻辑
|
||||
@@ -123,7 +123,19 @@ namespace GeekDesk.Control.UserControls
|
||||
private void DeleteMenu(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MenuInfo menuInfo = ((MenuItem)sender).Tag as MenuInfo;
|
||||
if (appData.MenuList.Count == 1)
|
||||
{
|
||||
//如果删除以后没有菜单的话 先创建一个
|
||||
CreateMenu(null, null);
|
||||
}
|
||||
appData.MenuList.Remove(menuInfo);
|
||||
if (menus.SelectedIndex == -1)
|
||||
{
|
||||
// 选中下一个菜单
|
||||
menus.SelectedIndex = 0;
|
||||
appData.AppConfig.SelectedMenuIndex = menus.SelectedIndex;
|
||||
appData.AppConfig.SelectedMenuIcons = appData.MenuList[0].IconList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -171,6 +183,14 @@ namespace GeekDesk.Control.UserControls
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改菜单图标
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void EditMenuGeometry(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.RightCardControl"
|
||||
<UserControl x:Class="GeekDesk.Control.UserControls.PannelCard.RightCardControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls"
|
||||
xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:cvt="clr-namespace:GeekDesk.Converts"
|
||||
xmlns:DraggAnimatedPanel="clr-namespace:DraggAnimatedPanel"
|
||||
@@ -1,5 +1,6 @@
|
||||
using DraggAnimatedPanelExample;
|
||||
using GeekDesk.Constant;
|
||||
using GeekDesk.Control.Other;
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.ViewModel;
|
||||
using System;
|
||||
@@ -20,7 +21,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.UserControls
|
||||
namespace GeekDesk.Control.UserControls.PannelCard
|
||||
{
|
||||
/// <summary>
|
||||
/// RightCardControl.xaml 的交互逻辑
|
||||
Reference in New Issue
Block a user