忱 沈 4 years ago
parent
commit
09c7b1e749
  1. 4
      App.xaml
  2. 2
      App.xaml.cs
  3. 39
      MainWindow.xaml
  4. 7
      MainWindow.xaml.cs
  5. 42
      Properties/Resources.Designer.cs
  6. 22
      Properties/Settings.Designer.cs
  7. 14
      SUNLIGHT-Audit.csproj
  8. 8
      SUNLIGHT-Audit.git.sln
  9. 4
      Windows/help.xaml
  10. 2
      Windows/help.xaml.cs

4
App.xaml

@ -1,7 +1,7 @@
<Application x:Class="SUNLIGHT_Administrate.git.App" <Application x:Class="SUNLIGHT_Audit.git.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SUNLIGHT_Administrate.git" xmlns:local="clr-namespace:SUNLIGHT_Audit.git"
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>

2
App.xaml.cs

@ -6,7 +6,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
namespace SUNLIGHT_Administrate.git namespace SUNLIGHT_Audit.git
{ {
/// <summary> /// <summary>
/// App.xaml 的交互逻辑 /// App.xaml 的交互逻辑

39
MainWindow.xaml

@ -1,13 +1,18 @@
<Window x:Class="SUNLIGHT_Administrate.git.MainWindow" <Window x:Class="SUNLIGHT_Audit.git.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SUNLIGHT_Administrate.git" xmlns:local="clr-namespace:SUNLIGHT_Audit.git"
mc:Ignorable="d" mc:Ignorable="d"
Background="#FFF5F5F5" Background="#FFF5F5F5"
Title="SUNLIGHT" Height="900" Width="1280" WindowStartupLocation="CenterScreen"> Title="" Height="900" Width="1280" WindowStartupLocation="CenterScreen">
<!--隐藏标题栏-->
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="30" UseAeroCaptionButtons="False"></WindowChrome>
</WindowChrome.WindowChrome>
<!--模板-->
<Window.Resources> <Window.Resources>
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}"> <Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
@ -88,20 +93,36 @@
</Style> </Style>
</Window.Resources> </Window.Resources>
<Grid> <Grid>
<Rectangle HorizontalAlignment="Left" Width="140" Margin="0,0,0,0" Fill="#FFCCCCCC"/> <!--工具栏-->
<Rectangle HorizontalAlignment="Left" Width="140" Fill="#FFCCCCCC"/>
<!--工具选项-->
<RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="统计" Tag="&#xf080;" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="统计" Tag="&#xf080;" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="原料" Tag="&#xF00B;" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/> <RadioButton Content="原料" Tag="&#xF00B;" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
<RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,50" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Exit" /> <RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,5" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Exit" />
<RadioButton Content="信息" Tag="&#xF0B1;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,105" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Help" /> <RadioButton Content="信息" Tag="&#xF0B1;" HorizontalAlignment="Left" Height="55" Margin="0,0,0,60" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Help" />
<!--LOGO-->
<Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120"> <Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120">
<Rectangle.Fill> <Rectangle.Fill>
<ImageBrush ImageSource="/Logo/sunlight_sc.png"/> <ImageBrush ImageSource="/Logo/sunlight_sc.png"/>
</Rectangle.Fill> </Rectangle.Fill>
</Rectangle> </Rectangle>
<!--righe-->
<Grid Grid.Column="1"> <!--自定义标题栏-->
<ContentControl x:Name="container" Margin="140,0,0,0"/> <Border HorizontalAlignment="Stretch" Height="35" Margin="140,0,0,0" VerticalAlignment="Top" Background="#FFE6E6E6" />
<Button Content="➖" HorizontalAlignment="Right" Height="35" Margin="0,0,0,0" VerticalAlignment="Top" Width="40" Click="Button_Click" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FF100F0F"
BorderThickness="0,0,0,0" FontSize="24" OpacityMask="#FFA4A4A4" WindowChrome.IsHitTestVisibleInChrome="True" VerticalContentAlignment="Center" Padding="0,0,0,0" FontWeight="Bold" FontStyle="Normal"/>
<Button Content="Button" HorizontalAlignment="Left" Height="190" Margin="185,155,0,0" VerticalAlignment="Top" Width="250"/>
<!--用户窗体-->
<Grid Grid.ColumnSpan="2">
<ContentControl x:Name="container" Margin="140,0,0,0">
</ContentControl>
</Grid> </Grid>
</Grid> </Grid>
</Window> </Window>

7
MainWindow.xaml.cs

@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation; using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace SUNLIGHT_Administrate.git namespace SUNLIGHT_Audit.git
{ {
/// <summary> /// <summary>
/// MainWindow.xaml 的交互逻辑 /// MainWindow.xaml 的交互逻辑
@ -53,5 +53,10 @@ namespace SUNLIGHT_Administrate.git
break; break;
} }
} }
private void Button_Click(object sender, RoutedEventArgs e)//最小化按钮
{
SystemCommands.MinimizeWindow(this);//最小化页面
}
} }
} }

42
Properties/Resources.Designer.cs

@ -3,48 +3,43 @@
// 此代码由工具生成。 // 此代码由工具生成。
// 运行时版本:4.0.30319.42000 // 运行时版本:4.0.30319.42000
// //
// 对此文件的更改可能导致不正确的行为,如果 // 对此文件的更改可能导致不正确的行为,并且如果
// 重新生成代码,则所做更改将丢失。 // 重新生成代码,这些更改将会丢失。
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace SUNLIGHT_Administrate.git.Properties namespace SUNLIGHT_Audit.git.Properties {
{ using System;
/// <summary> /// <summary>
/// 强类型资源类,用于查找本地化字符串等。 /// 一个强类型资源类,用于查找本地化字符串等。
/// </summary> /// </summary>
// 此类是由 StronglyTypedResourceBuilder // 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen // 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。 // (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources internal class Resources {
{
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() internal Resources() {
{
} }
/// <summary> /// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。 /// 返回此类使用的缓存 ResourceManager 实例。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager internal static global::System.Resources.ResourceManager ResourceManager {
{ get {
get if (object.ReferenceEquals(resourceMan, null)) {
{ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SUNLIGHT_Audit.git.Properties.Resources", typeof(Resources).Assembly);
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SUNLIGHT_Administrate.git.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
@ -56,14 +51,11 @@ namespace SUNLIGHT_Administrate.git.Properties
/// 使用此强类型资源类的所有资源查找执行重写。 /// 使用此强类型资源类的所有资源查找执行重写。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture internal static global::System.Globalization.CultureInfo Culture {
{ get {
get
{
return resourceCulture; return resourceCulture;
} }
set set {
{
resourceCulture = value; resourceCulture = value;
} }
} }

22
Properties/Settings.Designer.cs

@ -1,28 +1,24 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 此代码由工具生成。
// Runtime Version:4.0.30319.42000 // 运行时版本:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // 对此文件的更改可能会导致不正确的行为,并且如果
// the code is regenerated. // 重新生成代码,这些更改将会丢失。
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace SUNLIGHT_Administrate.git.Properties namespace SUNLIGHT_Audit.git.Properties {
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default public static Settings Default {
{ get {
get
{
return defaultInstance; return defaultInstance;
} }
} }

14
SUNLIGHT-Administrate.git.csproj → SUNLIGHT-Audit.csproj

@ -6,14 +6,15 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}</ProjectGuid> <ProjectGuid>{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>SUNLIGHT_Administrate.git</RootNamespace> <RootNamespace>SUNLIGHT_Audit.git</RootNamespace>
<AssemblyName>SUNLIGHT-Administrate.git</AssemblyName> <AssemblyName>SUNLIGHT-Audit.git</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
@ -26,7 +27,6 @@
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
@ -50,6 +50,14 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />

8
SUNLIGHT-Administrate.git.sln → SUNLIGHT-Audit.git.sln

@ -3,18 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339 VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SUNLIGHT-Administrate.git", "SUNLIGHT-Administrate.git.csproj", "{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SUNLIGHT-Audit", "SUNLIGHT-Audit.csproj", "{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|Any CPU.Build.0 = Debug|Any CPU {35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|x64.ActiveCfg = Debug|x64
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Debug|x64.Build.0 = Debug|x64
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|Any CPU.ActiveCfg = Release|Any CPU {35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|Any CPU.Build.0 = Release|Any CPU {35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|Any CPU.Build.0 = Release|Any CPU
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|x64.ActiveCfg = Release|x64
{35310B1C-E4E5-47DF-A8D4-CDC34816BAB6}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

4
Windows/help.xaml

@ -1,9 +1,9 @@
<Window x:Class="SUNLIGHT_Administrate.git.Windows.help" <Window x:Class="SUNLIGHT_Audit.git.Windows.help"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SUNLIGHT_Administrate.git.Windows" xmlns:local="clr-namespace:SUNLIGHT_Audit.git.Windows"
mc:Ignorable="d" mc:Ignorable="d"
Title="SUNLIGHT" Height="480" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="NoResize"> Title="SUNLIGHT" Height="480" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
<Grid> <Grid>

2
Windows/help.xaml.cs

@ -12,7 +12,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace SUNLIGHT_Administrate.git.Windows namespace SUNLIGHT_Audit.git.Windows
{ {
/// <summary> /// <summary>
/// help.xaml 的交互逻辑 /// help.xaml 的交互逻辑