下班 还有一些小问题 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Control/Other/IconInfoDialog.xaml
Normal file
56
Control/Other/IconInfoDialog.xaml
Normal file
@@ -0,0 +1,56 @@
|
||||
<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"
|
||||
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>
|
||||
82
Control/Other/IconInfoDialog.xaml.cs
Normal file
82
Control/Other/IconInfoDialog.xaml.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.ViewModel;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
|
||||
namespace GeekDesk.Control.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// TextDialog.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class IconInfoDialog
|
||||
{
|
||||
|
||||
public IconInfoDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public IconInfoDialog(IconInfo info)
|
||||
{
|
||||
this.DataContext = info;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存修改属性
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void SaveProperty(object sender, RoutedEventArgs e)
|
||||
{
|
||||
IconInfo info = this.DataContext as IconInfo;
|
||||
info.BitmapImage = IconImg.Source as BitmapImage;
|
||||
info.Name = IconName.Text;
|
||||
info.AdminStartUp = IconIsAdmin.IsChecked.Value;
|
||||
CommonCode.SaveAppData(MainWindow.appData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改图标为默认
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void ReStoreImage(object sender, RoutedEventArgs e)
|
||||
{
|
||||
IconInfo info = ((Button)sender).Tag as IconInfo;
|
||||
info.BitmapImage = ImageUtil.ByteArrToImage(info.DefaultImage);
|
||||
CommonCode.SaveAppData(MainWindow.appData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改图标
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void EditImage(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog
|
||||
{
|
||||
Multiselect = false, //只允许选中单个文件
|
||||
Filter = "所有文件(*.*)|*.*"
|
||||
};
|
||||
if (ofd.ShowDialog() == true)
|
||||
{
|
||||
IconInfo info = this.DataContext as IconInfo;
|
||||
info.BitmapImage = ImageUtil.GetBitmapIconByPath(ofd.FileName);
|
||||
CommonCode.SaveAppData(MainWindow.appData);
|
||||
}
|
||||
} catch (Exception)
|
||||
{
|
||||
HandyControl.Controls.Growl.WarningGlobal("修改图标失败,已重置为默认图标!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user