添加项目文件。
This commit is contained in:
parent
2c3a2dbe4f
commit
03e8e92c40
363
.gitignore
vendored
Normal file
363
.gitignore
vendored
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Oo]ut/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
46
CopyCode.sln
Normal file
46
CopyCode.sln
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.33027.164
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XKRS.UI.Main", "CopyCode\XKRS.UI.Main.csproj", "{9E42B387-BB80-4808-B9AB-4CE5F819A675}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{A4083DEF-5596-46B5-8100-E67DCFFA14DA}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XKRS.Common.Model", "XKRS.Common.Model\XKRS.Common.Model.csproj", "{46D35E44-A2B1-403C-9E12-93759F91143F}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{116AB5E1-0706-4E01-A99C-3F2B103961BA}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XKRS.UI.Model.Winform", "XKRS.UI.Model.Winform\XKRS.UI.Model.Winform.csproj", "{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9E42B387-BB80-4808-B9AB-4CE5F819A675}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9E42B387-BB80-4808-B9AB-4CE5F819A675}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9E42B387-BB80-4808-B9AB-4CE5F819A675}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9E42B387-BB80-4808-B9AB-4CE5F819A675}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{46D35E44-A2B1-403C-9E12-93759F91143F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{46D35E44-A2B1-403C-9E12-93759F91143F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{46D35E44-A2B1-403C-9E12-93759F91143F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{46D35E44-A2B1-403C-9E12-93759F91143F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{9E42B387-BB80-4808-B9AB-4CE5F819A675} = {116AB5E1-0706-4E01-A99C-3F2B103961BA}
|
||||||
|
{46D35E44-A2B1-403C-9E12-93759F91143F} = {A4083DEF-5596-46B5-8100-E67DCFFA14DA}
|
||||||
|
{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA} = {116AB5E1-0706-4E01-A99C-3F2B103961BA}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {27D8466D-FF59-4412-AF2F-6F25C396BBD1}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
122
CopyCode/AdvancedPwdFrm.Designer.cs
generated
Normal file
122
CopyCode/AdvancedPwdFrm.Designer.cs
generated
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
|
||||||
|
namespace XKRS.UI.Main
|
||||||
|
{
|
||||||
|
partial class AdvancedPwdFrm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.btnExitLogin = new System.Windows.Forms.Button();
|
||||||
|
this.txtPwd = new System.Windows.Forms.TextBox();
|
||||||
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
|
this.btnOK = new System.Windows.Forms.Button();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.label1.Location = new System.Drawing.Point(32, 32);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(52, 14);
|
||||||
|
this.label1.TabIndex = 1;
|
||||||
|
this.label1.Text = "密码:";
|
||||||
|
//
|
||||||
|
// btnExitLogin
|
||||||
|
//
|
||||||
|
this.btnExitLogin.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnExitLogin.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.btnExitLogin.Location = new System.Drawing.Point(12, 63);
|
||||||
|
this.btnExitLogin.Name = "btnExitLogin";
|
||||||
|
this.btnExitLogin.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnExitLogin.TabIndex = 2;
|
||||||
|
this.btnExitLogin.Text = "退出登录";
|
||||||
|
this.btnExitLogin.UseVisualStyleBackColor = true;
|
||||||
|
this.btnExitLogin.Click += new System.EventHandler(this.btnExitLogin_Click);
|
||||||
|
//
|
||||||
|
// txtPwd
|
||||||
|
//
|
||||||
|
this.txtPwd.Font = new System.Drawing.Font("宋体", 10F);
|
||||||
|
this.txtPwd.Location = new System.Drawing.Point(126, 28);
|
||||||
|
this.txtPwd.Name = "txtPwd";
|
||||||
|
this.txtPwd.PasswordChar = '*';
|
||||||
|
this.txtPwd.Size = new System.Drawing.Size(236, 23);
|
||||||
|
this.txtPwd.TabIndex = 0;
|
||||||
|
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyDown);
|
||||||
|
//
|
||||||
|
// btnCancel
|
||||||
|
//
|
||||||
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
|
this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.btnCancel.Location = new System.Drawing.Point(208, 63);
|
||||||
|
this.btnCancel.Name = "btnCancel";
|
||||||
|
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnCancel.TabIndex = 2;
|
||||||
|
this.btnCancel.Text = "Cancel";
|
||||||
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
|
//
|
||||||
|
// btnOK
|
||||||
|
//
|
||||||
|
this.btnOK.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.btnOK.Location = new System.Drawing.Point(289, 63);
|
||||||
|
this.btnOK.Name = "btnOK";
|
||||||
|
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.btnOK.TabIndex = 2;
|
||||||
|
this.btnOK.Text = "OK";
|
||||||
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
|
//
|
||||||
|
// AdvancedPwdFrm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(388, 98);
|
||||||
|
this.ControlBox = false;
|
||||||
|
this.Controls.Add(this.btnOK);
|
||||||
|
this.Controls.Add(this.btnCancel);
|
||||||
|
this.Controls.Add(this.txtPwd);
|
||||||
|
this.Controls.Add(this.btnExitLogin);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||||
|
this.Name = "AdvancedPwdFrm";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "用户验证";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.Button btnExitLogin;
|
||||||
|
private System.Windows.Forms.TextBox txtPwd;
|
||||||
|
private System.Windows.Forms.Button btnCancel;
|
||||||
|
private System.Windows.Forms.Button btnOK;
|
||||||
|
}
|
||||||
|
}
|
86
CopyCode/AdvancedPwdFrm.cs
Normal file
86
CopyCode/AdvancedPwdFrm.cs
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace XKRS.UI.Main
|
||||||
|
{
|
||||||
|
public partial class AdvancedPwdFrm : Form
|
||||||
|
{
|
||||||
|
public static Action<bool> OnLoginOK { get; set; }//内置泛型委托,以参数形式传递方法
|
||||||
|
string pwd = "";//定义一个字符串字段存储密码
|
||||||
|
string PWD//属性
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(pwd))
|
||||||
|
{
|
||||||
|
var pwdSetting = ConfigurationManager.AppSettings["Pwd"];//获取当前默认的数据
|
||||||
|
if (!string.IsNullOrEmpty(pwdSetting))//如果输入非空且不是null
|
||||||
|
{
|
||||||
|
pwd = pwdSetting.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pwd = "p@ssw0rd";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pwd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public AdvancedPwdFrm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CheckInputPassword();
|
||||||
|
}
|
||||||
|
private void CheckInputPassword()
|
||||||
|
{
|
||||||
|
string input = txtPwd.Text.Trim();//移出当前字符串前导与结尾空白字符串
|
||||||
|
if (string.IsNullOrWhiteSpace(input))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Please input password");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (input == PWD)
|
||||||
|
{
|
||||||
|
OnLoginOK?.Invoke(true);
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Wrong Password");
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtPwd_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
|
CheckInputPassword();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnExitLogin_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OnLoginOK?.Invoke(false);
|
||||||
|
this.DialogResult = DialogResult.Abort;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
CopyCode/AdvancedPwdFrm.resx
Normal file
120
CopyCode/AdvancedPwdFrm.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
6
CopyCode/App.config
Normal file
6
CopyCode/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
232
CopyCode/MainFrm.Designer.cs
generated
Normal file
232
CopyCode/MainFrm.Designer.cs
generated
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
|
||||||
|
namespace XKRS.UI.Main
|
||||||
|
{
|
||||||
|
partial class MainFrm
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows 窗体设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm));
|
||||||
|
this.menuMain = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.ststripDevices = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.tsslLoginStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
|
this.stsStripLayout = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.tssBtnLayout = new System.Windows.Forms.ToolStripSplitButton();
|
||||||
|
this.保存布局ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.重置布局ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.布局另存为ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.stsStripWarning = new System.Windows.Forms.StatusStrip();
|
||||||
|
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||||
|
this.ctmsExit = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.tsmiExitProgram = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.dockPanelMain = new WeifenLuo.WinFormsUI.Docking.DockPanel();
|
||||||
|
this.ststripDevices.SuspendLayout();
|
||||||
|
this.stsStripLayout.SuspendLayout();
|
||||||
|
this.ctmsExit.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// menuMain
|
||||||
|
//
|
||||||
|
this.menuMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.menuMain.AutoSize = false;
|
||||||
|
this.menuMain.Dock = System.Windows.Forms.DockStyle.None;
|
||||||
|
this.menuMain.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.menuMain.Name = "menuMain";
|
||||||
|
this.menuMain.Padding = new System.Windows.Forms.Padding(6, 1, 0, 1);
|
||||||
|
this.menuMain.Size = new System.Drawing.Size(728, 24);
|
||||||
|
this.menuMain.TabIndex = 1;
|
||||||
|
this.menuMain.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// ststripDevices
|
||||||
|
//
|
||||||
|
this.ststripDevices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.ststripDevices.AutoSize = false;
|
||||||
|
this.ststripDevices.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(96)))), ((int)(((byte)(130)))));
|
||||||
|
this.ststripDevices.Dock = System.Windows.Forms.DockStyle.None;
|
||||||
|
this.ststripDevices.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.tsslLoginStatus});
|
||||||
|
this.ststripDevices.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
|
||||||
|
this.ststripDevices.Location = new System.Drawing.Point(0, 333);
|
||||||
|
this.ststripDevices.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||||
|
this.ststripDevices.Name = "ststripDevices";
|
||||||
|
this.ststripDevices.Size = new System.Drawing.Size(651, 25);
|
||||||
|
this.ststripDevices.SizingGrip = false;
|
||||||
|
this.ststripDevices.TabIndex = 5;
|
||||||
|
this.ststripDevices.Text = "statusStrip1";
|
||||||
|
//
|
||||||
|
// tsslLoginStatus
|
||||||
|
//
|
||||||
|
this.tsslLoginStatus.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.tsslLoginStatus.Name = "tsslLoginStatus";
|
||||||
|
this.tsslLoginStatus.Size = new System.Drawing.Size(44, 20);
|
||||||
|
this.tsslLoginStatus.Text = "未登录";
|
||||||
|
//
|
||||||
|
// stsStripLayout
|
||||||
|
//
|
||||||
|
this.stsStripLayout.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.stsStripLayout.AutoSize = false;
|
||||||
|
this.stsStripLayout.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(96)))), ((int)(((byte)(130)))));
|
||||||
|
this.stsStripLayout.Dock = System.Windows.Forms.DockStyle.None;
|
||||||
|
this.stsStripLayout.GripMargin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.stsStripLayout.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.tssBtnLayout});
|
||||||
|
this.stsStripLayout.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
|
||||||
|
this.stsStripLayout.Location = new System.Drawing.Point(612, 333);
|
||||||
|
this.stsStripLayout.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||||
|
this.stsStripLayout.Name = "stsStripLayout";
|
||||||
|
this.stsStripLayout.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||||
|
this.stsStripLayout.Size = new System.Drawing.Size(186, 25);
|
||||||
|
this.stsStripLayout.SizingGrip = false;
|
||||||
|
this.stsStripLayout.TabIndex = 8;
|
||||||
|
this.stsStripLayout.Text = "statusStrip1";
|
||||||
|
//
|
||||||
|
// tssBtnLayout
|
||||||
|
//
|
||||||
|
this.tssBtnLayout.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
|
this.tssBtnLayout.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.保存布局ToolStripMenuItem,
|
||||||
|
this.重置布局ToolStripMenuItem,
|
||||||
|
this.布局另存为ToolStripMenuItem});
|
||||||
|
this.tssBtnLayout.ForeColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.tssBtnLayout.Image = ((System.Drawing.Image)(resources.GetObject("tssBtnLayout.Image")));
|
||||||
|
this.tssBtnLayout.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.tssBtnLayout.Name = "tssBtnLayout";
|
||||||
|
this.tssBtnLayout.Size = new System.Drawing.Size(72, 23);
|
||||||
|
this.tssBtnLayout.Text = "布局配置";
|
||||||
|
this.tssBtnLayout.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
|
||||||
|
//
|
||||||
|
// 保存布局ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.保存布局ToolStripMenuItem.Name = "保存布局ToolStripMenuItem";
|
||||||
|
this.保存布局ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
|
||||||
|
this.保存布局ToolStripMenuItem.Text = "保存布局";
|
||||||
|
//
|
||||||
|
// 重置布局ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.重置布局ToolStripMenuItem.Name = "重置布局ToolStripMenuItem";
|
||||||
|
this.重置布局ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
|
||||||
|
this.重置布局ToolStripMenuItem.Text = "重置布局";
|
||||||
|
//
|
||||||
|
// 布局另存为ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.布局另存为ToolStripMenuItem.Name = "布局另存为ToolStripMenuItem";
|
||||||
|
this.布局另存为ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
|
||||||
|
this.布局另存为ToolStripMenuItem.Text = "布局另存为";
|
||||||
|
//
|
||||||
|
// stsStripWarning
|
||||||
|
//
|
||||||
|
this.stsStripWarning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.stsStripWarning.Dock = System.Windows.Forms.DockStyle.None;
|
||||||
|
this.stsStripWarning.Location = new System.Drawing.Point(596, 0);
|
||||||
|
this.stsStripWarning.MinimumSize = new System.Drawing.Size(100, 24);
|
||||||
|
this.stsStripWarning.Name = "stsStripWarning";
|
||||||
|
this.stsStripWarning.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||||
|
this.stsStripWarning.Size = new System.Drawing.Size(202, 24);
|
||||||
|
this.stsStripWarning.SizingGrip = false;
|
||||||
|
this.stsStripWarning.TabIndex = 11;
|
||||||
|
this.stsStripWarning.Text = "statusStrip1";
|
||||||
|
//
|
||||||
|
// notifyIcon
|
||||||
|
//
|
||||||
|
this.notifyIcon.BalloonTipTitle = "asdasd";
|
||||||
|
this.notifyIcon.ContextMenuStrip = this.ctmsExit;
|
||||||
|
this.notifyIcon.Text = "notifyIcon1";
|
||||||
|
//
|
||||||
|
// ctmsExit
|
||||||
|
//
|
||||||
|
this.ctmsExit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.tsmiExitProgram});
|
||||||
|
this.ctmsExit.Name = "ctmsExit";
|
||||||
|
this.ctmsExit.Size = new System.Drawing.Size(125, 26);
|
||||||
|
//
|
||||||
|
// tsmiExitProgram
|
||||||
|
//
|
||||||
|
this.tsmiExitProgram.Name = "tsmiExitProgram";
|
||||||
|
this.tsmiExitProgram.Size = new System.Drawing.Size(124, 22);
|
||||||
|
this.tsmiExitProgram.Text = "退出程序";
|
||||||
|
//
|
||||||
|
// dockPanelMain
|
||||||
|
//
|
||||||
|
this.dockPanelMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.dockPanelMain.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
|
||||||
|
this.dockPanelMain.Location = new System.Drawing.Point(0, 24);
|
||||||
|
this.dockPanelMain.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.dockPanelMain.Name = "dockPanelMain";
|
||||||
|
this.dockPanelMain.Size = new System.Drawing.Size(800, 310);
|
||||||
|
this.dockPanelMain.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// MainFrm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(798, 358);
|
||||||
|
this.Controls.Add(this.dockPanelMain);
|
||||||
|
this.Controls.Add(this.stsStripWarning);
|
||||||
|
this.Controls.Add(this.stsStripLayout);
|
||||||
|
this.Controls.Add(this.ststripDevices);
|
||||||
|
this.Controls.Add(this.menuMain);
|
||||||
|
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
|
||||||
|
this.IsMdiContainer = true;
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.MainMenuStrip = this.menuMain;
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
|
||||||
|
this.Name = "MainFrm";
|
||||||
|
this.Text = "MainFrm";
|
||||||
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
this.Load += new System.EventHandler(this.MainFrm_Load);
|
||||||
|
this.ststripDevices.ResumeLayout(false);
|
||||||
|
this.ststripDevices.PerformLayout();
|
||||||
|
this.stsStripLayout.ResumeLayout(false);
|
||||||
|
this.stsStripLayout.PerformLayout();
|
||||||
|
this.ctmsExit.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.MenuStrip menuMain;
|
||||||
|
private System.Windows.Forms.StatusStrip ststripDevices;
|
||||||
|
private System.Windows.Forms.ToolStripStatusLabel tsslLoginStatus;
|
||||||
|
private System.Windows.Forms.StatusStrip stsStripLayout;
|
||||||
|
private System.Windows.Forms.ToolStripSplitButton tssBtnLayout;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 保存布局ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 重置布局ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 布局另存为ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.StatusStrip stsStripWarning;
|
||||||
|
private System.Windows.Forms.NotifyIcon notifyIcon;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip ctmsExit;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsmiExitProgram;
|
||||||
|
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanelMain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
260
CopyCode/MainFrm.cs
Normal file
260
CopyCode/MainFrm.cs
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using WeifenLuo.WinFormsUI.Docking;
|
||||||
|
using XKRS.Common.Factory;
|
||||||
|
using XKRS.Common.Interface;
|
||||||
|
using XKRS.Common.Model.Helper;
|
||||||
|
using XKRS.UI.Model.Winform;
|
||||||
|
|
||||||
|
namespace XKRS.UI.Main
|
||||||
|
{
|
||||||
|
public partial class MainFrm : Form
|
||||||
|
{
|
||||||
|
IProcess _process = null;
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.Process processB = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.Process processC = new System.Diagnostics.Process();
|
||||||
|
public MainFrm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;
|
||||||
|
var theme = new VS2015LightTheme();
|
||||||
|
stsStripLayout.BackColor = ststripDevices.BackColor = Color.FromArgb(64, 64, 64);
|
||||||
|
dockPanelMain.Theme = theme;
|
||||||
|
VisualStudioToolStripExtender extender = new VisualStudioToolStripExtender();
|
||||||
|
extender.SetStyle(menuMain, VisualStudioToolStripExtender.VsVersion.Vs2015, theme);
|
||||||
|
InitialMenu()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly ManualResetEvent _allMenuLoadDoneHandle = new ManualResetEvent(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void MainFrm_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadLayoutFromXML(m_deserializeMenuFrm);
|
||||||
|
_allMenuLoadDoneHandle.Set();
|
||||||
|
|
||||||
|
AdvancedPwdFrm.OnLoginOK = OnLoginOK;
|
||||||
|
|
||||||
|
LoadProcess();
|
||||||
|
LoadLayoutFromXML(m_deserializeDeviceRunFrm);
|
||||||
|
LoadProcess(false);
|
||||||
|
Openexe();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Openexe()
|
||||||
|
{
|
||||||
|
string strPathExe = Environment.CurrentDirectory + "\\BDebug2022110201_5" + "\\NJJ-ZK.exe";
|
||||||
|
process.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\BDebug2022110201_5";
|
||||||
|
process.StartInfo.FileName = strPathExe;
|
||||||
|
process.StartInfo.Arguments = null;//-s -t 可以用来关机或重启
|
||||||
|
process.StartInfo.UseShellExecute = false;
|
||||||
|
process.StartInfo.RedirectStandardInput = false;//true
|
||||||
|
process.StartInfo.RedirectStandardOutput = false;
|
||||||
|
process.StartInfo.RedirectStandardError = false;
|
||||||
|
process.StartInfo.CreateNoWindow = false;
|
||||||
|
process.Start();//启动
|
||||||
|
|
||||||
|
string strPathExe2 = Environment.CurrentDirectory + "\\CDebug2022110201_4" + "\\NJJ-ZK.exe";
|
||||||
|
processB.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\CDebug2022110201_4";
|
||||||
|
processB.StartInfo.FileName = strPathExe2;
|
||||||
|
processB.StartInfo.Arguments = null;//-s -t 可以用来关机、开机或重启
|
||||||
|
processB.StartInfo.UseShellExecute = false;
|
||||||
|
processB.StartInfo.RedirectStandardInput = false; //true
|
||||||
|
processB.StartInfo.RedirectStandardOutput = false; //true
|
||||||
|
processB.StartInfo.RedirectStandardError = false;
|
||||||
|
processB.StartInfo.CreateNoWindow = false;
|
||||||
|
processB.Start();//启动
|
||||||
|
|
||||||
|
string strPathExe3 = Environment.CurrentDirectory + "\\ADebug2022110201_2" + "\\NJJ-ZK.exe";
|
||||||
|
processC.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\ADebug2022110201_2";
|
||||||
|
processC.StartInfo.FileName = strPathExe3;
|
||||||
|
processC.StartInfo.Arguments = null;//-s -t 可以用来关机、开机或重启
|
||||||
|
processC.StartInfo.UseShellExecute = false;
|
||||||
|
processC.StartInfo.RedirectStandardInput = false; //true
|
||||||
|
processC.StartInfo.RedirectStandardOutput = false; //true
|
||||||
|
processC.StartInfo.RedirectStandardError = false;
|
||||||
|
processC.StartInfo.CreateNoWindow = false;
|
||||||
|
processC.Start();//启动
|
||||||
|
}
|
||||||
|
private void Killexe()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
process.CloseMainWindow();//通过向进程的主窗口发送关闭消息来关闭拥有用户界面的进程
|
||||||
|
process.Close();//释放与此组件关联的所有资源
|
||||||
|
processB.CloseMainWindow();//通过向进程的主窗口发送关闭消息来关闭拥有用户界面的进程
|
||||||
|
processB.Close();//释放与此组件关联的所有资源
|
||||||
|
processC.CloseMainWindow();//通过向进程的主窗口发送关闭消息来关闭拥有用户界面的进程
|
||||||
|
processC.Close();//释放与此组件关联的所有资源
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<string> LoadProcessCode()
|
||||||
|
{
|
||||||
|
var systemProcessCodes = ProcessFactory.GetProcessCodes();
|
||||||
|
var avaiableProcessCodes = SettingHelper.GetProcessCodes();
|
||||||
|
List<string> pCodes = new List<string>();
|
||||||
|
if (avaiableProcessCodes.Count > 0)
|
||||||
|
{
|
||||||
|
pCodes = avaiableProcessCodes.Intersect(systemProcessCodes).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pCodes = systemProcessCodes;
|
||||||
|
}
|
||||||
|
if (pCodes.Count > 1)
|
||||||
|
{
|
||||||
|
pCodes.RemoveAll(u => u == "");
|
||||||
|
}
|
||||||
|
return pCodes;
|
||||||
|
}
|
||||||
|
private List<string> LoadProductionCode()
|
||||||
|
{
|
||||||
|
return SettingHelper.GetProductionCodes();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 载入流程
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="isInitialProcess">是否为初始化流程</param>
|
||||||
|
private void LoadProcess(bool isInitialProcess = true)
|
||||||
|
{
|
||||||
|
if(isInitialProcess)//初次创建流程
|
||||||
|
{
|
||||||
|
var processCodes = LoadProcessCode();
|
||||||
|
var productionCodes = LoadProductionCode();
|
||||||
|
_process = ProcessFactory.CreateStationProcess(processCodes[0], productionCodes[0], out string msg);
|
||||||
|
if (!string.IsNullOrWhiteSpace(msg))
|
||||||
|
{
|
||||||
|
_process = null;
|
||||||
|
|
||||||
|
throw new ProcessException($"创建失败,{msg}", null, ExceptionLevel.Fatal);
|
||||||
|
}
|
||||||
|
_process.InitialProcess("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region Login
|
||||||
|
bool isLogin = false;
|
||||||
|
bool IsLogin
|
||||||
|
{
|
||||||
|
get => isLogin;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isLogin = value;
|
||||||
|
tsslLoginStatus.Text = isLogin ? "已登录" : "未登录";
|
||||||
|
foreach(var dock in dockPanelMain.Contents)
|
||||||
|
{
|
||||||
|
var menuFrm = dock as MenuFrmBase;
|
||||||
|
if (menuFrm != null)
|
||||||
|
{
|
||||||
|
menuFrm.SetLoginStatus(isLogin);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnLoginOK(bool isLogin)
|
||||||
|
{
|
||||||
|
IsLogin = isLogin;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Layout布局
|
||||||
|
|
||||||
|
string _layoutFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"{SettingHelper.GetSelectLayout()}.layout");//路径
|
||||||
|
private DeserializeDockContent m_deserializeMenuFrm;
|
||||||
|
private DeserializeDockContent m_deserializeDeviceRunFrm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadLayoutFromXML(DeserializeDockContent dContent)
|
||||||
|
{
|
||||||
|
if (!File.Exists(_layoutFile))
|
||||||
|
return;
|
||||||
|
dockPanelMain.SuspendLayout(true);//悬挂式布局
|
||||||
|
|
||||||
|
CloseAllDeviceFrm();
|
||||||
|
while (dockPanelMain.Contents.Count > 0)
|
||||||
|
{
|
||||||
|
dockPanelMain.Contents[0].DockHandler.DockPanel = null;
|
||||||
|
}
|
||||||
|
using (FileStream stream = new FileStream(_layoutFile, FileMode.Open))
|
||||||
|
{
|
||||||
|
dockPanelMain.LoadFromXml(stream, dContent);
|
||||||
|
stream.Close();
|
||||||
|
}
|
||||||
|
dockPanelMain.ResumeLayout(true, true);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region CloseForm
|
||||||
|
private void DeviceDisplayFrm_FormClosed(object sender,FormClosedEventArgs e)
|
||||||
|
{
|
||||||
|
string id = (sender as DeviceRunFrmBase).Device.Id;
|
||||||
|
if(showedDeviceUIDict.ContainsKey(id))
|
||||||
|
{
|
||||||
|
showedDeviceUIDict.Remove(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseAllDeviceFrm()
|
||||||
|
{
|
||||||
|
this.Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
dockPanelMain.Contents.Select(u =>
|
||||||
|
{
|
||||||
|
if (u is DeviceRunFrmBase runFrmBase)
|
||||||
|
{
|
||||||
|
return runFrmBase;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}).ToList().ForEach(u =>
|
||||||
|
{
|
||||||
|
if (u == null)
|
||||||
|
return;
|
||||||
|
if (_process.DeviceCollection.Any(d => d.Id == u.Device.Id))
|
||||||
|
return;
|
||||||
|
u.DockPanel = null;
|
||||||
|
u.Close();
|
||||||
|
});
|
||||||
|
this.ResumeLayout();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Device Display 设备展示到底部状态栏
|
||||||
|
readonly Dictionary<string, DeviceRunFrmBase> showedDeviceUIDict = new Dictionary<string, DeviceRunFrmBase>();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
154
CopyCode/MainFrm.resx
Normal file
154
CopyCode/MainFrm.resx
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="menuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ststripDevices.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>132, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="stsStripLayout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>265, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="tssBtnLayout.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="stsStripWarning.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>400, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="notifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>546, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ctmsExit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>657, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
22
CopyCode/Program.cs
Normal file
22
CopyCode/Program.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace XKRS.UI.Main
|
||||||
|
{
|
||||||
|
static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 应用程序的主入口点。
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new MainFrm());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
CopyCode/Properties/AssemblyInfo.cs
Normal file
36
CopyCode/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("框架")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("HP Inc.")]
|
||||||
|
[assembly: AssemblyProduct("XKRS.UI.Main")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © HP Inc. 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("9e42b387-bb80-4808-b9ab-4ce5f819a675")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
63
CopyCode/Properties/Resources.Designer.cs
generated
Normal file
63
CopyCode/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace XKRS.UI.Main.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||||
|
/// </summary>
|
||||||
|
// 此类是由 StronglyTypedResourceBuilder
|
||||||
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||||
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
|
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XKRS.UI.Main.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||||
|
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
117
CopyCode/Properties/Resources.resx
Normal file
117
CopyCode/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
26
CopyCode/Properties/Settings.Designer.cs
generated
Normal file
26
CopyCode/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace XKRS.UI.Main.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
CopyCode/Properties/Settings.settings
Normal file
7
CopyCode/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
113
CopyCode/XKRS.UI.Main.csproj
Normal file
113
CopyCode/XKRS.UI.Main.csproj
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{9E42B387-BB80-4808-B9AB-4CE5F819A675}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>XKRS.UI.Main</RootNamespace>
|
||||||
|
<AssemblyName>XKRS.UI.Main</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\Release\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DockPanelSuite.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DockPanelSuite.ThemeVS2015.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AdvancedPwdFrm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AdvancedPwdFrm.Designer.cs">
|
||||||
|
<DependentUpon>AdvancedPwdFrm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainFrm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainFrm.Designer.cs">
|
||||||
|
<DependentUpon>MainFrm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="AdvancedPwdFrm.resx">
|
||||||
|
<DependentUpon>AdvancedPwdFrm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainFrm.resx">
|
||||||
|
<DependentUpon>MainFrm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\XKRS.Common.Model\XKRS.Common.Model.csproj">
|
||||||
|
<Project>{46D35E44-A2B1-403C-9E12-93759F91143F}</Project>
|
||||||
|
<Name>XKRS.Common.Model</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\XKRS.UI.Model.Winform\XKRS.UI.Model.Winform.csproj">
|
||||||
|
<Project>{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}</Project>
|
||||||
|
<Name>XKRS.UI.Model.Winform</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
5
CopyCode/packages.config
Normal file
5
CopyCode/packages.config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="DockPanelSuite" version="3.1.0" targetFramework="net472" />
|
||||||
|
<package id="DockPanelSuite.ThemeVS2015" version="3.1.0" targetFramework="net472" />
|
||||||
|
</packages>
|
6
XKRS.Common.Model/App.config
Normal file
6
XKRS.Common.Model/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
48
XKRS.Common.Model/Exception/ExceptionHelper.cs
Normal file
48
XKRS.Common.Model/Exception/ExceptionHelper.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Model.Helper
|
||||||
|
{
|
||||||
|
public enum ExceptionLevel
|
||||||
|
{
|
||||||
|
Info=0,
|
||||||
|
Warning=1,
|
||||||
|
Fatal=2,
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ProcessException : Exception
|
||||||
|
{
|
||||||
|
public ExceptionLevel Level { get; set; } = ExceptionLevel.Warning;
|
||||||
|
|
||||||
|
public ProcessException(string error, Exception ex = null, ExceptionLevel lvl = ExceptionLevel.Warning)
|
||||||
|
{
|
||||||
|
Level = lvl;
|
||||||
|
ExceptionNotice();
|
||||||
|
}
|
||||||
|
public void ExceptionNotice()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static class ExceptionHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
public static string GetExceptionMessage(this Exception ex)
|
||||||
|
{
|
||||||
|
string msg = "异常信息:" + ex.Message;
|
||||||
|
//当前异常不为空
|
||||||
|
if (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
msg += ";\t内部异常信息:" + ex.InnerException.GetExceptionMessage();
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
XKRS.Common.Model/Factory/FactoryHelper.cs
Normal file
63
XKRS.Common.Model/Factory/FactoryHelper.cs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Factory
|
||||||
|
{
|
||||||
|
public static class FactoryHelper
|
||||||
|
{
|
||||||
|
const string DLLPATTERN = "XKRS.*.dll";
|
||||||
|
//readonly指示只能在声明期间或在同一个类的构造函数中向字段赋值
|
||||||
|
//可以在字段声明和构造函数中多次分配和重新分配只读字段。
|
||||||
|
//构造函数退出后,不能分配 readonly 字段。
|
||||||
|
private static readonly string[] DLLPATTERNS = { "XKRS." };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static Dictionary<T, Type> GetAttributeType<T>() where T : Attribute
|
||||||
|
{
|
||||||
|
Dictionary<T, Type> attrTyprDict = new Dictionary<T, Type>();//创建一个键值对集合
|
||||||
|
var dllFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory)
|
||||||
|
.GetFiles("*.dll")
|
||||||
|
.Where(fi => DLLPATTERNS.Any(pattern => fi.Name.StartsWith(pattern)))
|
||||||
|
.Select(u =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return u.FullName;//获取完整目录
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
return string.Empty;//返回一个只读的空字符串,
|
||||||
|
})
|
||||||
|
.Where(s => !string.IsNullOrEmpty(s))
|
||||||
|
.ToList();
|
||||||
|
dllFiles.ForEach(f =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Assembly assm = Assembly.LoadFrom(f);
|
||||||
|
if (assm != null)
|
||||||
|
{
|
||||||
|
assm.GetTypes().ToList().ForEach(t =>
|
||||||
|
{
|
||||||
|
T attr = t.GetCustomAttribute<T>();
|
||||||
|
if (attr != null)
|
||||||
|
{
|
||||||
|
attrTyprDict[attr] = t;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return attrTyprDict;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
56
XKRS.Common.Model/Factory/ProcessFactory.cs
Normal file
56
XKRS.Common.Model/Factory/ProcessFactory.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using XKRS.Common.Interface;
|
||||||
|
using XKRS.Common.Model.Helper;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Factory
|
||||||
|
{
|
||||||
|
public static class ProcessFactory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目中所有流程,即寻找所有带有[Process]的
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>返回流程名称列表</returns>
|
||||||
|
public static List<string> GetProcessCodes()
|
||||||
|
{
|
||||||
|
var attrs = FactoryHelper.GetAttributeType<ProcessAttribute>().Keys;
|
||||||
|
List<string> processCodes = attrs.Select(u => u.ProcessCode).Distinct().ToList();
|
||||||
|
return processCodes;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取StationProcess
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="processCode">流程代码</param>
|
||||||
|
/// <param name="productionCode"></param>
|
||||||
|
/// <param name="msg">异常信息</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IProcess CreateStationProcess(string processCode,string productionCode,out string msg)
|
||||||
|
{
|
||||||
|
IProcess proc = null;
|
||||||
|
msg = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var typeDict = FactoryHelper.GetAttributeType<ProcessAttribute>();
|
||||||
|
foreach(KeyValuePair<ProcessAttribute,Type>pair in typeDict)
|
||||||
|
{
|
||||||
|
if (typeof(IProcess).IsAssignableFrom(pair.Value) && pair.Key.ProcessCode == processCode)
|
||||||
|
{
|
||||||
|
proc = Activator.CreateInstance(pair.Value, productionCode) as IProcess;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
msg = ex.GetExceptionMessage();
|
||||||
|
}
|
||||||
|
return proc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
25
XKRS.Common.Model/Helper/AttributeHelper.cs
Normal file
25
XKRS.Common.Model/Helper/AttributeHelper.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static XKRS.Common.Model.Helper.EnumHelper;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Model.Helper
|
||||||
|
{
|
||||||
|
public class AttributeHelper:Attribute
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ProcessAttribute : Attribute
|
||||||
|
{
|
||||||
|
public string ProcessCode { get; set; }
|
||||||
|
public DeviceAttributeType AttrType { get; set; }
|
||||||
|
public ProcessAttribute(string stationCode,DeviceAttributeType attrType)
|
||||||
|
{
|
||||||
|
ProcessCode = stationCode;
|
||||||
|
AttrType = attrType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
XKRS.Common.Model/Helper/EnumHelper.cs
Normal file
22
XKRS.Common.Model/Helper/EnumHelper.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Model.Helper
|
||||||
|
{
|
||||||
|
public static class EnumHelper
|
||||||
|
{
|
||||||
|
public enum DeviceState
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]//将枚举视为位域
|
||||||
|
public enum DeviceAttributeType
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
92
XKRS.Common.Model/Helper/SettingHelper.cs
Normal file
92
XKRS.Common.Model/Helper/SettingHelper.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Model.Helper
|
||||||
|
{
|
||||||
|
public static class SettingHelper
|
||||||
|
{
|
||||||
|
const string SETTINGFILE = "Setting.json";
|
||||||
|
//声明一个SettingInfo类型的字段
|
||||||
|
public static SettingInfo SettingInfo;
|
||||||
|
public static string SettingPath => Path.Combine(AppDomain.CurrentDomain.BaseDirectory, SETTINGFILE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 声明一个静态方法,获取选择的布局
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>返回当前布局</returns>
|
||||||
|
public static string GetSelectLayout()
|
||||||
|
{
|
||||||
|
return SettingInfo.CurrLayout;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取生产代码,
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>字符串类型的集合</returns>
|
||||||
|
public static List<string> GetProductionCodes()
|
||||||
|
{
|
||||||
|
if (SettingInfo.ProductionCodes.Count == 0)
|
||||||
|
{
|
||||||
|
SettingInfo.ProductionCodes.Add("Default");
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(SettingInfo.DefaultProduction))
|
||||||
|
{
|
||||||
|
if (SettingInfo.ProductionCodes.Contains(SettingInfo.DefaultProduction))
|
||||||
|
{
|
||||||
|
SettingInfo.ProductionCodes.Remove(SettingInfo.DefaultProduction);
|
||||||
|
SettingInfo.ProductionCodes.Insert(0, SettingInfo.DefaultProduction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SettingInfo.ProductionCodes;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取过程代码
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static List<string> GetProcessCodes()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(SettingInfo.DefaultProcess))
|
||||||
|
{
|
||||||
|
if (SettingInfo.ProcessCodes.Contains(SettingInfo.DefaultProcess))
|
||||||
|
{
|
||||||
|
SettingInfo.ProcessCodes.Remove(SettingInfo.DefaultProcess);
|
||||||
|
SettingInfo.ProcessCodes.Insert(0, SettingInfo.DefaultProcess);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SettingInfo.ProcessCodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置信息类,声明自动属性
|
||||||
|
/// </summary>
|
||||||
|
public class SettingInfo
|
||||||
|
{
|
||||||
|
public List<string> ProcessCodes { get; set; } = new List<string>();
|
||||||
|
public List<string> ProductionCodes { get; set; } = new List<string>();
|
||||||
|
|
||||||
|
public string DefaultProcess { get; set; }
|
||||||
|
public string DefaultProduction { get; set; }
|
||||||
|
public string CurrLayout { get; set; } = "";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
27
XKRS.Common.Model/Interface/IDevice.cs
Normal file
27
XKRS.Common.Model/Interface/IDevice.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static XKRS.Common.Model.Helper.EnumHelper;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Interface
|
||||||
|
{
|
||||||
|
public interface IDevice:IDisposable,INotifyPropertyChanged,ISimpleDevice,ILogger,IExceptionHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
event Action<IDevice, DeviceState> OnDeviceStateChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public interface ISimpleDevice
|
||||||
|
{
|
||||||
|
string Id { get; set; }
|
||||||
|
}
|
||||||
|
public class SimpleDevice : ISimpleDevice
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
13
XKRS.Common.Model/Interface/IExceptionHandler.cs
Normal file
13
XKRS.Common.Model/Interface/IExceptionHandler.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Interface
|
||||||
|
{
|
||||||
|
public interface IExceptionHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
14
XKRS.Common.Model/Interface/ILogger.cs
Normal file
14
XKRS.Common.Model/Interface/ILogger.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace XKRS.Common.Interface
|
||||||
|
{
|
||||||
|
public interface ILogger
|
||||||
|
{
|
||||||
|
//event Action<LogMsg> OnLog;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
29
XKRS.Common.Model/Interface/IProcess.cs
Normal file
29
XKRS.Common.Model/Interface/IProcess.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
||||||
|
namespace XKRS.Common.Interface
|
||||||
|
{
|
||||||
|
public interface IProcess:ILogger,IExceptionHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 流程使用的硬件设备集合
|
||||||
|
/// </summary>
|
||||||
|
List<IDevice> DeviceCollection { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化Process
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="configPath"></param>
|
||||||
|
void InitialProcess(string configPath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
57
XKRS.Common.Model/XKRS.Common.Model.csproj
Normal file
57
XKRS.Common.Model/XKRS.Common.Model.csproj
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{46D35E44-A2B1-403C-9E12-93759F91143F}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>XKRS.Common.Model</RootNamespace>
|
||||||
|
<AssemblyName>XKRS.Common.Model</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>..\Release\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Exception\ExceptionHelper.cs" />
|
||||||
|
<Compile Include="Factory\FactoryHelper.cs" />
|
||||||
|
<Compile Include="Factory\ProcessFactory.cs" />
|
||||||
|
<Compile Include="Helper\AttributeHelper.cs" />
|
||||||
|
<Compile Include="Helper\EnumHelper.cs" />
|
||||||
|
<Compile Include="Interface\IDevice.cs" />
|
||||||
|
<Compile Include="Interface\IExceptionHandler.cs" />
|
||||||
|
<Compile Include="Helper\SettingHelper.cs" />
|
||||||
|
<Compile Include="Interface\ILogger.cs" />
|
||||||
|
<Compile Include="Interface\IProcess.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
6
XKRS.UI.Model.Winform/App.config
Normal file
6
XKRS.UI.Model.Winform/App.config
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
45
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.Designer.cs
generated
Normal file
45
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.Designer.cs
generated
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
namespace XKRS.UI.Model.Winform
|
||||||
|
{
|
||||||
|
partial class DeviceRunFrmBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// DeviceRunFrmBase
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||||
|
this.ClientSize = new System.Drawing.Size(284, 261);
|
||||||
|
this.Name = "DeviceRunFrmBase";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
24
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.cs
Normal file
24
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using WeifenLuo.WinFormsUI.Docking;
|
||||||
|
using XKRS.Common.Interface;
|
||||||
|
|
||||||
|
namespace XKRS.UI.Model.Winform
|
||||||
|
{
|
||||||
|
public partial class DeviceRunFrmBase : DockContent
|
||||||
|
{
|
||||||
|
public IDevice Device { get; set; }
|
||||||
|
|
||||||
|
public DeviceRunFrmBase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.resx
Normal file
120
XKRS.UI.Model.Winform/UI/DockContent/DeviceRunFrmBase.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
48
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.Designer.cs
generated
Normal file
48
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.Designer.cs
generated
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
namespace XKRS.UI.Model.Winform
|
||||||
|
{
|
||||||
|
partial class MenuFrmBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// MenuFrmBase
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||||
|
this.ClientSize = new System.Drawing.Size(474, 344);
|
||||||
|
this.DoubleBuffered = true;
|
||||||
|
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
|
||||||
|
this.Name = "MenuFrmBase";
|
||||||
|
this.Text = "MenuFrmBase";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
36
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.cs
Normal file
36
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using WeifenLuo.WinFormsUI.Docking;
|
||||||
|
using XKRS.Common.Interface;
|
||||||
|
|
||||||
|
namespace XKRS.UI.Model.Winform
|
||||||
|
{
|
||||||
|
public partial class MenuFrmBase : DockContent
|
||||||
|
{
|
||||||
|
public Action<string,IProcess> OnUploadProcess { get; set; }
|
||||||
|
public event Action<bool> OnIsLoginChanged;
|
||||||
|
|
||||||
|
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
|
public MenuFrmBase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
protected virtual bool IsLogin { get; set; }
|
||||||
|
public virtual void SetLoginStatus(bool isLogin)
|
||||||
|
{
|
||||||
|
IsLogin = isLogin;
|
||||||
|
OnIsLoginChanged?.Invoke(IsLogin);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
120
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.resx
Normal file
120
XKRS.UI.Model.Winform/UI/DockContent/MenuFrmBase.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
83
XKRS.UI.Model.Winform/XKRS.UI.Model.Winform.csproj
Normal file
83
XKRS.UI.Model.Winform/XKRS.UI.Model.Winform.csproj
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{0EABA88A-9DB3-46EA-B810-4F4FA6D2DFEA}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>XKRS.UI.Model.Winform</RootNamespace>
|
||||||
|
<AssemblyName>XKRS.UI.Model.Winform</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>..\Release\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="UI\DockContent\DeviceRunFrmBase.resx">
|
||||||
|
<DependentUpon>DeviceRunFrmBase.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UI\DockContent\MenuFrmBase.resx">
|
||||||
|
<DependentUpon>MenuFrmBase.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DockPanelSuite.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="UI\DockContent\DeviceRunFrmBase.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UI\DockContent\DeviceRunFrmBase.Designer.cs">
|
||||||
|
<DependentUpon>DeviceRunFrmBase.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UI\DockContent\MenuFrmBase.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UI\DockContent\MenuFrmBase.Designer.cs">
|
||||||
|
<DependentUpon>MenuFrmBase.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\XKRS.Common.Model\XKRS.Common.Model.csproj">
|
||||||
|
<Project>{46D35E44-A2B1-403C-9E12-93759F91143F}</Project>
|
||||||
|
<Name>XKRS.Common.Model</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
4
XKRS.UI.Model.Winform/packages.config
Normal file
4
XKRS.UI.Model.Winform/packages.config
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="DockPanelSuite" version="3.1.0" targetFramework="net472" />
|
||||||
|
</packages>
|
Loading…
Reference in New Issue
Block a user