下班 还有一些小问题 1.0版本就可以发布了
This commit is contained in:
43
Control/Other/BacklogNotificatin.xaml
Normal file
43
Control/Other/BacklogNotificatin.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<Border x:Class="GeekDesk.Control.Other.BacklogNotificatin"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="AliceBlue"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource BorderBrush}"
|
||||
Width="320"
|
||||
Height="450">
|
||||
<Grid>
|
||||
|
||||
<!--<TextBlock Text="You have a new task"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="25"
|
||||
Foreground="#326CF3"
|
||||
HorizontalAlignment="Center" Margin="37.686,17.333,36.353,0"/>
|
||||
<Border Margin="27.647,69,36.354,329" Style="{StaticResource BorderTipInfo}" Height="50">
|
||||
<TextBlock Margin="10,0,0,0" FontSize="20" Text="任务名称"/>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource BorderRegion}" Width="250" Height="200" Effect="{StaticResource EffectShadow1}" Margin="31.646,168,36.353,80">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Text="agaharhaewrhehssssssss任务名称ssssssssssssssssss"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="White"
|
||||
TextWrapping="Wrap"
|
||||
TextAlignment="Center"
|
||||
Margin="10"
|
||||
FontSize="15"/>
|
||||
</Border>
|
||||
</Border>-->
|
||||
|
||||
<ComboBox hc:DropDownElement.ConsistentWidth="False" SelectedIndex="0" Margin="219,334,39,84" Height="20" Width="60">
|
||||
<ComboBox.Items>
|
||||
<ComboBoxItem Content="分"/>
|
||||
<ComboBoxItem Content="时"/>
|
||||
</ComboBox.Items>
|
||||
</ComboBox>
|
||||
|
||||
<Button Command="{Binding OpenCmd}" Content="关闭" Margin="10,0,10,20" Width="298" VerticalAlignment="Bottom"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
28
Control/Other/BacklogNotificatin.xaml.cs
Normal file
28
Control/Other/BacklogNotificatin.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using GeekDesk.ViewModel;
|
||||
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.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// BacklogNotificatin.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class BacklogNotificatin
|
||||
{
|
||||
public BacklogNotificatin(BacklogInfo info)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<Border x:Class="GeekDesk.Control.IconInfoDialog"
|
||||
<Border x:Class="GeekDesk.Control.Other.IconInfoDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
@@ -34,7 +34,7 @@
|
||||
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
||||
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" Width="60" Height="60"/>
|
||||
<Button Content="修改" Click="EditImage"/>
|
||||
<Button Content="默认" Click="EditImageToDefault"/>
|
||||
<Button Content="重置" Click="ReStoreImage"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,128,0,23" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,150,0,10" Grid.ColumnSpan="4">
|
||||
@@ -7,7 +7,7 @@ using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
|
||||
namespace GeekDesk.Control
|
||||
namespace GeekDesk.Control.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// TextDialog.xaml 的交互逻辑
|
||||
@@ -45,7 +45,7 @@ namespace GeekDesk.Control
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void EditImageToDefault(object sender, RoutedEventArgs e)
|
||||
private void ReStoreImage(object sender, RoutedEventArgs e)
|
||||
{
|
||||
IconInfo info = ((Button)sender).Tag as IconInfo;
|
||||
info.BitmapImage = ImageUtil.ByteArrToImage(info.DefaultImage);
|
||||
56
Control/Other/MenuGeometryDialog.xaml
Normal file
56
Control/Other/MenuGeometryDialog.xaml
Normal file
@@ -0,0 +1,56 @@
|
||||
<Border x:Class="GeekDesk.Control.Other.MenuGeometryDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
CornerRadius="10"
|
||||
Width="300"
|
||||
Height="300"
|
||||
Opacity="0.9">
|
||||
<!--<Border.Resources>
|
||||
<Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
|
||||
<Setter Property="Width" Value="40"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
</Border.Resources>
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="AliceBlue" Opacity="0.9"/>
|
||||
</Border.Background>
|
||||
<hc:SimplePanel Margin="10">
|
||||
<Grid Margin="8,20,8,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="93*"/>
|
||||
<ColumnDefinition Width="38*"/>
|
||||
<ColumnDefinition Width="126*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,50,0,71" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,59,0,-9" Grid.ColumnSpan="4">
|
||||
<TextBlock Text="图标:" Style="{StaticResource LeftTB}"/>
|
||||
<Image x:Name="IconImg" Source="{Binding BitmapImage, Mode=OneWay}" Width="60" Height="60"/>
|
||||
<Button Content="修改" Click="EditImage"/>
|
||||
<Button Content="重置" Click="ReStoreImage"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,128,0,23" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,150,0,10" Grid.ColumnSpan="4">
|
||||
<CheckBox x:Name="IconIsAdmin" Content="始终以管理员方式启动" IsChecked="{Binding AdminStartUp, Mode=OneWay}">
|
||||
<CheckBox.Background>
|
||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||
<GradientStop Color="#FF9EA3A6"/>
|
||||
</LinearGradientBrush>
|
||||
</CheckBox.Background>
|
||||
</CheckBox>
|
||||
</hc:UniformSpacingPanel>
|
||||
<hc:Divider LineStrokeDashArray="3,3" Margin="0,200,0,-27" LineStroke="Black" Grid.ColumnSpan="4"/>
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,218,0,-38" Grid.ColumnSpan="4">
|
||||
<Button Content="保存" Command="hc:ControlCommands.Close" Click="SaveProperty" Margin="208,6,-208,-10"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Grid>
|
||||
<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</hc:SimplePanel>-->
|
||||
</Border>
|
||||
28
Control/Other/MenuGeometryDialog.xaml.cs
Normal file
28
Control/Other/MenuGeometryDialog.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// MenuGeometryDialogxaml.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MenuGeometryDialog
|
||||
{
|
||||
public MenuGeometryDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
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 的交互逻辑
|
||||
69
Control/Windows/BacklogInfoWindow.xaml
Normal file
69
Control/Windows/BacklogInfoWindow.xaml
Normal file
@@ -0,0 +1,69 @@
|
||||
<Window x:Class="GeekDesk.Control.Windows.BacklogInfoWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:GeekDesk"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="670"
|
||||
Width="450"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent" ShowInTaskbar="False"
|
||||
>
|
||||
<Window.Resources>
|
||||
|
||||
</Window.Resources>
|
||||
<Border CornerRadius="3" BorderThickness="2" BorderBrush="Black" Margin="0,0,0,313.323" MouseDown="DragMove">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="AliceBlue"/>
|
||||
</Border.Background>
|
||||
<Border.Resources>
|
||||
<Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
|
||||
<Setter Property="Width" Value="65"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
</Border.Resources>
|
||||
<Grid Margin="0,0,0,8">
|
||||
<hc:SimplePanel Margin="20" HorizontalAlignment="Center">
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||
<TextBlock Text="待办任务*:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="Title" Width="290" FontSize="14" />
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,48.997,0,-48.997">
|
||||
<TextBlock Text="待办详情:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="Msg" TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
VerticalScrollBarVisibility="Visible"
|
||||
Height="100" MaxHeight="150" MinHeight="100" Width="290" MinWidth="290"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,167.622,0,-167.622">
|
||||
<TextBlock Text="待办时间*:" Style="{StaticResource LeftTB}"/>
|
||||
<hc:DateTimePicker x:Name="ExeTime" ErrorStr="test" Width="200"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4" Margin="0,228,0,-228">
|
||||
<TextBlock Text="完成时间:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBlock x:Name="DoneTime" Width="200"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,273.333,0,-93.333" Grid.ColumnSpan="4">
|
||||
<Button Content="保存" Background="#5BC0DE"
|
||||
Foreground="White" Margin="320,6,-208,-10"
|
||||
Click="Save_Button_Click"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
</hc:SimplePanel>
|
||||
<Button Panel.ZIndex="2" Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
145
Control/Windows/BacklogInfoWindow.xaml.cs
Normal file
145
Control/Windows/BacklogInfoWindow.xaml.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
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.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// BacklogInfoWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class BacklogInfoWindow
|
||||
{
|
||||
|
||||
private static int windowType = -1;
|
||||
private static readonly int NEW_BACKLOG = 1;
|
||||
private static readonly int DETAIL_BACKLOG = 2;
|
||||
|
||||
private AppData appData = MainWindow.appData;
|
||||
|
||||
private BacklogInfo info;
|
||||
|
||||
private BacklogInfoWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
ExeTime.SelectedDateTime = DateTime.Now.AddMinutes(10);
|
||||
this.Topmost = true;
|
||||
}
|
||||
private BacklogInfoWindow(BacklogInfo info)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Topmost = true;
|
||||
Title.Text = info.Title;
|
||||
Msg.Text = info.Msg;
|
||||
ExeTime.Text = info.ExeTime;
|
||||
DoneTime.Text = info.DoneTime;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点击关闭按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Close_Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移动窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.LeftButton == MouseButtonState.Pressed)
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存待办
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Save_Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (Title.Text.Trim() == "" || ExeTime.Text.Trim() == "")
|
||||
{
|
||||
Growl.Warning("任务标题 和 待办时间不能为空!");
|
||||
return;
|
||||
} else
|
||||
{
|
||||
try
|
||||
{
|
||||
Convert.ToDateTime(ExeTime.Text);
|
||||
} catch (Exception)
|
||||
{
|
||||
Growl.Warning("请输入正确的时间!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (windowType == NEW_BACKLOG)
|
||||
{
|
||||
info = new BacklogInfo
|
||||
{
|
||||
Title = Title.Text,
|
||||
Msg = Msg.Text,
|
||||
ExeTime = ExeTime.Text
|
||||
};
|
||||
appData.ExeBacklogList.Add(info);
|
||||
} else
|
||||
{
|
||||
int index =appData.ExeBacklogList.IndexOf(info);
|
||||
appData.ExeBacklogList.Remove(info);
|
||||
info.Title = Title.Text;
|
||||
info.Msg = Msg.Text;
|
||||
info.ExeTime = ExeTime.Text;
|
||||
info.DoneTime = DoneTime.Text;
|
||||
appData.ExeBacklogList.Insert(index, info);
|
||||
}
|
||||
CommonCode.SaveAppData(MainWindow.appData);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private static System.Windows.Window window = null;
|
||||
public static void ShowNone()
|
||||
{
|
||||
if (window == null || !window.Activate())
|
||||
{
|
||||
window = new BacklogInfoWindow();
|
||||
|
||||
}
|
||||
windowType = NEW_BACKLOG;
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private static System.Windows.Window window2 = null;
|
||||
public static void ShowDetail(BacklogInfo info)
|
||||
{
|
||||
if (window2 == null || !window2.Activate())
|
||||
{
|
||||
window2 = new BacklogInfoWindow(info);
|
||||
}
|
||||
windowType = DETAIL_BACKLOG;
|
||||
window2.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
99
Control/Windows/BacklogWindow.xaml
Normal file
99
Control/Windows/BacklogWindow.xaml
Normal file
@@ -0,0 +1,99 @@
|
||||
<Window x:Class="GeekDesk.Control.Windows.BacklogWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:GeekDesk"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="450"
|
||||
Width="850"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent" ShowInTaskbar="False"
|
||||
>
|
||||
<Window.Resources>
|
||||
<Style x:Key="MenuStyle" TargetType="hc:SideMenuItem" BasedOn="{StaticResource SideMenuItemBaseStyle}">
|
||||
<Style.Setters>
|
||||
<Setter Property="Background" Value="AliceBlue"/>
|
||||
</Style.Setters>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFE2E2E2"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#FFDAD7D7"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
<Border CornerRadius="8" BorderThickness="0">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="AliceBlue" Opacity="0.9"/>
|
||||
</Border.Background>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="140"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<hc:Card Grid.Row="0" Grid.Column="0">
|
||||
<hc:SideMenu BorderThickness="1"
|
||||
AutoSelect="True"
|
||||
>
|
||||
<hc:SideMenu.Background>
|
||||
<SolidColorBrush Color="AliceBlue"/>
|
||||
</hc:SideMenu.Background>
|
||||
|
||||
<hc:SideMenu.ItemContainerStyle>
|
||||
<Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MenuStyle}"/>
|
||||
</hc:SideMenu.ItemContainerStyle>
|
||||
|
||||
<hc:SideMenuItem Header="待办列表"
|
||||
IsSelected="True"
|
||||
Selected="MemuClick"
|
||||
Tag="ExeList"
|
||||
>
|
||||
<hc:SideMenuItem.Icon>
|
||||
<Button Background="Transparent"
|
||||
BorderThickness="0"
|
||||
hc:IconElement.Geometry="{StaticResource About}"
|
||||
hc:IconElement.Height="18"
|
||||
hc:IconElement.Width="18"
|
||||
HorizontalAlignment="Right"
|
||||
/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
</hc:SideMenuItem>
|
||||
<hc:SideMenuItem Header="历史待办"
|
||||
Tag="History"
|
||||
Selected="MemuClick">
|
||||
<hc:SideMenuItem.Icon>
|
||||
<Button Background="Transparent"
|
||||
BorderThickness="0"
|
||||
hc:IconElement.Geometry="{StaticResource Pannel}"
|
||||
hc:IconElement.Height="18"
|
||||
hc:IconElement.Width="18"
|
||||
HorizontalAlignment="Right"
|
||||
/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
</hc:SideMenuItem>
|
||||
</hc:SideMenu>
|
||||
</hc:Card>
|
||||
<hc:Card Grid.Row="0" Grid.Column="1" x:Name="RightCard" Height="450" MouseDown="DragMove" />
|
||||
|
||||
|
||||
<Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
|
||||
<Button Content="新建待办"
|
||||
Panel.ZIndex="1"
|
||||
Background="#5BC0DE"
|
||||
Foreground="White"
|
||||
Grid.Column="1"
|
||||
Margin="590,29,10,384"
|
||||
Click="CreateBacklog_BtnClick"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
97
Control/Windows/BacklogWindow.xaml.cs
Normal file
97
Control/Windows/BacklogWindow.xaml.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
using GeekDesk.Control.UserControls.Backlog;
|
||||
using GeekDesk.ViewModel;
|
||||
using HandyControl.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
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.Shapes;
|
||||
|
||||
namespace GeekDesk.Control.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// BacklogWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class BacklogWindow
|
||||
{
|
||||
private static BacklogControl backlog = new BacklogControl();
|
||||
private AppData appData = MainWindow.appData;
|
||||
private BacklogWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
RightCard.Content = backlog;
|
||||
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
|
||||
this.Topmost = true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 移动窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.LeftButton == MouseButtonState.Pressed)
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点击关闭按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Close_Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void MemuClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SideMenuItem smi = sender as SideMenuItem;
|
||||
switch (smi.Tag.ToString())
|
||||
{
|
||||
case "History":
|
||||
backlog.BacklogList.ItemsSource = appData.HiBacklogList;
|
||||
break;
|
||||
default:
|
||||
backlog.BacklogList.ItemsSource = appData.ExeBacklogList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新建待办
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void CreateBacklog_BtnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
BacklogInfoWindow.ShowNone();
|
||||
}
|
||||
|
||||
|
||||
private static System.Windows.Window window = null;
|
||||
public static void Show()
|
||||
{
|
||||
if (window == null || !window.Activate())
|
||||
{
|
||||
window = new BacklogWindow();
|
||||
}
|
||||
window.Show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,17 @@
|
||||
<hc:Window x:Class="GeekDesk.Control.ConfigWindow"
|
||||
<hc:Window x:Class="GeekDesk.Control.Windows.ConfigWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:GeekDesk"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="450"
|
||||
Width="600"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Background="Transparent" ShowInTaskbar="False"
|
||||
>
|
||||
|
||||
<Window.Resources>
|
||||
@@ -37,7 +38,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -72,13 +73,14 @@
|
||||
Tag="Theme"
|
||||
Selected="MemuClick">
|
||||
<hc:SideMenuItem.Icon>
|
||||
<Button Background="Transparent"
|
||||
<!--<Button Background="Transparent"
|
||||
BorderThickness="0"
|
||||
hc:IconElement.Geometry="{StaticResource Pannel}"
|
||||
hc:IconElement.Height="18"
|
||||
hc:IconElement.Width="18"
|
||||
HorizontalAlignment="Right"
|
||||
/>
|
||||
/>-->
|
||||
<TextBlock Text="" Style="{StaticResource MyIcon}"/>
|
||||
</hc:SideMenuItem.Icon>
|
||||
</hc:SideMenuItem>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using GeekDesk.Control.UserControls;
|
||||
using GeekDesk.Control.UserControls.Config;
|
||||
using GeekDesk.ViewModel;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
@@ -8,7 +9,7 @@ using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace GeekDesk.Control
|
||||
namespace GeekDesk.Control.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// ConfigDialog.xaml 的交互逻辑
|
||||
@@ -20,7 +21,7 @@ namespace GeekDesk.Control
|
||||
private static MotionControl motion = new MotionControl();
|
||||
public MainWindow mainWindow;
|
||||
|
||||
public ConfigWindow(AppConfig appConfig, MainWindow mainWindow)
|
||||
private ConfigWindow(AppConfig appConfig, MainWindow mainWindow)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = appConfig;
|
||||
@@ -69,5 +70,15 @@ namespace GeekDesk.Control
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static System.Windows.Window window = null;
|
||||
public static void Show(AppConfig appConfig, MainWindow mainWindow)
|
||||
{
|
||||
if (window == null || !window.Activate())
|
||||
{
|
||||
window = new ConfigWindow(appConfig, mainWindow);
|
||||
}
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user