DESKTOP-58BB7H3\ZJH 4 місяці тому
джерело
коміт
f4e0eb52ca
100 змінених файлів з 0 додано та 69973 видалено
  1. +0
    -63
      .gitattributes
  2. +0
    -261
      .gitignore
  3. BIN
      .vs/CNAS_DBSync/v15/.suo
  4. +0
    -0
      .vs/CNAS_DBSync/v15/Server/sqlite3/db.lock
  5. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide
  6. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-shm
  7. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal
  8. +0
    -49
      CNASBalanceDBManage/App.config
  9. +0
    -107
      CNASBalanceDBManage/CNASBalanceDBManage.csproj
  10. +0
    -30
      CNASBalanceDBManage/Program.cs
  11. +0
    -37
      CNASBalanceDBManage/Properties/AssemblyInfo.cs
  12. +0
    -63
      CNASBalanceDBManage/Properties/Resources.Designer.cs
  13. +0
    -117
      CNASBalanceDBManage/Properties/Resources.resx
  14. +0
    -26
      CNASBalanceDBManage/Properties/Settings.Designer.cs
  15. +0
    -7
      CNASBalanceDBManage/Properties/Settings.settings
  16. BIN
      CNASBalanceDBManage/database_16px_1229703_easyicon.net.ico
  17. +0
    -512
      CNASBalanceDBManage/frmBalanceDB.Designer.cs
  18. +0
    -222
      CNASBalanceDBManage/frmBalanceDB.cs
  19. +0
    -163
      CNASBalanceDBManage/frmBalanceDB.resx
  20. +0
    -11
      CNAS_Authorize/App.config
  21. +0
    -9
      CNAS_Authorize/App.xaml
  22. +0
    -17
      CNAS_Authorize/App.xaml.cs
  23. +0
    -123
      CNAS_Authorize/CNAS_Authorize.csproj
  24. +0
    -243
      CNAS_Authorize/MachineAuth.cs
  25. +0
    -130
      CNAS_Authorize/MainWindow.xaml
  26. +0
    -204
      CNAS_Authorize/MainWindow.xaml.cs
  27. +0
    -55
      CNAS_Authorize/Properties/AssemblyInfo.cs
  28. +0
    -71
      CNAS_Authorize/Properties/Resources.Designer.cs
  29. +0
    -117
      CNAS_Authorize/Properties/Resources.resx
  30. +0
    -30
      CNAS_Authorize/Properties/Settings.Designer.cs
  31. +0
    -7
      CNAS_Authorize/Properties/Settings.settings
  32. +0
    -56
      CNAS_BalanceClient/App.config
  33. +0
    -164
      CNAS_BalanceClient/CNAS_BalanceClient.csproj
  34. +0
    -227
      CNAS_BalanceClient/ILaboratoryTestOpera.cs
  35. +0
    -31
      CNAS_BalanceClient/Program.cs
  36. +0
    -37
      CNAS_BalanceClient/Properties/AssemblyInfo.cs
  37. +0
    -63
      CNAS_BalanceClient/Properties/Resources.Designer.cs
  38. +0
    -117
      CNAS_BalanceClient/Properties/Resources.resx
  39. +0
    -26
      CNAS_BalanceClient/Properties/Settings.Designer.cs
  40. +0
    -7
      CNAS_BalanceClient/Properties/Settings.settings
  41. +0
    -393
      CNAS_BalanceClient/UIOperation/BalanceMainOperation.cs
  42. +0
    -161
      CNAS_BalanceClient/UIOperation/CrucibleUIOperation.cs
  43. +0
    -132
      CNAS_BalanceClient/UIOperation/HuiFaFenUIOperation.cs
  44. +0
    -176
      CNAS_BalanceClient/UIOperation/HuiFenUIOperation.cs
  45. +0
    -182
      CNAS_BalanceClient/UIOperation/QuanShuiFenUIOperation.cs
  46. +0
    -151
      CNAS_BalanceClient/UIOperation/ShuiFenUIOperation.cs
  47. +0
    -770
      CNAS_BalanceClient/frmBalanceField.Designer.cs
  48. +0
    -409
      CNAS_BalanceClient/frmBalanceField.cs
  49. +0
    -183
      CNAS_BalanceClient/frmBalanceField.resx
  50. +0
    -1980
      CNAS_BalanceClient/frmBalanceMain.Designer.cs
  51. +0
    -1200
      CNAS_BalanceClient/frmBalanceMain.cs
  52. +0
    -522
      CNAS_BalanceClient/frmBalanceMain.resx
  53. +0
    -257
      CNAS_BalanceClient/frmConditionMap.Designer.cs
  54. +0
    -556
      CNAS_BalanceClient/frmConditionMap.cs
  55. +0
    -182
      CNAS_BalanceClient/frmConditionMap.resx
  56. +0
    -317
      CNAS_BalanceClient/frmConfigPort.Designer.cs
  57. +0
    -83
      CNAS_BalanceClient/frmConfigPort.cs
  58. +0
    -167
      CNAS_BalanceClient/frmConfigPort.resx
  59. +0
    -926
      CNAS_BalanceClient/frmHistory.Designer.cs
  60. +0
    -111
      CNAS_BalanceClient/frmHistory.cs
  61. +0
    -329
      CNAS_BalanceClient/frmHistory.resx
  62. +0
    -183
      CNAS_BalanceClient/frmLoginServer.Designer.cs
  63. +0
    -130
      CNAS_BalanceClient/frmLoginServer.cs
  64. +0
    -407
      CNAS_BalanceClient/frmLoginServer.resx
  65. BIN
      CNAS_BalanceClient/scales_of_Balance_16px_1117673_easyicon.net.ico
  66. +0
    -109
      CNAS_DBSync.sln
  67. +0
    -115
      CNAS_DBSync/ActivationForm.Designer.cs
  68. +0
    -210
      CNAS_DBSync/ActivationForm.cs
  69. +0
    -120
      CNAS_DBSync/ActivationForm.resx
  70. +0
    -87
      CNAS_DBSync/App.config
  71. +0
    -261
      CNAS_DBSync/CNAS_DBSync.csproj
  72. +0
    -264
      CNAS_DBSync/FormSizeHelper.cs
  73. +0
    -94
      CNAS_DBSync/Program.cs
  74. +0
    -37
      CNAS_DBSync/Properties/AssemblyInfo.cs
  75. +0
    -63
      CNAS_DBSync/Properties/Resources.Designer.cs
  76. +0
    -117
      CNAS_DBSync/Properties/Resources.resx
  77. +0
    -45
      CNAS_DBSync/Properties/Settings.Designer.cs
  78. +0
    -17
      CNAS_DBSync/Properties/Settings.settings
  79. +0
    -63
      CNAS_DBSync/SourceSettingTextBoxDecrible.cs
  80. BIN
      CNAS_DBSync/dll/CNAS_DBSync.exe
  81. +0
    -58
      CNAS_DBSync/dll/CNAS_DBSync.exe.config
  82. +0
    -195
      CNAS_DBSync/dll/Data/SyncInStrumentData.xml
  83. BIN
      CNAS_DBSync/dll/Document/AshMeltingPoint.xls
  84. BIN
      CNAS_DBSync/dll/Document/IndustrialAnalyzer.xls
  85. BIN
      CNAS_DBSync/dll/Document/InfraredSulfurMeter.xls
  86. BIN
      CNAS_DBSync/dll/Document/MoistureMeter.xls
  87. BIN
      CNAS_DBSync/dll/Document/SulphurMeter.xls
  88. BIN
      CNAS_DBSync/dll/System.Data.SQLite.EF6.dll
  89. BIN
      CNAS_DBSync/dll/System.Data.SQLite.Linq.dll
  90. BIN
      CNAS_DBSync/dll/System.Data.SQLite.dll
  91. +0
    -22
      CNAS_DBSync/dll/System.Data.SQLite.dll.config
  92. +0
    -21120
      CNAS_DBSync/dll/System.Data.SQLite.xml
  93. BIN
      CNAS_DBSync/dll/log4net.dll
  94. +0
    -32464
      CNAS_DBSync/dll/log4net.xml
  95. BIN
      CNAS_DBSync/drum_set_16px_1218345_easyicon.net.ico
  96. +0
    -192
      CNAS_DBSync/frmAddSubtract.Designer.cs
  97. +0
    -89
      CNAS_DBSync/frmAddSubtract.cs
  98. +0
    -120
      CNAS_DBSync/frmAddSubtract.resx
  99. +0
    -256
      CNAS_DBSync/frmCNASValue.Designer.cs
  100. +0
    -546
      CNAS_DBSync/frmCNASValue.cs

+ 0
- 63
.gitattributes Переглянути файл

@@ -1,63 +0,0 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

+ 0
- 261
.gitignore Переглянути файл

@@ -1,261 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
project.fragment.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.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

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# 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
# TODO: 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
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable 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

# 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
node_modules/
orleans.codegen.cs

# 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

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# 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/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

BIN
.vs/CNAS_DBSync/v15/.suo Переглянути файл


+ 0
- 0
.vs/CNAS_DBSync/v15/Server/sqlite3/db.lock Переглянути файл


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide Переглянути файл


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-shm Переглянути файл


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal Переглянути файл


+ 0
- 49
CNASBalanceDBManage/App.config Переглянути файл

@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<appSettings>
<add key="TargetDBType" value="Oracle"/>
<add key="InitalOperationPwd" value="123456"/>
<add key="StartWebApiUrl" value="0"/>
</appSettings>
<log4net>
<logger name="Log">
<level value="INFO"/>
<appender-ref ref="RollingLog"/>
</logger>
<logger name="Err">
<level value="ERROR"/>
<appender-ref ref="RollingErr"/>
</logger>
<appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
<file value="Log\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 操作信息:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
</filter>
</appender>
<appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
<file value="ErrorLog\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 错误描述:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="ERROR"/>
</filter>
</appender>
</log4net>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

+ 0
- 107
CNASBalanceDBManage/CNASBalanceDBManage.csproj Переглянути файл

@@ -1,107 +0,0 @@
<?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>{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CNASBalanceDBManage</RootNamespace>
<AssemblyName>CNASBalanceDBManage</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\dll\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>database_16px_1229703_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<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.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="frmBalanceDB.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBalanceDB.Designer.cs">
<DependentUpon>frmBalanceDB.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="frmBalanceDB.resx">
<DependentUpon>frmBalanceDB.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="App.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>
<ProjectReference Include="..\CnasSynchronousCommon\CnasSynchronousCommon.csproj">
<Project>{8e0e5f2e-2ba2-4952-9f31-34c072cd86b3}</Project>
<Name>CnasSynchronousCommon</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchronusClient\CnasSynchronusBLL.csproj">
<Project>{cb9b6d92-3cc4-46c6-92e8-a6fd0ad48041}</Project>
<Name>CnasSynchronusBLL</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchrousModel\CnasSynchrousModel.csproj">
<Project>{0c3243f5-729e-409c-b406-c6de56e632e0}</Project>
<Name>CnasSynchrousModel</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="database_16px_1229703_easyicon.net.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 0
- 30
CNASBalanceDBManage/Program.cs Переглянути файл

@@ -1,30 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace CNASBalanceDBManage
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

SystemFormatConfig systemFormat = FileOperation.GetSystemFormatConfigData();
GlobalCommonOperation.strStartGeneralVersion = systemFormat.StartGeneralVersion;
GlobalCommonOperation.strStartWebApi = systemFormat.StartWebApi;
GlobalCommonOperation.strWebApiUrl = systemFormat.WebApiUrl;
GlobalCommonOperation.strTargetDbType = systemFormat.TargetDBType;

Application.Run(new frmBalanceDB());
}
}
}

+ 0
- 37
CNASBalanceDBManage/Properties/AssemblyInfo.cs Переглянути файл

@@ -1,37 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CNASBalanceDBManage")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CNASBalanceDBManage")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("d4d6a680-8b6b-4ecb-96d0-264954dabfc1")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]

+ 0
- 63
CNASBalanceDBManage/Properties/Resources.Designer.cs Переглянути файл

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNASBalanceDBManage.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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("CNASBalanceDBManage.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;
}
}
}
}

+ 0
- 117
CNASBalanceDBManage/Properties/Resources.resx Переглянути файл

@@ -1,117 +0,0 @@
<?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>

+ 0
- 26
CNASBalanceDBManage/Properties/Settings.Designer.cs Переглянути файл

@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNASBalanceDBManage.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.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;
}
}
}
}

+ 0
- 7
CNASBalanceDBManage/Properties/Settings.settings Переглянути файл

@@ -1,7 +0,0 @@
<?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>

BIN
CNASBalanceDBManage/database_16px_1229703_easyicon.net.ico Переглянути файл

Перед Після

+ 0
- 512
CNASBalanceDBManage/frmBalanceDB.Designer.cs Переглянути файл

@@ -1,512 +0,0 @@
namespace CNASBalanceDBManage
{
partial class frmBalanceDB
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBalanceDB));
this.pnlAll = new System.Windows.Forms.Panel();
this.pnlCenter = new System.Windows.Forms.Panel();
this.tabSetting = new System.Windows.Forms.TabControl();
this.tabCNASDB = new System.Windows.Forms.TabPage();
this.btnCNASTestLink = new System.Windows.Forms.Button();
this.txtPort = new System.Windows.Forms.TextBox();
this.txtDBHost = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.txtDBName = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.txtDBUser = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtDBPwd = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.tabPlatForm = new System.Windows.Forms.TabPage();
this.btnPlatTest = new System.Windows.Forms.Button();
this.txtPlatPort = new System.Windows.Forms.TextBox();
this.txtPlatHost = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtPlatServer = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.txtPlatUser = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtPlatPwd = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.tabPwd = new System.Windows.Forms.TabPage();
this.txtRepeatPwd = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtNewPwd = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtOldPwd = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.pnlBottom = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pnlAll.SuspendLayout();
this.pnlCenter.SuspendLayout();
this.tabSetting.SuspendLayout();
this.tabCNASDB.SuspendLayout();
this.tabPlatForm.SuspendLayout();
this.tabPwd.SuspendLayout();
this.pnlBottom.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// pnlAll
//
this.pnlAll.Controls.Add(this.pnlCenter);
this.pnlAll.Controls.Add(this.pnlBottom);
this.pnlAll.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlAll.Location = new System.Drawing.Point(0, 0);
this.pnlAll.Name = "pnlAll";
this.pnlAll.Size = new System.Drawing.Size(493, 311);
this.pnlAll.TabIndex = 0;
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.tabSetting);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(0, 0);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(493, 258);
this.pnlCenter.TabIndex = 1;
//
// tabSetting
//
this.tabSetting.Controls.Add(this.tabCNASDB);
this.tabSetting.Controls.Add(this.tabPlatForm);
this.tabSetting.Controls.Add(this.tabPwd);
this.tabSetting.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabSetting.Location = new System.Drawing.Point(0, 0);
this.tabSetting.Name = "tabSetting";
this.tabSetting.SelectedIndex = 0;
this.tabSetting.Size = new System.Drawing.Size(493, 258);
this.tabSetting.TabIndex = 36;
//
// tabCNASDB
//
this.tabCNASDB.Controls.Add(this.btnCNASTestLink);
this.tabCNASDB.Controls.Add(this.txtPort);
this.tabCNASDB.Controls.Add(this.txtDBHost);
this.tabCNASDB.Controls.Add(this.label1);
this.tabCNASDB.Controls.Add(this.label9);
this.tabCNASDB.Controls.Add(this.txtDBName);
this.tabCNASDB.Controls.Add(this.label8);
this.tabCNASDB.Controls.Add(this.txtDBUser);
this.tabCNASDB.Controls.Add(this.label11);
this.tabCNASDB.Controls.Add(this.txtDBPwd);
this.tabCNASDB.Controls.Add(this.label10);
this.tabCNASDB.Location = new System.Drawing.Point(4, 26);
this.tabCNASDB.Name = "tabCNASDB";
this.tabCNASDB.Padding = new System.Windows.Forms.Padding(3);
this.tabCNASDB.Size = new System.Drawing.Size(485, 228);
this.tabCNASDB.TabIndex = 0;
this.tabCNASDB.Text = "目标数据库";
this.tabCNASDB.UseVisualStyleBackColor = true;
//
// btnCNASTestLink
//
this.btnCNASTestLink.Location = new System.Drawing.Point(398, 176);
this.btnCNASTestLink.Name = "btnCNASTestLink";
this.btnCNASTestLink.Size = new System.Drawing.Size(79, 24);
this.btnCNASTestLink.TabIndex = 36;
this.btnCNASTestLink.Text = "测试连接";
this.btnCNASTestLink.UseVisualStyleBackColor = true;
this.btnCNASTestLink.Click += new System.EventHandler(this.btnCNASTestLink_Click);
//
// txtPort
//
this.txtPort.Location = new System.Drawing.Point(71, 176);
this.txtPort.Name = "txtPort";
this.txtPort.PasswordChar = '*';
this.txtPort.Size = new System.Drawing.Size(316, 23);
this.txtPort.TabIndex = 35;
//
// txtDBHost
//
this.txtDBHost.Location = new System.Drawing.Point(71, 24);
this.txtDBHost.Name = "txtDBHost";
this.txtDBHost.Size = new System.Drawing.Size(316, 23);
this.txtDBHost.TabIndex = 31;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 180);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 34;
this.label1.Text = "端口:";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(14, 104);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 25;
this.label9.Text = "用户名:";
//
// txtDBName
//
this.txtDBName.Location = new System.Drawing.Point(71, 62);
this.txtDBName.Name = "txtDBName";
this.txtDBName.Size = new System.Drawing.Size(316, 23);
this.txtDBName.TabIndex = 32;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(26, 142);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 17);
this.label8.TabIndex = 26;
this.label8.Text = "密码:";
//
// txtDBUser
//
this.txtDBUser.Location = new System.Drawing.Point(71, 100);
this.txtDBUser.Name = "txtDBUser";
this.txtDBUser.Size = new System.Drawing.Size(316, 23);
this.txtDBUser.TabIndex = 33;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(26, 66);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
this.label11.TabIndex = 30;
this.label11.Text = "实例:";
//
// txtDBPwd
//
this.txtDBPwd.Location = new System.Drawing.Point(71, 138);
this.txtDBPwd.Name = "txtDBPwd";
this.txtDBPwd.PasswordChar = '*';
this.txtDBPwd.Size = new System.Drawing.Size(316, 23);
this.txtDBPwd.TabIndex = 34;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(15, 27);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 29;
this.label10.Text = "服务器:";
//
// tabPlatForm
//
this.tabPlatForm.Controls.Add(this.btnPlatTest);
this.tabPlatForm.Controls.Add(this.txtPlatPort);
this.tabPlatForm.Controls.Add(this.txtPlatHost);
this.tabPlatForm.Controls.Add(this.label5);
this.tabPlatForm.Controls.Add(this.label6);
this.tabPlatForm.Controls.Add(this.txtPlatServer);
this.tabPlatForm.Controls.Add(this.label7);
this.tabPlatForm.Controls.Add(this.txtPlatUser);
this.tabPlatForm.Controls.Add(this.label12);
this.tabPlatForm.Controls.Add(this.txtPlatPwd);
this.tabPlatForm.Controls.Add(this.label13);
this.tabPlatForm.Location = new System.Drawing.Point(4, 26);
this.tabPlatForm.Name = "tabPlatForm";
this.tabPlatForm.Size = new System.Drawing.Size(485, 228);
this.tabPlatForm.TabIndex = 2;
this.tabPlatForm.Text = "目标平台数据库";
this.tabPlatForm.UseVisualStyleBackColor = true;
//
// btnPlatTest
//
this.btnPlatTest.Location = new System.Drawing.Point(399, 176);
this.btnPlatTest.Name = "btnPlatTest";
this.btnPlatTest.Size = new System.Drawing.Size(79, 24);
this.btnPlatTest.TabIndex = 47;
this.btnPlatTest.Text = "测试连接";
this.btnPlatTest.UseVisualStyleBackColor = true;
this.btnPlatTest.Click += new System.EventHandler(this.btnPlatTest_Click);
//
// txtPlatPort
//
this.txtPlatPort.Location = new System.Drawing.Point(72, 176);
this.txtPlatPort.Name = "txtPlatPort";
this.txtPlatPort.PasswordChar = '*';
this.txtPlatPort.Size = new System.Drawing.Size(316, 23);
this.txtPlatPort.TabIndex = 46;
//
// txtPlatHost
//
this.txtPlatHost.Location = new System.Drawing.Point(72, 24);
this.txtPlatHost.Name = "txtPlatHost";
this.txtPlatHost.Size = new System.Drawing.Size(316, 23);
this.txtPlatHost.TabIndex = 42;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(27, 180);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 17);
this.label5.TabIndex = 45;
this.label5.Text = "端口:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(15, 104);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 36;
this.label6.Text = "用户名:";
//
// txtPlatServer
//
this.txtPlatServer.Location = new System.Drawing.Point(72, 62);
this.txtPlatServer.Name = "txtPlatServer";
this.txtPlatServer.Size = new System.Drawing.Size(316, 23);
this.txtPlatServer.TabIndex = 43;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(27, 142);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 37;
this.label7.Text = "密码:";
//
// txtPlatUser
//
this.txtPlatUser.Location = new System.Drawing.Point(72, 100);
this.txtPlatUser.Name = "txtPlatUser";
this.txtPlatUser.Size = new System.Drawing.Size(316, 23);
this.txtPlatUser.TabIndex = 44;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(27, 66);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(44, 17);
this.label12.TabIndex = 41;
this.label12.Text = "实例:";
//
// txtPlatPwd
//
this.txtPlatPwd.Location = new System.Drawing.Point(72, 138);
this.txtPlatPwd.Name = "txtPlatPwd";
this.txtPlatPwd.PasswordChar = '*';
this.txtPlatPwd.Size = new System.Drawing.Size(316, 23);
this.txtPlatPwd.TabIndex = 45;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(16, 27);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(56, 17);
this.label13.TabIndex = 40;
this.label13.Text = "服务器:";
//
// tabPwd
//
this.tabPwd.Controls.Add(this.txtRepeatPwd);
this.tabPwd.Controls.Add(this.label4);
this.tabPwd.Controls.Add(this.txtNewPwd);
this.tabPwd.Controls.Add(this.label3);
this.tabPwd.Controls.Add(this.txtOldPwd);
this.tabPwd.Controls.Add(this.label2);
this.tabPwd.Location = new System.Drawing.Point(4, 26);
this.tabPwd.Name = "tabPwd";
this.tabPwd.Padding = new System.Windows.Forms.Padding(3);
this.tabPwd.Size = new System.Drawing.Size(485, 228);
this.tabPwd.TabIndex = 1;
this.tabPwd.Text = "操作密码";
this.tabPwd.UseVisualStyleBackColor = true;
//
// txtRepeatPwd
//
this.txtRepeatPwd.Location = new System.Drawing.Point(90, 120);
this.txtRepeatPwd.Name = "txtRepeatPwd";
this.txtRepeatPwd.PasswordChar = '*';
this.txtRepeatPwd.Size = new System.Drawing.Size(316, 23);
this.txtRepeatPwd.TabIndex = 37;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(10, 123);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 17);
this.label4.TabIndex = 36;
this.label4.Text = "重复新密码:";
//
// txtNewPwd
//
this.txtNewPwd.Location = new System.Drawing.Point(90, 81);
this.txtNewPwd.Name = "txtNewPwd";
this.txtNewPwd.PasswordChar = '*';
this.txtNewPwd.Size = new System.Drawing.Size(316, 23);
this.txtNewPwd.TabIndex = 35;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(34, 84);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 34;
this.label3.Text = "新密码:";
//
// txtOldPwd
//
this.txtOldPwd.Location = new System.Drawing.Point(90, 43);
this.txtOldPwd.Name = "txtOldPwd";
this.txtOldPwd.PasswordChar = '*';
this.txtOldPwd.Size = new System.Drawing.Size(316, 23);
this.txtOldPwd.TabIndex = 33;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(34, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 32;
this.label2.Text = "原密码:";
//
// pnlBottom
//
this.pnlBottom.Controls.Add(this.panel1);
this.pnlBottom.Controls.Add(this.groupBox1);
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(0, 258);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(493, 53);
this.pnlBottom.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.btnOK);
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.Location = new System.Drawing.Point(395, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(98, 49);
this.panel1.TabIndex = 2;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(3, 3);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// groupBox1
//
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(493, 4);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
//
// frmBalanceDB
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(493, 311);
this.Controls.Add(this.pnlAll);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.Name = "frmBalanceDB";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "初始配置";
this.Load += new System.EventHandler(this.frmBalanceDB_Load);
this.pnlAll.ResumeLayout(false);
this.pnlCenter.ResumeLayout(false);
this.tabSetting.ResumeLayout(false);
this.tabCNASDB.ResumeLayout(false);
this.tabCNASDB.PerformLayout();
this.tabPlatForm.ResumeLayout(false);
this.tabPlatForm.PerformLayout();
this.tabPwd.ResumeLayout(false);
this.tabPwd.PerformLayout();
this.pnlBottom.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlAll;
private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtPort;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnCNASTestLink;
private System.Windows.Forms.TextBox txtDBName;
private System.Windows.Forms.TextBox txtDBHost;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtDBPwd;
private System.Windows.Forms.TextBox txtDBUser;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TabControl tabSetting;
private System.Windows.Forms.TabPage tabCNASDB;
private System.Windows.Forms.TabPage tabPwd;
private System.Windows.Forms.TextBox txtRepeatPwd;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtNewPwd;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtOldPwd;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TabPage tabPlatForm;
private System.Windows.Forms.Button btnPlatTest;
private System.Windows.Forms.TextBox txtPlatPort;
private System.Windows.Forms.TextBox txtPlatHost;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPlatServer;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtPlatUser;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtPlatPwd;
private System.Windows.Forms.Label label13;
}
}

+ 0
- 222
CNASBalanceDBManage/frmBalanceDB.cs Переглянути файл

@@ -1,222 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.IO;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace CNASBalanceDBManage
{
public partial class frmBalanceDB : Form
{
public DataBaseInfo CNASDataBase { get; set; }

public DataBaseInfo PlatDataBase { get; set; }

public string strOldPwd { get; set; }

public frmBalanceDB()
{
InitializeComponent();
}

private void btnCNASTestLink_Click(object sender, EventArgs e)
{
if (this.txtDBHost.Text.Trim() == "" || this.txtDBName.Text.Trim() == "" || this.txtDBUser.Text.Trim() == "" || this.txtDBPwd.Text.Trim() == "" || this.txtPort.Text.Trim()=="")
{
MessageBox.Show("不允许为空!");
return;
}

if (CnasDataOperationFact.CnasDataOperation().TestConnect(new DataBaseInfo()
{
DataBaseCode="cnas",
DBHost = this.txtDBHost.Text.Trim(),
DBName = this.txtDBName.Text.Trim(),
DBUser = this.txtDBUser.Text.Trim(),
DBPwd = this.txtDBPwd.Text.Trim(),
DBPort = this.txtPort.Text.Trim()
}))
MessageBox.Show("连接成功!");
else
MessageBox.Show("连接失败!");
}

private void frmBalanceDB_Load(object sender, EventArgs e)
{
CNASDataBase = FileOperation.GetLocalCnasDB();
if (this.CNASDataBase != null)
{
this.txtDBHost.Text = CNASDataBase.DBHost;
this.txtDBName.Text = CNASDataBase.DBName;
this.txtDBUser.Text = CNASDataBase.DBUser;
this.txtDBPwd.Text = CNASDataBase.DBPwd;
this.txtPort.Text = CNASDataBase.DBPort;
}
PlatDataBase = FileOperation.GetLocalPlatFormDB();
if(PlatDataBase!=null)
{
this.txtPlatHost.Text = PlatDataBase.DBHost;
this.txtPlatServer.Text = PlatDataBase.DBName;
this.txtPlatUser.Text = PlatDataBase.DBUser;
this.txtPlatPwd.Text = PlatDataBase.DBPwd;
this.txtPlatPort.Text = PlatDataBase.DBPort;
}

strOldPwd = FileOperation.GetLocalOperationPwd();
}

private void btnOK_Click(object sender, EventArgs e)
{
bool bIfSavePwd = false;
if (this.txtDBHost.Text.Trim() == "" || this.txtDBName.Text.Trim() == "" || this.txtDBUser.Text.Trim() == "" || this.txtDBPwd.Text.Trim() == "" || this.txtPort.Text.Trim() == "")
{
MessageBox.Show("CNAS数据库配置不允许为空!");
return;
}
if (this.txtPlatHost.Text.Trim() == "" || this.txtPlatServer.Text.Trim() == "" || this.txtPlatUser.Text.Trim() == "" || this.txtPlatPwd.Text.Trim() == "" || this.txtPlatPort.Text.Trim() == "")
{
MessageBox.Show("平台数据库配置不允许为空!");
return;
}
if (this.txtOldPwd.Text == "" && this.txtNewPwd.Text == "" && this.txtRepeatPwd.Text == "") //此时认为用户无意修改密码
{
bIfSavePwd = false;
}
else
{
//旧密码不正确
if (this.txtOldPwd.Text == ""||(this.txtOldPwd.Text != "" && this.txtOldPwd.Text != strOldPwd))
{
MessageBox.Show("旧操作密码错误!");
return;
}
if (this.txtNewPwd.Text.Trim() == "")
{
MessageBox.Show("新操作密码不能为空!");
return;
}
if (this.txtOldPwd.Text == this.txtNewPwd.Text)
{
MessageBox.Show("新旧操作密码不能一样!");
return;
}
if (this.txtNewPwd.Text.Trim() != this.txtRepeatPwd.Text.Trim())
{
MessageBox.Show("重复输入操作密码不一样!");
return;
}
bIfSavePwd = true;
}
//目标库的信息
CNASDataBase.DBHost = this.txtDBHost.Text.Trim();
CNASDataBase.DBName = this.txtDBName.Text.Trim();
CNASDataBase.DBUser = this.txtDBUser.Text.Trim();
CNASDataBase.DBPwd = this.txtDBPwd.Text.Trim();
CNASDataBase.DBPort = this.txtPort.Text.Trim();


PlatDataBase.DBHost = this.txtPlatHost.Text.Trim();
PlatDataBase.DBName = this.txtPlatServer.Text.Trim();
PlatDataBase.DBUser = this.txtPlatUser.Text.Trim();
PlatDataBase.DBPwd = this.txtPlatPwd.Text.Trim();
PlatDataBase.DBPort = this.txtPlatPort.Text.Trim();

/*一套有点恶心的逻辑,但没想到其他的方案*/
//保存数据到本地
if (!bIfSavePwd) //此时没有修改密码,此时只判断两个数据库配置的存储
{
bool bSaveCNAS = FileOperation.SaveLocalCnasDB(CNASDataBase);
bool bSavePlat= FileOperation.SaveLocalPlatDB(PlatDataBase);
if (bSaveCNAS && bSavePlat)
{
MessageBox.Show("数据库配置保存成功!");
}
else if (bSaveCNAS && !bSavePlat)
{
MessageBox.Show("平台数据库配置保存失败。");
}
else if (!bSaveCNAS && bSavePlat)
{
MessageBox.Show("CNAS数据库配置保存失败。");
}
else
{
MessageBox.Show("数据库配置保存失败。");
}
}
else
{
string strMsg = "";
bool bSaveDB = bSaveDataBase(ref strMsg);
bool bSavePwd = FileOperation.SaveLocalOperationPwd(this.txtNewPwd.Text.Trim());
if (bSaveDB == true && bSavePwd == true)
{
MessageBox.Show("保存成功!");
}
else if (bSaveDB == true && bSavePwd == false)
{
MessageBox.Show("数据库配置保存成功,操作密码保存失败!");
}
else if (bSaveDB == false && bSavePwd == true)
{
MessageBox.Show(strMsg+"操作密码设置保存成功!");
}
else
{
MessageBox.Show("保存失败!");
}
}
}

private bool bSaveDataBase(ref string strMsg)
{
bool bSaveCNAS = FileOperation.SaveLocalCnasDB(CNASDataBase);
bool bSavePlat = FileOperation.SaveLocalPlatDB(PlatDataBase);
if (bSaveCNAS && bSavePlat)
{
strMsg="数据库配置保存成功!";
return true;
}
else if (bSaveCNAS && !bSavePlat)
{
strMsg = "平台数据库配置保存失败。";
return false;
}
else if (!bSaveCNAS && bSavePlat)
{
strMsg = "CNAS数据库配置保存失败。";
return false;
}
else
{
strMsg = "数据库配置保存失败。";
return false;
}
}

private void btnPlatTest_Click(object sender, EventArgs e)
{
if (this.txtPlatHost.Text.Trim() == "" || this.txtPlatServer.Text.Trim() == "" || this.txtPlatUser.Text.Trim() == "" || this.txtPlatPwd.Text.Trim() == "" || this.txtPlatPort.Text.Trim() == "")
{
MessageBox.Show("平台数据库配置不允许为空!");
return;
}

//if (CnasDataOperationFact.CnasDataOperation().TestConnect(this.txtPlatHost.Text.Trim(), this.txtPlatServer.Text.Trim(), this.txtPlatUser.Text.Trim(), this.txtPlatPwd.Text.Trim(), this.txtPlatPort.Text.Trim()))
if (CnasDataOperationFact.CnasDataOperation().TestConnect(new DataBaseInfo()
{
DBHost = this.txtPlatHost.Text.Trim(),
DBName = this.txtPlatServer.Text.Trim(),
DBUser = this.txtPlatUser.Text.Trim(),
DBPwd = this.txtPlatPwd.Text.Trim(),
DBPort = this.txtPlatPort.Text.Trim()
}))
MessageBox.Show("连接成功!");
else
MessageBox.Show("连接失败!");
}
}
}

+ 0
- 163
CNASBalanceDBManage/frmBalanceDB.resx Переглянути файл

@@ -1,163 +0,0 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAFhgAAAEAIADICAAAFgAAACgAAAAWAAAAMAAAAAEAIAAAAAAAQAgAABAnAAAQJwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAKAAAAFQAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAA1AAAAmgAAALoAAACHAAAAMAAAAA4AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAPQAAAD0AAAA9AAAAOwAAAHIAAAC7AAAADQAAAAAAAAAAAAAAAAAAAAAAAAAbAAAArwAA
ADgAAAALAAAACQAAAAUAAAAXAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABYAAABQAAAApQAA
AAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFkAAACuAAAAbQAAAFkAAAA4AAAApQAAAKoAAACqAAAAqgAA
AKoAAACqAAAAqgAAAKoAAACrAAAAqQAAAEMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAA
AA4AAAAKAAAABwAAABYAAAAXAAAAFwAAABcAAAAXAAAAFwAAABcAAAAXAAAAGAAAAA4AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD/4AAA+AAAAPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BAAAABwAAAAcAAAAHAAAABwAAAAcAAAAHAAAABwAAAAcAAAAHAAAABwAAAAcAAAAHAA=
</value>
</data>
</root>

+ 0
- 11
CNAS_Authorize/App.config Переглянути файл

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="TargetDBType" value="Oracle"/>
<add key="InitalOperationPwd" value="123456"/>
<add key="StartWebApiUrl" value="0"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

+ 0
- 9
CNAS_Authorize/App.xaml Переглянути файл

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

+ 0
- 17
CNAS_Authorize/App.xaml.cs Переглянути файл

@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace CNAS_Authorize
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}

+ 0
- 123
CNAS_Authorize/CNAS_Authorize.csproj Переглянути файл

@@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CNAS_Authorize</RootNamespace>
<AssemblyName>CNAS_Authorize</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</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>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MachineAuth.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CnasSynchronousCommon\CnasSynchronousCommon.csproj">
<Project>{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}</Project>
<Name>CnasSynchronousCommon</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchronusClient\CnasSynchronusBLL.csproj">
<Project>{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}</Project>
<Name>CnasSynchronusBLL</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchrousModel\CnasSynchrousModel.csproj">
<Project>{0C3243F5-729E-409C-B406-C6DE56E632E0}</Project>
<Name>CnasSynchrousModel</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 0
- 243
CNAS_Authorize/MachineAuth.cs Переглянути файл

@@ -1,243 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace CNAS_Authorize
{
public class Machine
{
public string FactoryName { get; set; }
public string MachineCode { get; set; }
public string ImportTime { get; set; }
public bool IsGenerated { get; set; }

public Machine(string name, string code, string time, bool isGen)
{
FactoryName = name;
MachineCode = code;
ImportTime = time;
IsGenerated = isGen;
}

}

class MachineAuth
{
/// <summary>
/// 所有数据行
/// </summary>
private List<Machine> m_machines;
/// <summary>
/// 编码过滤
/// </summary>
private string m_filter_code;
/// <summary>
/// 名称过滤
/// </summary>
private string m_filter_factory;
//以下都是过滤过的数据
/// <summary>
/// 过滤过的数据
/// </summary>
private List<Machine> m_rangle;
/// <summary>
/// 过滤过的当前页
/// </summary>
private List<Machine> m_page;
/// <summary>
/// 每页数量
/// </summary>
private int m_pageSize;
/// <summary>
/// 页号
/// </summary>
private int m_pageIndex;
/// <summary>
/// 总页数
/// </summary>
private int m_pageCount;


public MachineAuth()
{
m_pageSize = 10;
m_pageIndex = 1;
}
DataBaseInfo targetDataBase = new DataBaseInfo();
public void Load()
{
//加载CNAS数据库配置
targetDataBase = FileOperation.GetLocalCnasDB();
if (!CnasDataOperationFact.CnasDataOperation().TestConnect(targetDataBase))
{
MessageBox.Show("CNAS数据库无法正常连接...", "提示");
return;
}


m_machines = new List<Machine>();
////1.加载数据
DataTable dtmacaddressinfo = CnasDataOperationFact.CnasDataOperation().GetTableData(targetDataBase, "select * from macaddress");
if (dtmacaddressinfo != null && dtmacaddressinfo.Rows.Count > 0)
{
List<string> lstCnasTables = new List<string>();
foreach (DataRow dr in dtmacaddressinfo.Rows)
{
Machine m = new Machine( dr["PLANTCODE"].ToString(), dr["MAC_ADDRESS"].ToString(), dr["CREATETIME"].ToString(), true);
m_machines.Add(m);
lstCnasTables.Add(dr["MAC_ADDRESS"].ToString());
}
}

m_rangle = new List<Machine>();
m_rangle.AddRange(m_machines);

m_pageSize = 10;
m_pageIndex = 1;
m_pageCount = (m_rangle.Count / m_pageSize) + (m_rangle.Count % m_pageSize == 0 ? 0 : 1);

m_page = getPageData(m_pageIndex);

}

public int PageSize
{
get { return m_pageSize; }
set
{
m_pageSize = value;
updateView();
}
}

public string CurrentPage
{
get
{
return m_pageCount == 0 ? "" : string.Format("{0} / {1}", m_pageIndex, m_pageCount);
}
set
{

}
}

public int TotalCount
{
get
{
return m_machines == null ? 0 : m_machines.Count;
}
set
{

}
}

private void updateView()
{
List<Machine> view = new List<Machine>();
if (!string.IsNullOrEmpty(m_filter_code) || !string.IsNullOrEmpty(m_filter_factory))
{
foreach (Machine item in m_machines)
{
bool flag = true;
if (!string.IsNullOrEmpty(m_filter_code))
{
if (item.MachineCode.IndexOf(m_filter_code) == -1)
{
flag = false;
}
}
if (!string.IsNullOrEmpty(m_filter_factory))
{
if (item.FactoryName.IndexOf(m_filter_factory) == -1)
{
flag = false;
}
}
if (flag)
{
view.Add(item);
}
}
}
else
{
view.AddRange(m_machines);
}
m_rangle = view;
m_pageIndex = 1;
m_pageCount = (m_rangle.Count / m_pageSize) + (m_rangle.Count % m_pageSize == 0 ? 0 : 1);
m_page = getPageData(m_pageIndex);
}

public void ChangeFilter(string code, string factory)
{
this.m_filter_code = code;
this.m_filter_factory = factory;

updateView();
}

public List<Machine> Page
{
get
{
return m_page;
}
}

private List<Machine> getPageData(int pageIndex)
{
int index = (pageIndex - 1) * m_pageSize;
List<Machine> page = new List<Machine>(m_pageSize);
for (int i = 0; i < m_pageSize && index < m_rangle.Count; i++)
{
page.Add(m_rangle[index]);
index++;
}
return page;
}

public List<Machine> NextPage(out bool ok)
{
int index = m_pageIndex * m_pageSize;
if (m_rangle == null || index >= m_rangle.Count)
{
ok = false;
return null;
}

m_pageIndex++;
m_page = getPageData(m_pageIndex);

ok = true;
return m_page;
}

public List<Machine> PrevPage(out bool ok)
{
if (m_pageIndex == 1 || m_rangle == null)
{
ok = false;
return null;
}
m_pageIndex--;

m_page = getPageData(m_pageIndex);

ok = true;
return m_page;

}


}
}

+ 0
- 130
CNAS_Authorize/MainWindow.xaml Переглянути файл

@@ -1,130 +0,0 @@
<Window x:Class="CNAS_Authorize.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:CNAS_Authorize"
mc:Ignorable="d"
Title="取数端授权程序" Height="460" Width="805" Loaded="Window_Loaded" SizeChanged="Window_SizeChanged">
<DockPanel>
<!--NORTH部分:固定高度,包含两个查询条件-->
<Grid x:Name="northPanel" Margin="10" Height="60" DockPanel.Dock="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal">
<Label x:Name="lbMachine" Content="机器识别码:" Width="100" />
<TextBox x:Name="edtMachine" Width="350" >
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Italic" Text="请输入机器识别码进行查询后在下方列表中下载对应激活码,如查询不到机器识别码则填写电厂名称后进行导入"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button x:Name="btnQuery" Content="搜索" Width="60" Click="Query_Click" />
</StackPanel>

<StackPanel Grid.Row="1" Orientation="Horizontal">
<Label Content="授权电厂名称:" Width="100" />
<TextBox x:Name="edtFactory" Width="350" >
<TextBox.Resources>
<VisualBrush x:Key="HintText" TileMode="None" Opacity="0.5" Stretch="None" AlignmentX="Left">
<VisualBrush.Visual>
<TextBlock FontStyle="Italic" Text="请输入电厂名称,非必填"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Style.Triggers>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource HintText}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<Button x:Name="btnConfirmImport" Content="确认导入" Width="60" Click="ConfirmImport_Click" />
</StackPanel>
</Grid>
<Grid x:Name="southPanel" DockPanel.Dock="Bottom" Height="30">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center">
<Label Content="共有条数:" />
<TextBox Width="50" Text="{Binding TotalCount}" IsEnabled="False" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
<Button x:Name="btnPrev" Content="上一页" Margin="5" Click="PrevPage_Click" />
<Button x:Name="btnNext" Content="下一页" Margin="5" Click="NextPage_Click" />
<TextBox Width="50" Text="{Binding CurrentPage}" IsEnabled="False" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" />
</StackPanel>
</Grid>
<!--CENTER部分:表格,包含列:"电厂名称"、"机器识别码"、"导入时间"、"是否已经生成激活码"和"操作"6列-->
<ScrollViewer x:Name="centerPanel" Margin="10">
<DataGrid Name="dataGrid"
AutoGenerateColumns="False"
SelectionMode="Single"
VerticalAlignment="Stretch"
HorizontalAlignment="Left"
Width="750"
Height="300" IsReadOnly="True">
<!--列定义-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding FactoryName}" Header="电厂名称" Width="120" CanUserSort="False" />
<DataGridTextColumn Binding="{Binding MachineCode}" Header="机器识别码" Width="220" CanUserSort="False" />
<DataGridTextColumn Binding="{Binding ImportTime}" Header="导入时间" Width="100" CanUserSort="False" />
<DataGridCheckBoxColumn Binding="{Binding IsGenerated}"
Header="是否已经生成激活码"
Width="130"
CanUserSort="False">
<DataGridCheckBoxColumn.ElementStyle>
<Style TargetType="CheckBox">
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</DataGridCheckBoxColumn.ElementStyle>
<DataGridCheckBoxColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</DataGridCheckBoxColumn.HeaderStyle>
</DataGridCheckBoxColumn>
<DataGridTemplateColumn Header="操作" Width="100">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="下载激活码"
Click="DownloadActivationCode_Click"
Margin="5"
Height="25"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</ScrollViewer>

</DockPanel>
</Window>

+ 0
- 204
CNAS_Authorize/MainWindow.xaml.cs Переглянути файл

@@ -1,204 +0,0 @@
using CnasSynchronousCommon;
using CnasSynchronusClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CNAS_Authorize
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{

private MachineAuth m_machines;

public MainWindow()
{
InitializeComponent();

}

private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.LoadData();
}

private void LoadData()
{
m_machines = new MachineAuth();
m_machines.Load();
dataGrid.ItemsSource = m_machines.Page;
this.DataContext = m_machines;
}

private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (this.Width < 500) return;
dataGrid.Width = this.Width - 48;
dataGrid.Height = centerPanel.Height;

//设置列宽
double colWidth = this.Width - 60;// centerPanel.Width;
for (int i = 1; i < dataGrid.Columns.Count; i++)
{
colWidth = colWidth - dataGrid.Columns[i].Width.Value;
}
if (colWidth > 0)
dataGrid.Columns[0].Width = colWidth;

edtMachine.Width = this.Width - lbMachine.Width - btnQuery.Width - 48;
edtFactory.Width = edtMachine.Width;

}

private void refreshBind()
{
this.DataContext = null;
this.DataContext = m_machines;
}

private void PrevPage_Click(object sender, RoutedEventArgs e)
{
bool ok;
List<Machine> page = m_machines.PrevPage(out ok);
if (ok)
{
dataGrid.ItemsSource = page;
refreshBind();
}


}

private void NextPage_Click(object sender, RoutedEventArgs e)
{
bool ok;
List<Machine> page = m_machines.NextPage(out ok);
if (ok)
{
dataGrid.ItemsSource = page;
refreshBind();
}

}

private void Query_Click(object sender, RoutedEventArgs e)
{
m_machines.ChangeFilter(edtMachine.Text.Trim(), edtFactory.Text.Trim());
dataGrid.ItemsSource = m_machines.Page;
refreshBind();
}

private void ConfirmImport_Click(object sender, RoutedEventArgs e)
{

//加载CNAS数据库配置
var targetDataBase = FileOperation.GetLocalCnasDB();
if (!CnasDataOperationFact.CnasDataOperation().TestConnect(targetDataBase))
{
MessageBox.Show("CNAS数据库无法正常连接...", "提示");
return;
}

var existData = CnasDataOperationFact.CnasDataOperation().GetTableData(targetDataBase, $"select * from macaddress where MAC_ADDRESS='{edtMachine.Text.Trim()}'");
if(existData!=null&& existData.Rows.Count > 0)
{
MessageBox.Show("已经导入!");
return;
}
StringBuilder sb = new StringBuilder();
sb.AppendFormat($"insert into macaddress(MAC_ADDRESS,PLANTCODE,CREATETIME,FACILITY_STYLE) VALUES('{edtMachine.Text.Trim()}','{edtFactory.Text.Trim()}',now(),'999')");

//1.加载数据
var flag = CnasDataOperationFact.CnasDataOperation().InsertTableData(targetDataBase, sb.ToString());
if (flag)
{
AppLog.ServiceInfo("导入成功");
MessageBox.Show("导入成功...", "提示");
this.LoadData();
}
else
{
MessageBox.Show("导入失败...", "提示");
}
}

private void DownloadActivationCode_Click(object sender, RoutedEventArgs e)
{
var button = sender as Button;
var machine = button.DataContext as Machine;
if (machine != null)
{
try
{
// 生成激活码
string activationCode = GenerateActivationCode(machine.MachineCode);

// 创建保存文件对话框
var saveFileDialog = new Microsoft.Win32.SaveFileDialog
{
FileName = $"激活码_{machine.MachineCode}_{DateTime.Now:yyyyMMdd}",
DefaultExt = ".txt",
Filter = "文本文件|*.txt"
};

if (saveFileDialog.ShowDialog() == true)
{
// 将激活码写入文件
System.IO.File.WriteAllText(saveFileDialog.FileName, activationCode);
MessageBox.Show("激活码已成功保存!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);

// 更新状态
machine.IsGenerated = true;
refreshBind();
}
}
catch (Exception ex)
{
MessageBox.Show($"下载激活码失败: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
}

private string GenerateActivationCode(string machineCode)
{
// 这里实现激活码生成算法
// 示例:简单的加密算法,实际应用中应该使用更安全的加密方式
using (var md5 = System.Security.Cryptography.MD5.Create())
{
// 加入时间戳使得生成的激活码具有时效性
string input = machineCode + DateTime.Now.ToString("yyyyMMdd");
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);

// 转换为16进制字符串
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("X2"));
// 每4个字符添加一个分隔符,提高可读性
if ((i + 1) % 4 == 0 && i != hashBytes.Length - 1)
{
sb.Append("-");
}
}
return sb.ToString();
}
}
}
}

+ 0
- 55
CNAS_Authorize/Properties/AssemblyInfo.cs Переглянути файл

@@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CNAS_Authorize")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CNAS_Authorize")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

//若要开始生成可本地化的应用程序,请
//<PropertyGroup> 中的 .csproj 文件中
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(当资源未在页面
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(当资源未在页面
//、应用程序或任何主题专用资源字典中找到时使用)
)]


// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0
- 71
CNAS_Authorize/Properties/Resources.Designer.cs Переглянути файл

@@ -1,71 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_Authorize.Properties
{


/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CNAS_Authorize.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;
}
}
}
}

+ 0
- 117
CNAS_Authorize/Properties/Resources.resx Переглянути файл

@@ -1,117 +0,0 @@
<?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>

+ 0
- 30
CNAS_Authorize/Properties/Settings.Designer.cs Переглянути файл

@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_Authorize.Properties
{


[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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;
}
}
}
}

+ 0
- 7
CNAS_Authorize/Properties/Settings.settings Переглянути файл

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

+ 0
- 56
CNAS_BalanceClient/App.config Переглянути файл

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<appSettings>
<add key="TargetDBType" value="Mysql"/>
<add key="InitalOperationPwd" value="123456"/>
</appSettings>
<log4net>
<logger name="Log">
<level value="INFO"/>
<appender-ref ref="RollingLog"/>
</logger>
<logger name="Err">
<level value="ERROR"/>
<appender-ref ref="RollingErr"/>
</logger>
<appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
<file value="Log\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 操作信息:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
</filter>
</appender>
<appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
<file value="ErrorLog\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 错误描述:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="ERROR"/>
</filter>
</appender>
</log4net>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Devart.Data" publicKeyToken="09af7300eec23701" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.2194.0" newVersion="5.0.2194.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

+ 0
- 164
CNAS_BalanceClient/CNAS_BalanceClient.csproj Переглянути файл

@@ -1,164 +0,0 @@
<?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>{00BEA43E-D03E-4BF7-9474-F36BD7811F74}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CNAS_BalanceClient</RootNamespace>
<AssemblyName>CNAS_BalanceClient</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\dll\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>scales_of_Balance_16px_1117673_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Devart.Data, Version=5.0.2194.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL" />
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<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.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="frmConditionMap.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmConditionMap.Designer.cs">
<DependentUpon>frmConditionMap.cs</DependentUpon>
</Compile>
<Compile Include="UIOperation\BalanceMainOperation.cs" />
<Compile Include="UIOperation\CrucibleUIOperation.cs" />
<Compile Include="frmBalanceField.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBalanceField.Designer.cs">
<DependentUpon>frmBalanceField.cs</DependentUpon>
</Compile>
<Compile Include="frmBalanceMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBalanceMain.Designer.cs">
<DependentUpon>frmBalanceMain.cs</DependentUpon>
</Compile>
<Compile Include="frmConfigPort.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmConfigPort.Designer.cs">
<DependentUpon>frmConfigPort.cs</DependentUpon>
</Compile>
<Compile Include="frmHistory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmHistory.Designer.cs">
<DependentUpon>frmHistory.cs</DependentUpon>
</Compile>
<Compile Include="frmLoginServer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmLoginServer.Designer.cs">
<DependentUpon>frmLoginServer.cs</DependentUpon>
</Compile>
<Compile Include="UIOperation\HuiFaFenUIOperation.cs" />
<Compile Include="UIOperation\HuiFenUIOperation.cs" />
<Compile Include="ILaboratoryTestOpera.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UIOperation\QuanShuiFenUIOperation.cs" />
<Compile Include="UIOperation\ShuiFenUIOperation.cs" />
<EmbeddedResource Include="frmBalanceField.resx">
<DependentUpon>frmBalanceField.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmBalanceMain.resx">
<DependentUpon>frmBalanceMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmConditionMap.resx">
<DependentUpon>frmConditionMap.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmConfigPort.resx">
<DependentUpon>frmConfigPort.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmHistory.resx">
<DependentUpon>frmHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmLoginServer.resx">
<DependentUpon>frmLoginServer.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="App.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>
<ProjectReference Include="..\CnasSynchronousCommon\CnasSynchronousCommon.csproj">
<Project>{8e0e5f2e-2ba2-4952-9f31-34c072cd86b3}</Project>
<Name>CnasSynchronousCommon</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchronusClient\CnasSynchronusBLL.csproj">
<Project>{cb9b6d92-3cc4-46c6-92e8-a6fd0ad48041}</Project>
<Name>CnasSynchronusClient</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchrousModel\CnasSynchrousModel.csproj">
<Project>{0c3243f5-729e-409c-b406-c6de56e632e0}</Project>
<Name>CnasSynchrousModel</Name>
</ProjectReference>
<ProjectReference Include="..\CNAS_SerialPort\CNAS_SerialPort.csproj">
<Project>{abb56058-b6fd-4747-a4e9-9c9361d6d993}</Project>
<Name>CNAS_SerialPort</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="scales_of_Balance_16px_1117673_easyicon.net.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 0
- 227
CNAS_BalanceClient/ILaboratoryTestOpera.cs Переглянути файл

@@ -1,227 +0,0 @@
using System;
using System.Collections.Generic;
using CnasSynchronousCommon;
using CnasSynchronusClient;
using CnasSynchrousModel;

namespace CNAS_BalanceClient
{
interface ILaboratoryTestOpera
{
ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode);

}

public class QuanShuiFenOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "ARB";
laboratory.Granularity = "6mm";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}

public class ShuiFenOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Moisture";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}

public class HuiFenOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Ash";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}

public class HuiFaFenOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Volatile";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}

public class CrucibleHeatOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Crucible|Heat";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}

public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode, string strCrucible)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.Crucible_Number = strCrucible;
laboratory.DataType = "Crucible|Heat";
laboratory.WeighingType = "FRL";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}
public class CrucibleSulfurOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Crucible|Sulfur";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}

public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode, string strCrucible)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.Crucible_Number = strCrucible;
laboratory.DataType = "Crucible|Sulfur";
laboratory.WeighingType = "CLY";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}

public class CrucibleHydrogenOpera : ILaboratoryTestOpera
{
public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.DataType = "Crucible|Hydrogen";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}

public ReturnValue<LaboratoryTest> CreateLaboratoryTestData(string strCode, string strCrucible)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
LaboratoryTest laboratory = new LaboratoryTest();

laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCode;
laboratory.Crucible_Number = strCrucible;
laboratory.WeighingType = "CHN";
laboratory.DataType = "Crucible|Hydrogen";
laboratory.DataMold = "临时";
laboratory.Operator = GlobalCommonOperation.strUserName;

laboratory.OperationType = "Add";

if (returnValue.LstValue == null) returnValue.LstValue = new List<LaboratoryTest>();
returnValue.LstValue.Add(laboratory);

return returnValue;
}
}
}

+ 0
- 31
CNAS_BalanceClient/Program.cs Переглянути файл

@@ -1,31 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

SystemFormatConfig systemFormat = FileOperation.GetSystemFormatConfigData();
GlobalCommonOperation.strStartGeneralVersion = systemFormat.StartGeneralVersion;
GlobalCommonOperation.strStartWebApi = systemFormat.StartWebApi;
GlobalCommonOperation.strWebApiUrl = systemFormat.WebApiUrl;
GlobalCommonOperation.strTargetDbType = systemFormat.TargetDBType;

if (new frmLoginServer().ShowDialog()==DialogResult.OK)
Application.Run(new frmBalanceMain());
}
}
}

+ 0
- 37
CNAS_BalanceClient/Properties/AssemblyInfo.cs Переглянути файл

@@ -1,37 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CNAS_BalanceClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CNAS_BalanceClient")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("00bea43e-d03e-4bf7-9474-f36bd7811f74")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]

+ 0
- 63
CNAS_BalanceClient/Properties/Resources.Designer.cs Переглянути файл

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_BalanceClient.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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("CNAS_BalanceClient.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;
}
}
}
}

+ 0
- 117
CNAS_BalanceClient/Properties/Resources.resx Переглянути файл

@@ -1,117 +0,0 @@
<?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>

+ 0
- 26
CNAS_BalanceClient/Properties/Settings.Designer.cs Переглянути файл

@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_BalanceClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.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;
}
}
}
}

+ 0
- 7
CNAS_BalanceClient/Properties/Settings.settings Переглянути файл

@@ -1,7 +0,0 @@
<?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>

+ 0
- 393
CNAS_BalanceClient/UIOperation/BalanceMainOperation.cs Переглянути файл

@@ -1,393 +0,0 @@
using CnasSynchronousCommon;
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace CNAS_BalanceClient
{
public class BalanceMainOperation
{
ILaboratoryTestOpera iopera;

/// <summary>
/// 根据当前切换的tab页,切换当前数据类型标识
/// </summary>
/// <param name="e"></param>
/// <param name="CurrentDataType"></param>
public void UpdateCurrentDataType(System.Windows.Forms.TabControlEventArgs e, ref string CurrentDataType)
{
//ARB 全水分;Moisture 水分;Ash 灰分;Volatile 挥发分;Crucible 坩埚;Heat 发热量:Sulfur 测硫;Hydrogen 测氢
switch (e.TabPage.Name)
{
case "tabpAllWater":
CurrentDataType = "ARB";
break;
case "tabpWater":
CurrentDataType = "Moisture";
break;
case "tabpAsh":
CurrentDataType = "Ash";
break;
case "tabpVoliate":
CurrentDataType = "Volatile";
break;
case "tabpCrucible":
CurrentDataType = "Crucible";
break;
case "tabpHeat":
CurrentDataType = "Heat";
break;
case "tabpSulfur":
CurrentDataType = "Sulfur";
break;
case "tabpHydrogen":
CurrentDataType = "Hydrogen";
break;
}
}

/// <summary>
/// 根据类型绑定datagridview
/// </summary>
/// <param name="dgv"></param>
/// <param name="laboratoryTests"></param>
/// <param name="currentDataType"></param>
public void BindData(System.Windows.Forms.DataGridView dgv, List<LaboratoryTest> laboratoryTests, string currentDataType)
{
dgv.DataSource = new BindingList<LaboratoryTest>();

var query = laboratoryTests.Where(s => s.DataType == currentDataType && s.OperationType != "delete").ToList<LaboratoryTest>();
dgv.DataSource = new BindingList<LaboratoryTest>(query);
}

/// <summary>
/// 绑定坩埚数据源
/// </summary>
/// <param name="dgv"></param>
/// <param name="laboratoryTests"></param>
/// <param name="currentDataType"></param>
public void BindCrucibleData(DataGridView dgv, List<LaboratoryTest> laboratoryTests, string currentDataType)
{
dgv.DataSource = new BindingList<LaboratoryTest>();

var query = laboratoryTests.Where(s => s.DataType == currentDataType &&(s.Crucible_Number==null||s.Crucible_Number=="")&& s.OperationType != "delete").ToList<LaboratoryTest>();
dgv.DataSource = new BindingList<LaboratoryTest>(query);
}
/// <summary>
/// 删除当前选中行
/// </summary>
/// <param name="dgv"></param>
public void DeleteData(System.Windows.Forms.DataGridView dgv, List<LaboratoryTest> laboratoryTests, string currentDataType)
{
//当前选中行
if (dgv.CurrentCell == null) return;
if (dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value == null) return;
string strID = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value.ToString(); //要求每个dgv的第一列必须为ID字段

var queryitem = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (queryitem.Count == 1)
{
queryitem[0].OperationType = "delete";
dgv.Rows.Remove(dgv.CurrentRow);
}
}

/// <summary>
/// 增加新数据(全水分/水分/灰分/挥发分/...)
/// </summary>
/// <param name="strCode"></param>
/// <param name="strType"></param>
/// <returns></returns>
public ReturnValue<LaboratoryTest> AddNewData(string strCode, string strType)
{
ReturnValue<LaboratoryTest> returnValue = new ReturnValue<LaboratoryTest>();
if (strCode == "" || strType == "")
{
returnValue.StrErrorMsg = string.Format("参数为空,{0}", strCode == "" ? "样品编码" : "化验类型");
return null;
}
//ARB 全水分;Moisture 水分;Ash 灰分;Volatile 挥发分;Crucible 坩埚;Heat 发热量:Sulfur 测硫;Hydrogen 测氢
switch (strType)
{
case "ARB":
iopera = new QuanShuiFenOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Moisture":
iopera = new ShuiFenOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Ash":
iopera = new HuiFenOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Volatile":
iopera = new HuiFaFenOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Crucible|Heat":
iopera = new CrucibleHeatOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Crucible|Sulfur":
iopera = new CrucibleSulfurOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
case "Crucible|Hydrogen":
iopera = new CrucibleHydrogenOpera();
returnValue = iopera.CreateLaboratoryTestData(strCode);
break;
}
return returnValue;
}
/// <summary>
/// 获取自动编码
/// </summary>
/// <param name="laboratoryTests"></param>
/// <returns></returns>
public string GetAutoCode(List<LaboratoryTest> laboratoryTests)
{
string strCode= "T";
string strNewCode = DateTime.Now.ToString("yyyyMMdd") + "01";
if (laboratoryTests.Count > 0)
{
var query = laboratoryTests.OrderByDescending(s => s.Auto_Code).ToList<LaboratoryTest>();
string strMaxCode = query[0].Auto_Code;
if (strMaxCode != "")
{
long maxIndex = Convert.ToInt64(strMaxCode.Substring(1, strMaxCode.Length - 1));
if (maxIndex >= Convert.ToInt64(strNewCode))
strCode += (maxIndex + 1).ToString();
else
strCode += strNewCode;
}
else
strCode += strNewCode;
}
else
{
strCode += strNewCode;
}
return strCode;
}
/// <summary>
/// 绘制序号列
/// </summary>
/// <param name="dgv"></param>
/// <param name="e"></param>
public void DrawFirstColumnIndex(DataGridView dgv, DataGridViewRowPostPaintEventArgs e)
{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
dgv.RowHeadersWidth - 4,
e.RowBounds.Height);

TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
dgv.RowHeadersDefaultCellStyle.Font,
rectangle,
dgv.RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}

/// <summary>
/// 提交编辑列
/// </summary>
/// <param name="dgv"></param>
/// <param name="laboratoryTests"></param>
/// <param name="e"></param>
public void CommitEditColumn(DataGridView dgv, List<LaboratoryTest> laboratoryTests, DataGridViewCellEventArgs e)
{
if (dgv.CurrentCell == null) return;
if (dgv.CurrentCell.Value == null) return;
if (e.ColumnIndex == 2) //仪器编号
{
string strInputValue = dgv.CurrentCell.Value.ToString();
string strCurrentID = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value.ToString();

var query = laboratoryTests.Where(s => s.GUID == strCurrentID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
query[0].Instrument_Number = strInputValue;
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";
}
}
if (e.ColumnIndex == 3) //坩埚编号
{
string strInputValue = dgv.CurrentCell.Value.ToString();
string strCurrentID = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value.ToString();

var query = laboratoryTests.Where(s => s.GUID == strCurrentID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
query[0].Crucible_Number = strInputValue;
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";
}
}
if (e.ColumnIndex == 12) //颗粒度
{
string strInputValue = dgv.CurrentCell.Value.ToString();
string strCurrentID = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value.ToString();

var query = laboratoryTests.Where(s => s.GUID == strCurrentID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
query[0].Granularity = strInputValue;
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";
}
}
}
/// <summary>
/// 把天平端数据更改到显示端和存储端
/// </summary>
/// <param name="dgvQuanShuiFen"></param>
/// <param name="lstWeightColumnIndex"></param>
/// <param name="balanceWeight"></param>
/// <param name="laboratoryTests"></param>
public void UpdateQuanShuiFenBalanceWeight(System.Windows.Forms.DataGridView dgvQuanShuiFen, List<string> lstWeightColumnIndex, double balanceWeight, List<LaboratoryTest> laboratoryTests,string strType)
{
lstWeightColumnIndex = new List<string>() { "4", "5", "7", "8", "9" }; //全水分的这些列从天平端获取
if (lstWeightColumnIndex.Contains(dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString()))
{
string strCurrentValue = dgvQuanShuiFen.CurrentCell.Value.ToString();
if (strCurrentValue != ""&&strCurrentValue!="0")
{
if (MessageBox.Show("单元格已经存在数据,继续将覆盖这个数据,是否继续?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
switch (strType)
{
case "ARB":
new QuanShuiFenUIOperation().UpdateQuanShuiFenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
case "Moisture":
new ShuiFenUIOperation().UpdateShuiFenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
case "Ash":
new HuiFenUIOperation().UpdateHuifenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
}
}
}
else
{
switch (strType)
{
case "ARB":
new QuanShuiFenUIOperation().UpdateQuanShuiFenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
case "Moisture":
new ShuiFenUIOperation().UpdateShuiFenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
case "Ash":
new HuiFenUIOperation().UpdateHuifenData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
break;
}
}
}
}

/// <summary>
/// 将天平传输的重量插入数据中
/// </summary>
/// <param name="dgvQuanShuiFen"></param>
/// <param name="lstWeightColumnIndex"></param>
/// <param name="balanceWeight"></param>
/// <param name="laboratoryTests"></param>
public void UpdateVolatileBalanceWeight(System.Windows.Forms.DataGridView dgvQuanShuiFen, List<string> lstWeightColumnIndex, double balanceWeight, List<LaboratoryTest> laboratoryTests)
{
lstWeightColumnIndex = new List<string>() { "4", "5", "7" }; //全水分的这些列从天平端获取
if (lstWeightColumnIndex.Contains(dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString()))
{
string strCurrentValue = dgvQuanShuiFen.CurrentCell.Value.ToString();
if (strCurrentValue != "" && strCurrentValue != "0")
{
if (MessageBox.Show("单元格已经存在数据,继续将覆盖这个数据,是否继续?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
new HuiFaFenUIOperation().UpdateVolatileData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
}
}
else
{
new HuiFaFenUIOperation().UpdateVolatileData(dgvQuanShuiFen, balanceWeight, laboratoryTests);
}
}
}

/// <summary>
/// 检查输入百分比大小是否是100内小数
/// </summary>
/// <param name="strInput"></param>
/// <returns></returns>
public bool CheckInputPercent(string strInput)
{
bool bIfSuccess = true;
double value = 0;
if (double.TryParse(strInput, out value))
{
if (value < 0 || value > 100)
{
MessageBox.Show("输入值范围为0~100", "提示");
bIfSuccess = false;
}
}
else
{
MessageBox.Show("输入值范围为0~100的数字", "提示");
bIfSuccess = false;
}
return bIfSuccess;
}

/// <summary>
/// 获取当前选中项的GUID集合
/// </summary>
/// <param name="dgv"></param>
/// <returns></returns>
public List<string> GetSelectItemID(DataGridView dgv)
{
List<string> lstSelectID = new List<string>();
for (int j = 0; j < dgv.SelectedRows.Count; j++)
{
string strID = dgv.SelectedRows[j].Cells[0].Value.ToString();
lstSelectID.Add(strID);
}
return lstSelectID;
}

/// <summary>
/// 将天平传输来的重量插入坩埚架数据中
/// </summary>
/// <param name="DstCurrentLeftGrids"></param>
/// <param name="dgvCrucibleShelf"></param>
/// <param name="defaultdouble"></param>
/// <param name="currentCrucibleDataType"></param>
/// <param name="laboratoryTests"></param>
public void UpdateCrucibleBalanceWeight(Dictionary<string,DataGridView> DstCurrentLeftGrids,DataGridView dgvCrucibleShelf, double defaultdouble,string currentCrucibleDataType,List<LaboratoryTest> laboratoryTests)
{
new CrucibleUIOperation().UpdateCrucibleBalanceWeight(DstCurrentLeftGrids, dgvCrucibleShelf, defaultdouble, currentCrucibleDataType, laboratoryTests);
}

/// <summary>
/// 新增一组坩埚架数据
/// </summary>
/// <param name="DictCrucuibleGrids"></param>
/// <param name="dgvCrucibleShelf"></param>
/// <param name="currentCrucibleDataType"></param>
/// <param name="strTypeTitle"></param>
/// <param name="laboratoryTests"></param>
public void AddCrucibleShelfData(Dictionary<string,DataGridView> DictCrucuibleGrids,DataGridView dgvCrucibleShelf, string currentCrucibleDataType,string strTypeTitle,List<LaboratoryTest> laboratoryTests)
{
new CrucibleUIOperation().AddCrucibleShelfData(DictCrucuibleGrids, dgvCrucibleShelf, currentCrucibleDataType, strTypeTitle, laboratoryTests);
}
}
}

+ 0
- 161
CNAS_BalanceClient/UIOperation/CrucibleUIOperation.cs Переглянути файл

@@ -1,161 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public class CrucibleUIOperation
{
/// <summary>
/// 将天平端传输过来的重量传输到坩埚数据中
/// </summary>
/// <param name="DstCurrentLeftGrids"></param>
/// <param name="dgvCrucibleShelf"></param>
/// <param name="defaultdouble"></param>
/// <param name="currentCrucibleDataType"></param>
/// <param name="laboratoryTests"></param>
public void UpdateCrucibleBalanceWeight(Dictionary<string, DataGridView> DstCurrentLeftGrids, DataGridView dgvCrucibleShelf, double defaultdouble, string currentCrucibleDataType, List<LaboratoryTest> laboratoryTests)
{
//当前坩埚架选中单元格
if (dgvCrucibleShelf.CurrentCell == null) return;
if (dgvCrucibleShelf.CurrentCell.ColumnIndex != 3) return; //索引为3的列为“重量”列,其他列不允许插入数值

//是否满足称重范围
double MinValue = 0;
double MaxValue = 0;
switch (currentCrucibleDataType)
{
case "Crucible|Heat":
MinValue = 0.9;
MaxValue = 1.1;
break;
case "Crucible|Sulfur":
MinValue = 0.045;
MaxValue = 0.055;
break;
case "Crucible|Hydrogen":
MinValue = 0.05;
MaxValue = 0.2;
break;
}
if (defaultdouble > MaxValue || defaultdouble < MinValue)
{
MessageBox.Show($"称重范围是{MinValue}g~{MaxValue}g.", "提示");
return;
}

if (dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells[0].Value == null || dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells[0].Value.ToString() == "")
{
//此时说明datagridview中没有旧值,不存在覆盖问题,可以直接增加数据
string strSampleCode = GetCurrentSelectedSampleCode(currentCrucibleDataType, DstCurrentLeftGrids);
if (strSampleCode == "") return; //此时未获得左侧样品编号,不能在右侧增加数据

string strCrucibleNumber = dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_CrucibleNumber"].Value.ToString();
//新增加一条数据
LaboratoryTest laboratory = new LaboratoryTest();
laboratory.GUID = Guid.NewGuid().ToString();
laboratory.Sample_Number = strCrucibleNumber + "-" + strSampleCode;
laboratory.Sample_Weight = defaultdouble;
laboratory.Operator = GlobalCommonOperation.strUserName;
laboratory.OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
laboratory.DataType = currentCrucibleDataType;
laboratory.Crucible_Number = strCrucibleNumber;
laboratory.WeighingType = currentCrucibleDataType == "Crucible|Heat" ? "FRL" : (currentCrucibleDataType == "Crucible|Sulfur" ? "CLY" : "CHN");

laboratory.OperationType = "add";

laboratoryTests.Add(laboratory);

//更改datagridview中的值
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_ID"].Value = laboratory.GUID;
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_SampleNumber"].Value = laboratory.Sample_Number;
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_WeighingType"].Value = laboratory.WeighingType;
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_SampleWeight"].Value = laboratory.Sample_Weight;
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_Operator"].Value = laboratory.Operator;
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_SampleWeight"].Value = laboratory.Sample_Weight;
}
else //此时说明datagridview中存在旧值,可能存在覆盖问题
{
if (MessageBox.Show("单元格已经存在数据,继续将覆盖这个数据,是否继续?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
string strCurrentID = dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strCurrentID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
query[0].Sample_Weight = defaultdouble;
query[0].OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm"));
query[0].Operator = GlobalCommonOperation.strUserName;
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";

//更改datagridview中的值
dgvCrucibleShelf.Rows[dgvCrucibleShelf.CurrentCell.RowIndex].Cells["Shelf_SampleWeight"].Value = query[0].Sample_Weight;
}
}
}
}



/// <summary>
/// 获得当前坩埚选中的样品编码
/// </summary>
/// <param name="currentCrucibleDataType"></param>
/// <param name="DstCurrentGrids"></param>
/// <returns></returns>
private string GetCurrentSelectedSampleCode(string currentCrucibleDataType, Dictionary<string, DataGridView> DstCurrentGrids)
{
string strSampleCode = "";
DataGridView dgv = DstCurrentGrids[currentCrucibleDataType];
if (dgv.CurrentCell != null && dgv.Rows[dgv.CurrentCell.RowIndex].Cells[0].Value != null)
strSampleCode = dgv.Rows[dgv.CurrentCell.RowIndex].Cells[1].Value.ToString();
return strSampleCode;
}

/// <summary>
/// 增加一组坩埚架数据
/// </summary>
/// <param name="DictCrucuibleGrids"></param>
/// <param name="dgvCrucibleShelf"></param>
/// <param name="currentCrucibleDataType"></param>
/// <param name="strTypeTitle"></param>
/// <param name="laboratoryTests"></param>
public void AddCrucibleShelfData(Dictionary<string, DataGridView> DictCrucuibleGrids, DataGridView dgvCrucibleShelf, string currentCrucibleDataType, string strTypeTitle, List<LaboratoryTest> laboratoryTests)
{
//0.判断左侧选中某项内容,如果左侧未选中任何内容,则不应该产生数据
string strSampleCode = GetCurrentSelectedSampleCode(currentCrucibleDataType, DictCrucuibleGrids);
//if (strSampleCode == "") return;
//1.在datagridview上增加20个数据行
dgvCrucibleShelf.Rows.Clear();
string strWeighingType = currentCrucibleDataType == "Crucible|Heat" ? "FRL" : (currentCrucibleDataType == "Crucible|Sulfur" ? "CLY" : "CHN");
for (int i = 1; i < 21; i++)
{
int index = dgvCrucibleShelf.Rows.Add();
dgvCrucibleShelf.Rows[index].Cells["Shelf_CrucibleNumber"].Value = strWeighingType + strTypeTitle + string.Format("{0:D2}", i);
}
//2.判断数据库中是否存在该坩埚架的内容,如果存在,则将数据插入到这20行数据行中
var query = laboratoryTests.Where(s => s.DataType == currentCrucibleDataType && s.Crucible_Number != null && s.Crucible_Number.StartsWith($"{strWeighingType}{strTypeTitle}") && s.OperaDateTime.ToString("yyyyMMdd") == DateTime.Now.ToString("yyyyMMdd") && ((s.OperationType == null) || (s.OperationType != null && s.OperationType.ToLower() != "delete"))).ToList<LaboratoryTest>(); //判断条件:今天的,样品编码以左侧样品号结尾,坩埚号以称量类型开头。
if (query.Count > 0)
{
foreach (var item in query)
{
foreach (DataGridViewRow dgr in dgvCrucibleShelf.Rows)
{
if (dgr.Cells["Shelf_CrucibleNumber"].Value.ToString() == item.Crucible_Number)
{
dgr.Cells["Shelf_ID"].Value = item.GUID;
dgr.Cells["Shelf_SampleNumber"].Value = item.Sample_Number;
dgr.Cells["Shelf_WeighingType"].Value = item.WeighingType;
dgr.Cells["Shelf_SampleWeight"].Value = item.Sample_Weight;
dgr.Cells["Shelf_Operator"].Value = item.Operator;
}
}
}
}
}
}
}

+ 0
- 132
CNAS_BalanceClient/UIOperation/HuiFaFenUIOperation.cs Переглянути файл

@@ -1,132 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public class HuiFaFenUIOperation
{
/// <summary>
/// 将天平传输的重量插入数据中
/// </summary>
/// <param name="dgvQuanShuiFen"></param>
/// <param name="balanceWeight"></param>
/// <param name="laboratoryTests"></param>
public void UpdateVolatileData(System.Windows.Forms.DataGridView dgvQuanShuiFen, double balanceWeight, List<LaboratoryTest> laboratoryTests)
{

bool bIfUpdate = true;
//更改内存值
string strID = dgvQuanShuiFen.Rows[dgvQuanShuiFen.CurrentCell.RowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
switch (dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString())
{
case "4": //空坩埚重
if (balanceWeight < 15 || balanceWeight > 20)
{
MessageBox.Show("样重范围是15g~20g", "提示");
bIfUpdate = false;
}
else
{
query[0].Empty_Crucible_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvQuanShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
}
break;
case "5": //样重
if (balanceWeight < 0.9 || balanceWeight > 1.1)
{
MessageBox.Show("样重范围是0.9g~1.1g");
bIfUpdate = false;
}
else
{
query[0].Sample_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvQuanShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
}
break;
case "6"://加样重
//query[0].AddSample_Weight = balanceWeight;
break;
case "7"://烘干重
//query[0].Drying_Weight = balanceWeight;

if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].BurningResidue_Weight;
query[0].BurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateVolatilePercentColumn(dgvQuanShuiFen, laboratoryTests, dgvQuanShuiFen.CurrentCell.RowIndex))
{
query[0].BurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
}
if (bIfUpdate)
{
query[0].Operator = GlobalCommonOperation.strUserName;
query[0].OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";

//更改显示值
dgvQuanShuiFen.CurrentCell.Value = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
}
}
}

/// <summary>
/// 实时更改挥发分百分比数据
/// </summary>
/// <param name="dgvHuiFaFen"></param>
/// <param name="laboratoryTests"></param>
/// <param name="currentRowIndex"></param>
/// <returns></returns>
public bool UpdateVolatilePercentColumn(DataGridView dgvHuiFaFen, List<LaboratoryTest> laboratoryTests, int currentRowIndex)
{
bool IfUpdate = true;
string strID = dgvHuiFaFen.Rows[currentRowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
if (query[0].Sample_Weight != 0 && query[0].AddSample_Weight != 0 && query[0].BurningResidue_Weight != 0)
{
string strMsg = "";
double percentdouble = 0;

percentdouble = CalculateOperation.CalculateVr(query[0].AddSample_Weight, query[0].Sample_Weight, new double[3] { query[0].BurningResidue_Weight, query[0].SecondBurningResidue_Weight, query[0].ThirdBurningResidue_Weight }, ref strMsg);
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFaFen.Rows[currentRowIndex].Cells["Vr"].Value = percentdouble;

percentdouble = CalculateOperation.CalculateVad(CalculateOperation.CalculateVr(query[0].AddSample_Weight, query[0].Sample_Weight, new double[3] { query[0].BurningResidue_Weight, query[0].SecondBurningResidue_Weight, query[0].ThirdBurningResidue_Weight }, ref strMsg), Convert.ToDouble(dgvHuiFaFen.Rows[currentRowIndex].Cells["MAD2"].Value));
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFaFen.Rows[currentRowIndex].Cells["VAD"].Value = percentdouble;

query[0].Vr = Convert.ToDouble(dgvHuiFaFen.Rows[currentRowIndex].Cells["Vr"].Value);
query[0].Vad = Convert.ToDouble(dgvHuiFaFen.Rows[currentRowIndex].Cells["VAD"].Value);
}
}
return IfUpdate;
}
}
}

+ 0
- 176
CNAS_BalanceClient/UIOperation/HuiFenUIOperation.cs Переглянути файл

@@ -1,176 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public class HuiFenUIOperation
{
/// <summary>
/// 更改灰分数据
/// </summary>
/// <param name="dgvShuiFen"></param>
/// <param name="balanceWeight"></param>
/// <param name="laboratoryTests"></param>
public void UpdateHuifenData(System.Windows.Forms.DataGridView dgvShuiFen, double balanceWeight, List<LaboratoryTest> laboratoryTests)
{
//更改内存值
bool bIfUpdate = true;
string strID = dgvShuiFen.Rows[dgvShuiFen.CurrentCell.RowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
switch (dgvShuiFen.CurrentCell.ColumnIndex.ToString())
{
case "4": //空坩埚重
query[0].Empty_Crucible_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
break;
case "5": //样重
if (balanceWeight < 0.9 || balanceWeight > 1.1)
{
MessageBox.Show("样重范围是0.9g~1.1g", "提示");
bIfUpdate = false;
}
else
{
query[0].Sample_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
}
break;
case "6"://加样重
//query[0].AddSample_Weight = balanceWeight;
break;
case "7"://烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].BurningResidue_Weight;
query[0].BurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateAshPercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].BurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
case "8"://二次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].SecondBurningResidue_Weight;
query[0].SecondBurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateAshPercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].SecondBurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
case "9"://三次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].ThirdBurningResidue_Weight;
query[0].ThirdBurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateAshPercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].ThirdBurningResidue_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
}
if (bIfUpdate)
{
query[0].Operator = GlobalCommonOperation.strUserName;
query[0].OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";

//更改显示值
dgvShuiFen.CurrentCell.Value = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
}
}
}

/// <summary>
/// 更改灰分百分比
/// </summary>
/// <param name="dgvShuiFen"></param>
/// <param name="laboratoryTests"></param>
public bool UpdateAshPercentColumn(DataGridView dgvHuiFen, List<LaboratoryTest> laboratoryTests, int CurrentRowIndex)
{
bool IfUpdate = true;
string strID = dgvHuiFen.Rows[CurrentRowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
double percentdouble = 0;
if (query[0].Sample_Weight != 0 && query[0].AddSample_Weight != 0 && query[0].BurningResidue_Weight != 0)
{
string strMsg = "";
if (query[0].SecondBurningResidue_Weight == 0)
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[1] { query[0].BurningResidue_Weight });
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFen.Rows[CurrentRowIndex].Cells["DecrementValue2"].Value = percentdouble;
}
else if (query[0].ThirdBurningResidue_Weight == 0)
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[2] { query[0].BurningResidue_Weight, query[0].SecondBurningResidue_Weight });
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFen.Rows[CurrentRowIndex].Cells["DecrementValue2"].Value = percentdouble;
}
else
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[3] { query[0].BurningResidue_Weight, query[0].SecondBurningResidue_Weight, query[0].ThirdBurningResidue_Weight });
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFen.Rows[CurrentRowIndex].Cells["DecrementValue2"].Value = percentdouble;
}

percentdouble = CalculateOperation.CalculateAad(query[0].AddSample_Weight, query[0].Sample_Weight, new double[3] { query[0].BurningResidue_Weight, query[0].SecondBurningResidue_Weight, query[0].ThirdBurningResidue_Weight }, ref strMsg);
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgvHuiFen.Rows[CurrentRowIndex].Cells["AAD"].Value = percentdouble;

query[0].Aad = Convert.ToDouble(dgvHuiFen.Rows[CurrentRowIndex].Cells["AAD"].Value);
query[0].DecrementValue = Convert.ToDouble(dgvHuiFen.Rows[CurrentRowIndex].Cells["DecrementValue2"].Value);
}
}
return IfUpdate;
}

}
}

+ 0
- 182
CNAS_BalanceClient/UIOperation/QuanShuiFenUIOperation.cs Переглянути файл

@@ -1,182 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public class QuanShuiFenUIOperation
{
/// <summary>
/// 更改全水分数据
/// </summary>
/// <param name="dgvQuanShuiFen">datagridview控件</param>
/// <param name="balanceWeight">天平传过来的重量</param>
/// <param name="laboratoryTests">数据源</param>
public void UpdateQuanShuiFenData(System.Windows.Forms.DataGridView dgvQuanShuiFen, double balanceWeight, List<LaboratoryTest> laboratoryTests)
{
//更改内存值
bool bIfUpdate = true;
string strID = dgvQuanShuiFen.Rows[dgvQuanShuiFen.CurrentCell.RowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
switch (dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString())
{
case "4": //空坩埚重
query[0].Empty_Crucible_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvQuanShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
break;
case "5": //样重
double MinValue = 0;
double MaxValue = 0;
if (query[0].Granularity == "13mm")
{
MinValue = 490;
MaxValue = 510;
}
else
{
MinValue = 10;
MaxValue = 12;
}
if (balanceWeight < MinValue || balanceWeight > MaxValue)
{
MessageBox.Show($"样重范围是{MinValue}g~{MaxValue}g.", "提示");
bIfUpdate = false;
}
else
{
query[0].Sample_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvQuanShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
}
break;
case "6"://加样重
//query[0].AddSample_Weight = balanceWeight;
break;
case "7"://烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].Drying_Weight;
query[0].Drying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateARBPercentColumn(dgvQuanShuiFen, laboratoryTests, dgvQuanShuiFen.CurrentCell.RowIndex))
{
query[0].Drying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
case "8"://二次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].SecondDrying_Weight;
query[0].SecondDrying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateARBPercentColumn(dgvQuanShuiFen, laboratoryTests, dgvQuanShuiFen.CurrentCell.RowIndex))
{
query[0].SecondDrying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
case "9"://三次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].ThirdDrying_Weight;
query[0].ThirdDrying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateARBPercentColumn(dgvQuanShuiFen, laboratoryTests, dgvQuanShuiFen.CurrentCell.RowIndex))
{
query[0].ThirdDrying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
}
if (bIfUpdate)
{
query[0].Operator = GlobalCommonOperation.strUserName;
query[0].OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";

//更改显示值
dgvQuanShuiFen.CurrentCell.Value = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
//if(dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString()=="4"|| dgvQuanShuiFen.CurrentCell.ColumnIndex.ToString()=="5")
// dgvQuanShuiFen.CurrentRow.Cells[6].Value = query[0].AddSample_Weight;
}
}
}

/// <summary>
/// 更改全水分百分比
/// </summary>
/// <param name="dgv"></param>
/// <param name="laboratoryTests"></param>
/// <returns></returns>
public bool UpdateARBPercentColumn(DataGridView dgv, List<LaboratoryTest> laboratoryTests, int CurrentRowIndex)
{
bool IfUpdate = true;
string strID = dgv.Rows[CurrentRowIndex].Cells["ID"].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
if (query[0].Sample_Weight != 0 && query[0].AddSample_Weight != 0 && query[0].Drying_Weight != 0)
{
string strMsg = "";
double percentdouble = 0;
if (query[0].SecondDrying_Weight == 0)
{
percentdouble = CalculateOperation.CalculateMt(query[0].AddSample_Weight, query[0].Sample_Weight, new double[1] { query[0].Drying_Weight }, ref strMsg);
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgv.Rows[CurrentRowIndex].Cells["Mt"].Value = percentdouble;
}

else if (query[0].ThirdDrying_Weight == 0)
{
percentdouble = CalculateOperation.CalculateMt(query[0].AddSample_Weight, query[0].Sample_Weight, new double[2] { query[0].Drying_Weight, query[0].SecondDrying_Weight }, ref strMsg);
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgv.Rows[CurrentRowIndex].Cells["Mt"].Value = percentdouble;
}
else
{
percentdouble = CalculateOperation.CalculateMt(query[0].AddSample_Weight, query[0].Sample_Weight, new double[3] { query[0].Drying_Weight, query[0].SecondDrying_Weight, query[0].ThirdDrying_Weight }, ref strMsg);
if (percentdouble > 100 || percentdouble < 0)
{
MessageBox.Show("百分比计算结果出错,请调整数据。", "提示");
return false;
}
dgv.Rows[CurrentRowIndex].Cells["Mt"].Value = percentdouble;
}

query[0].Mt = Convert.ToDouble(dgv.Rows[CurrentRowIndex].Cells["Mt"].Value);
}
}
return IfUpdate;
}
}
}

+ 0
- 151
CNAS_BalanceClient/UIOperation/ShuiFenUIOperation.cs Переглянути файл

@@ -1,151 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public class ShuiFenUIOperation
{
/// <summary>
/// 更改水分数据
/// </summary>
/// <param name="dgvShuiFen"></param>
/// <param name="balanceWeight"></param>
/// <param name="laboratoryTests"></param>
public void UpdateShuiFenData(System.Windows.Forms.DataGridView dgvShuiFen, double balanceWeight, List<LaboratoryTest> laboratoryTests)
{
//更改内存值
bool bIfUpdate = true;
string strID = dgvShuiFen.Rows[dgvShuiFen.CurrentCell.RowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
switch (dgvShuiFen.CurrentCell.ColumnIndex.ToString())
{
case "4": //空坩埚重
query[0].Empty_Crucible_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
break;
case "5": //样重
if (balanceWeight < 0.9 || balanceWeight > 1.1)
{
MessageBox.Show("样重范围是0.9g~1.1g", "提示");
bIfUpdate = false;
}
else
{
query[0].Sample_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
dgvShuiFen.CurrentRow.Cells[6].Value = CalculateOperation.GetShowDoubleValueN4(query[0].Empty_Crucible_Weight + query[0].Sample_Weight);
}
break;
case "6"://加样重
//query[0].AddSample_Weight = balanceWeight;
break;
case "7"://烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].Drying_Weight;
query[0].Drying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateMoisturePercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].Drying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
};
break;
case "8"://二次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].SecondDrying_Weight;
query[0].SecondDrying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateMoisturePercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].SecondDrying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
case "9"://三次烘干重
if (query[0].AddSample_Weight != 0 && balanceWeight > query[0].AddSample_Weight)
{
MessageBox.Show("烘干重不能大于加样重,请调整后再传入。", "提示");
bIfUpdate = false;
}
else
{
double oldvaue = query[0].ThirdDrying_Weight;
query[0].ThirdDrying_Weight = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
if (!UpdateMoisturePercentColumn(dgvShuiFen, laboratoryTests, dgvShuiFen.CurrentCell.RowIndex))
{
query[0].ThirdDrying_Weight = CalculateOperation.GetShowDoubleValueN4(oldvaue);
bIfUpdate = false;
}
}
break;
}
if (bIfUpdate)
{
query[0].Operator = GlobalCommonOperation.strUserName;
query[0].OperaDateTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
if (query[0].OperationType == null || query[0].OperationType == "")
query[0].OperationType = "update";

//更改显示值
dgvShuiFen.CurrentCell.Value = CalculateOperation.GetShowDoubleValueN4(balanceWeight);
}
}
}

/// <summary>
/// 更改水分百分比
/// </summary>
/// <param name="dgvShuiFen"></param>
/// <param name="laboratoryTests"></param>
/// <returns></returns>
public bool UpdateMoisturePercentColumn(DataGridView dgvShuiFen, List<LaboratoryTest> laboratoryTests, int CurrentRowIndex)
{
bool IfUpdate = true;
string strID = dgvShuiFen.Rows[CurrentRowIndex].Cells[0].Value.ToString();
var query = laboratoryTests.Where(s => s.GUID == strID).ToList<LaboratoryTest>();
if (query.Count == 1)
{
if (query[0].Sample_Weight != 0 && query[0].AddSample_Weight != 0 && query[0].Drying_Weight != 0)
{
double percentdouble = 0;
if (query[0].SecondDrying_Weight == 0)
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[1] { query[0].Drying_Weight });
dgvShuiFen.Rows[CurrentRowIndex].Cells["DecrementValue1"].Value = percentdouble;
}

else if (query[0].ThirdDrying_Weight == 0)
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[2] { query[0].Drying_Weight, query[0].SecondDrying_Weight });
dgvShuiFen.Rows[CurrentRowIndex].Cells["DecrementValue1"].Value = percentdouble;
}
else
{
percentdouble = CalculateOperation.CalculateDecrement(query[0].AddSample_Weight, new double[3] { query[0].Drying_Weight, query[0].SecondDrying_Weight, query[0].ThirdDrying_Weight });
dgvShuiFen.Rows[CurrentRowIndex].Cells["DecrementValue1"].Value = percentdouble;
}
query[0].DecrementValue = Convert.ToDouble(dgvShuiFen.Rows[CurrentRowIndex].Cells["DecrementValue1"].Value);
}
}
return IfUpdate;
}
}
}

+ 0
- 770
CNAS_BalanceClient/frmBalanceField.Designer.cs Переглянути файл

@@ -1,770 +0,0 @@
namespace CNAS_BalanceClient
{
partial class frmBalanceField
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBalanceField));
this.pnlAll = new System.Windows.Forms.Panel();
this.pnlCenter = new System.Windows.Forms.Panel();
this.pnlbalanceRight = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage6 = new System.Windows.Forms.TabPage();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvbalancefield = new System.Windows.Forms.DataGridView();
this.InstruFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InstruDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel4 = new System.Windows.Forms.Panel();
this.label12 = new System.Windows.Forms.Label();
this.dgvCnas = new System.Windows.Forms.DataGridView();
this.CNASFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel5 = new System.Windows.Forms.Panel();
this.cbxCnas = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.panel10 = new System.Windows.Forms.Panel();
this.btnDeleteMapping = new System.Windows.Forms.Button();
this.btnAddMapping = new System.Windows.Forms.Button();
this.pnlbalanceLeft = new System.Windows.Forms.Panel();
this.panel9 = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel();
this.lstBalance = new System.Windows.Forms.ListBox();
this.panel6 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.pnlBottom = new System.Windows.Forms.Panel();
this.panel8 = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pnlTop = new System.Windows.Forms.Panel();
this.pnlRight = new System.Windows.Forms.Panel();
this.pnlLeft = new System.Windows.Forms.Panel();
this.panel11 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.panel12 = new System.Windows.Forms.Panel();
this.txtInstrumentColumn = new System.Windows.Forms.TextBox();
this.cbxCNASColumn = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.panel13 = new System.Windows.Forms.Panel();
this.dgvMapping = new System.Windows.Forms.DataGridView();
this.InstrumentField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PrimaryKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.DateKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.btnConditionMap = new System.Windows.Forms.Button();
this.pnlAll.SuspendLayout();
this.pnlCenter.SuspendLayout();
this.pnlbalanceRight.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvbalancefield)).BeginInit();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).BeginInit();
this.panel5.SuspendLayout();
this.panel1.SuspendLayout();
this.panel10.SuspendLayout();
this.pnlbalanceLeft.SuspendLayout();
this.panel7.SuspendLayout();
this.panel6.SuspendLayout();
this.pnlBottom.SuspendLayout();
this.panel8.SuspendLayout();
this.panel11.SuspendLayout();
this.panel12.SuspendLayout();
this.panel13.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMapping)).BeginInit();
this.SuspendLayout();
//
// pnlAll
//
this.pnlAll.Controls.Add(this.pnlCenter);
this.pnlAll.Controls.Add(this.pnlBottom);
this.pnlAll.Controls.Add(this.pnlTop);
this.pnlAll.Controls.Add(this.pnlRight);
this.pnlAll.Controls.Add(this.pnlLeft);
this.pnlAll.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlAll.Location = new System.Drawing.Point(0, 0);
this.pnlAll.Name = "pnlAll";
this.pnlAll.Size = new System.Drawing.Size(844, 554);
this.pnlAll.TabIndex = 0;
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.pnlbalanceRight);
this.pnlCenter.Controls.Add(this.pnlbalanceLeft);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(10, 5);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(829, 493);
this.pnlCenter.TabIndex = 4;
//
// pnlbalanceRight
//
this.pnlbalanceRight.Controls.Add(this.panel3);
this.pnlbalanceRight.Controls.Add(this.panel2);
this.pnlbalanceRight.Controls.Add(this.panel1);
this.pnlbalanceRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlbalanceRight.Location = new System.Drawing.Point(121, 0);
this.pnlbalanceRight.Name = "pnlbalanceRight";
this.pnlbalanceRight.Size = new System.Drawing.Size(708, 493);
this.pnlbalanceRight.TabIndex = 1;
//
// panel3
//
this.panel3.Controls.Add(this.splitContainer1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(5, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(703, 462);
this.panel3.TabIndex = 2;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.panel13);
this.splitContainer1.Panel1.Controls.Add(this.panel11);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.tabControl1);
this.splitContainer1.Size = new System.Drawing.Size(703, 462);
this.splitContainer1.SplitterDistance = 202;
this.splitContainer1.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage6);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(703, 256);
this.tabControl1.TabIndex = 2;
//
// tabPage6
//
this.tabPage6.Controls.Add(this.splitContainer2);
this.tabPage6.Location = new System.Drawing.Point(4, 26);
this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(695, 226);
this.tabPage6.TabIndex = 1;
this.tabPage6.Text = "字段";
this.tabPage6.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(3, 3);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvbalancefield);
this.splitContainer2.Panel1.Controls.Add(this.panel4);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.dgvCnas);
this.splitContainer2.Panel2.Controls.Add(this.panel5);
this.splitContainer2.Size = new System.Drawing.Size(689, 220);
this.splitContainer2.SplitterDistance = 342;
this.splitContainer2.TabIndex = 1;
//
// dgvbalancefield
//
this.dgvbalancefield.AllowUserToAddRows = false;
this.dgvbalancefield.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvbalancefield.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dgvbalancefield.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvbalancefield.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.InstruFieldName,
this.InstruDataType});
this.dgvbalancefield.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvbalancefield.Location = new System.Drawing.Point(0, 34);
this.dgvbalancefield.Name = "dgvbalancefield";
this.dgvbalancefield.ReadOnly = true;
this.dgvbalancefield.RowHeadersVisible = false;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dgvbalancefield.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvbalancefield.RowTemplate.Height = 23;
this.dgvbalancefield.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvbalancefield.Size = new System.Drawing.Size(342, 186);
this.dgvbalancefield.TabIndex = 1;
//
// InstruFieldName
//
this.InstruFieldName.DataPropertyName = "FieldName";
this.InstruFieldName.HeaderText = "列名";
this.InstruFieldName.Name = "InstruFieldName";
this.InstruFieldName.ReadOnly = true;
this.InstruFieldName.Width = 155;
//
// InstruDataType
//
this.InstruDataType.DataPropertyName = "FieldType";
this.InstruDataType.HeaderText = "数据类型";
this.InstruDataType.Name = "InstruDataType";
this.InstruDataType.ReadOnly = true;
this.InstruDataType.Width = 130;
//
// panel4
//
this.panel4.Controls.Add(this.label12);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(342, 34);
this.panel4.TabIndex = 0;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(3, 10);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(92, 17);
this.label12.TabIndex = 0;
this.label12.Text = "化验数据字段:";
//
// dgvCnas
//
this.dgvCnas.AllowUserToAddRows = false;
this.dgvCnas.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvCnas.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dgvCnas.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCnas.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.CNASFieldName,
this.CnasDataType});
this.dgvCnas.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCnas.Location = new System.Drawing.Point(0, 34);
this.dgvCnas.Name = "dgvCnas";
this.dgvCnas.ReadOnly = true;
this.dgvCnas.RowHeadersVisible = false;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dgvCnas.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvCnas.RowTemplate.Height = 23;
this.dgvCnas.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvCnas.Size = new System.Drawing.Size(343, 186);
this.dgvCnas.TabIndex = 2;
//
// CNASFieldName
//
this.CNASFieldName.DataPropertyName = "CnasFieldName";
this.CNASFieldName.HeaderText = "列名";
this.CNASFieldName.Name = "CNASFieldName";
this.CNASFieldName.ReadOnly = true;
this.CNASFieldName.Width = 155;
//
// CnasDataType
//
this.CnasDataType.DataPropertyName = "CnasDataType";
this.CnasDataType.HeaderText = "数据类型";
this.CnasDataType.Name = "CnasDataType";
this.CnasDataType.ReadOnly = true;
this.CnasDataType.Width = 130;
//
// panel5
//
this.panel5.Controls.Add(this.cbxCnas);
this.panel5.Controls.Add(this.label13);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(343, 34);
this.panel5.TabIndex = 0;
//
// cbxCnas
//
this.cbxCnas.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxCnas.FormattingEnabled = true;
this.cbxCnas.Location = new System.Drawing.Point(122, 6);
this.cbxCnas.Name = "cbxCnas";
this.cbxCnas.Size = new System.Drawing.Size(189, 25);
this.cbxCnas.TabIndex = 2;
this.cbxCnas.SelectedIndexChanged += new System.EventHandler(this.cbxCnas_SelectedIndexChanged);
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(3, 10);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(113, 17);
this.label13.TabIndex = 1;
this.label13.Text = "CNAS数据库表名:";
//
// panel2
//
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(5, 462);
this.panel2.TabIndex = 1;
//
// panel1
//
this.panel1.Controls.Add(this.panel10);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 462);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(708, 31);
this.panel1.TabIndex = 0;
//
// panel10
//
this.panel10.Controls.Add(this.btnConditionMap);
this.panel10.Controls.Add(this.btnDeleteMapping);
this.panel10.Controls.Add(this.btnAddMapping);
this.panel10.Dock = System.Windows.Forms.DockStyle.Right;
this.panel10.Location = new System.Drawing.Point(444, 0);
this.panel10.Name = "panel10";
this.panel10.Size = new System.Drawing.Size(264, 31);
this.panel10.TabIndex = 5;
//
// btnDeleteMapping
//
this.btnDeleteMapping.Location = new System.Drawing.Point(93, 2);
this.btnDeleteMapping.Name = "btnDeleteMapping";
this.btnDeleteMapping.Size = new System.Drawing.Size(79, 23);
this.btnDeleteMapping.TabIndex = 4;
this.btnDeleteMapping.Text = "移除映射";
this.btnDeleteMapping.UseVisualStyleBackColor = true;
this.btnDeleteMapping.Click += new System.EventHandler(this.btnDeleteMapping_Click);
//
// btnAddMapping
//
this.btnAddMapping.Location = new System.Drawing.Point(8, 2);
this.btnAddMapping.Name = "btnAddMapping";
this.btnAddMapping.Size = new System.Drawing.Size(79, 23);
this.btnAddMapping.TabIndex = 3;
this.btnAddMapping.Text = "新增映射";
this.btnAddMapping.UseVisualStyleBackColor = true;
this.btnAddMapping.Click += new System.EventHandler(this.btnAddMapping_Click);
//
// pnlbalanceLeft
//
this.pnlbalanceLeft.Controls.Add(this.panel9);
this.pnlbalanceLeft.Controls.Add(this.panel7);
this.pnlbalanceLeft.Controls.Add(this.panel6);
this.pnlbalanceLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlbalanceLeft.Location = new System.Drawing.Point(0, 0);
this.pnlbalanceLeft.Name = "pnlbalanceLeft";
this.pnlbalanceLeft.Size = new System.Drawing.Size(121, 493);
this.pnlbalanceLeft.TabIndex = 0;
//
// panel9
//
this.panel9.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel9.Location = new System.Drawing.Point(0, 462);
this.panel9.Name = "panel9";
this.panel9.Size = new System.Drawing.Size(121, 31);
this.panel9.TabIndex = 3;
//
// panel7
//
this.panel7.Controls.Add(this.lstBalance);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(0, 29);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(121, 464);
this.panel7.TabIndex = 2;
//
// lstBalance
//
this.lstBalance.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstBalance.Font = new System.Drawing.Font("微软雅黑", 9.5F);
this.lstBalance.FormattingEnabled = true;
this.lstBalance.ItemHeight = 19;
this.lstBalance.Items.AddRange(new object[] {
"全水分",
"水分",
"灰分",
"挥发分"});
this.lstBalance.Location = new System.Drawing.Point(0, 0);
this.lstBalance.Name = "lstBalance";
this.lstBalance.Size = new System.Drawing.Size(121, 464);
this.lstBalance.TabIndex = 0;
this.lstBalance.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lstBalance_DrawItem);
this.lstBalance.SelectedIndexChanged += new System.EventHandler(this.lstBalance_SelectedIndexChanged);
//
// panel6
//
this.panel6.Controls.Add(this.label1);
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(121, 29);
this.panel6.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(-1, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 0;
this.label1.Text = "化验类型";
//
// pnlBottom
//
this.pnlBottom.Controls.Add(this.panel8);
this.pnlBottom.Controls.Add(this.groupBox1);
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(10, 498);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(829, 56);
this.pnlBottom.TabIndex = 3;
//
// panel8
//
this.panel8.Controls.Add(this.btnOK);
this.panel8.Dock = System.Windows.Forms.DockStyle.Right;
this.panel8.Location = new System.Drawing.Point(732, 13);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(97, 43);
this.panel8.TabIndex = 2;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(4, 6);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// groupBox1
//
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(829, 13);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
//
// pnlTop
//
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTop.Location = new System.Drawing.Point(10, 0);
this.pnlTop.Name = "pnlTop";
this.pnlTop.Size = new System.Drawing.Size(829, 5);
this.pnlTop.TabIndex = 2;
//
// pnlRight
//
this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.pnlRight.Location = new System.Drawing.Point(839, 0);
this.pnlRight.Name = "pnlRight";
this.pnlRight.Size = new System.Drawing.Size(5, 554);
this.pnlRight.TabIndex = 1;
//
// pnlLeft
//
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 0);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(10, 554);
this.pnlLeft.TabIndex = 0;
//
// panel11
//
this.panel11.Controls.Add(this.panel12);
this.panel11.Controls.Add(this.label2);
this.panel11.Dock = System.Windows.Forms.DockStyle.Top;
this.panel11.Location = new System.Drawing.Point(0, 0);
this.panel11.Name = "panel11";
this.panel11.Size = new System.Drawing.Size(703, 29);
this.panel11.TabIndex = 2;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 1;
this.label2.Text = "映射表";
//
// panel12
//
this.panel12.Controls.Add(this.txtInstrumentColumn);
this.panel12.Controls.Add(this.cbxCNASColumn);
this.panel12.Controls.Add(this.label3);
this.panel12.Dock = System.Windows.Forms.DockStyle.Right;
this.panel12.Location = new System.Drawing.Point(394, 0);
this.panel12.Name = "panel12";
this.panel12.Size = new System.Drawing.Size(309, 29);
this.panel12.TabIndex = 3;
//
// txtInstrumentColumn
//
this.txtInstrumentColumn.Location = new System.Drawing.Point(111, 3);
this.txtInstrumentColumn.Name = "txtInstrumentColumn";
this.txtInstrumentColumn.ReadOnly = true;
this.txtInstrumentColumn.Size = new System.Drawing.Size(190, 23);
this.txtInstrumentColumn.TabIndex = 10;
this.txtInstrumentColumn.DoubleClick += new System.EventHandler(this.txtInstrumentColumn_DoubleClick);
//
// cbxCNASColumn
//
this.cbxCNASColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxCNASColumn.FormattingEnabled = true;
this.cbxCNASColumn.Location = new System.Drawing.Point(111, 7);
this.cbxCNASColumn.Name = "cbxCNASColumn";
this.cbxCNASColumn.Size = new System.Drawing.Size(179, 25);
this.cbxCNASColumn.TabIndex = 9;
this.cbxCNASColumn.Visible = false;
this.cbxCNASColumn.SelectedIndexChanged += new System.EventHandler(this.cbxCNASColumn_SelectedIndexChanged);
this.cbxCNASColumn.Leave += new System.EventHandler(this.cbxCNASColumn_Leave);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 7);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(113, 17);
this.label3.TabIndex = 8;
this.label3.Text = "CNAS仪器信息列:";
//
// panel13
//
this.panel13.Controls.Add(this.dgvMapping);
this.panel13.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel13.Location = new System.Drawing.Point(0, 29);
this.panel13.Name = "panel13";
this.panel13.Size = new System.Drawing.Size(703, 173);
this.panel13.TabIndex = 3;
//
// dgvMapping
//
this.dgvMapping.AllowUserToAddRows = false;
this.dgvMapping.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvMapping.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvMapping.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvMapping.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.InstrumentField,
this.CnasField,
this.PrimaryKey,
this.DateKey});
this.dgvMapping.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMapping.Location = new System.Drawing.Point(0, 0);
this.dgvMapping.MultiSelect = false;
this.dgvMapping.Name = "dgvMapping";
this.dgvMapping.RowHeadersVisible = false;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dgvMapping.RowsDefaultCellStyle = dataGridViewCellStyle2;
this.dgvMapping.RowTemplate.Height = 23;
this.dgvMapping.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvMapping.Size = new System.Drawing.Size(703, 173);
this.dgvMapping.TabIndex = 1;
//
// InstrumentField
//
this.InstrumentField.DataPropertyName = "SourceField";
this.InstrumentField.HeaderText = "仪器数据列";
this.InstrumentField.Name = "InstrumentField";
this.InstrumentField.Width = 200;
//
// CnasField
//
this.CnasField.DataPropertyName = "TargetField";
this.CnasField.HeaderText = "CNAS数据列";
this.CnasField.Name = "CnasField";
this.CnasField.Width = 200;
//
// PrimaryKey
//
this.PrimaryKey.DataPropertyName = "IfPrimaryKey";
this.PrimaryKey.HeaderText = "关键字段";
this.PrimaryKey.Name = "PrimaryKey";
this.PrimaryKey.Width = 80;
//
// DateKey
//
this.DateKey.DataPropertyName = "IfDateField";
this.DateKey.HeaderText = "日期字段";
this.DateKey.Name = "DateKey";
//
// btnConditionMap
//
this.btnConditionMap.Location = new System.Drawing.Point(178, 2);
this.btnConditionMap.Name = "btnConditionMap";
this.btnConditionMap.Size = new System.Drawing.Size(79, 23);
this.btnConditionMap.TabIndex = 5;
this.btnConditionMap.Text = "条件映射";
this.btnConditionMap.UseVisualStyleBackColor = true;
this.btnConditionMap.Click += new System.EventHandler(this.btnConditionMap_Click);
//
// frmBalanceField
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(844, 554);
this.Controls.Add(this.pnlAll);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "frmBalanceField";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "天平端字段映射";
this.Load += new System.EventHandler(this.frmBalanceField_Load);
this.pnlAll.ResumeLayout(false);
this.pnlCenter.ResumeLayout(false);
this.pnlbalanceRight.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage6.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvbalancefield)).EndInit();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel10.ResumeLayout(false);
this.pnlbalanceLeft.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
this.pnlBottom.ResumeLayout(false);
this.panel8.ResumeLayout(false);
this.panel11.ResumeLayout(false);
this.panel11.PerformLayout();
this.panel12.ResumeLayout(false);
this.panel12.PerformLayout();
this.panel13.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMapping)).EndInit();
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlAll;
private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Panel pnlTop;
private System.Windows.Forms.Panel pnlRight;
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel pnlbalanceRight;
private System.Windows.Forms.Panel pnlbalanceLeft;
private System.Windows.Forms.ListBox lstBalance;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btnDeleteMapping;
private System.Windows.Forms.Button btnAddMapping;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage6;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.DataGridView dgvbalancefield;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.DataGridView dgvCnas;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.ComboBox cbxCnas;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.Panel panel10;
private System.Windows.Forms.Panel panel9;
private System.Windows.Forms.DataGridViewTextBoxColumn InstruFieldName;
private System.Windows.Forms.DataGridViewTextBoxColumn InstruDataType;
private System.Windows.Forms.DataGridViewTextBoxColumn CNASFieldName;
private System.Windows.Forms.DataGridViewTextBoxColumn CnasDataType;
private System.Windows.Forms.Panel panel11;
private System.Windows.Forms.Panel panel12;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel13;
private System.Windows.Forms.DataGridView dgvMapping;
private System.Windows.Forms.DataGridViewTextBoxColumn InstrumentField;
private System.Windows.Forms.DataGridViewTextBoxColumn CnasField;
private System.Windows.Forms.DataGridViewCheckBoxColumn PrimaryKey;
private System.Windows.Forms.DataGridViewCheckBoxColumn DateKey;
private System.Windows.Forms.TextBox txtInstrumentColumn;
private System.Windows.Forms.ComboBox cbxCNASColumn;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnConditionMap;
}
}

+ 0
- 409
CNAS_BalanceClient/frmBalanceField.cs Переглянути файл

@@ -1,409 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace CNAS_BalanceClient
{
public partial class frmBalanceField : Form
{
SyncInstrumentItemInfo currentSyncItem = new SyncInstrumentItemInfo();
//List<SyncParamasInfo> lstpramas = new List<SyncParamasInfo>();
public List<SyncBalanceItem> syncBalanceItems = new List<SyncBalanceItem>();
SyncBalanceItem currentBalanceItem = new SyncBalanceItem();
DataBaseInfo targetDataBase = new DataBaseInfo();
public frmBalanceField(List<SyncBalanceItem> syncBalanceItems, DataBaseInfo targetDataBase)
{
InitializeComponent();

this.syncBalanceItems = syncBalanceItems;
this.targetDataBase = targetDataBase;


dgvMapping.AutoGenerateColumns = false;
dgvMapping.RowHeadersVisible = false;

dgvbalancefield.AutoGenerateColumns = false;
dgvbalancefield.RowHeadersVisible = false;

dgvCnas.AutoGenerateColumns = false;
dgvCnas.RowHeadersVisible = false;
}

private void lstBalance_SelectedIndexChanged(object sender, EventArgs e)
{
if (lstBalance.SelectedItem == null) return;
string strCurrentSelect = lstBalance.SelectedItem.ToString();
dgvMapping.DataSource = new BindingList<SyncParamasInfo>();

//根据选中项加载数据
dgvbalancefield.DataSource = new BindingList<BalanceField>(BindBalanceField(strCurrentSelect));


//绑定映射数据
var syncItems = syncBalanceItems.Where(s => s.Type == strCurrentSelect).ToList<SyncBalanceItem>();
if (syncItems != null && syncItems.Count >= 1)
{
currentBalanceItem = syncItems[0];

if (!string.IsNullOrWhiteSpace(currentBalanceItem.CnasInstrumentColumn))
txtInstrumentColumn.Text = currentBalanceItem.CnasInstrumentColumn;
else
txtInstrumentColumn.Text = "";

if (syncItems[0].syncParamasInfos!=null)
dgvMapping.DataSource = new BindingList<SyncParamasInfo>(syncItems[0].syncParamasInfos);
else
dgvMapping.DataSource = new BindingList<SyncParamasInfo>();
}
else
{
currentBalanceItem = new SyncBalanceItem()
{
GUID=Guid.NewGuid().ToString(),
Type = strCurrentSelect
};
syncBalanceItems.Add(currentBalanceItem);
}
}

private List<BalanceField> BindBalanceField(string strItem)
{
List<BalanceField> balanceFields = new List<BalanceField>();
switch (strItem)
{
case "全水分":
balanceFields=InitinalBalanceField("1");
break;
case "水分":
balanceFields=InitinalBalanceField("2");
break;
case "灰分":
balanceFields=InitinalBalanceField("3");
break;
case "挥发分":
balanceFields=InitinalBalanceField("4");
break;
}
return balanceFields;
}


private List<BalanceField> InitinalBalanceField(string strValue)
{
List<BalanceField> balanceFields = new List<BalanceField>();
//得到类的所有属性
var lstProperties = new LaboratoryTest().GetType().GetProperties();
foreach (var oProperty in lstProperties)
{
balanceFields.Add(new BalanceField() { FieldName = oProperty.Name, FieldType = oProperty.PropertyType });

////得到每一个属性的特性类集合
//IList<CustomAttributeData> lstAttr = oProperty.GetCustomAttributesData();
//foreach (var oAttr in lstAttr)
//{
// var lstAttrArgu = oAttr.NamedArguments;
// foreach (CustomAttributeNamedArgument oAttrAru in lstAttrArgu)
// {
// //if (oAttrAru.MemberInfo.Name == "ApplyType"&& oAttrAru.TypedValue.Value.ToString().Contains(strValue))
// {
// balanceFields.Add(new BalanceField() { FieldName = oProperty.Name, FieldType = oProperty.GetType() });
// }
// }
//}
}
return balanceFields;
}

private void frmBalanceField_Load(object sender, EventArgs e)
{
////1.加载数据
DataTable dtCNAS = CnasDataOperationFact.CnasDataOperation().GetAllCNASTablesName(targetDataBase);
if (dtCNAS != null && dtCNAS.Rows.Count > 0)
{
List<string> lstCnasTables = new List<string>();
foreach (DataRow dr in dtCNAS.Rows)
{
lstCnasTables.Add(dr["TABNAME"].ToString());
}

cbxCnas.DataSource = lstCnasTables;
cbxCnas.ValueMember = "";
}

////2.初始化天平端数据
lstBalance.SelectedIndex = 0;
}

public class BalanceField
{
public string FieldName { get; set; }

public Type FieldType { get; set; }
}

private void cbxCnas_SelectedIndexChanged(object sender, EventArgs e)
{
if (cbxCnas.Text == null) return;

string strTableName_Cnas = cbxCnas.Text.ToString();
//从数据库中加载数据表结构
//DataTable dtTableStruct = SQLDB2Helper.getDB2Table(string.Format("SELECT * FROM {0} Where 1=0", strTableName_Cnas));

DataTable dtTableStruct = CnasDataOperationFact.CnasDataOperation().GetCNASTablesStruct(strTableName_Cnas, targetDataBase);
if (dtTableStruct != null)
{
DataTable dtCnasShow = new DataTable();
dtCnasShow.Columns.Add("CnasFieldName");
dtCnasShow.Columns.Add("CnasDataType");
foreach (DataColumn dc in dtTableStruct.Columns)
{
dtCnasShow.Rows.Add(new object[] { dc.ColumnName, dc.DataType });
}

dgvCnas.DataSource = dtCnasShow;

//绑定数据
cbxCNASColumn.DataSource = dtCnasShow.Copy();
cbxCNASColumn.DisplayMember = "CnasFieldName";
cbxCNASColumn.ValueMember = "CnasFieldName";

if (dtTableStruct.Columns.Count > 0)
{
if (!string.IsNullOrWhiteSpace(currentSyncItem.CnasInstrumentColumn) && dtTableStruct.Columns.Contains(currentSyncItem.CnasInstrumentColumn))
{
cbxCNASColumn.Text = this.txtInstrumentColumn.Text = currentSyncItem.CnasInstrumentColumn;
}
else
{
cbxCNASColumn.Text = this.txtInstrumentColumn.Text = "";
}
}
}
}

private void btnAddMapping_Click(object sender, EventArgs e)
{
if (currentBalanceItem.syncParamasInfos == null)
currentBalanceItem.syncParamasInfos = new List<SyncParamasInfo>();
SyncParamasInfo syncParamas = new SyncParamasInfo();
//仪器表名和选中行
syncParamas.SourceTable = lstBalance.SelectedItem.ToString();
syncParamas.SourceField = dgvbalancefield.Rows[dgvbalancefield.CurrentCell.RowIndex].Cells[0].Value.ToString();

//CNAS表名和选中行
syncParamas.TargetTable = cbxCnas.SelectedValue.ToString().ToUpper();
syncParamas.TargetField = dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells[0].Value.ToString().ToUpper();

//验证数据合法性
SyncParamsOperation paramsOperation = new SyncParamsOperation();
if (paramsOperation.CheckTableIfRepeat(currentBalanceItem.syncParamasInfos, syncParamas.SourceTable, syncParamas.TargetTable))
{
MessageBox.Show("已存在不同表单映射数据,无法添加!", "提示");
return;
}
//if (paramsOperation.CheckSourceFieldRepeat(currentBalanceItem.syncParamasInfos, syncParamas.SourceTable, syncParamas.SourceField))
//{
// MessageBox.Show("天平端数据字段已分配,请重新选择!");
// return;
//}
if (paramsOperation.CheckTargetFieldRepeat(currentBalanceItem.syncParamasInfos, syncParamas.TargetTable, syncParamas.TargetField))
{
MessageBox.Show("CNAS端数据字段已分配,请重新选择!", "提示");
return;
}
if (paramsOperation.CheckTargetKeepField(syncParamas.TargetField))
{
MessageBox.Show("CNAS端数据字段为保留字段,请重新选择!", "提示");
return;
}

//绑定数据
currentBalanceItem.syncParamasInfos.Add(syncParamas);
dgvMapping.DataSource = new BindingList<SyncParamasInfo>(currentBalanceItem.syncParamasInfos);
//选中最后一行
dgvMapping.CurrentCell = dgvMapping.Rows[dgvMapping.Rows.Count - 1].Cells[0];
}

private void btnDeleteMapping_Click(object sender, EventArgs e)
{
//当前选中项
if (dgvMapping.CurrentCell == null) return;
string strSourceField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["InstrumentField"].Value.ToString();
string strTargetField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["CnasField"].Value.ToString();

var lstDelItems = currentBalanceItem.syncParamasInfos.Where(s => s.SourceField == strSourceField && s.TargetField == strTargetField).ToList<SyncParamasInfo>();
if (lstDelItems.Count > 0)
{
foreach (var item in lstDelItems)
{
currentBalanceItem.syncParamasInfos.Remove(item);
}

dgvMapping.DataSource = new BindingList<SyncParamasInfo>(currentBalanceItem.syncParamasInfos);
}
}

private void btnOK_Click(object sender, EventArgs e)
{
if (!CheckIfHaveDateField())
{
if (MessageBox.Show("日期字段的缺失可能会导致后续不能准确数据传输。是否继续保存?", "",MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Cancel)
return;
}
//将数据存储到本地
if (FileOperation.SaveLocalBalanceData(syncBalanceItems))
{
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageBox.Show("保存配置失败!", "提示");
}
}

private void dgvMapping_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (dgvMapping.CurrentCell == null) return;
if (dgvMapping.CurrentCell.ColumnIndex == 2) //此时修改的主健列
{
string strSourceField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["InstrumentField"].Value.ToString();
string strTargetField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["CnasField"].Value.ToString();
string strPrimaryKey = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["PrimaryKey"].Value.ToString();

var lstDelItems = currentBalanceItem.syncParamasInfos.Where(s => s.SourceField == strSourceField && s.TargetField == strTargetField).ToList<SyncParamasInfo>();
if (lstDelItems.Count > 0)
{
foreach (var item in lstDelItems)
{
item.IfPrimaryKey = strPrimaryKey.ToLower() == "true" ? true : false;
}
}
}
if (dgvMapping.CurrentCell.ColumnIndex == 3) //此时修改的是日期字段列
{
string strSourceField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["InstrumentField"].Value.ToString();
string strTargetField = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["CnasField"].Value.ToString();
string strDateKey = dgvMapping.Rows[dgvMapping.CurrentCell.RowIndex].Cells["DateKey"].Value.ToString();

var lstDelItems = currentBalanceItem.syncParamasInfos.Where(s => s.SourceField == strSourceField && s.TargetField == strTargetField).ToList<SyncParamasInfo>();
if (lstDelItems.Count ==1)
{
if (strDateKey.ToLower() == "true")
{
//datagridview显示列
foreach (DataGridViewRow dgvRow in dgvMapping.Rows)
{
if (dgvRow.Cells["DateKey"].Value.ToString().ToLower() == "true")
dgvRow.Cells["DateKey"].Value = false;
}
//内存数据源
foreach (var item in currentBalanceItem.syncParamasInfos)
{
if (item.IfDateField)
item.IfDateField = false;
}
lstDelItems[0].IfDateField = true;
}
else
{
lstDelItems[0].IfDateField = false;
}
}
}
}

private void lstBalance_DrawItem(object sender, DrawItemEventArgs e)
{
Brush myBrush = Brushes.Black;
if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
{
myBrush = new SolidBrush(Color.FromArgb(0, 0, 255));//选中时背景颜色
}
else//没有选中时的背景颜色
{
myBrush = new SolidBrush(Color.White);
}
e.Graphics.FillRectangle(myBrush, e.Bounds);//填满矩形背景颜色
e.Graphics.DrawRectangle(new Pen(new SolidBrush(e.ForeColor)), e.Bounds);
e.DrawFocusRectangle();//焦点框
StringFormat stringformat = StringFormat.GenericDefault;
stringformat.LineAlignment = StringAlignment.Center;
e.Graphics.DrawString(lstBalance.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds, stringformat);
}

private void dgvMapping_CurrentCellDirtyStateChanged(object sender, EventArgs e)
{
if (dgvMapping.IsCurrentCellDirty)
{
dgvMapping.CommitEdit(DataGridViewDataErrorContexts.Commit);
}
}

private bool CheckIfHaveDateField()
{
bool bIfHave = true;
foreach (var item in syncBalanceItems)
{
if (item.syncParamasInfos == null) continue;
if (item.syncParamasInfos.Count <=0) continue;
if (item.syncParamasInfos.Where(s => s.IfDateField == true).Count() != 1)
{
bIfHave = false;
break;
}
}
return bIfHave;
}

private void txtInstrumentColumn_DoubleClick(object sender, EventArgs e)
{
txtInstrumentColumn.Visible = false;

cbxCNASColumn.Top = txtInstrumentColumn.Top;
cbxCNASColumn.Height = txtInstrumentColumn.Height;
cbxCNASColumn.Width = txtInstrumentColumn.Width;
cbxCNASColumn.Location = txtInstrumentColumn.Location;

cbxCNASColumn.Visible = true;
}

private void cbxCNASColumn_Leave(object sender, EventArgs e)
{
if (cbxCNASColumn.Visible)
{
txtInstrumentColumn.Visible = true;
cbxCNASColumn.Visible = false;
}
}

private void cbxCNASColumn_SelectedIndexChanged(object sender, EventArgs e)
{
if (cbxCNASColumn.Visible)
{
cbxCNASColumn.Visible = false;
txtInstrumentColumn.Visible = true;

currentBalanceItem.CnasInstrumentColumn = txtInstrumentColumn.Text = cbxCNASColumn.Text;
}
}

private void btnConditionMap_Click(object sender, EventArgs e)
{
frmConditionMap frmCNAS = new frmConditionMap(currentBalanceItem, targetDataBase);
if (frmCNAS.ShowDialog() == DialogResult.OK)
{
this.currentBalanceItem = frmCNAS.currentBalanceItem;
}
}
}
}

+ 0
- 183
CNAS_BalanceClient/frmBalanceField.resx Переглянути файл

@@ -1,183 +0,0 @@
<?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="InstrumentField.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CnasField.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PrimaryKey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DateKey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="InstruFieldName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="InstruDataType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CNASFieldName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CnasDataType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAExgAAAEAIACoBwAAFgAAACgAAAATAAAAMAAAAAEAIAAAAAAAIAcAABAnAAAQJwAAAAAAAAAA
AAAAAAADAAAAFgAAABoAAAAZAAAAGwAAABkAAAAaAAAAGgAAABwAAAAcAAAAHAAAABoAAAAaAAAAGQAA
ABsAAAAZAAAAGgAAABYAAAADAAAAKgAAAKUAAACsAAAAvgAAAJoAAAC4AAAAswAAAKoAAACRAAAAkgAA
AJEAAACqAAAAswAAALgAAACaAAAAvgAAAKwAAAClAAAAKgAAADkAAACnAAAAowAAAFcAAAAYAAAAlwAA
AHwAAACqAAAAewAAAH0AAAB7AAAAqgAAAHwAAACXAAAAGAAAAFYAAACjAAAApwAAADk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ABkAAAAaAAAAFgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAIAAAgC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAgAACAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAA=
</value>
</data>
</root>

+ 0
- 1980
CNAS_BalanceClient/frmBalanceMain.Designer.cs
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 0
- 1200
CNAS_BalanceClient/frmBalanceMain.cs
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 0
- 522
CNAS_BalanceClient/frmBalanceMain.resx Переглянути файл

@@ -1,522 +0,0 @@
<?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="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Sample_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Instrument_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Crucible_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Empty_Crucible_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Sample_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AddSample_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Drying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SecondDrying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThirdDrying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Mt.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Auto_Code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Granularity.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Mad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DecrementValue2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AAD.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn26.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn27.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn28.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn30.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="VR.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MAD2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="VAD.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_SampleNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_WeighingType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_SampleWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_Operator.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Shelf_CrucibleNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cmsShelf.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>375, 17</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn54.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn55.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn56.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn57.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn58.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SampleCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn31.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn32.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbOpenPort.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI/SURBVEhLrZbJaxRBFIdHIXhwhZCIRIngRRNyEIIe1EDQ
GBURl6t4yzW5uCHixQU3ooEY4oLigiIkoJdAEBfwH/P7mqrw0t2ZBicPvpmat/xedU1VzbRKtgN2l+iG
DdDOtkG5rgc2woodgu8wB88T8+nzZljLBmABXkGuewFvwSaFKf4NfsA+6IWdaWyD7VBng/AV/sIQ5Dqf
wCa+F8vizJdhFsZhOnEenFFdg03wCX7BaxiDJ2D+JXgGRQNfnOVFuAZTcCtxCmagroG+WDcJ1tyG07Cq
gR+c+U24AdcTJ6FdA2PmWJNRQ61KgwvgIz4KnIOmBubEGjXUqjQw8T7cC5yFpgbmxBo11Ko08FFdy6sB
v7imBubEGjXUqm0Q119yg62guXNE05cbxBo1Kg3ewTAcCOyHo/Amjd1RHjxxbI4xc4zHWrXULBr4qHfg
MTwsoc+t+B6+wOWEY33G1qpTs1ha7wuPdB/YcU9gF1yBl+CVYJE41mfMnFijhlord5HH28dZgg/gCXb9
fPdk/wRn7e7IT5DHxsyJNWqopabaxQwW4Q8YvAt5u1rwG0ZBgWMJx/qMmZO3p7VqqKWm2q0uOAi5eCRw
BNx6rvVhcLbiWJ8xc2JN1lFT7UbzlvwID8ArQBzrM7Yu9hRcls8Jx/rWxbzOXRbX090hjvUZ69hcSy+x
sukz1rG51ydgL/QnHOsz1pH5Y+9MT8AZOJ5wrM9Y0x+CtrYFvG/8SfSLjegzZs5/W75GPP51VP6arLZW
6x+FhpAmxTjzIAAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGkSURBVEhLvdXPThRBEMfxeQJOgsYEQQxnI140/DHCW+hz
yLupBFSC/AlXEtCL4SE48/tMppPOZIObXtdKvttTNd1V3VXVO93/kKdhdU7w3V2Fk/AtfJ8wtsIn391t
eBdehfXwehg3wovwvIGVsB347n6Fl+FTcKz9alwIrbIcfnv4E+Z1Ar67u3AejoLc/YsaWMsn332UrSBq
3QFgezYF47V0PvsTyJNJk2QpmAw5Lc6M9PLOvLGY09fAj6hjeRIOwmnQcjfhZ/gxjHR2z1/D41ALnw8G
WAtnwVFxGTSDne2Ei7A5YBOKW8tfA1hgtxyiPBPpUUgjFLY5QMmz09QnsOtSj+YAx8G7R+FLkG87N9LZ
BZnpBC6bAr4NuxV0drVqDmAhR5+DjnEZC3T2N4PeFEA67JYzV186zDXS2d+HmQJwcBh0Sy10doVvDqBT
Pgb/KxyxybmRzv4hOMmDAUp/1+L66xQX6joIpqsKdHbvzVsMtfDZB/BRKPm1i4Kdls6Rpr0JsJeOKidD
qVH/wSmfTB0zpnTMNIzX8tl/Muf+0Z+jdN09oxiraev3MGcAAAAASUVORK5CYII=
</value>
</data>
<data name="tsbAllSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIXSURBVEhLtZZLS5VBHIdPmu6SsjShqxWJ7ZQoukCt2xQu
SizoG4gQqAvpK7SQaBetMgratLEr3aBAV9rK6Lv0PPO+8/qecY54jviDhzPX3/ufmf8Mp5FRL5yC823i
HOduq6vwEr51iHOvQFaX4TfMwgUYLjkNRpfDvjjOOXOgxyVoUje8gIVQa9Zh0OwkaCiWbbMv1WN4Dl2h
VuoIfIXxUNvUJLj0X7ABRieWbbPPMXVdBL2aPj4C3+F4qBUaAA2m4Dqslr/1sn2OcWyUq9PLg690A97D
gVAr5L7+gBPgJCO/VmLZNvsc49ioPvgIBlDJSF6BZxHlJCNxzwfhE8QtsmybfY6pf2A/vIF7oVbK039S
FCvFD8TJQ3CmxLJKx0QtwqOiWGhLA2o1ua5WY+ahCrgHXsPdUNuUk9xf07GV7EvPQN2HJQhbfgg+gIdX
V8yiB6CRJnVssy/NInUTlsEDb5wF8/aclUTxHmxHeg/UKOgZVm86fYZ+KxnVb3Id23I3WbmiLxCeDFP0
LdiY2wpT0fYc9qXjbT8K72ACQor+BS+aGZHbhnbQwzP9B9MQHqZ1uA3muFF1gpH71Pir1xo8g8p8tzoG
M3Ar1ApPvcNSjHw32gdPwTdoBcbAlei99x/4A3u1RXqHk/4Jd8CVpGm3Uzxon28j10vPkEW+RQ/BNM2l
XSfopafelQ6Cz0X6d6Rd9NALNRr/AZaJk9+L+J/SAAAAAElFTkSuQmCC
</value>
</data>
<data name="tsbDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALtSURBVEhLrdbJy05RHMDxxzzPMymizPMYC0MsZJaUqWSI
iCxkFhYWZllgYQ5lLiGZyViUhY2FBfI32Pp+j3uf507vQH716b3nPM99fvec8zvnvqVENEKH/6Bj9Lch
qow+uIyneJzxEu/wJNEn2+/xItEX83fOoQcK4zhOYBiGJwzGJjzD6KhPfm8c3mANhiB53whcwD7koj6u
YV5o5WM2bqBuaFXCJbiHiaGVj+U4/+cyHSa8irmhlY9ZuI46oVUJ1+guJoRWPpbBac2FCR3BFWzFjgTb
l/AZu6I+bccefMEZbEPyvi24jcIRGkvxEz7RfhyMeO2N/vDhqE8HcBRf4exk77EAf6CqZQplbGX1Da10
/MsajsJDtAitgugEK3FAaKXDtb2JBqFViaYw4eTQSsdImLBZaBVEbRLWC61SqXn0tzGKEg6F0/0NG9ET
uagpoVPaC7vh9yyK3kgm9IE2wMPgJCwe1/I1ZiAV1SV0Db/DTX4WC2Hl2nYUk2DMwVuMDa1K+H1PqtRv
V5fQk8PSnwK3kOEenA77LTRH5+GxEhbXAvj5NBieZG6jcsQJ+4dWPrKbPo64ctvD+z3iTH4Rv7AZxiK4
z+M6CAmfYwwsilYJLSPJvlgTGK3hoe356ujdz07vThir4XKUH9xXyic415bzo1rwAf2RuGqP4QgcRTe0
hQNxL97BCpTDD15hMdy0vhlkAThqeR33+x1PJwvHhzVcS19lVnJ3mKgfTsOzuA3KkSyaJTgEF7kLTODr
piv2ws9ck0HwdIoTGu5B18rplA9kwTjiVMQJ/RHfDh7a69Eu6rOYLAz3mZ/NhAWSTWhYyfPxAb5PCwsu
mXAq1sIX67roWl7b57VbxITek01o1OostQgGYhVOwf8AiviZBeDTO0JnIRsmtGqt5MLwSR7As891dKTV
8TvxtPm2sM8HkA/tdrgF3yhVhlN5H06TT14T/3n6CGcm2e/9boPxqDEcaee/4FIU9cd7MxOl0m9ZK7WO
DQmsvAAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbUpload.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABUAAAAXCAYAAADk3wSdAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHcSURBVEhLrZXLK2dxGIePhXI3hJlcEpJRspqF3SxGjcil
lCyUWWgsbGysmFAWZKfJRhYzjUuuiZJiJ/+A/D+e5/gejsnl5/Kpx3ve6zm+l37RC1QU7LvpOxwF+y7q
hD0YCVb/TeqCffgSezdW3/ir1ANn0B57d/oGxs2/SKWwC+fgWraB0uobN29dxsoCG8phGfpAafWNm7cu
YxXAJ6iA39ALSqtv3Lx1GakVDmEH1uESukFp9Y2bt876J1UDrtkVtMAHWIL0l+obN2+d9fY9KG/MCvyC
TagCtQDpNdVX5q2bAvuK4Z6yYQ5moQz89ypBzUNyfLT6yrx11ttnv3NuNQYn4OGWY/gKDbAK5muD1Tdu
3rqkx37zsarhAlz0P/APXKc1+AsHsA3mtPrGzVtnvTn7neO8qAk24CPkBXIhJ2Ufe9YmPfY7x3nxH99W
qBNUApOwCG6MuJbis3Hz1iWy3zmPDv0MrlE/DAQ7DKMwGHzz1iV6dmgzuE7KDdGfAGMdoHw2niijLz0F
v06G4Ce4uz9CzPyzX5q+x16EcfD8TcNMsAnGzad/Yuy/HdoIHhXPobfCK6j1zRZq/yeJp+vtd47zonxw
R7fAN70W+53jvFietzqofwP2MyeKrgFQ2m6IcGPD9gAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbHistory.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKbSURBVEhLtZVJaxRBGIZb3Pe4Im64QPQmCnrIIShu6EFQ
FAx6ESUo7iuixriL+4L7Apq/kFw8e/Y/+TyVqkxNMT2Tg77wMF013d9X/W1doQkw04txaEZkPNKmtqv5
8BkewHaYB7k0uAnOwKeI1+6VznxWG9rSprarZfATDsJD+AJXYQecho/wGo6AhsVr9/zP9S7wGZ/VxiHQ
prar5fAeprtArjUwDP3QDZNBbY6oSeB/x0Bnh2EFKG1pU1tjDma7iJoGd2BuWDWUO0gy1tdhSliNSltt
HXi6jTA1rBraGUlaBL2ggzVuRHV0MAvuw4Kwamg9rANPexxM5DN4DCb/GphY36rjGxiK8g32g8VwCZ6A
CX4OL+Ey3IzrpfAOah14ghsQyiyTJzdEPnwFNLYFNoD3W56++Sl4C7UONGQ9p8rKZRgugCWaH2AiPAXf
6itYsk1lmjvQ8Ekoq0g9Ah3cDatmmRcP8AOGoNaBZWpd53tJhuI8GKayk+/BWfgWqXVgck2o1ZTLqjoK
xv423IJVYFJPgMk20eanbQ482TnoCquGHAE6sAk17njwTUSHPvMBVse9WgeOBhuoTLKnXQnmxuYyDOZi
AOwDS9f/O/aBN3iiskwPRJIuwh/4DZ7c/lHaauvAGx3HZaM53CTJHvgFI9DnRlRLB3lCvbZpylHhWN49
ehlkrF+BzbXVjSifb3JgLPNw1L3BHtBJkgPuDfgN2OZGlMWhzeDA17ED9WiFeCr30qhYDHvBU9qh4ofI
hK8FvwXJgcnfBzp1CI6F3ZM6nu1QJ6T17K9VYcsPgjPI8WyV+CHSkfVuiGwwq8rx4b09YLO21BywRB1Y
hmMhtJLfX+/T6AuwR5bAP5XlbCi+Q4j3/5AVU3Z8VFX9BcQkdR/ORj7kAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="tsmMapping.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABMAAAAYCAYAAAAYl8YPAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAACcQAAAnEAGUaVEZAAAAB3RJ
TUUH4wIGFBc4NQH4lAAAAVRJREFUSEutlblKxVAQho9ebRS0UlxubWFl5/IKdiIKNqK9zQUbl0LQUnBB
BBEbEUHsbKx8BV/J7wsnEA+5eJH54ctk5sxMtkmSUAemYQ5mYT5bfek2qGNlnvX2SYvwAu/wBQ/wCR/w
Btdwk62+cdfNM9866+2TVuEVnmEbZuAeTsDiYzjNVt+46+ZtgXXW2yctwzds6qBxeIQNOIBeA33jrpun
rLPePmkNLmFIB43CETyBl3EFrmv1jbtunrLOdftUmwt3GhqGCbgDL2UqW33jrjdlfd9mtRbAo3qztfpt
GqiZ8iwms+2ngZqNwBKsZ6vfpj+bjYE3+hYOs9U3XupXs3N3Cu2AM1VNdrb6xktZXzVbAad4H/Yy7jvl
Z7CbY1p942Wu9faJbRZ6mW5CH0BbMxU2GrXChjbkdfIs/v2ie9SQT1DoxzH0sx36Q3GyA351qfMDY4V8
rdFnsfUAAAAASUVORK5CYII=
</value>
</data>
<data name="tsmPortConfig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAACcQAAAnEAGUaVEZAAAAB3RJ
TUUH4wEJBBwLasCJvwAAAj9JREFUSEutlslrFEEUh0cheHCFkIhEieBFE3IQgh7UQNAYFRGXq3jLNbm4
IeLFBTeigRjiguKCIiSgl0AQF/Af8/uaqvDS3ZkGJw++mZq3/F51TVXNtEq2A3aX6IYN0M62QbmuBzbC
ih2C7zAHzxPz6fNmWMsGYAFeQa57AW/BJoUp/g1+wD7ohZ1pbIPtUGeD8BX+whDkOp/AJr4Xy+LMl2EW
xmE6cR6cUV2DTfAJfsFrGIMnYP4leAZFA1+c5UW4BlNwK3EKZqCugb5YNwnW3IbTsKqBH5z5TbgB1xMn
oV0DY+ZYk1FDrUqDC+AjPgqcg6YG5sQaNdSqNDDxPtwLnIWmBubEGjXUqjTwUV3LqwG/uKYG5sQaNdSq
bRDXX3KDraC5c0TTlxvEGjUqDd7BMBwI7Iej8CaN3VEePHFsjjFzjMdatdQsGviod+AxPCyhz634Hr7A
5YRjfcbWqlOzWFrvC490H9hxT2AXXIGX4JVgkTjWZ8ycWKOGWit3kcfbx1mCD+AJdv1892T/BGft7shP
kMfGzIk1aqilptrFDBbhDxi8C3m7WvAbRkGBYwnH+oyZk7entWqopabarS44CLl4JHAE3Hqu9WFwtuJY
nzFzYk3WUVPtRvOW/AgPwCtAHOszti72FFyWzwnH+tbFvM5dFtfT3SGO9Rnr2FxLL7Gy6TPWsbnXJ2Av
9Ccc6zPWkflj70xPwBk4nnCsz1jTH4K2tgW8b/xJ9IuN6DNmzn9bvkY8/nVU/pqstlbrH4WGkCbFOPMg
AAAAAElFTkSuQmCC
</value>
</data>
<metadata name="sPortBalance.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>247, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>55</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAkAABAnAAAQJwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAsAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAA
ABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAALAAAAAAAA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AAAA3wAAAN4AAADlAAAA6gAAAPQAAAC1AAAACQAAAAAAAAAAAAAAAgAA
AKEAAADSAAAAQwAAACsAAAAsAAAALAAAACgAAAB0AAAA1QAAAIcAAACHAAAA1QAAAHQAAAAoAAAALAAA
ACwAAAArAAAAQwAAANIAAAChAAAAAgAAAAAAAAAAAAAAAAAAADIAAADQAAAAzAAAAKcAAACmAAAApgAA
AKQAAADGAAAA1wAAAEMAAABDAAAA1wAAAMYAAACkAAAApgAAAKYAAACnAAAAzAAAANAAAAAyAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAnAAAAewAAAJgAAACZAAAAmQAAAJcAAAC7AAAA3AAAABYAAAAWAAAA3AAA
ALsAAACXAAAAmQAAAJkAAACYAAAAewAAACcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAtAAAA3wAAAJYAAACWAAAA3wAAAC0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAWAAA
AMIAAADCAAAAWAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAANAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAADAMAAAwDgAAcA4AAHAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEA4AAHAP8A
/wA=
</value>
</data>
</root>

+ 0
- 257
CNAS_BalanceClient/frmConditionMap.Designer.cs Переглянути файл

@@ -1,257 +0,0 @@
namespace CNAS_BalanceClient
{
partial class frmConditionMap
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConditionMap));
this.pnlCenter = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dgvCnas = new System.Windows.Forms.DataGridView();
this.TableName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.TableColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.condition = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Value = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlCenterBottom = new System.Windows.Forms.Panel();
this.btnDelete = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.pnlRight = new System.Windows.Forms.Panel();
this.pnlBottom = new System.Windows.Forms.Panel();
this.pnlTop = new System.Windows.Forms.Panel();
this.pnlLeft = new System.Windows.Forms.Panel();
this.pnlCenter.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).BeginInit();
this.pnlCenterBottom.SuspendLayout();
this.SuspendLayout();
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.groupBox1);
this.pnlCenter.Controls.Add(this.pnlCenterBottom);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(10, 10);
this.pnlCenter.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(574, 396);
this.pnlCenter.TabIndex = 7;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.dgvCnas);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.groupBox1.Size = new System.Drawing.Size(574, 353);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "CNAS列";
//
// dgvCnas
//
this.dgvCnas.AllowUserToAddRows = false;
this.dgvCnas.BackgroundColor = System.Drawing.Color.White;
this.dgvCnas.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCnas.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.TableName,
this.TableColumn,
this.DataType,
this.condition,
this.Value});
this.dgvCnas.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCnas.Location = new System.Drawing.Point(3, 22);
this.dgvCnas.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.dgvCnas.Name = "dgvCnas";
this.dgvCnas.RowTemplate.Height = 23;
this.dgvCnas.Size = new System.Drawing.Size(568, 325);
this.dgvCnas.TabIndex = 0;
this.dgvCnas.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellClick);
this.dgvCnas.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellDoubleClick);
this.dgvCnas.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellEndEdit);
this.dgvCnas.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellValueChanged);
this.dgvCnas.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvCnas_RowPostPaint);
//
// TableName
//
this.TableName.DataPropertyName = "CnasTableName";
this.TableName.HeaderText = "表名";
this.TableName.Name = "TableName";
this.TableName.Visible = false;
this.TableName.Width = 120;
//
// TableColumn
//
this.TableColumn.DataPropertyName = "CnasFieldName";
this.TableColumn.HeaderText = "列名";
this.TableColumn.Name = "TableColumn";
this.TableColumn.ReadOnly = true;
this.TableColumn.Width = 170;
//
// DataType
//
this.DataType.DataPropertyName = "CnasDataType";
this.DataType.HeaderText = "类型";
this.DataType.Name = "DataType";
this.DataType.ReadOnly = true;
this.DataType.Visible = false;
this.DataType.Width = 120;
//
// condition
//
this.condition.HeaderText = "条件";
this.condition.Name = "condition";
this.condition.ReadOnly = true;
this.condition.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.condition.Width = 110;
//
// Value
//
this.Value.HeaderText = "值";
this.Value.Name = "Value";
this.Value.Width = 200;
//
// pnlCenterBottom
//
this.pnlCenterBottom.Controls.Add(this.btnDelete);
this.pnlCenterBottom.Controls.Add(this.btnOK);
this.pnlCenterBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlCenterBottom.Location = new System.Drawing.Point(0, 353);
this.pnlCenterBottom.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlCenterBottom.Name = "pnlCenterBottom";
this.pnlCenterBottom.Size = new System.Drawing.Size(574, 43);
this.pnlCenterBottom.TabIndex = 0;
//
// btnDelete
//
this.btnDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnDelete.Location = new System.Drawing.Point(401, 11);
this.btnDelete.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(70, 25);
this.btnDelete.TabIndex = 1;
this.btnDelete.Text = "全部清除";
this.btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnOK.Location = new System.Drawing.Point(477, 6);
this.btnOK.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// pnlRight
//
this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.pnlRight.Location = new System.Drawing.Point(584, 10);
this.pnlRight.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlRight.Name = "pnlRight";
this.pnlRight.Size = new System.Drawing.Size(10, 396);
this.pnlRight.TabIndex = 4;
//
// pnlBottom
//
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(10, 406);
this.pnlBottom.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(584, 10);
this.pnlBottom.TabIndex = 5;
//
// pnlTop
//
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTop.Location = new System.Drawing.Point(10, 0);
this.pnlTop.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlTop.Name = "pnlTop";
this.pnlTop.Size = new System.Drawing.Size(584, 10);
this.pnlTop.TabIndex = 6;
//
// pnlLeft
//
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 0);
this.pnlLeft.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(10, 416);
this.pnlLeft.TabIndex = 3;
//
// frmConditionMap
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 416);
this.Controls.Add(this.pnlCenter);
this.Controls.Add(this.pnlRight);
this.Controls.Add(this.pnlBottom);
this.Controls.Add(this.pnlTop);
this.Controls.Add(this.pnlLeft);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.Name = "frmConditionMap";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "条件映射";
this.Load += new System.EventHandler(this.frmConditionMap_Load);
this.pnlCenter.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).EndInit();
this.pnlCenterBottom.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGridView dgvCnas;
private System.Windows.Forms.Panel pnlCenterBottom;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Panel pnlRight;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Panel pnlTop;
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.DataGridViewTextBoxColumn TableName;
private System.Windows.Forms.DataGridViewTextBoxColumn TableColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn DataType;
private System.Windows.Forms.DataGridViewTextBoxColumn condition;
private System.Windows.Forms.DataGridViewTextBoxColumn Value;
}
}

+ 0
- 556
CNAS_BalanceClient/frmConditionMap.cs Переглянути файл

@@ -1,556 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public partial class frmConditionMap : Form
{
DataBaseInfo targetDataBase;
public SyncBalanceItem currentBalanceItem;
private ComboBox cbxConditionValue;
//private List<string> lstConditionValueType = new List<string>() { "等于", "连接", "若...则...", "截取", "除以", "乘以", "小数位数", "数值相加(减)", "截断开头(结尾)" };
private List<string> lstConditionValueType = new List<string>() { "等于" };

public frmConditionMap(SyncBalanceItem currentBalanceItem, DataBaseInfo targetDataBase)
{
InitializeComponent();

this.currentBalanceItem = currentBalanceItem;
this.targetDataBase = targetDataBase;
}

private void frmConditionMap_Load(object sender, EventArgs e)
{
if (currentBalanceItem == null || currentBalanceItem.syncParamasInfos == null || currentBalanceItem.syncParamasInfos.Count == 0)
{
MessageBox.Show("请先指定至少一个映射字段。");
return;
}
//初始化ComBobox
InnitalComboBox();

//加载数据
LoadShowData();
}

/// <summary>
/// 初始化控件combobox
/// </summary>
private void InnitalComboBox()
{
cbxConditionValue = new ComboBox();
cbxConditionValue.SelectedIndexChanged += new EventHandler(cbxConditionValue_SelectedIndexChanged);
cbxConditionValue.SelectionChangeCommitted += new EventHandler(cbxConditionValue_SelectionChangedCommitted);

cbxConditionValue.Visible = false;

cbxConditionValue.DataSource = lstConditionValueType;
}
private void cbxConditionValue_SelectionChangedCommitted(object sender, EventArgs e)
{
cbxConditionValue.Visible = false;
}

private void cbxConditionValue_SelectedIndexChanged(object sender, EventArgs e)
{
//当前选中单元格的值将随之发生更改
if (dgvCnas.CurrentCell == null) return;
dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells["condition"].Value = cbxConditionValue.Text;
}
/// <summary>
/// 加载数据
/// </summary>
private void LoadShowData()
{
//1.根据映射表中的表名,获取该表所有字段,全部显示
string strTableName = currentBalanceItem.syncParamasInfos[0].TargetTable;
DataTable dtTableStruct = CnasDataOperationFact.CnasDataOperation().GetCNASTablesStruct(strTableName, targetDataBase);
if (dtTableStruct != null)
{
DataTable dtCnasShow = new DataTable();
dtCnasShow.Columns.Add("CnasTableName");
dtCnasShow.Columns.Add("CnasFieldName");
dtCnasShow.Columns.Add("CnasDataType");
foreach (DataColumn dc in dtTableStruct.Columns)
{
if (dc.ColumnName.ToUpper() == "ID") continue;
dtCnasShow.Rows.Add(new object[] { strTableName, dc.ColumnName, dc.DataType });
}

dgvCnas.DataSource = dtCnasShow;
}
//2.根据已存储数据,匹配后填充到datagridview中
if (currentBalanceItem.lstFixedValue == null)
currentBalanceItem.lstFixedValue = new List<CnasConditionMapValue>();
if (currentBalanceItem.lstFixedValue.Count == 0) return;
foreach (DataGridViewRow dgvRow in dgvCnas.Rows)
{
string strCurrentTable = dgvRow.Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvRow.Cells["TableColumn"].Value.ToString();

if (strCurrentTable == "" || strCurrentColumn == "") continue;
var query = currentBalanceItem.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count == 1)
{
dgvRow.Cells["Value"].Value = query[0].Value;
dgvRow.Cells["Condition"].Value = GiveShowByCondition(query[0]);
}
}
}

public string GiveShowByCondition(CnasConditionMapValue cnasFixed)
{
string strCurrentCondition = "";
switch (cnasFixed.Condition)
{
case MapCondition.Equal:
strCurrentCondition = "等于";
break;
case MapCondition.Sub:
strCurrentCondition = "连接";
break;
case MapCondition.IFThen:
strCurrentCondition = "若...则...";
break;
case MapCondition.Divided:
strCurrentCondition = "除以";
break;
case MapCondition.Multiplied:
strCurrentCondition = "乘以";
break;
case MapCondition.SubString:
strCurrentCondition = "截取";
break;
case MapCondition.DecimalDigits:
strCurrentCondition = "小数位数";
break;
case MapCondition.AddSubtract:
strCurrentCondition = "数值相加(减)";
break;
case MapCondition.SubstringStartEnd:
strCurrentCondition = "截断开头(结尾)";
break;
}
return strCurrentCondition;
}

private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}

private void dgvCnas_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 1) //此时是“值”列
{
//如果没有指定条件,无法存储结果
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;

//当前列名
string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
string strCurrentCondition = dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString();

if (dgvCnas.CurrentCell.Value == null)
{
currentBalanceItem.lstFixedValue.RemoveAll(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn);
return;
}
string strInputValue = dgvCnas.CurrentCell.Value.ToString();

//检查合法性
if (strCurrentColumn == "ID")
{
MessageBox.Show("该列不能指定固定值。");
return;
}
bool bIfSuccess = true;
switch (strCurrentType)
{
case "System.Decimal":
decimal defaultdecimal = 0;
if (!decimal.TryParse(strInputValue, out defaultdecimal))
bIfSuccess = false;
break;
case "System.Int":
int defaultint = 0;
if (!int.TryParse(strInputValue, out defaultint))
bIfSuccess = false;
break;
case "System.String":
default:
break;
}
if (!bIfSuccess)
{
MessageBox.Show("输入格式不正确,请重新输入。");
return;
}

if (GetBytesOfString(strInputValue) > 20)
{
MessageBox.Show("输入内容超出限制,请重新输入。");
dgvCnas.CurrentCell.Value = "";
return;
}

//将数据插入到数据源中
var query = currentBalanceItem.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
GiveConditionByShow(query[0], strCurrentCondition);
//query[0].Condition = strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen: MapCondition.Equal);
query[0].Value = strInputValue;
}
else
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
cnasFixed.TableName = strCurrentTable;
cnasFixed.ColumnName = strCurrentColumn;
cnasFixed.Value = strInputValue;
//cnasFixed.Condition= strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen : MapCondition.Equal);
GiveConditionByShow(cnasFixed, strCurrentCondition);

currentBalanceItem.lstFixedValue.Add(cnasFixed);
}
}
}

public int GetBytesOfString(string Text)
{
int nByte = 0;
byte[] bytes = Encoding.Unicode.GetBytes(Text);
for (int i = 0; i < bytes.GetLength(0); i++)
{
// 偶数位置,如0、2、4等,为UCS2编码中两个字节的第一个字节
if (i % 2 == 0)
{
nByte++; // 在UCS2第一个字节时n加1
}
else
{
// 当UCS2编码的第二个字节大于0时,该UCS2字符为汉字,一个汉字算两个字节
if (bytes[i] > 0)
{
nByte++;
}
}
}

return nByte;
}

public void GiveConditionByShow(CnasConditionMapValue cnasFixed, string strCurrentCondition)
{
switch (strCurrentCondition)
{
case "连接":
cnasFixed.Condition = MapCondition.Sub;
break;
case "若...则...":
cnasFixed.Condition = MapCondition.IFThen;
break;
case "截取":
cnasFixed.Condition = MapCondition.SubString;
break;
case "除以":
cnasFixed.Condition = MapCondition.Divided;
break;
case "乘以":
cnasFixed.Condition = MapCondition.Multiplied;
break;
case "小数位数":
cnasFixed.Condition = MapCondition.DecimalDigits;
break;
case "等于":
cnasFixed.Condition = MapCondition.Equal;
break;
case "数值相加(减)":
cnasFixed.Condition = MapCondition.AddSubtract;
break;
case "截断开头(结尾)":
cnasFixed.Condition = MapCondition.SubstringStartEnd;
break;
default:
break;
}
}

private void dgvCnas_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
dgvCnas.RowHeadersWidth - 4,
e.RowBounds.Height);

TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
dgvCnas.RowHeadersDefaultCellStyle.Font,
rectangle,
dgvCnas.RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}

private void dgvCnas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0) //如果此时是“条件”列
{
ShowConditionValue();
}
#region
//if (e.ColumnIndex == 1)//如果此时是“值”列
//{
// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;
// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "连接")
// {
// CnasConditionMapValue cnasFixed = new CnasConditionMapValue
// {
// TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
// ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
// Condition = MapCondition.Sub
// };
// if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
// cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

// frmConditionParam frmCondition = new frmConditionParam(syncInstrument, cnasFixed);
// if (frmCondition.ShowDialog() == DialogResult.OK)
// {
// if (frmCondition.conditionvalue.Value != null && frmCondition.conditionvalue.Value.ToString() != "")
// {
// dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmCondition.conditionvalue.Value;

// //将数据插入到数据源中
// var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
// if (query.Count >= 1)
// {
// query[0].Condition = cnasFixed.Condition;
// query[0].Value = frmCondition.conditionvalue.Value;
// }
// else
// {
// cnasFixed.Value = frmCondition.conditionvalue.Value;
// syncInstrument.lstFixedValue.Add(cnasFixed);
// }
// }
// }
// }
// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "若...则...")
// {
// CnasConditionMapValue cnasFixed = new CnasConditionMapValue
// {
// TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
// ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
// Condition = MapCondition.IFThen
// };
// if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
// cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

// frmIfThenParams frmIfThen = new frmIfThenParams(syncInstrument, cnasFixed);
// if (frmIfThen.ShowDialog() == DialogResult.OK)
// {
// if (frmIfThen.conditionvalue.Value != null && frmIfThen.conditionvalue.Value.ToString() != "")
// {
// dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmIfThen.conditionvalue.Value;

// //将数据插入到数据源中
// var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
// if (query.Count >= 1)
// {
// query[0].Condition = cnasFixed.Condition;
// query[0].Value = frmIfThen.conditionvalue.Value;
// }
// else
// {
// cnasFixed.Value = frmIfThen.conditionvalue.Value;
// syncInstrument.lstFixedValue.Add(cnasFixed);
// }
// }
// }
// }
// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截取")
// {
// CnasConditionMapValue cnasFixed = new CnasConditionMapValue
// {
// TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
// ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
// Condition = MapCondition.SubString
// };
// if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
// cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

// frmSplitParam frmSplitParam = new frmSplitParam(cnasFixed);
// if (frmSplitParam.ShowDialog() == DialogResult.OK)
// {
// if (frmSplitParam.conditionvalue.Value != null && frmSplitParam.conditionvalue.Value.ToString() != "")
// {
// dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmSplitParam.conditionvalue.Value;

// //将数据插入到数据源中
// var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
// if (query.Count >= 1)
// {
// query[0].Condition = cnasFixed.Condition;
// query[0].Value = frmSplitParam.conditionvalue.Value;
// }
// else
// {
// cnasFixed.Value = frmSplitParam.conditionvalue.Value;
// syncInstrument.lstFixedValue.Add(cnasFixed);
// }
// }
// }
// }

// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截断开头(结尾)")
// {
// CnasConditionMapValue cnasFixed = new CnasConditionMapValue
// {
// TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
// ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
// Condition = MapCondition.SubstringStartEnd
// };
// if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
// cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

// frmStartEndSubstring frmStartEnd = new frmStartEndSubstring(cnasFixed);
// if (frmStartEnd.ShowDialog() == DialogResult.OK)
// {
// if (frmStartEnd.conditionvalue.Value != null && frmStartEnd.conditionvalue.Value.ToString() != "")
// {
// dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmStartEnd.conditionvalue.Value;

// //将数据插入到数据源中
// var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
// if (query.Count >= 1)
// {
// query[0].Condition = cnasFixed.Condition;
// query[0].Value = frmStartEnd.conditionvalue.Value;
// }
// else
// {
// cnasFixed.Value = frmStartEnd.conditionvalue.Value;
// syncInstrument.lstFixedValue.Add(cnasFixed);
// }
// }
// }
// }

// if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "数值相加(减)")
// {
// CnasConditionMapValue cnasFixed = new CnasConditionMapValue
// {
// TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
// ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
// Condition = MapCondition.AddSubtract
// };
// if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
// cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

// frmAddSubtract frmAddSubtract = new frmAddSubtract(syncInstrument, cnasFixed);
// if (frmAddSubtract.ShowDialog() == DialogResult.OK)
// {
// if (frmAddSubtract.conditionvalue.Value != null && frmAddSubtract.conditionvalue.Value.ToString() != "")
// {
// dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmAddSubtract.conditionvalue.Value;

// //将数据插入到数据源中
// var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
// if (query.Count >= 1)
// {
// query[0].Condition = cnasFixed.Condition;
// query[0].Value = frmAddSubtract.conditionvalue.Value;
// }
// else
// {
// cnasFixed.Value = frmAddSubtract.conditionvalue.Value;
// syncInstrument.lstFixedValue.Add(cnasFixed);
// }
// }
// }
// }

// dgvCnas.EndEdit();
//}
#endregion
}
private void ShowConditionValue()
{
Rectangle TmpRect = dgvCnas.GetCellDisplayRectangle(dgvCnas.CurrentCell.ColumnIndex, dgvCnas.CurrentCell.RowIndex, true);
cbxConditionValue.Size = TmpRect.Size;
cbxConditionValue.Top = TmpRect.Top;
cbxConditionValue.Left = TmpRect.Left;
cbxConditionValue.DropDownStyle = ComboBoxStyle.DropDownList;
cbxConditionValue.FormattingEnabled = true;
cbxConditionValue.Visible = true;

if (!this.dgvCnas.Controls.Contains(cbxConditionValue))
this.dgvCnas.Controls.Add(cbxConditionValue);
}

private void btnDelete_Click(object sender, EventArgs e)
{
if (currentBalanceItem == null) return;
if (currentBalanceItem.lstFixedValue == null) return;
if (dgvCnas == null) return;
if (dgvCnas.Rows.Count <= 0) return;

foreach (DataGridViewRow dr in dgvCnas.Rows)
{
dr.Cells["condition"].Value = "";
dr.Cells["Value"].Value = "";
}
currentBalanceItem.lstFixedValue.Clear();
}

private void dgvCnas_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex <= 0) return;
if (e.ColumnIndex == 0) //此时是“条件”列
{
if (dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value == null) return;

//当前列名
string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
string strCurrentCondition = dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value.ToString();
string strCurrentValue = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value == null ? "" : dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

//将数据插入到数据源中
var query = currentBalanceItem.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
GiveConditionByShow(query[0], strCurrentCondition);
}
else
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
cnasFixed.TableName = strCurrentTable;
cnasFixed.ColumnName = strCurrentColumn;
cnasFixed.Value = strCurrentValue;
GiveConditionByShow(cnasFixed, strCurrentCondition);

currentBalanceItem.lstFixedValue.Add(cnasFixed);
}
}
}

private void dgvCnas_CellClick(object sender, DataGridViewCellEventArgs e)
{
cbxConditionValue.Visible = false;
}
}
}

+ 0
- 182
CNAS_BalanceClient/frmConditionMap.resx Переглянути файл

@@ -1,182 +0,0 @@
<?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="TableName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TableColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DataType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="condition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Value.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAkAABMLAAATCwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAVAAAAOwAAAGYAAACWAAAAvQAAANkAAADvAAAA+wAAAP8AAAD/AAAA+gAA
AOwAAADWAAAAuQAAAJIAAABhAAAAOAAAABMAAAAAAAAAAAAAAAAAAAAAAAAACQAAAFEAAACeAAAAuQAA
ALkAAAClAAAAlgAAAIkAAACEAAAAfwAAAIQAAACKAAAAlgAAAKUAAAC7AAAA1QAAAPQAAAD9AAAA4QAA
AKgAAABQAAAACAAAAAAAAAAAAAAAJQAAAFgAAABEAAAAMAAAACUAAAAdAAAAFwAAABMAAAARAAAADwAA
ABEAAAATAAAAFwAAAB0AAAAlAAAALgAAAD4AAABuAAAAtwAAAPIAAADmAAAAUwAAAAAAAAAAAAAACQAA
ACcAAABCAAAAbAAAAJYAAAC3AAAAzgAAAOAAAADpAAAA8AAAAOkAAADhAAAA0AAAALoAAACZAAAAcQAA
AEQAAAAmAAAAEgAAAEUAAADPAAAAgAAAAAAAAAAmAAAAgQAAAMgAAAD2AAAA/AAAAOYAAADIAAAAsAAA
AJ4AAACPAAAAhw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AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAADlAAAAUgAAAAAAAAAAAAAACAAAAFAAAACoAAAA4QAAAPwAAAD/AAAA/wAAAP8AAAD/AAAA/wAA
AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD8AAAA4QAAAKcAAABPAAAABwAAAAAAAAAAAAAAAAAA
AAAAAAAUAAAAOAAAAGEAAACRAAAAtwAAANIAAADoAAAA9AAAAPwAAAD8AAAA9AAAAOcAAADSAAAAtgAA
AJAAAABhAAAAOAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAA=
</value>
</data>
</root>

+ 0
- 317
CNAS_BalanceClient/frmConfigPort.Designer.cs Переглянути файл

@@ -1,317 +0,0 @@
namespace CNAS_BalanceClient
{
partial class frmConfigPort
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConfigPort));
this.panel1 = new System.Windows.Forms.Panel();
this.pnlCenter = new System.Windows.Forms.Panel();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.cbxHandshake = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.cbxDataBits = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.cbxParity = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.cbxStopBits = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.cbxBaudRate = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.cbxPortName = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.pnlBottom = new System.Windows.Forms.Panel();
this.pnlTop = new System.Windows.Forms.Panel();
this.pnlRight = new System.Windows.Forms.Panel();
this.pnlLeft = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.pnlCenter.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.pnlCenter);
this.panel1.Controls.Add(this.pnlBottom);
this.panel1.Controls.Add(this.pnlTop);
this.panel1.Controls.Add(this.pnlRight);
this.panel1.Controls.Add(this.pnlLeft);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(509, 275);
this.panel1.TabIndex = 0;
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.btnCancel);
this.pnlCenter.Controls.Add(this.btnOK);
this.pnlCenter.Controls.Add(this.cbxHandshake);
this.pnlCenter.Controls.Add(this.label6);
this.pnlCenter.Controls.Add(this.cbxDataBits);
this.pnlCenter.Controls.Add(this.label5);
this.pnlCenter.Controls.Add(this.cbxParity);
this.pnlCenter.Controls.Add(this.label4);
this.pnlCenter.Controls.Add(this.cbxStopBits);
this.pnlCenter.Controls.Add(this.label3);
this.pnlCenter.Controls.Add(this.cbxBaudRate);
this.pnlCenter.Controls.Add(this.label2);
this.pnlCenter.Controls.Add(this.cbxPortName);
this.pnlCenter.Controls.Add(this.label1);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(10, 10);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(489, 255);
this.pnlCenter.TabIndex = 4;
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(377, 213);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(90, 30);
this.btnCancel.TabIndex = 16;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(268, 213);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 15;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// cbxHandshake
//
this.cbxHandshake.FormattingEnabled = true;
this.cbxHandshake.Items.AddRange(new object[] {
"None",
"XOnXOff",
"RequestToSend",
"RequestToSendXOnXOff"});
this.cbxHandshake.Location = new System.Drawing.Point(110, 167);
this.cbxHandshake.Name = "cbxHandshake";
this.cbxHandshake.Size = new System.Drawing.Size(357, 25);
this.cbxHandshake.TabIndex = 11;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(38, 175);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 10;
this.label6.Text = "握手信号";
//
// cbxDataBits
//
this.cbxDataBits.FormattingEnabled = true;
this.cbxDataBits.Items.AddRange(new object[] {
"8",
"7"});
this.cbxDataBits.Location = new System.Drawing.Point(341, 120);
this.cbxDataBits.Name = "cbxDataBits";
this.cbxDataBits.Size = new System.Drawing.Size(126, 25);
this.cbxDataBits.TabIndex = 9;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(269, 128);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 17);
this.label5.TabIndex = 8;
this.label5.Text = "数据位";
//
// cbxParity
//
this.cbxParity.FormattingEnabled = true;
this.cbxParity.Items.AddRange(new object[] {
"None",
"Even",
"Odd",
"Mark",
"Space"});
this.cbxParity.Location = new System.Drawing.Point(110, 120);
this.cbxParity.Name = "cbxParity";
this.cbxParity.Size = new System.Drawing.Size(126, 25);
this.cbxParity.TabIndex = 7;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(38, 128);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 6;
this.label4.Text = "奇偶校验";
//
// cbxStopBits
//
this.cbxStopBits.FormattingEnabled = true;
this.cbxStopBits.Items.AddRange(new object[] {
"1",
"1.5",
"2"});
this.cbxStopBits.Location = new System.Drawing.Point(341, 72);
this.cbxStopBits.Name = "cbxStopBits";
this.cbxStopBits.Size = new System.Drawing.Size(126, 25);
this.cbxStopBits.TabIndex = 5;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(269, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 4;
this.label3.Text = "停止位";
//
// cbxBaudRate
//
this.cbxBaudRate.FormattingEnabled = true;
this.cbxBaudRate.Items.AddRange(new object[] {
"9600",
"1200"});
this.cbxBaudRate.Location = new System.Drawing.Point(110, 72);
this.cbxBaudRate.Name = "cbxBaudRate";
this.cbxBaudRate.Size = new System.Drawing.Size(126, 25);
this.cbxBaudRate.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 75);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(97, 17);
this.label2.TabIndex = 2;
this.label2.Text = "传输速率/波特率";
//
// cbxPortName
//
this.cbxPortName.FormattingEnabled = true;
this.cbxPortName.Items.AddRange(new object[] {
"COM1"});
this.cbxPortName.Location = new System.Drawing.Point(110, 24);
this.cbxPortName.Name = "cbxPortName";
this.cbxPortName.Size = new System.Drawing.Size(357, 25);
this.cbxPortName.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(38, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 17);
this.label1.TabIndex = 0;
this.label1.Text = "COM名称";
//
// pnlBottom
//
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(10, 265);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(489, 10);
this.pnlBottom.TabIndex = 3;
//
// pnlTop
//
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTop.Location = new System.Drawing.Point(10, 0);
this.pnlTop.Name = "pnlTop";
this.pnlTop.Size = new System.Drawing.Size(489, 10);
this.pnlTop.TabIndex = 2;
//
// pnlRight
//
this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.pnlRight.Location = new System.Drawing.Point(499, 0);
this.pnlRight.Name = "pnlRight";
this.pnlRight.Size = new System.Drawing.Size(10, 275);
this.pnlRight.TabIndex = 1;
//
// pnlLeft
//
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 0);
this.pnlLeft.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(10, 275);
this.pnlLeft.TabIndex = 0;
//
// frmConfigPort
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(509, 275);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmConfigPort";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "天平设置";
this.Load += new System.EventHandler(this.frmConfigPort_Load);
this.Shown += new System.EventHandler(this.frmConfigPort_Shown);
this.panel1.ResumeLayout(false);
this.pnlCenter.ResumeLayout(false);
this.pnlCenter.PerformLayout();
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Panel pnlTop;
private System.Windows.Forms.Panel pnlRight;
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.ComboBox cbxHandshake;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox cbxDataBits;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox cbxParity;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cbxStopBits;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cbxBaudRate;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cbxPortName;
private System.Windows.Forms.Label label1;
}
}

+ 0
- 83
CNAS_BalanceClient/frmConfigPort.cs Переглянути файл

@@ -1,83 +0,0 @@
using CNAS_SerialPort;
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public partial class frmConfigPort : Form
{
public SerialPortConfigInfo serialPortConfig;

public frmConfigPort(SerialPortConfigInfo serialPortConfig)
{
InitializeComponent();

this.serialPortConfig = serialPortConfig;
}

private void frmConfigPort_Load(object sender, EventArgs e)
{
if (serialPortConfig != null)
{
cbxPortName.Text=serialPortConfig.PortName;
cbxBaudRate.Text = serialPortConfig.BaudRate.ToString();
cbxDataBits.Text = serialPortConfig.DataBits.ToString();
cbxParity.Text = serialPortConfig.Parity;
cbxStopBits.Text = serialPortConfig.StopBits;
cbxHandshake.Text = serialPortConfig.Handshake;

//if (serialPortConfig.IfAutoWrap)
// cbIfAutoWrap.Checked = true;
//if (serialPortConfig.IfMuffleFurnace)
// cbIfMuffleFurnace.Checked = true;
//if (serialPortConfig.IfPeelingWeighing)
// cbIfPeelingWeighing.Checked = true;
}

//cbxPortName.Items.AddRange(System.IO.Ports.SerialPort.GetPortNames());
}

private void btnOK_Click(object sender, EventArgs e)
{
if (serialPortConfig == null) serialPortConfig = new SerialPortConfigInfo();

serialPortConfig.PortName = cbxPortName.Text;
serialPortConfig.BaudRate = Convert.ToInt32(cbxBaudRate.Text);
serialPortConfig.DataBits = Convert.ToInt32(cbxDataBits.Text);
serialPortConfig.Parity = cbxParity.Text;
serialPortConfig.StopBits = cbxStopBits.Text;
serialPortConfig.Handshake = cbxHandshake.Text;
//if (cbIfAutoWrap.Checked)
// serialPortConfig.IfAutoWrap = true;
//if (cbIfMuffleFurnace.Checked)
// serialPortConfig.IfMuffleFurnace = true;
//if (cbIfPeelingWeighing.Checked)
// serialPortConfig.IfPeelingWeighing = true;

this.DialogResult = DialogResult.OK;

int iReturn=new SericalPortConfigBLL().SaveSerialPortConfigInfo(serialPortConfig);
if (iReturn > 0)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageBox.Show("保存时发生异常,无法正常保存!", "提示");
}
}

private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}

private void frmConfigPort_Shown(object sender, EventArgs e)
{
this.cbxPortName.Select(0, 0);
}
}
}

+ 0
- 167
CNAS_BalanceClient/frmConfigPort.resx Переглянути файл

@@ -1,167 +0,0 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGB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D8A/AA/AP4AfwD+AH8AAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAc
AAA=
</value>
</data>
</root>

+ 0
- 926
CNAS_BalanceClient/frmHistory.Designer.cs Переглянути файл

@@ -1,926 +0,0 @@
namespace CNAS_BalanceClient
{
partial class frmHistory
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmHistory));
this.pnlAll = new System.Windows.Forms.Panel();
this.pnlCenter = new System.Windows.Forms.Panel();
this.pnlCenterBody = new System.Windows.Forms.Panel();
this.dgvShuiFen = new System.Windows.Forms.DataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Mad = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvHuiFen = new System.Windows.Forms.DataGridView();
this.ID3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DecrementValue2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AAD = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvHuiFaFen = new System.Windows.Forms.DataGridView();
this.ID4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn24 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn25 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn26 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn27 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn28 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn29 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn30 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.VR = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MAD2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.VAD = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvQuanShuiFen = new System.Windows.Forms.DataGridView();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Sample_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Instrument_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Crucible_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Empty_Crucible_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Sample_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AddSample_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Drying_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SecondDrying_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ThirdDrying_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Mt = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Auto_Code = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlCenterTop = new System.Windows.Forms.Panel();
this.btnFind = new System.Windows.Forms.Button();
this.txtCode = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.comType = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.dtpEndDate = new System.Windows.Forms.DateTimePicker();
this.dtpStartTime = new System.Windows.Forms.DateTimePicker();
this.label1 = new System.Windows.Forms.Label();
this.pnlBottom = new System.Windows.Forms.Panel();
this.pnlRight = new System.Windows.Forms.Panel();
this.pnlLeft = new System.Windows.Forms.Panel();
this.pnlTop = new System.Windows.Forms.Panel();
this.pnlAll.SuspendLayout();
this.pnlCenter.SuspendLayout();
this.pnlCenterBody.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShuiFen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvHuiFen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvHuiFaFen)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvQuanShuiFen)).BeginInit();
this.pnlCenterTop.SuspendLayout();
this.SuspendLayout();
//
// pnlAll
//
this.pnlAll.Controls.Add(this.pnlCenter);
this.pnlAll.Controls.Add(this.pnlBottom);
this.pnlAll.Controls.Add(this.pnlRight);
this.pnlAll.Controls.Add(this.pnlLeft);
this.pnlAll.Controls.Add(this.pnlTop);
this.pnlAll.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlAll.Location = new System.Drawing.Point(0, 0);
this.pnlAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlAll.Name = "pnlAll";
this.pnlAll.Size = new System.Drawing.Size(919, 558);
this.pnlAll.TabIndex = 0;
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.pnlCenterBody);
this.pnlCenter.Controls.Add(this.pnlCenterTop);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(10, 10);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(899, 538);
this.pnlCenter.TabIndex = 4;
//
// pnlCenterBody
//
this.pnlCenterBody.Controls.Add(this.dgvShuiFen);
this.pnlCenterBody.Controls.Add(this.dgvHuiFen);
this.pnlCenterBody.Controls.Add(this.dgvHuiFaFen);
this.pnlCenterBody.Controls.Add(this.dgvQuanShuiFen);
this.pnlCenterBody.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenterBody.Location = new System.Drawing.Point(0, 48);
this.pnlCenterBody.Name = "pnlCenterBody";
this.pnlCenterBody.Size = new System.Drawing.Size(899, 490);
this.pnlCenterBody.TabIndex = 1;
//
// dgvShuiFen
//
this.dgvShuiFen.AllowUserToAddRows = false;
this.dgvShuiFen.BackgroundColor = System.Drawing.Color.White;
this.dgvShuiFen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShuiFen.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn2,
this.dataGridViewTextBoxColumn3,
this.dataGridViewTextBoxColumn4,
this.dataGridViewTextBoxColumn5,
this.dataGridViewTextBoxColumn6,
this.dataGridViewTextBoxColumn7,
this.dataGridViewTextBoxColumn8,
this.dataGridViewTextBoxColumn9,
this.dataGridViewTextBoxColumn10,
this.Column9,
this.Mad,
this.dataGridViewTextBoxColumn12,
this.Column1});
this.dgvShuiFen.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShuiFen.Location = new System.Drawing.Point(0, 0);
this.dgvShuiFen.Name = "dgvShuiFen";
this.dgvShuiFen.ReadOnly = true;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.DimGray;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black;
this.dgvShuiFen.RowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShuiFen.RowTemplate.Height = 23;
this.dgvShuiFen.Size = new System.Drawing.Size(899, 490);
this.dgvShuiFen.TabIndex = 5;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "GUID";
this.dataGridViewTextBoxColumn1.HeaderText = "编号";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.Visible = false;
this.dataGridViewTextBoxColumn1.Width = 55;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "Sample_Number";
this.dataGridViewTextBoxColumn2.HeaderText = "样品编号";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.DataPropertyName = "Instrument_Number";
this.dataGridViewTextBoxColumn3.HeaderText = "仪器编号";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.DataPropertyName = "Crucible_Number";
this.dataGridViewTextBoxColumn4.HeaderText = "坩埚号";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "Empty_Crucible_Weight";
this.dataGridViewTextBoxColumn5.HeaderText = "空坩埚重(g)";
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.ReadOnly = true;
//
// dataGridViewTextBoxColumn6
//
this.dataGridViewTextBoxColumn6.DataPropertyName = "Sample_Weight";
this.dataGridViewTextBoxColumn6.HeaderText = "样重(g)";
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
this.dataGridViewTextBoxColumn6.ReadOnly = true;
this.dataGridViewTextBoxColumn6.Width = 80;
//
// dataGridViewTextBoxColumn7
//
this.dataGridViewTextBoxColumn7.DataPropertyName = "AddSample_Weight";
this.dataGridViewTextBoxColumn7.HeaderText = "加样重(g)";
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
this.dataGridViewTextBoxColumn7.ReadOnly = true;
this.dataGridViewTextBoxColumn7.Width = 90;
//
// dataGridViewTextBoxColumn8
//
this.dataGridViewTextBoxColumn8.DataPropertyName = "Drying_Weight";
this.dataGridViewTextBoxColumn8.HeaderText = "烘干重(g)";
this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
this.dataGridViewTextBoxColumn8.ReadOnly = true;
this.dataGridViewTextBoxColumn8.Width = 90;
//
// dataGridViewTextBoxColumn9
//
this.dataGridViewTextBoxColumn9.DataPropertyName = "SecondDrying_Weight";
this.dataGridViewTextBoxColumn9.HeaderText = "二次烘干重(g)";
this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
this.dataGridViewTextBoxColumn9.ReadOnly = true;
this.dataGridViewTextBoxColumn9.Width = 120;
//
// dataGridViewTextBoxColumn10
//
this.dataGridViewTextBoxColumn10.DataPropertyName = "ThirdDrying_Weight";
this.dataGridViewTextBoxColumn10.HeaderText = "三次烘干重(g)";
this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
this.dataGridViewTextBoxColumn10.ReadOnly = true;
this.dataGridViewTextBoxColumn10.Width = 120;
//
// Column9
//
this.Column9.DataPropertyName = "DecrementValue";
this.Column9.HeaderText = "减量";
this.Column9.Name = "Column9";
this.Column9.ReadOnly = true;
//
// Mad
//
this.Mad.DataPropertyName = "Mad";
this.Mad.HeaderText = "Mad(%)";
this.Mad.Name = "Mad";
this.Mad.ReadOnly = true;
this.Mad.Width = 50;
//
// dataGridViewTextBoxColumn12
//
this.dataGridViewTextBoxColumn12.DataPropertyName = "Auto_Code";
this.dataGridViewTextBoxColumn12.HeaderText = "自动编号";
this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
this.dataGridViewTextBoxColumn12.ReadOnly = true;
//
// Column1
//
this.Column1.DataPropertyName = "OperaDateTime";
this.Column1.HeaderText = "称量日期";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 150;
//
// dgvHuiFen
//
this.dgvHuiFen.AllowUserToAddRows = false;
this.dgvHuiFen.BackgroundColor = System.Drawing.Color.White;
this.dgvHuiFen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvHuiFen.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ID3,
this.dataGridViewTextBoxColumn14,
this.dataGridViewTextBoxColumn15,
this.dataGridViewTextBoxColumn16,
this.dataGridViewTextBoxColumn17,
this.dataGridViewTextBoxColumn18,
this.dataGridViewTextBoxColumn19,
this.dataGridViewTextBoxColumn20,
this.dataGridViewTextBoxColumn21,
this.dataGridViewTextBoxColumn22,
this.DecrementValue2,
this.AAD,
this.Column17,
this.dataGridViewTextBoxColumn11});
this.dgvHuiFen.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvHuiFen.Location = new System.Drawing.Point(0, 0);
this.dgvHuiFen.Name = "dgvHuiFen";
this.dgvHuiFen.ReadOnly = true;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.DimGray;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black;
this.dgvHuiFen.RowsDefaultCellStyle = dataGridViewCellStyle2;
this.dgvHuiFen.RowTemplate.Height = 23;
this.dgvHuiFen.Size = new System.Drawing.Size(899, 490);
this.dgvHuiFen.TabIndex = 4;
//
// ID3
//
this.ID3.DataPropertyName = "GUID";
this.ID3.HeaderText = "编号";
this.ID3.Name = "ID3";
this.ID3.ReadOnly = true;
this.ID3.Visible = false;
this.ID3.Width = 55;
//
// dataGridViewTextBoxColumn14
//
this.dataGridViewTextBoxColumn14.DataPropertyName = "Sample_Number";
this.dataGridViewTextBoxColumn14.HeaderText = "样品编号";
this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
this.dataGridViewTextBoxColumn14.ReadOnly = true;
//
// dataGridViewTextBoxColumn15
//
this.dataGridViewTextBoxColumn15.DataPropertyName = "Instrument_Number";
this.dataGridViewTextBoxColumn15.HeaderText = "仪器编号";
this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
this.dataGridViewTextBoxColumn15.ReadOnly = true;
//
// dataGridViewTextBoxColumn16
//
this.dataGridViewTextBoxColumn16.DataPropertyName = "Crucible_Number";
this.dataGridViewTextBoxColumn16.HeaderText = "坩埚号";
this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
this.dataGridViewTextBoxColumn16.ReadOnly = true;
//
// dataGridViewTextBoxColumn17
//
this.dataGridViewTextBoxColumn17.DataPropertyName = "Empty_Crucible_Weight";
this.dataGridViewTextBoxColumn17.HeaderText = "空坩埚重(g)";
this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
this.dataGridViewTextBoxColumn17.ReadOnly = true;
//
// dataGridViewTextBoxColumn18
//
this.dataGridViewTextBoxColumn18.DataPropertyName = "Sample_Weight";
this.dataGridViewTextBoxColumn18.HeaderText = "样重(g)";
this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
this.dataGridViewTextBoxColumn18.ReadOnly = true;
this.dataGridViewTextBoxColumn18.Width = 80;
//
// dataGridViewTextBoxColumn19
//
this.dataGridViewTextBoxColumn19.DataPropertyName = "AddSample_Weight";
this.dataGridViewTextBoxColumn19.HeaderText = "加样重(g)";
this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19";
this.dataGridViewTextBoxColumn19.ReadOnly = true;
this.dataGridViewTextBoxColumn19.Width = 90;
//
// dataGridViewTextBoxColumn20
//
this.dataGridViewTextBoxColumn20.DataPropertyName = "BurningResidue_Weight";
this.dataGridViewTextBoxColumn20.HeaderText = "烧残重(g)";
this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20";
this.dataGridViewTextBoxColumn20.ReadOnly = true;
this.dataGridViewTextBoxColumn20.Width = 90;
//
// dataGridViewTextBoxColumn21
//
this.dataGridViewTextBoxColumn21.DataPropertyName = "SecondBurningResidue_Weight";
this.dataGridViewTextBoxColumn21.HeaderText = "二次灼烧残重(g)";
this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21";
this.dataGridViewTextBoxColumn21.ReadOnly = true;
this.dataGridViewTextBoxColumn21.Width = 120;
//
// dataGridViewTextBoxColumn22
//
this.dataGridViewTextBoxColumn22.DataPropertyName = "ThirdBurningResidue_Weight";
this.dataGridViewTextBoxColumn22.HeaderText = "三次灼烧重(g)";
this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22";
this.dataGridViewTextBoxColumn22.ReadOnly = true;
this.dataGridViewTextBoxColumn22.Width = 120;
//
// DecrementValue2
//
this.DecrementValue2.DataPropertyName = "DecrementValue";
this.DecrementValue2.HeaderText = "减量";
this.DecrementValue2.Name = "DecrementValue2";
this.DecrementValue2.ReadOnly = true;
//
// AAD
//
this.AAD.DataPropertyName = "AAD";
this.AAD.HeaderText = "Aad(%)";
this.AAD.Name = "AAD";
this.AAD.ReadOnly = true;
//
// Column17
//
this.Column17.DataPropertyName = "Auto_Code";
this.Column17.HeaderText = "自动编号";
this.Column17.Name = "Column17";
this.Column17.ReadOnly = true;
//
// dataGridViewTextBoxColumn11
//
this.dataGridViewTextBoxColumn11.DataPropertyName = "OperaDateTime";
this.dataGridViewTextBoxColumn11.HeaderText = "称量日期";
this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
this.dataGridViewTextBoxColumn11.ReadOnly = true;
this.dataGridViewTextBoxColumn11.Width = 150;
//
// dgvHuiFaFen
//
this.dgvHuiFaFen.AllowUserToAddRows = false;
this.dgvHuiFaFen.BackgroundColor = System.Drawing.Color.White;
this.dgvHuiFaFen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvHuiFaFen.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ID4,
this.dataGridViewTextBoxColumn24,
this.dataGridViewTextBoxColumn25,
this.dataGridViewTextBoxColumn26,
this.dataGridViewTextBoxColumn27,
this.dataGridViewTextBoxColumn28,
this.dataGridViewTextBoxColumn29,
this.dataGridViewTextBoxColumn30,
this.VR,
this.MAD2,
this.VAD,
this.Column13,
this.Column14,
this.dataGridViewTextBoxColumn13});
this.dgvHuiFaFen.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvHuiFaFen.Location = new System.Drawing.Point(0, 0);
this.dgvHuiFaFen.Name = "dgvHuiFaFen";
this.dgvHuiFaFen.ReadOnly = true;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.DimGray;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.Black;
this.dgvHuiFaFen.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvHuiFaFen.RowTemplate.Height = 23;
this.dgvHuiFaFen.Size = new System.Drawing.Size(899, 490);
this.dgvHuiFaFen.TabIndex = 3;
//
// ID4
//
this.ID4.DataPropertyName = "GUID";
this.ID4.HeaderText = "编号";
this.ID4.Name = "ID4";
this.ID4.ReadOnly = true;
this.ID4.Visible = false;
this.ID4.Width = 55;
//
// dataGridViewTextBoxColumn24
//
this.dataGridViewTextBoxColumn24.DataPropertyName = "Sample_Number";
this.dataGridViewTextBoxColumn24.HeaderText = "样品编号";
this.dataGridViewTextBoxColumn24.Name = "dataGridViewTextBoxColumn24";
this.dataGridViewTextBoxColumn24.ReadOnly = true;
//
// dataGridViewTextBoxColumn25
//
this.dataGridViewTextBoxColumn25.DataPropertyName = "Instrument_Number";
this.dataGridViewTextBoxColumn25.HeaderText = "仪器编号";
this.dataGridViewTextBoxColumn25.Name = "dataGridViewTextBoxColumn25";
this.dataGridViewTextBoxColumn25.ReadOnly = true;
//
// dataGridViewTextBoxColumn26
//
this.dataGridViewTextBoxColumn26.DataPropertyName = "Crucible_Number";
this.dataGridViewTextBoxColumn26.HeaderText = "坩埚号";
this.dataGridViewTextBoxColumn26.Name = "dataGridViewTextBoxColumn26";
this.dataGridViewTextBoxColumn26.ReadOnly = true;
//
// dataGridViewTextBoxColumn27
//
this.dataGridViewTextBoxColumn27.DataPropertyName = "Empty_Crucible_Weight";
this.dataGridViewTextBoxColumn27.HeaderText = "空坩埚重(g)";
this.dataGridViewTextBoxColumn27.Name = "dataGridViewTextBoxColumn27";
this.dataGridViewTextBoxColumn27.ReadOnly = true;
//
// dataGridViewTextBoxColumn28
//
this.dataGridViewTextBoxColumn28.DataPropertyName = "Sample_Weight";
this.dataGridViewTextBoxColumn28.HeaderText = "样重(g)";
this.dataGridViewTextBoxColumn28.Name = "dataGridViewTextBoxColumn28";
this.dataGridViewTextBoxColumn28.ReadOnly = true;
this.dataGridViewTextBoxColumn28.Width = 80;
//
// dataGridViewTextBoxColumn29
//
this.dataGridViewTextBoxColumn29.DataPropertyName = "AddSample_Weight";
this.dataGridViewTextBoxColumn29.HeaderText = "加样重(g)";
this.dataGridViewTextBoxColumn29.Name = "dataGridViewTextBoxColumn29";
this.dataGridViewTextBoxColumn29.ReadOnly = true;
this.dataGridViewTextBoxColumn29.Width = 90;
//
// dataGridViewTextBoxColumn30
//
this.dataGridViewTextBoxColumn30.DataPropertyName = "Drying_Weight";
this.dataGridViewTextBoxColumn30.HeaderText = "烧残重(g)";
this.dataGridViewTextBoxColumn30.Name = "dataGridViewTextBoxColumn30";
this.dataGridViewTextBoxColumn30.ReadOnly = true;
this.dataGridViewTextBoxColumn30.Width = 90;
//
// VR
//
this.VR.DataPropertyName = "VR";
this.VR.HeaderText = "Vr(%)";
this.VR.Name = "VR";
this.VR.ReadOnly = true;
//
// MAD2
//
this.MAD2.DataPropertyName = "MAD";
this.MAD2.HeaderText = "Mad(%)";
this.MAD2.Name = "MAD2";
this.MAD2.ReadOnly = true;
//
// VAD
//
this.VAD.DataPropertyName = "VAD";
this.VAD.HeaderText = "Vad(%)";
this.VAD.Name = "VAD";
this.VAD.ReadOnly = true;
//
// Column13
//
this.Column13.DataPropertyName = "Cinder_Characteristics";
this.Column13.HeaderText = "焦渣特征";
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
//
// Column14
//
this.Column14.DataPropertyName = "Auto_Code";
this.Column14.HeaderText = "自动编号";
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
//
// dataGridViewTextBoxColumn13
//
this.dataGridViewTextBoxColumn13.DataPropertyName = "OperaDateTime";
this.dataGridViewTextBoxColumn13.HeaderText = "称量日期";
this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
this.dataGridViewTextBoxColumn13.ReadOnly = true;
this.dataGridViewTextBoxColumn13.Width = 150;
//
// dgvQuanShuiFen
//
this.dgvQuanShuiFen.AllowUserToAddRows = false;
this.dgvQuanShuiFen.BackgroundColor = System.Drawing.Color.White;
this.dgvQuanShuiFen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvQuanShuiFen.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ID,
this.Sample_Number,
this.Instrument_Number,
this.Crucible_Number,
this.Empty_Crucible_Weight,
this.Sample_Weight,
this.AddSample_Weight,
this.Drying_Weight,
this.SecondDrying_Weight,
this.ThirdDrying_Weight,
this.Mt,
this.Auto_Code,
this.Column2});
this.dgvQuanShuiFen.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvQuanShuiFen.Location = new System.Drawing.Point(0, 0);
this.dgvQuanShuiFen.Name = "dgvQuanShuiFen";
this.dgvQuanShuiFen.ReadOnly = true;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.DimGray;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.dgvQuanShuiFen.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvQuanShuiFen.RowTemplate.Height = 23;
this.dgvQuanShuiFen.Size = new System.Drawing.Size(899, 490);
this.dgvQuanShuiFen.TabIndex = 1;
//
// ID
//
this.ID.DataPropertyName = "GUID";
this.ID.HeaderText = "编号";
this.ID.Name = "ID";
this.ID.ReadOnly = true;
this.ID.Visible = false;
this.ID.Width = 55;
//
// Sample_Number
//
this.Sample_Number.DataPropertyName = "Sample_Number";
this.Sample_Number.HeaderText = "样品编号";
this.Sample_Number.Name = "Sample_Number";
this.Sample_Number.ReadOnly = true;
//
// Instrument_Number
//
this.Instrument_Number.DataPropertyName = "Instrument_Number";
this.Instrument_Number.HeaderText = "仪器编号";
this.Instrument_Number.Name = "Instrument_Number";
this.Instrument_Number.ReadOnly = true;
//
// Crucible_Number
//
this.Crucible_Number.DataPropertyName = "Crucible_Number";
this.Crucible_Number.HeaderText = "坩埚号";
this.Crucible_Number.Name = "Crucible_Number";
this.Crucible_Number.ReadOnly = true;
//
// Empty_Crucible_Weight
//
this.Empty_Crucible_Weight.DataPropertyName = "Empty_Crucible_Weight";
this.Empty_Crucible_Weight.HeaderText = "空坩埚重(g)";
this.Empty_Crucible_Weight.Name = "Empty_Crucible_Weight";
this.Empty_Crucible_Weight.ReadOnly = true;
//
// Sample_Weight
//
this.Sample_Weight.DataPropertyName = "Sample_Weight";
this.Sample_Weight.HeaderText = "样重(g)";
this.Sample_Weight.Name = "Sample_Weight";
this.Sample_Weight.ReadOnly = true;
this.Sample_Weight.Width = 80;
//
// AddSample_Weight
//
this.AddSample_Weight.DataPropertyName = "AddSample_Weight";
this.AddSample_Weight.HeaderText = "加样重(g)";
this.AddSample_Weight.Name = "AddSample_Weight";
this.AddSample_Weight.ReadOnly = true;
this.AddSample_Weight.Width = 90;
//
// Drying_Weight
//
this.Drying_Weight.DataPropertyName = "Drying_Weight";
this.Drying_Weight.HeaderText = "烘干重(g)";
this.Drying_Weight.Name = "Drying_Weight";
this.Drying_Weight.ReadOnly = true;
this.Drying_Weight.Width = 90;
//
// SecondDrying_Weight
//
this.SecondDrying_Weight.DataPropertyName = "SecondDrying_Weight";
this.SecondDrying_Weight.HeaderText = "二次烘干重(g)";
this.SecondDrying_Weight.Name = "SecondDrying_Weight";
this.SecondDrying_Weight.ReadOnly = true;
this.SecondDrying_Weight.Width = 120;
//
// ThirdDrying_Weight
//
this.ThirdDrying_Weight.DataPropertyName = "ThirdDrying_Weight";
this.ThirdDrying_Weight.HeaderText = "三次烘干重(g)";
this.ThirdDrying_Weight.Name = "ThirdDrying_Weight";
this.ThirdDrying_Weight.ReadOnly = true;
this.ThirdDrying_Weight.Width = 120;
//
// Mt
//
this.Mt.DataPropertyName = "Mt";
this.Mt.HeaderText = "Mt(%)";
this.Mt.Name = "Mt";
this.Mt.ReadOnly = true;
this.Mt.Width = 50;
//
// Auto_Code
//
this.Auto_Code.DataPropertyName = "Auto_Code";
this.Auto_Code.HeaderText = "自动编号";
this.Auto_Code.Name = "Auto_Code";
this.Auto_Code.ReadOnly = true;
//
// Column2
//
this.Column2.DataPropertyName = "OperaDateTime";
this.Column2.HeaderText = "称量日期";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 150;
//
// pnlCenterTop
//
this.pnlCenterTop.Controls.Add(this.btnFind);
this.pnlCenterTop.Controls.Add(this.txtCode);
this.pnlCenterTop.Controls.Add(this.label3);
this.pnlCenterTop.Controls.Add(this.comType);
this.pnlCenterTop.Controls.Add(this.label2);
this.pnlCenterTop.Controls.Add(this.dtpEndDate);
this.pnlCenterTop.Controls.Add(this.dtpStartTime);
this.pnlCenterTop.Controls.Add(this.label1);
this.pnlCenterTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlCenterTop.Location = new System.Drawing.Point(0, 0);
this.pnlCenterTop.Name = "pnlCenterTop";
this.pnlCenterTop.Size = new System.Drawing.Size(899, 48);
this.pnlCenterTop.TabIndex = 0;
//
// btnFind
//
this.btnFind.Location = new System.Drawing.Point(808, 12);
this.btnFind.Name = "btnFind";
this.btnFind.Size = new System.Drawing.Size(75, 25);
this.btnFind.TabIndex = 10;
this.btnFind.Text = "查询";
this.btnFind.UseVisualStyleBackColor = true;
this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(593, 13);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(173, 23);
this.txtCode.TabIndex = 6;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(530, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 5;
this.label3.Text = "样品编码";
//
// comType
//
this.comType.FormattingEnabled = true;
this.comType.Items.AddRange(new object[] {
"全水分",
"水分",
"灰分",
"挥发分"});
this.comType.Location = new System.Drawing.Point(398, 11);
this.comType.Name = "comType";
this.comType.Size = new System.Drawing.Size(121, 25);
this.comType.TabIndex = 4;
this.comType.SelectedValueChanged += new System.EventHandler(this.comType_SelectedValueChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(359, 15);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 3;
this.label2.Text = "类型";
//
// dtpEndDate
//
this.dtpEndDate.CustomFormat = "yyyy-MM-dd HH:mm";
this.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpEndDate.Location = new System.Drawing.Point(212, 11);
this.dtpEndDate.Name = "dtpEndDate";
this.dtpEndDate.Size = new System.Drawing.Size(139, 23);
this.dtpEndDate.TabIndex = 2;
//
// dtpStartTime
//
this.dtpStartTime.CustomFormat = "yyyy-MM-dd HH:mm";
this.dtpStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpStartTime.Location = new System.Drawing.Point(69, 11);
this.dtpStartTime.Name = "dtpStartTime";
this.dtpStartTime.Size = new System.Drawing.Size(139, 23);
this.dtpStartTime.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 0;
this.label1.Text = "称量日期";
//
// pnlBottom
//
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(10, 548);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(899, 10);
this.pnlBottom.TabIndex = 3;
//
// pnlRight
//
this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.pnlRight.Location = new System.Drawing.Point(909, 10);
this.pnlRight.Name = "pnlRight";
this.pnlRight.Size = new System.Drawing.Size(10, 548);
this.pnlRight.TabIndex = 2;
//
// pnlLeft
//
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 10);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(10, 548);
this.pnlLeft.TabIndex = 1;
//
// pnlTop
//
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTop.Location = new System.Drawing.Point(0, 0);
this.pnlTop.Name = "pnlTop";
this.pnlTop.Size = new System.Drawing.Size(919, 10);
this.pnlTop.TabIndex = 0;
//
// frmHistory
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(919, 558);
this.Controls.Add(this.pnlAll);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "frmHistory";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "查询";
this.Load += new System.EventHandler(this.frmHistory_Load);
this.Shown += new System.EventHandler(this.frmHistory_Shown);
this.pnlAll.ResumeLayout(false);
this.pnlCenter.ResumeLayout(false);
this.pnlCenterBody.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShuiFen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvHuiFen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvHuiFaFen)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvQuanShuiFen)).EndInit();
this.pnlCenterTop.ResumeLayout(false);
this.pnlCenterTop.PerformLayout();
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlAll;
private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.Panel pnlCenterBody;
private System.Windows.Forms.Panel pnlCenterTop;
private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comType;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.DateTimePicker dtpEndDate;
private System.Windows.Forms.DateTimePicker dtpStartTime;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Panel pnlRight;
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.Panel pnlTop;
private System.Windows.Forms.Button btnFind;
private System.Windows.Forms.DataGridView dgvQuanShuiFen;
private System.Windows.Forms.DataGridView dgvHuiFaFen;
private System.Windows.Forms.DataGridView dgvHuiFen;
private System.Windows.Forms.DataGridView dgvShuiFen;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
private System.Windows.Forms.DataGridViewTextBoxColumn Mad;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn ID3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn14;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn15;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn21;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn22;
private System.Windows.Forms.DataGridViewTextBoxColumn DecrementValue2;
private System.Windows.Forms.DataGridViewTextBoxColumn AAD;
private System.Windows.Forms.DataGridViewTextBoxColumn Column17;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
private System.Windows.Forms.DataGridViewTextBoxColumn ID4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn24;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn25;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn26;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn27;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn28;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn29;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn30;
private System.Windows.Forms.DataGridViewTextBoxColumn VR;
private System.Windows.Forms.DataGridViewTextBoxColumn MAD2;
private System.Windows.Forms.DataGridViewTextBoxColumn VAD;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;
private System.Windows.Forms.DataGridViewTextBoxColumn ID;
private System.Windows.Forms.DataGridViewTextBoxColumn Sample_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn Instrument_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn Crucible_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn Empty_Crucible_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn Sample_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn AddSample_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn Drying_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn SecondDrying_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn ThirdDrying_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn Mt;
private System.Windows.Forms.DataGridViewTextBoxColumn Auto_Code;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
}
}

+ 0
- 111
CNAS_BalanceClient/frmHistory.cs Переглянути файл

@@ -1,111 +0,0 @@
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_BalanceClient
{
public partial class frmHistory : Form
{
public frmHistory()
{
InitializeComponent();

dgvQuanShuiFen.AutoGenerateColumns = false;
dgvShuiFen.AutoGenerateColumns = false;
dgvHuiFen.AutoGenerateColumns = false;
dgvHuiFaFen.AutoGenerateColumns = false;
}

private void frmHistory_Load(object sender, EventArgs e)
{
this.comType.SelectedIndex = 0;
}

private void comType_SelectedValueChanged(object sender, EventArgs e)
{
string selectedItem = comType.SelectedItem == null ? "" : comType.SelectedItem.ToString();
switch (selectedItem)
{
case "全水分":
dgvQuanShuiFen.Visible = true;
dgvShuiFen.Visible = false;
dgvHuiFen.Visible = false;
dgvHuiFaFen.Visible = false;
break;
case "水分":
dgvQuanShuiFen.Visible = false;
dgvShuiFen.Visible = true;
dgvHuiFen.Visible = false;
dgvHuiFaFen.Visible = false;
break;
case "灰分":
dgvQuanShuiFen.Visible = false;
dgvShuiFen.Visible = false;
dgvHuiFen.Visible = true;
dgvHuiFaFen.Visible = false;
break;
case "挥发分":
dgvQuanShuiFen.Visible = false;
dgvShuiFen.Visible = false;
dgvHuiFen.Visible = false;
dgvHuiFaFen.Visible = true;
break;
}
}

private void btnFind_Click(object sender, EventArgs e)
{
List<LaboratoryTest> lstFilterData = new List<LaboratoryTest>();
List<LaboratoryTest> laboratoryTests = new LaboratoryTestBLL().GetLaboratoryTestData();

//过滤时间
if (dtpEndDate.Value >= dtpStartTime.Value)
lstFilterData = laboratoryTests.Where(s => s.OperaDateTime != null && s.OperaDateTime > dtpStartTime.Value && s.OperaDateTime < dtpEndDate.Value).ToList<LaboratoryTest>();
//筛选编码
if (this.txtCode.Text.Trim() != "")
lstFilterData = lstFilterData.Where(s => s.Sample_Number == this.txtCode.Text.Trim()).ToList<LaboratoryTest>();
//筛选类型
string selectedIteem = comType.SelectedItem == null ? "" : comType.SelectedItem.ToString();
switch (selectedIteem)
{
case "全水分":
lstFilterData = lstFilterData.Where(s => s.DataType == "ARB").ToList<LaboratoryTest>();

dgvQuanShuiFen.DataSource = new BindingList<LaboratoryTest>();
dgvQuanShuiFen.DataSource = new BindingList<LaboratoryTest>(lstFilterData);
break;
case "水分":
lstFilterData = lstFilterData.Where(s => s.DataType == "Moisture").ToList<LaboratoryTest>();

dgvShuiFen.DataSource = new BindingList<LaboratoryTest>();
dgvShuiFen.DataSource = new BindingList<LaboratoryTest>(lstFilterData);
break;
case "灰分":
lstFilterData = lstFilterData.Where(s => s.DataType == "Ash").ToList<LaboratoryTest>();

dgvHuiFen.DataSource = new BindingList<LaboratoryTest>();
dgvHuiFen.DataSource = new BindingList<LaboratoryTest>(lstFilterData);
break;
case "挥发分":
lstFilterData = lstFilterData.Where(s => s.DataType == "Volatile").ToList<LaboratoryTest>();

dgvHuiFaFen.DataSource = new BindingList<LaboratoryTest>();
dgvHuiFaFen.DataSource = new BindingList<LaboratoryTest>(lstFilterData);
break;
}
}

private void frmHistory_Shown(object sender, EventArgs e)
{
txtCode.Focus();
txtCode.Select(0, 0);
}
}
}

+ 0
- 329
CNAS_BalanceClient/frmHistory.resx Переглянути файл

@@ -1,329 +0,0 @@
<?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="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Mad.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DecrementValue2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AAD.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn26.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn27.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn28.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn30.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="VR.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MAD2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="VAD.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Sample_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Instrument_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Crucible_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Empty_Crucible_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Sample_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AddSample_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Drying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SecondDrying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThirdDrying_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Mt.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Auto_Code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAkAABAnAAAQJwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAsAAAAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA
AAkAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOQAAAKUAAACsAAAAXAAA
AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQAAAH8AAAAIAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAALAAAApQAAAFcAAAA0AAAArQAAAGcAAAABAAAAAAAAAAAA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AFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIgAA
ADQAAAASAAAASwAAALAAAACPAAAAWAAAAEcAAABbAAAAlAAAAKkAAAA5AAAAIQAAALAAAABNAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AAAAxAAAAJAAAABkAAABZAAAAiAAA
AJQAAACEAAAATwAAABMAAAA7AAAAsAAAAGYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAnAAAAqgAAAIwAAABGAAAAJQAAAB4AAAAmAAAASwAAAJIAAACvAAAATAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQAA
AGEAAACYAAAAqQAAAKsAAACpAAAAlgAAAFwAAAAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAEAAAABYAAAAPAAAAAQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8H8AAMAfAABAHwAAAB8AAAAfAAAABwAAAAMAgAABAIAA
AACAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAA8AAAAPAAAADwAAAA+AAAAPgAAAD8AAEA/gADAP8A
BwA=
</value>
</data>
</root>

+ 0
- 183
CNAS_BalanceClient/frmLoginServer.Designer.cs Переглянути файл

@@ -1,183 +0,0 @@
namespace CNAS_BalanceClient
{
partial class frmLoginServer
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmLoginServer));
this.pnlCenter = new System.Windows.Forms.Panel();
this.lblTitle = new System.Windows.Forms.Label();
this.Btn_Logout = new System.Windows.Forms.Button();
this.Btn_Login = new System.Windows.Forms.Button();
this.txtPwd = new System.Windows.Forms.TextBox();
this.lblPwd = new System.Windows.Forms.Label();
this.txtUserName = new System.Windows.Forms.TextBox();
this.lblUser = new System.Windows.Forms.Label();
this.pnlCenter.SuspendLayout();
this.SuspendLayout();
//
// pnlCenter
//
this.pnlCenter.BackColor = System.Drawing.Color.White;
this.pnlCenter.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pnlCenter.BackgroundImage")));
this.pnlCenter.Controls.Add(this.lblTitle);
this.pnlCenter.Controls.Add(this.Btn_Logout);
this.pnlCenter.Controls.Add(this.Btn_Login);
this.pnlCenter.Controls.Add(this.txtPwd);
this.pnlCenter.Controls.Add(this.lblPwd);
this.pnlCenter.Controls.Add(this.txtUserName);
this.pnlCenter.Controls.Add(this.lblUser);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlCenter.Location = new System.Drawing.Point(0, 0);
this.pnlCenter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(491, 249);
this.pnlCenter.TabIndex = 3;
this.pnlCenter.MouseDown += new System.Windows.Forms.MouseEventHandler(this.frmLoginServer_MouseDown);
//
// lblTitle
//
this.lblTitle.AutoSize = true;
this.lblTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.lblTitle.Font = new System.Drawing.Font("华文新魏", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTitle.ForeColor = System.Drawing.Color.White;
this.lblTitle.Location = new System.Drawing.Point(176, 22);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(133, 30);
this.lblTitle.TabIndex = 12;
this.lblTitle.Text = "用户登录";
//
// Btn_Logout
//
this.Btn_Logout.BackColor = System.Drawing.SystemColors.HotTrack;
this.Btn_Logout.FlatAppearance.BorderColor = System.Drawing.Color.DarkGray;
this.Btn_Logout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Btn_Logout.Font = new System.Drawing.Font("微软雅黑", 9.5F);
this.Btn_Logout.ForeColor = System.Drawing.Color.White;
this.Btn_Logout.Location = new System.Drawing.Point(268, 177);
this.Btn_Logout.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Btn_Logout.Name = "Btn_Logout";
this.Btn_Logout.Size = new System.Drawing.Size(90, 30);
this.Btn_Logout.TabIndex = 6;
this.Btn_Logout.Text = "取 消";
this.Btn_Logout.UseVisualStyleBackColor = false;
this.Btn_Logout.Click += new System.EventHandler(this.Btn_Logout_Click);
//
// Btn_Login
//
this.Btn_Login.BackColor = System.Drawing.SystemColors.HotTrack;
this.Btn_Login.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.Btn_Login.FlatAppearance.BorderColor = System.Drawing.Color.DarkGray;
this.Btn_Login.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.Btn_Login.Font = new System.Drawing.Font("微软雅黑", 9.5F);
this.Btn_Login.ForeColor = System.Drawing.Color.White;
this.Btn_Login.Location = new System.Drawing.Point(134, 176);
this.Btn_Login.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Btn_Login.Name = "Btn_Login";
this.Btn_Login.Size = new System.Drawing.Size(90, 30);
this.Btn_Login.TabIndex = 5;
this.Btn_Login.Text = "登 录";
this.Btn_Login.UseVisualStyleBackColor = false;
this.Btn_Login.Click += new System.EventHandler(this.Btn_Login_Click);
//
// txtPwd
//
this.txtPwd.Location = new System.Drawing.Point(181, 122);
this.txtPwd.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtPwd.MaxLength = 10;
this.txtPwd.Name = "txtPwd";
this.txtPwd.PasswordChar = '*';
this.txtPwd.Size = new System.Drawing.Size(186, 23);
this.txtPwd.TabIndex = 2;
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmLoginServer_KeyDown);
//
// lblPwd
//
this.lblPwd.AutoSize = true;
this.lblPwd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPwd.Location = new System.Drawing.Point(122, 126);
this.lblPwd.Name = "lblPwd";
this.lblPwd.Size = new System.Drawing.Size(39, 17);
this.lblPwd.TabIndex = 6;
this.lblPwd.Text = "密 码:";
//
// txtUserName
//
this.txtUserName.Location = new System.Drawing.Point(181, 84);
this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtUserName.MaxLength = 20;
this.txtUserName.Name = "txtUserName";
this.txtUserName.Size = new System.Drawing.Size(186, 23);
this.txtUserName.TabIndex = 1;
this.txtUserName.Text = "admin";
this.txtUserName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmLoginServer_KeyDown);
//
// lblUser
//
this.lblUser.AutoSize = true;
this.lblUser.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblUser.Location = new System.Drawing.Point(117, 88);
this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(47, 17);
this.lblUser.TabIndex = 0;
this.lblUser.Text = "用户名:";
//
// frmLoginServer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(491, 251);
this.Controls.Add(this.pnlCenter);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "frmLoginServer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "登录";
this.Shown += new System.EventHandler(this.frmLoginServer_Shown);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmLoginServer_KeyDown);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.frmLoginServer_MouseDown);
this.pnlCenter.ResumeLayout(false);
this.pnlCenter.PerformLayout();
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.Button Btn_Logout;
private System.Windows.Forms.Button Btn_Login;
private System.Windows.Forms.TextBox txtPwd;
private System.Windows.Forms.Label lblPwd;
private System.Windows.Forms.TextBox txtUserName;
private System.Windows.Forms.Label lblUser;
}
}


+ 0
- 130
CNAS_BalanceClient/frmLoginServer.cs Переглянути файл

@@ -1,130 +0,0 @@
using CnasSynchronousCommon;
using CnasSynchronusClient;
using CnasSynchrousModel;
using log4net;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Xml.Serialization;

namespace CNAS_BalanceClient
{

public partial class frmLoginServer : Form
{
public static string strLoginName = "";
public static string strLoginPwd = "";
public static string strServerIP = "";
public static string strServerPort = "";
//Point mouseOff; //鼠标移动位置
//bool leftFlag; //标签是否为左键
public frmLoginServer()
{
InitializeComponent();

lblTitle.BackColor = Color.Transparent;
lblUser.BackColor = Color.Transparent;
lblPwd.BackColor = Color.Transparent;
}

private void Btn_Login_Click(object sender, EventArgs e)
{
Config();
}
private void Config()
{
//合法行判断
if (this.txtUserName.Text.Trim() == "" || this.txtPwd.Text.Trim() == "")
{
MessageBox.Show("用户名,密码不能为空。", "提示");
return;
}

//1.读取本地数据库配置信息
DataBaseInfo targetdataBase = new DataBaseInfo(); //cnas目标数据库
try
{
//加载CNAS数据库信息
targetdataBase = FileOperation.GetLocalPlatFormDB();

if (!CnasDataOperationFact.CnasDataOperation().TestConnect(targetdataBase))
{
MessageBox.Show("无法连接数据,请联系管理员。", "提示");
return;
}
}
catch (Exception ex)
{
AppLog.Error(ex.Message.ToString());
}
//2.传输输入信息到数据库中,查阅,并返回所需信息
DataTable dtLogin = CnasDataOperationFact.CnasDataOperation().GetLoginNameByPwd(targetdataBase, this.txtUserName.Text.Trim(), this.txtPwd.Text.Trim());
if (dtLogin != null && dtLogin.Rows.Count == 1)
{
GlobalCommonOperation.strLoginName = dtLogin.Rows[0]["username"].ToString();
GlobalCommonOperation.strUserName = this.txtUserName.Text.Trim();
AppLog.Info($"{this.txtUserName.Text.Trim()}登录成功");
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageBox.Show("用户名,密码登录失败,请重新输入。", "提示");
AppLog.Error($"{this.txtUserName.Text.Trim()}尝试登录失败");
return;
}
}
private void Btn_Logout_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.None;
this.Close();
}

[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
private void frmLoginServer_MouseDown(object sender, MouseEventArgs e)
{
try
{
ReleaseCapture();
SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
}
catch(Exception ex)
{
AppLog.Error(ex.Message.ToString());
}
}

private void frmLoginServer_KeyDown(object sender, KeyEventArgs e)
{
try
{
if (!Btn_Login.Focused && !Btn_Logout.Focused)
{
FormKeyEventClass fke = new FormKeyEventClass();
fke.FormKeyEvent += new FormKeyEventClass.FormKey(Config);
fke.FormKeyEventRun(e);
}
}
catch(Exception ex)
{
AppLog.Error(ex.Message.ToString());
}
}

private void frmLoginServer_Shown(object sender, EventArgs e)
{
txtUserName.Select(txtUserName.Text.Length, 0);
}
}
}

+ 0
- 407
CNAS_BalanceClient/frmLoginServer.resx Переглянути файл

@@ -1,407 +0,0 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pnlCenter.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwg
JC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAFVAfQDAREAAhEBAxEB/8QA
GwAAAwEBAQEBAAAAAAAAAAAAAQIDAAQFBgf/xAA8EAACAQMCBAMFBQcEAgMAAAAAAQIDERIEIQUxQVET
YXEiMkJSkQYUgaGxIzNDU3KC0RVikuFUwUTw8f/EABoBAQEBAQEBAQAAAAAAAAAAAAEAAgMEBQb/xAAq
EQEBAQEAAgICAgEDBQEBAAAAARECAxIhMUFRBBMyIkJhFFJxgZGhBf/aAAwDAQACEQMRAD8A69PhFr2U
forr85/Xx+nPxThlOS+80qas/eSXIzO79GePj9PIVGHyI17Vr+rj9GVGHyIva/tf1cfpSNCHyIPa/sf1
cfpSNCn8kQ9r+1/T4/0rGhT+SP0D2v7H9Pj/AEoqFPpCP0L2v7H9Pj/7S1NJT96NOPmrDO7+2L4fH+ix
oQ+RfQfasXw8fpRUYfKvoXtWf6uP0bw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RUSRlECKiSMkRFIkdIirGrKMbXDDoiyxBiTCAJMSYQxBiQkmAMSEi1iQkhA
tyIiBEmmIiSYixJgQCGJASBsgBJiTEmJMSAQDIMxZoMmaVizSsQVjAmxBGiJGiRWiJWgRbEQsBxrEmsi
I2JDigIpEhsSPFtAVLKxNDYENiQ2IikSMkSNYCJIxJ//2Q==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGBgAAAEAIACICQAAFgAAACgAAAAYAAAAMAAAAAEAIAAAAAAAAAkAABAnAAAQJwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAsAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAA
ABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAALAAAAAAAAAAAAAAAAAAAABQAAAJEAAADSAAAA0AAA
AM4AAADPAAAAzwAAAM8AAADPAAAAzwAAAM8AAADPAAAAzwAAAM8AAADPAAAAzwAAAM8AAADOAAAA0AAA
ANIAAACRAAAABQAAAAAAAAAAAAAAAgAAAEEAAABuAAAA4gAAALIAAABhAAAAYwAAAGMAAABjAAAAYwAA
AGMAAABjAAAAYwAAAGMAAABjAAAAYwAAAGEAAACyAAAA4gAAAG4AAABBAAAAAgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAlgAAALQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAC0AAAAlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARwAAAOYAAAB7AAAAXAAA
AF4AAABdAAAAWwAAAF0AAABdAAAAWwAAAF0AAABeAAAAXAAAAHsAAADmAAAARwAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAIAAAADSAAAA1AAAANMAAADiAAAA9wAAANgAAADYAAAA9wAA
AO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AAAAAAAAAAAAABAAAAWAAA
AMIAAADCAAAAWAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAANAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAADAMAAAwDgAAcA4AAHAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAEA4AAHAP8A
/wA=
</value>
</data>
</root>

BIN
CNAS_BalanceClient/scales_of_Balance_16px_1117673_easyicon.net.ico Переглянути файл

Перед Після

+ 0
- 109
CNAS_DBSync.sln Переглянути файл

@@ -1,109 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasSynchronusDAL", "CnasSynchronusDAL\CnasSynchronusDAL.csproj", "{F4EC1B78-EFF4-4D04-AE79-631D220187AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasSynchrousModel", "CnasSynchrousModel\CnasSynchrousModel.csproj", "{0C3243F5-729E-409C-B406-C6DE56E632E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasSynchronusIDAL", "CnasSynchronusIDAL\CnasSynchronusIDAL.csproj", "{284FBC6D-D437-4616-AC96-582974FF390F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasSynchronousCommon", "CnasSynchronousCommon\CnasSynchronousCommon.csproj", "{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasLocalIDAL", "CnasLocalIDAL\CnasLocalIDAL.csproj", "{49F0F118-144F-4DC5-A980-E845572295EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyncLocalDAL", "SyncLocalDAL\SyncLocalDAL.csproj", "{E1052176-831E-4070-9356-CA0F8108DBDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CnasSynchronusBLL", "CnasSynchronusClient\CnasSynchronusBLL.csproj", "{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNASBalanceDBManage", "CNASBalanceDBManage\CNASBalanceDBManage.csproj", "{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_SyncService", "CNAS_SyncService\CNAS_SyncService.csproj", "{6FA284AB-8D0D-422C-ABA2-6AAC31B12017}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_RunSync", "CNAS_RunSync\CNAS_RunSync.csproj", "{2F1E5C7F-BEE0-4C40-B928-917AD9A4CF46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_DBSync", "CNAS_DBSync\CNAS_DBSync.csproj", "{0F16F166-6646-4502-B22D-5FE5BFE92326}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_BalanceClient", "CNAS_BalanceClient\CNAS_BalanceClient.csproj", "{00BEA43E-D03E-4BF7-9474-F36BD7811F74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WF-ChangeGUID", "WF-ChangeGUID\WF-ChangeGUID.csproj", "{E20B8662-89F1-42D9-8DC5-0E30E1AADCD6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_SerialPort", "CNAS_SerialPort\CNAS_SerialPort.csproj", "{ABB56058-B6FD-4747-A4E9-9C9361D6D993}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CNAS_Authorize", "CNAS_Authorize\CNAS_Authorize.csproj", "{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F4EC1B78-EFF4-4D04-AE79-631D220187AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4EC1B78-EFF4-4D04-AE79-631D220187AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4EC1B78-EFF4-4D04-AE79-631D220187AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4EC1B78-EFF4-4D04-AE79-631D220187AF}.Release|Any CPU.Build.0 = Release|Any CPU
{0C3243F5-729E-409C-B406-C6DE56E632E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C3243F5-729E-409C-B406-C6DE56E632E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C3243F5-729E-409C-B406-C6DE56E632E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C3243F5-729E-409C-B406-C6DE56E632E0}.Release|Any CPU.Build.0 = Release|Any CPU
{284FBC6D-D437-4616-AC96-582974FF390F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{284FBC6D-D437-4616-AC96-582974FF390F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{284FBC6D-D437-4616-AC96-582974FF390F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{284FBC6D-D437-4616-AC96-582974FF390F}.Release|Any CPU.Build.0 = Release|Any CPU
{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E0E5F2E-2BA2-4952-9F31-34C072CD86B3}.Release|Any CPU.Build.0 = Release|Any CPU
{49F0F118-144F-4DC5-A980-E845572295EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49F0F118-144F-4DC5-A980-E845572295EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49F0F118-144F-4DC5-A980-E845572295EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49F0F118-144F-4DC5-A980-E845572295EA}.Release|Any CPU.Build.0 = Release|Any CPU
{E1052176-831E-4070-9356-CA0F8108DBDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1052176-831E-4070-9356-CA0F8108DBDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1052176-831E-4070-9356-CA0F8108DBDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1052176-831E-4070-9356-CA0F8108DBDF}.Release|Any CPU.Build.0 = Release|Any CPU
{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB9B6D92-3CC4-46C6-92E8-A6FD0AD48041}.Release|Any CPU.Build.0 = Release|Any CPU
{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4D6A680-8B6B-4ECB-96D0-264954DABFC1}.Release|Any CPU.Build.0 = Release|Any CPU
{6FA284AB-8D0D-422C-ABA2-6AAC31B12017}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FA284AB-8D0D-422C-ABA2-6AAC31B12017}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FA284AB-8D0D-422C-ABA2-6AAC31B12017}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FA284AB-8D0D-422C-ABA2-6AAC31B12017}.Release|Any CPU.Build.0 = Release|Any CPU
{2F1E5C7F-BEE0-4C40-B928-917AD9A4CF46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F1E5C7F-BEE0-4C40-B928-917AD9A4CF46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F1E5C7F-BEE0-4C40-B928-917AD9A4CF46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F1E5C7F-BEE0-4C40-B928-917AD9A4CF46}.Release|Any CPU.Build.0 = Release|Any CPU
{0F16F166-6646-4502-B22D-5FE5BFE92326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F16F166-6646-4502-B22D-5FE5BFE92326}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F16F166-6646-4502-B22D-5FE5BFE92326}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F16F166-6646-4502-B22D-5FE5BFE92326}.Release|Any CPU.Build.0 = Release|Any CPU
{00BEA43E-D03E-4BF7-9474-F36BD7811F74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00BEA43E-D03E-4BF7-9474-F36BD7811F74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00BEA43E-D03E-4BF7-9474-F36BD7811F74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00BEA43E-D03E-4BF7-9474-F36BD7811F74}.Release|Any CPU.Build.0 = Release|Any CPU
{E20B8662-89F1-42D9-8DC5-0E30E1AADCD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E20B8662-89F1-42D9-8DC5-0E30E1AADCD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E20B8662-89F1-42D9-8DC5-0E30E1AADCD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E20B8662-89F1-42D9-8DC5-0E30E1AADCD6}.Release|Any CPU.Build.0 = Release|Any CPU
{ABB56058-B6FD-4747-A4E9-9C9361D6D993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ABB56058-B6FD-4747-A4E9-9C9361D6D993}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ABB56058-B6FD-4747-A4E9-9C9361D6D993}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ABB56058-B6FD-4747-A4E9-9C9361D6D993}.Release|Any CPU.Build.0 = Release|Any CPU
{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B4A6989-A7A6-41C0-ADFE-D470EB972D79}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CD002DA4-66BE-485C-A3D3-E1725BF3C0E9}
EndGlobalSection
EndGlobal

+ 0
- 115
CNAS_DBSync/ActivationForm.Designer.cs Переглянути файл

@@ -1,115 +0,0 @@
namespace CNAS_DBSync
{
partial class ActivationForm
{
private System.ComponentModel.IContainer components = null;

protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

private void InitializeComponent()
{
this.lblTitle = new System.Windows.Forms.Label();
this.lblDescription = new System.Windows.Forms.Label();
this.lblActivationCode = new System.Windows.Forms.Label();
this.txtActivationCode = new System.Windows.Forms.TextBox();
this.btnActivate = new System.Windows.Forms.Button();
this.lnkDownloadCode = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// lblTitle
//
this.lblTitle.Location = new System.Drawing.Point(0, 0);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(100, 23);
this.lblTitle.TabIndex = 0;
//
// lblDescription
//
this.lblDescription.Font = new System.Drawing.Font("微软雅黑", 10F);
this.lblDescription.ForeColor = System.Drawing.Color.Red;
this.lblDescription.Location = new System.Drawing.Point(20, 60);
this.lblDescription.Name = "lblDescription";
this.lblDescription.Size = new System.Drawing.Size(560, 40);
this.lblDescription.TabIndex = 1;
this.lblDescription.Text = "请点击上方按钮下载机器识别码,然后将机器识别码发给平台管理员申请授权文件后进行激活,激活后才可正常使用取数仪器客户端。";
//
// lblActivationCode
//
this.lblActivationCode.AutoSize = true;
this.lblActivationCode.Location = new System.Drawing.Point(20, 120);
this.lblActivationCode.Name = "lblActivationCode";
this.lblActivationCode.Size = new System.Drawing.Size(69, 20);
this.lblActivationCode.TabIndex = 2;
this.lblActivationCode.Text = "激活码:";
//
// txtActivationCode
//
this.txtActivationCode.Location = new System.Drawing.Point(20, 140);
this.txtActivationCode.Multiline = true;
this.txtActivationCode.Name = "txtActivationCode";
this.txtActivationCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtActivationCode.Size = new System.Drawing.Size(840, 225);
this.txtActivationCode.TabIndex = 0;
//
// btnActivate
//
this.btnActivate.Location = new System.Drawing.Point(370, 460);
this.btnActivate.Name = "btnActivate";
this.btnActivate.Size = new System.Drawing.Size(100, 30);
this.btnActivate.TabIndex = 3;
this.btnActivate.Text = "输入激活";
this.btnActivate.Click += new System.EventHandler(this.btnActivate_Click);
//
// lnkDownloadCode
//
this.lnkDownloadCode.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(204)))));
this.lnkDownloadCode.AutoSize = true;
this.lnkDownloadCode.Font = new System.Drawing.Font("微软雅黑", 10F);
this.lnkDownloadCode.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
this.lnkDownloadCode.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(102)))), ((int)(((byte)(204)))));
this.lnkDownloadCode.Location = new System.Drawing.Point(20, 23);
this.lnkDownloadCode.Name = "lnkDownloadCode";
this.lnkDownloadCode.Size = new System.Drawing.Size(129, 23);
this.lnkDownloadCode.TabIndex = 4;
this.lnkDownloadCode.TabStop = true;
this.lnkDownloadCode.Text = "下载机器识别码";
this.lnkDownloadCode.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkDownloadCode_LinkClicked);
//
// ActivationForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(909, 563);
this.Controls.Add(this.lblTitle);
this.Controls.Add(this.lblDescription);
this.Controls.Add(this.lblActivationCode);
this.Controls.Add(this.txtActivationCode);
this.Controls.Add(this.btnActivate);
this.Controls.Add(this.lnkDownloadCode);
this.Font = new System.Drawing.Font("微软雅黑", 9F);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ActivationForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "下载机器识别码";
this.ResumeLayout(false);
this.PerformLayout();

}

private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.Label lblDescription;
private System.Windows.Forms.Label lblActivationCode;
private System.Windows.Forms.TextBox txtActivationCode;
private System.Windows.Forms.Button btnActivate;
private System.Windows.Forms.LinkLabel lnkDownloadCode;
}
}

+ 0
- 210
CNAS_DBSync/ActivationForm.cs Переглянути файл

@@ -1,210 +0,0 @@
using System;
using System.Text;
using System.Windows.Forms;
using System.Management;
using System.Net.NetworkInformation;
using System.Collections.Generic;
using System.IO;
using System.Configuration;

namespace CNAS_DBSync
{
public partial class ActivationForm : Form
{
private const string ACTIVATION_FILE = "activation.config";
public bool IsActivated { get; private set; }

public ActivationForm()
{
InitializeComponent();
IsActivated = false;
}

// 检查是否已激活
public bool CheckActivation()
{
try
{
string activationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ACTIVATION_FILE);
if (File.Exists(activationPath))
{
string machineCode = GetMachineCode();
string savedMachineCode = File.ReadAllText(activationPath);
return machineCode == savedMachineCode;
}
}
catch
{
// 如果读取失败,返回未激活状态
}
return false;
}

private void SaveActivation()
{
try
{
string activationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ACTIVATION_FILE);
File.WriteAllText(activationPath, GetMachineCode());
}
catch (Exception ex)
{
MessageBox.Show($"保存激活状态失败:{ex.Message}", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}

private void btnActivate_Click(object sender, EventArgs e)
{
string activationCode = txtActivationCode.Text.Trim();
if (string.IsNullOrEmpty(activationCode))
{
MessageBox.Show("请输入激活码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}

try
{
if (ValidateActivationCode(activationCode))
{
IsActivated = true;
SaveActivation(); // 保存激活状态
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
MessageBox.Show("激活码无效!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{
MessageBox.Show($"激活失败:{ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void lnkDownloadCode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
string machineCode = GetMachineCode();
// 创建保存文件对话框
var saveFileDialog = new SaveFileDialog
{
FileName = $"机器码_{DateTime.Now:yyyyMMdd}",
DefaultExt = ".txt",
Filter = "文本文件|*.txt"
};

if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
File.WriteAllText(saveFileDialog.FileName, machineCode);
MessageBox.Show("机器码已成功保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show($"获取机器码失败:{ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private string GetMachineCode()
{
StringBuilder machineCode = new StringBuilder();

// 获取CPU ID
string cpuId = GetCPUId();
machineCode.Append(cpuId);

// 获取所有MAC地址
List<string> macAddresses = GetMACAddresses();
foreach (string mac in macAddresses)
{
machineCode.Append("_").Append(mac);
}

return machineCode.ToString();
}

private string GetCPUId()
{
try
{
using (ManagementClass mc = new ManagementClass("Win32_Processor"))
{
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
return mo.Properties["ProcessorId"].Value.ToString();
}
}
}
catch (Exception ex)
{
throw new Exception("获取CPU ID失败: " + ex.Message);
}
return string.Empty;
}

private List<string> GetMACAddresses()
{
List<string> macAddresses = new List<string>();
try
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in nics)
{
// 只获取物理网卡的MAC地址
if (adapter.NetworkInterfaceType == NetworkInterfaceType.Ethernet ||
adapter.NetworkInterfaceType == NetworkInterfaceType.Wireless80211)
{
string mac = adapter.GetPhysicalAddress().ToString();
if (!string.IsNullOrEmpty(mac))
{
macAddresses.Add(mac);
}
}
}
}
catch (Exception ex)
{
throw new Exception("获取MAC地址失败: " + ex.Message);
}
return macAddresses;
}

private bool ValidateActivationCode(string activationCode)
{
// 使用实际的机器码来验证
string machineCode = GetMachineCode();
return GenerateActivationCode(machineCode) == activationCode;
}

private string GenerateActivationCode(string machineCode)
{
// 这里实现激活码生成算法
// 示例:简单的加密算法,实际应用中应该使用更安全的加密方式
using (var md5 = System.Security.Cryptography.MD5.Create())
{
// 加入时间戳使得生成的激活码具有时效性
string input = machineCode + DateTime.Now.ToString("yyyyMMdd");
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);

// 转换为16进制字符串
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("X2"));
// 每4个字符添加一个分隔符,提高可读性
if ((i + 1) % 4 == 0 && i != hashBytes.Length - 1)
{
sb.Append("-");
}
}
return sb.ToString();
}
}
}
}

+ 0
- 120
CNAS_DBSync/ActivationForm.resx Переглянути файл

@@ -1,120 +0,0 @@
<?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>

+ 0
- 87
CNAS_DBSync/App.config Переглянути файл

@@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CNAS_DBSync.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="CoreDb" connectionString="Driver={IBM DB2 ODBC DRIVER};DataBase=SAMPLE; HostName=127.0.0.1; Protocol=TCPIP;Port=50000;Uid=db2admin;Pwd=123" />
<add name="CNAS_DBSync.Properties.Settings.ConnectionString"
connectionString="Data Source=C:\DEV\CNAS\CNASClient\CNAS_DBSync\dll\database.db"
providerName="Devart.Data.SQLite" />
</connectionStrings>
<appSettings>
<add key="TargetDBType" value="Mysql"/>
<add key="InitalOperationPwd" value="123456"/>
<add key="GetMacMethod" value="1"/>
<add key="StartGeneralVersion" value="1"/>
<add key="StartWebApiUrl" value="1"/>
<add key="WebApiUrl" value="http://localhost:60101/api"/>
</appSettings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6"/>
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
<remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
</system.data>
<log4net>
<logger name="Log">
<level value="INFO"/>
<appender-ref ref="RollingLog"/>
</logger>
<logger name="Err">
<level value="ERROR"/>
<appender-ref ref="RollingErr"/>
</logger>
<appender name="RollingLog" type="log4net.Appender.RollingFileAppender">
<file value="Log\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 操作信息:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO"/>
<param name="LevelMax" value="INFO"/>
</filter>
</appender>
<appender name="RollingErr" type="log4net.Appender.RollingFileAppender">
<file value="ErrorLog\"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyyMMdd'.txt'"/>
<staticLogFileName value="false"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="记录时间:%d 线程ID:[%thread]- 错误描述:%m%n"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR"/>
<param name="LevelMax" value="ERROR"/>
</filter>
</appender>
</log4net>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup><applicationSettings>
<CNAS_DBSync.Properties.Settings>
<setting name="SyncParamSize" serializeAs="String">
<value />
</setting>
</CNAS_DBSync.Properties.Settings>
</applicationSettings>
</configuration>

+ 0
- 261
CNAS_DBSync/CNAS_DBSync.csproj Переглянути файл

@@ -1,261 +0,0 @@
<?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>{0F16F166-6646-4502-B22D-5FE5BFE92326}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CNAS_DBSync</RootNamespace>
<AssemblyName>CNAS_DBSync</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\dll\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>drum_set_16px_1218345_easyicon.net.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.ServiceProcess" />
<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.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActivationForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ActivationForm.Designer.cs">
<DependentUpon>ActivationForm.cs</DependentUpon>
</Compile>
<Compile Include="FormSizeHelper.cs" />
<Compile Include="SourceSettingTextBoxDecrible.cs" />
<Compile Include="frmAddSubtract.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmAddSubtract.Designer.cs">
<DependentUpon>frmAddSubtract.cs</DependentUpon>
</Compile>
<Compile Include="frmCNASValue.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmCNASValue.Designer.cs">
<DependentUpon>frmCNASValue.cs</DependentUpon>
</Compile>
<Compile Include="frmConditionParam.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmConditionParam.Designer.cs">
<DependentUpon>frmConditionParam.cs</DependentUpon>
</Compile>
<Compile Include="frmDatabaseParams.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmDatabaseParams.Designer.cs">
<DependentUpon>frmDatabaseParams.cs</DependentUpon>
</Compile>
<Compile Include="frmIfThenParams.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmIfThenParams.Designer.cs">
<DependentUpon>frmIfThenParams.cs</DependentUpon>
</Compile>
<Compile Include="frmInstrumentCode.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmInstrumentCode.Designer.cs">
<DependentUpon>frmInstrumentCode.cs</DependentUpon>
</Compile>
<Compile Include="frmOperationPwd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmOperationPwd.Designer.cs">
<DependentUpon>frmOperationPwd.cs</DependentUpon>
</Compile>
<Compile Include="frmSelectInstruItem.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSelectInstruItem.Designer.cs">
<DependentUpon>frmSelectInstruItem.cs</DependentUpon>
</Compile>
<Compile Include="frmServiceConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmServiceConfig.Designer.cs">
<DependentUpon>frmServiceConfig.cs</DependentUpon>
</Compile>
<Compile Include="frmSourceFilter.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSourceFilter.Designer.cs">
<DependentUpon>frmSourceFilter.cs</DependentUpon>
</Compile>
<Compile Include="frmSourceSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSourceSetting.Designer.cs">
<DependentUpon>frmSourceSetting.cs</DependentUpon>
</Compile>
<Compile Include="frmSplitParam.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSplitParam.Designer.cs">
<DependentUpon>frmSplitParam.cs</DependentUpon>
</Compile>
<Compile Include="frmStartEndSubstring.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmStartEndSubstring.Designer.cs">
<DependentUpon>frmStartEndSubstring.cs</DependentUpon>
</Compile>
<Compile Include="frmSyncParams.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSyncParams.Designer.cs">
<DependentUpon>frmSyncParams.cs</DependentUpon>
</Compile>
<Compile Include="frmSystemSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSystemSetting.Designer.cs">
<DependentUpon>frmSystemSetting.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="ActivationForm.resx">
<DependentUpon>ActivationForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAddSubtract.resx">
<DependentUpon>frmAddSubtract.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmCNASValue.resx">
<DependentUpon>frmCNASValue.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmConditionParam.resx">
<DependentUpon>frmConditionParam.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmDatabaseParams.resx">
<DependentUpon>frmDatabaseParams.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmIfThenParams.resx">
<DependentUpon>frmIfThenParams.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmInstrumentCode.resx">
<DependentUpon>frmInstrumentCode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmOperationPwd.resx">
<DependentUpon>frmOperationPwd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSelectInstruItem.resx">
<DependentUpon>frmSelectInstruItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmServiceConfig.resx">
<DependentUpon>frmServiceConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSourceFilter.resx">
<DependentUpon>frmSourceFilter.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSourceSetting.resx">
<DependentUpon>frmSourceSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSplitParam.resx">
<DependentUpon>frmSplitParam.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmStartEndSubstring.resx">
<DependentUpon>frmStartEndSubstring.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSyncParams.resx">
<DependentUpon>frmSyncParams.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSystemSetting.resx">
<DependentUpon>frmSystemSetting.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="App.config" />
<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>
<ProjectReference Include="..\CnasSynchronousCommon\CnasSynchronousCommon.csproj">
<Project>{8e0e5f2e-2ba2-4952-9f31-34c072cd86b3}</Project>
<Name>CnasSynchronousCommon</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchronusClient\CnasSynchronusBLL.csproj">
<Project>{cb9b6d92-3cc4-46c6-92e8-a6fd0ad48041}</Project>
<Name>CnasSynchronusClient</Name>
</ProjectReference>
<ProjectReference Include="..\CnasSynchrousModel\CnasSynchrousModel.csproj">
<Project>{0c3243f5-729e-409c-b406-c6de56e632e0}</Project>
<Name>CnasSynchrousModel</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="drum_set_16px_1218345_easyicon.net.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.111.0\build\net40\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.111.0\build\net40\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.111.0\build\net40\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.111.0\build\net40\System.Data.SQLite.Core.targets'))" />
</Target>
</Project>

+ 0
- 264
CNAS_DBSync/FormSizeHelper.cs Переглянути файл

@@ -1,264 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Windows.Forms;
using System.Configuration;
using System.Collections;
using System.Drawing;
using System.IO;

using CnasSynchronousCommon;
using System.Xml;

namespace CNAS_DBSync
{

struct FieldLine
{
Label label;
Control editor;
Button button;
int size;

public FieldLine(Label label, Control editor, Button button = null)
{
this.label = label;
this.editor = editor;
this.button = button;
int count = 0;
if (label != null) count++;
if (editor != null) count++;
if (button != null) count++;
size = count;
}

public Label Label
{
get
{
return label;
}
}
public Control Editor
{
get
{
return editor;
}
}

public Button Button
{
get
{
return button;
}
}

}

/// <summary>
/// 设置容器内编辑字段位置的公共算法
/// </summary>
class FormSizeHelper
{
private static readonly string strLocalConfigPath = FileHelper.getBasePath() + @"\Data\";
private static readonly string FormSizeXml = "FormSize.xml";
private static readonly FormSizeHelper instance;
private Hashtable formSizes;

// 静态构造函数确保线程安全且延迟加载。
static FormSizeHelper() {
instance = new FormSizeHelper();
}

// 防止外部实例化。
private FormSizeHelper() {
Init();
}
public static FormSizeHelper Instance => instance; // 提供全局访问点。

public static void Arrange(Panel container, FieldLine[] fields, int span1 = 1, int span2 = 1)
{
int colLabel = 0;
int colEditor = 0;
int colButton = 0;
int lbLeft = -1;
for (int i = 0; i < fields.Length; i++)
{
if (lbLeft == -1)
{
if (fields[i].Label != null)
lbLeft = fields[i].Label.Left;
}
else if (fields[i].Label != null && fields[i].Label.Left >= 0 && fields[i].Label.Left < lbLeft)
{
lbLeft = fields[i].Label.Left;
}
}

int width = lbLeft < 0 ? (container.Width * 80 / 100) : (container.Width-lbLeft*2);
int marginLeft = (container.Width - width) / 2;
for (int i=0;i< fields.Length; i++)
{
if(fields[i].Label != null && fields[i].Label.Width > colLabel)
{
colLabel = fields[i].Label.Width;
}
if (fields[i].Button != null && fields[i].Button.Width > colButton)
{
colButton = fields[i].Button.Width;
}
}

colEditor = width - (colLabel + span1 + span2 + colButton);

for (int i = 0; i < fields.Length; i++)
{
//Label不动

//改变Editor
if (fields[i].Editor != null)
{
if(fields[i].Editor is TextBox)
{
TextBox tb = (TextBox)fields[i].Editor;
//tb.Left = marginLeft + colLabel + span1;
tb.Width = colEditor;
if(fields[i].Button != null)
{
fields[i].Button.Left = tb.Left + colEditor + span2;
}
}


if(fields[i].Editor is CheckBox)
{
//不动
}

if(fields[i].Editor is ComboBox)
{
ComboBox tb = (ComboBox)fields[i].Editor;
//tb.Left = marginLeft + colLabel + span1;
tb.Width = colEditor;
if (fields[i].Button != null)
{
fields[i].Button.Left = tb.Left + colEditor + span2;
}
}

}

}


}

private static bool ValidBound(Form form, int x, int y, int w, int h)
{
if (x>=0 && y >= 0 && w>0 && h > 0)
{
Screen screen = Screen.FromControl(form);
Rectangle r = screen.Bounds;
return (x + w < r.Width && y + h < r.Height);
}
return false;
}

private void Init()
{
formSizes = new Hashtable(10);
string strUrl = strLocalConfigPath + FormSizeXml;
try
{
if (!File.Exists(strUrl)) return;

XmlDocument doc = new XmlDocument();
doc.Load(strUrl);
XmlNode root = doc.DocumentElement;
foreach (XmlNode node in root.ChildNodes)
{
string formname = node.Name;
string value = node.InnerText;
formSizes.Add(formname, value);
}
}
catch (Exception ex)
{
AppLog.Error(ex.Message);
}
}

public List<string> LoadDefaultSize(Form form, string key, out bool changed)
{
changed = false;
if (formSizes.ContainsKey(key))
{
string value = formSizes[key] as string;
string[] values = value.Split(',');
if (values.Length >= 4)
{
int x, y, w, h;
if (int.TryParse(values[0], out x) && int.TryParse(values[1], out y) &&
int.TryParse(values[2], out w) && int.TryParse(values[3], out h))
{
if (ValidBound(form, x, y, w, h))
{
form.Left = x;
form.Top = y;
form.Width = w;
form.Height = h;
changed = true;
}
}

if (changed && values.Length > 4)
{
List<string> list = new List<string>(values.Length - 4);
for (int i = 4; i < values.Length; i++)
{
list.Add(values[i]);
}
return list;
}
}
}
return null;
}

public bool SaveDefaultSize(string key, string value)
{
if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
{
formSizes[key] = value;
StringBuilder sb = new StringBuilder();
sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Forms>\n");
foreach(object k in formSizes.Keys)
{
string line = string.Format("<{0}>{1}</{0}>", k, formSizes[k]);
sb.Append(line).Append("\n");
}
sb.Append("</Forms>");
try
{
bool bIfSuccess = FileHelper.SaveLocalFile(strLocalConfigPath, FormSizeXml, sb.ToString());
return bIfSuccess;
}
catch (Exception ex)
{
AppLog.Error(ex.Message);
}
}
return true;
}

}
}

+ 0
- 94
CNAS_DBSync/Program.cs Переглянути файл

@@ -1,94 +0,0 @@
using CnasSynchronousCommon;
using CnasSynchronusClient;
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Windows.Forms;

namespace CNAS_DBSync
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string strMsg = "";
/*CheckAvailability(ref strMsg);*/
if (strMsg == "")
{
// 检查是否已激活
if (! (new ActivationForm()).CheckActivation())
{
// 未激活,显示激活窗口
using (var activationForm = new ActivationForm())
{
if (activationForm.ShowDialog() == DialogResult.OK)
{
// 激活成功,显示主窗口
if (new frmOperationPwd().ShowDialog() == DialogResult.OK)
Application.Run(new frmSyncParams());
}
}
}
else
{
// 已激活,直接显示主窗口
if (new frmOperationPwd().ShowDialog() == DialogResult.OK)
Application.Run(new frmSyncParams());
}
}
else
MessageBox.Show(strMsg);
}

///检查当前电脑是否可以启动程序
public static void CheckAvailability(ref string strErrorMsg)
{
//0.读取本地系统配置文件
SystemFormatConfig systemFormat = FileOperation.GetSystemFormatConfigData();
GlobalCommonOperation.strStartGeneralVersion = systemFormat.StartGeneralVersion;
GlobalCommonOperation.strStartWebApi = systemFormat.StartWebApi;
GlobalCommonOperation.strWebApiUrl = systemFormat.WebApiUrl;
GlobalCommonOperation.strTargetDbType = systemFormat.TargetDBType;
if (GlobalCommonOperation.strStartGeneralVersion == "1") //此时启动的时通用版本,不需检查Mac地址
{
return;
}

//1.读取本地CNAS数据库配置信息
DataBaseInfo Cnasdb = null;
if (GlobalCommonOperation.strStartWebApi != "1")
Cnasdb = FileOperation.GetLocalCnasDB();
else
Cnasdb = new DataBaseInfo()
{
DataBaseCode = "cnas"
};
if (!CnasDataOperationFact.CnasDataOperation().TestConnect(Cnasdb))
{
strErrorMsg = "无法正常连接CNAS库,请先配置数据库连接。";
return;
}
//2.获取本机MAC地址
string strLocalMac = ComputeMessage.getLocalMac(ref strErrorMsg);
if (strErrorMsg != "")
{
return;
}
//3 验证是否存在于CNAS数据库相应表中
bool bIfChecked = CnasDataOperationFact.CnasDataOperation().CheckMacMessage(Cnasdb, strLocalMac);
if (!bIfChecked)
{
strErrorMsg = $"当前电脑[{strLocalMac}]没有使用权限,请联系管理员。";
return;
}
}
}
}

+ 0
- 37
CNAS_DBSync/Properties/AssemblyInfo.cs Переглянути файл

@@ -1,37 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CNAS_DBSync")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CNAS_DBSync")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("0f16f166-6646-4502-b22d-5fe5bfe92326")]

// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", ConfigFileExtension = "config", Watch = true)]

+ 0
- 63
CNAS_DBSync/Properties/Resources.Designer.cs Переглянути файл

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_DBSync.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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("CNAS_DBSync.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;
}
}
}
}

+ 0
- 117
CNAS_DBSync/Properties/Resources.resx Переглянути файл

@@ -1,117 +0,0 @@
<?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>

+ 0
- 45
CNAS_DBSync/Properties/Settings.Designer.cs Переглянути файл

@@ -1,45 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace CNAS_DBSync.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.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;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=C:\\DEV\\CNAS\\CNASClient\\CNAS_DBSync\\dll\\database.db")]
public string ConnectionString {
get {
return ((string)(this["ConnectionString"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SyncParamSize {
get {
return ((string)(this["SyncParamSize"]));
}
}
}
}

+ 0
- 17
CNAS_DBSync/Properties/Settings.settings Переглянути файл

@@ -1,17 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CNAS_DBSync.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="ConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=C:\DEV\CNAS\CNASClient\CNAS_DBSync\dll\database.db&lt;/ConnectionString&gt;
&lt;ProviderName&gt;Devart.Data.SQLite&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=C:\DEV\CNAS\CNASClient\CNAS_DBSync\dll\database.db</Value>
</Setting>
<Setting Name="SyncParamSize" Type="System.String" Scope="Application">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

+ 0
- 63
CNAS_DBSync/SourceSettingTextBoxDecrible.cs Переглянути файл

@@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CNAS_DBSync
{
/// <summary>
/// 来源设置界面中提示语言类
/// </summary>
public class SourceSettingTextBoxDecrible
{
/*Excel配置界面中参数*/
public static string txtExcelSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtExcelFileNameFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtExcelAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtExcelAutoSql_Decrible = "请输入自定义查询的sql语句";

/*Access配置界面中参数*/
public static string txtAccessSuffix_Decrible = "请输入文件后缀名";
public static string txtAccessSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtAccessFileName_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtAccessAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtAccessAutoSql_Decrible = "请输入自定义查询的sql语句";

/*FoxPro配置界面中参数*/
public static string txtFoxProSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtFoxProFileNameFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtFoxProAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtFoxProAutoSql_Decrible = "请输入自定义查询的sql语句";
public static string txtFoxProSpecialMethodName_Decrible = "请输入特殊方法的名称(比如comcat)";
public static string txtFoxProSpecialMethod_Decrible = "请输入特殊方法的参数列,用英文逗号隔开";

/*Sqlite配置界面中参数*/
public static string txtSqliteSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtSqliteFileNameFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtSqliteAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtSqliteAutoSql_Decrible = "请输入自定义查询的sql语句";

/*Sqlserver配置界面中参数*/
public static string txtSqlServerSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtSqlServerConnection_Decrible = "请输入连接字符串";
public static string txtSqlServerAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtSqlServerAutoSql_Decrible = "请输入自定义查询的sql语句";

/*MySql配置界面中参数*/
public static string txtMySqlSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtMySqlAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtMySqlAutoSql_Decrible = "请输入自定义查询的sql语句";

/*Oracle配置界面中参数*/
public static string txtOracleSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtOracleAutoSqlName_Decrible = "请定义一个自定义查询的名称或描述";
public static string txtOracleAutoSql_Decrible = "请输入自定义查询的sql语句";

/*TXT配置界面中参数*/
public static string txtNormalFileSpecialDateColumnFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtNormalFileNameFormat_Decrible = "请输入类似于yyyyMMdd样式内容";
public static string txtNormalFileReadDataMode_Decrible = "请输入读取规则选型";
public static string txtNormalFileSuffix_Decrible = "请输入文件后缀名";
public static string txtNormalFileReadSplitMode_Decrible = "请输入文件分割每个数据行的依据。0代表“ ”,1代表“\t”,2代表0和1的集合";
}
}

BIN
CNAS_DBSync/dll/CNAS_DBSync.exe Переглянути файл


+ 0
- 58
CNAS_DBSync/dll/CNAS_DBSync.exe.config Переглянути файл

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<connectionStrings>
<add name="CoreDb" connectionString="Driver={IBM DB2 ODBC DRIVER};DataBase=SAMPLE; HostName=127.0.0.1; Protocol=TCPIP;Port=50000;Uid=db2admin;Pwd=123" />
</connectionStrings>
<appSettings>
<add key="CoreDb" value="Provider=IBMDADB2;Data Source=SAMPLE;UID=db2admin;PWD=123;" />
</appSettings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
<log4net>
<!-- OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL -->
<!-- Set root logger level to ERROR and its appenders -->
<root>
<level value="ALL" />
<appender-ref ref="SysAppender" />
</root>
<!-- Print only messages of level DEBUG or above in the packages -->
<logger name="WindowsFormLogger">
<level value="DEBUG" />
</logger>
<appender name="SysAppender" type="log4net.Appender.RollingFileAppender,log4net">
<param name="File" value="Log/" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="&quot;Logs_&quot;yyyyMMdd&quot;.txt&quot;" />
<param name="StaticLogFileName" value="false" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="consoleApp" type="log4net.Appender.ConsoleAppender,log4net">
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
</appender>
</log4net>
</configuration>

+ 0
- 195
CNAS_DBSync/dll/Data/SyncInStrumentData.xml Переглянути файл

@@ -1,195 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSyncInstrumentItemInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SyncInstrumentItemInfo>
<GUID>a2065a7f-62fb-4f5d-8a94-c321b896cf53</GUID>
<Code>LDD-1</Code>
<SyncInstrumentDSInfo>
<InstrumentDataSourceType>Excel</InstrumentDataSourceType>
<LocalPath>C:\Users\Li\Desktop\水分仪模拟数据.xls</LocalPath>
</SyncInstrumentDSInfo>
<SyncTargetDBInfo>
<DBHost>127.0.0.1</DBHost>
<DBName>SAMPLE</DBName>
<DBUser>DB2ADMIN</DBUser>
<DBPwd>123</DBPwd>
</SyncTargetDBInfo>
<LstSyncPramas>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SerialNumber</SourceField>
<TargetTable>ASHEXAMINERECORD</TargetTable>
<TargetField>PLANTCODE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleID</SourceField>
<TargetTable>ASHEXAMINERECORD</TargetTable>
<TargetField>COAL_CODE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleName</SourceField>
<TargetTable>ASHEXAMINERECORD</TargetTable>
<TargetField>TEST_DATE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Content</SourceField>
<TargetTable>ASHEXAMINERECORD</TargetTable>
<TargetField>STANDARD_NAME</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Method</SourceField>
<TargetTable>ASHEXAMINERECORD</TargetTable>
<TargetField>STANDARD_ID</TargetField>
</SyncParamasInfo>
</LstSyncPramas>
</SyncInstrumentItemInfo>
<SyncInstrumentItemInfo>
<GUID>f521c2d4-ab6b-450c-a2dd-ef7d4e6d9fd4</GUID>
<Code>SDD-2</Code>
<SyncInstrumentDSInfo>
<InstrumentDataSourceType>Excel</InstrumentDataSourceType>
<LocalPath>C:\Users\Li\Desktop\水分仪模拟数据.xls</LocalPath>
</SyncInstrumentDSInfo>
<SyncTargetDBInfo>
<DBHost>127.0.0.1</DBHost>
<DBName>SAMPLE</DBName>
<DBUser>DB2ADMIN</DBUser>
<DBPwd>123</DBPwd>
</SyncTargetDBInfo>
<LstSyncPramas>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SerialNumber</SourceField>
<TargetTable>ASHEXAMINERECORD_SUB</TargetTable>
<TargetField>VESSEL_CODE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleID</SourceField>
<TargetTable>ASHEXAMINERECORD_SUB</TargetTable>
<TargetField>VESSEL_MASS</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleName</SourceField>
<TargetTable>ASHEXAMINERECORD_SUB</TargetTable>
<TargetField>SAMPLING_MASS</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Content</SourceField>
<TargetTable>ASHEXAMINERECORD_SUB</TargetTable>
<TargetField>MASS_AFTER_FIRING</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Method</SourceField>
<TargetTable>ASHEXAMINERECORD_SUB</TargetTable>
<TargetField>FIRST_FIRING_MASS</TargetField>
</SyncParamasInfo>
</LstSyncPramas>
</SyncInstrumentItemInfo>
<SyncInstrumentItemInfo>
<GUID>bc6bc9f0-4b2d-42d6-92dd-85a2afb2b8b8</GUID>
<Code>SDF-1</Code>
<SyncInstrumentDSInfo>
<InstrumentDataSourceType>Excel</InstrumentDataSourceType>
<LocalPath>C:\Users\Li\Desktop\水分仪模拟数据.xls</LocalPath>
</SyncInstrumentDSInfo>
<SyncTargetDBInfo>
<DBHost>127.0.0.1</DBHost>
<DBName>SAMPLE</DBName>
<DBUser>DB2ADMIN</DBUser>
<DBPwd>123</DBPwd>
</SyncTargetDBInfo>
<LstSyncPramas>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SerialNumber</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_DECIMAL</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleID</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_CHAR</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>SampleName</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_VARCHAR</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Content</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_GRAPHIC</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Method</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_VARGRAPHIC</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Tare</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_DATE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Sample</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_TIMESTAMP</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Leftover</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_TIME</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Calibration</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_DOUBLE</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>Moisture</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_BLOB</TargetField>
</SyncParamasInfo>
<SyncParamasInfo>
<SourceTable>TestResult</SourceTable>
<SourceField>TypeFlag</SourceField>
<TargetTable>DB2TEST</TargetTable>
<TargetField>T_CLOB</TargetField>
</SyncParamasInfo>
</LstSyncPramas>
</SyncInstrumentItemInfo>
<SyncInstrumentItemInfo>
<GUID>20aa5cdf-ded4-4972-91ba-124300a34f63</GUID>
<Code>1</Code>
<SyncInstrumentDSInfo>
<InstrumentDataSourceType>None</InstrumentDataSourceType>
</SyncInstrumentDSInfo>
<SyncTargetDBInfo>
<DBHost />
<DBName />
<DBUser />
<DBPwd />
</SyncTargetDBInfo>
<LstSyncPramas />
</SyncInstrumentItemInfo>
<SyncInstrumentItemInfo>
<GUID>a98d236d-c067-4fa4-ac63-6b188989cd01</GUID>
<Code>2</Code>
</SyncInstrumentItemInfo>
</ArrayOfSyncInstrumentItemInfo>

BIN
CNAS_DBSync/dll/Document/AshMeltingPoint.xls Переглянути файл


BIN
CNAS_DBSync/dll/Document/IndustrialAnalyzer.xls Переглянути файл


BIN
CNAS_DBSync/dll/Document/InfraredSulfurMeter.xls Переглянути файл


BIN
CNAS_DBSync/dll/Document/MoistureMeter.xls Переглянути файл


BIN
CNAS_DBSync/dll/Document/SulphurMeter.xls Переглянути файл


BIN
CNAS_DBSync/dll/System.Data.SQLite.EF6.dll Переглянути файл


BIN
CNAS_DBSync/dll/System.Data.SQLite.Linq.dll Переглянути файл


BIN
CNAS_DBSync/dll/System.Data.SQLite.dll Переглянути файл


+ 0
- 22
CNAS_DBSync/dll/System.Data.SQLite.dll.config Переглянути файл

@@ -1,22 +0,0 @@
<?xml version="1.0"?>
<!--
*
* System.Data.SQLite.dll.config -
*
* WARNING: This XML configuration file is intended for use within the NuGet
* package directories only. Please do not copy this file to any of
* the build output directories because it could interfere with the
* native library pre-loading feature.
*
* Written by Joe Mistachkin.
* Released to the public domain, use at your own risk!
*
-->
<configuration>
<appSettings>
<add key="PreLoadSQLite_BaseDirectory"
value="%PreLoadSQLite_AssemblyDirectory%\..\..\build\%PreLoadSQLite_TargetFramework%" />
</appSettings>

<dllmap dll="SQLite.Interop" target="SQLite.Interop.dll" />
</configuration>

+ 0
- 21120
CNAS_DBSync/dll/System.Data.SQLite.xml
Різницю між файлами не показано, бо вона завелика
Переглянути файл


BIN
CNAS_DBSync/dll/log4net.dll Переглянути файл


+ 0
- 32464
CNAS_DBSync/dll/log4net.xml
Різницю між файлами не показано, бо вона завелика
Переглянути файл


BIN
CNAS_DBSync/drum_set_16px_1218345_easyicon.net.ico Переглянути файл

Перед Після

+ 0
- 192
CNAS_DBSync/frmAddSubtract.Designer.cs Переглянути файл

@@ -1,192 +0,0 @@
namespace CNAS_DBSync
{
partial class frmAddSubtract
{
/// <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.pnlAll = new System.Windows.Forms.Panel();
this.btnOK = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cbxParams2 = new System.Windows.Forms.ComboBox();
this.btnSelect3 = new System.Windows.Forms.Button();
this.btnSelect1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.txtPrama3 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtPrama1 = new System.Windows.Forms.TextBox();
this.pnlAll.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// pnlAll
//
this.pnlAll.Controls.Add(this.btnOK);
this.pnlAll.Controls.Add(this.groupBox1);
this.pnlAll.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlAll.Location = new System.Drawing.Point(0, 0);
this.pnlAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlAll.Name = "pnlAll";
this.pnlAll.Size = new System.Drawing.Size(401, 162);
this.pnlAll.TabIndex = 1;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(306, 127);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 1;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.SystemColors.Control;
this.groupBox1.Controls.Add(this.cbxParams2);
this.groupBox1.Controls.Add(this.btnSelect3);
this.groupBox1.Controls.Add(this.btnSelect1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtPrama3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.txtPrama1);
this.groupBox1.Location = new System.Drawing.Point(12, 11);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(381, 110);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "参数";
//
// cbxParams2
//
this.cbxParams2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxParams2.FormattingEnabled = true;
this.cbxParams2.Items.AddRange(new object[] {
"数值相加",
"数值相减"});
this.cbxParams2.Location = new System.Drawing.Point(90, 50);
this.cbxParams2.Name = "cbxParams2";
this.cbxParams2.Size = new System.Drawing.Size(188, 20);
this.cbxParams2.TabIndex = 9;
//
// btnSelect3
//
this.btnSelect3.Location = new System.Drawing.Point(284, 79);
this.btnSelect3.Name = "btnSelect3";
this.btnSelect3.Size = new System.Drawing.Size(66, 23);
this.btnSelect3.TabIndex = 8;
this.btnSelect3.Text = "选择";
this.btnSelect3.UseVisualStyleBackColor = true;
this.btnSelect3.Click += new System.EventHandler(this.btnSelect3_Click);
//
// btnSelect1
//
this.btnSelect1.Location = new System.Drawing.Point(284, 21);
this.btnSelect1.Name = "btnSelect1";
this.btnSelect1.Size = new System.Drawing.Size(66, 23);
this.btnSelect1.TabIndex = 6;
this.btnSelect1.Text = "选择";
this.btnSelect1.UseVisualStyleBackColor = true;
this.btnSelect1.Click += new System.EventHandler(this.btnSelect1_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(33, 83);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(47, 12);
this.label3.TabIndex = 5;
this.label3.Text = "参数3:";
//
// txtPrama3
//
this.txtPrama3.Location = new System.Drawing.Point(90, 79);
this.txtPrama3.Name = "txtPrama3";
this.txtPrama3.Size = new System.Drawing.Size(188, 21);
this.txtPrama3.TabIndex = 4;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(33, 53);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(47, 12);
this.label2.TabIndex = 3;
this.label2.Text = "参数2:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(33, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(47, 12);
this.label1.TabIndex = 1;
this.label1.Text = "参数1:";
//
// txtPrama1
//
this.txtPrama1.Location = new System.Drawing.Point(90, 21);
this.txtPrama1.Name = "txtPrama1";
this.txtPrama1.Size = new System.Drawing.Size(188, 21);
this.txtPrama1.TabIndex = 0;
//
// frmAddSubtract
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(401, 162);
this.Controls.Add(this.pnlAll);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmAddSubtract";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "添加参数(加/减)";
this.Load += new System.EventHandler(this.frmAddSubtract_Load);
this.pnlAll.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlAll;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox cbxParams2;
private System.Windows.Forms.Button btnSelect3;
private System.Windows.Forms.Button btnSelect1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPrama3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtPrama1;
}
}

+ 0
- 89
CNAS_DBSync/frmAddSubtract.cs Переглянути файл

@@ -1,89 +0,0 @@
using CnasSynchrousModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CNAS_DBSync
{
public partial class frmAddSubtract : Form
{
public SyncInstrumentItemInfo syncInstrument { get; set; }

public CnasConditionMapValue conditionvalue { get; set; }

public frmAddSubtract(SyncInstrumentItemInfo syncInstrument, CnasConditionMapValue conditionvalue)
{
InitializeComponent();

this.syncInstrument = syncInstrument;
this.conditionvalue = conditionvalue;
}

private void frmAddSubtract_Load(object sender, EventArgs e)
{
if (conditionvalue == null) return;

string strValue = "";
if (conditionvalue.Value != null)
strValue = conditionvalue.Value.ToString();

if (strValue != "")
{
string[] strValues = strValue.Split(new string[] { "{", "}" }, StringSplitOptions.RemoveEmptyEntries);
if (strValues.Length == 3)
{
txtPrama1.Text = "{" + strValues[0] +"}";
cbxParams2.Text = strValues[1] == "Add" ?"数值相加": "数值相减";
txtPrama3.Text = "{" + strValues[2]+ "}";
}
else
{
conditionvalue.Condition = new MapCondition();
conditionvalue.Value = "";
}
}
}


private void btnSelect1_Click(object sender, EventArgs e)
{
frmSelectInstruItem frm = new frmSelectInstruItem(syncInstrument);
if (frm.ShowDialog() == DialogResult.OK)
{
if (frm.strSelectedColumn != "")
txtPrama1.Text = "{[" + frm.strSelectedColumn + "]}";
}
}

private void btnSelect3_Click(object sender, EventArgs e)
{
frmSelectInstruItem frm = new frmSelectInstruItem(syncInstrument);
if (frm.ShowDialog() == DialogResult.OK)
{
if (frm.strSelectedColumn != "")
txtPrama3.Text = "{[" + frm.strSelectedColumn + "]}";
}
}

private void btnOK_Click(object sender, EventArgs e)
{
if (this.txtPrama1.Text.Trim() == "" && this.cbxParams2.Text.Trim() == "" && this.txtPrama3.Text.Trim() == "")
return;
conditionvalue.Value = this.txtPrama1.Text;
if (this.cbxParams2.Text != "")
conditionvalue.Value += this.cbxParams2.Text=="数值相加"?"{Add}":"{Subtract}";
if (this.txtPrama3.Text != "")
conditionvalue.Value += this.txtPrama3.Text;

this.DialogResult = DialogResult.OK;
this.Close();
}

}
}

+ 0
- 120
CNAS_DBSync/frmAddSubtract.resx Переглянути файл

@@ -1,120 +0,0 @@
<?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>

+ 0
- 256
CNAS_DBSync/frmCNASValue.Designer.cs Переглянути файл

@@ -1,256 +0,0 @@
namespace CNAS_DBSync
{
partial class frmCNASValue
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCNASValue));
this.pnlLeft = new System.Windows.Forms.Panel();
this.pnlTop = new System.Windows.Forms.Panel();
this.pnlBottom = new System.Windows.Forms.Panel();
this.pnlRight = new System.Windows.Forms.Panel();
this.pnlCenter = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dgvCnas = new System.Windows.Forms.DataGridView();
this.pnlCenterBottom = new System.Windows.Forms.Panel();
this.btnDelete = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.TableName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.TableColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.condition = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Value = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlCenter.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).BeginInit();
this.pnlCenterBottom.SuspendLayout();
this.SuspendLayout();
//
// pnlLeft
//
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 0);
this.pnlLeft.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(10, 403);
this.pnlLeft.TabIndex = 0;
//
// pnlTop
//
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTop.Location = new System.Drawing.Point(10, 0);
this.pnlTop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlTop.Name = "pnlTop";
this.pnlTop.Size = new System.Drawing.Size(512, 10);
this.pnlTop.TabIndex = 1;
//
// pnlBottom
//
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(10, 393);
this.pnlBottom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(512, 10);
this.pnlBottom.TabIndex = 1;
//
// pnlRight
//
this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.pnlRight.Location = new System.Drawing.Point(512, 10);
this.pnlRight.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlRight.Name = "pnlRight";
this.pnlRight.Size = new System.Drawing.Size(10, 383);
this.pnlRight.TabIndex = 1;
//
// pnlCenter
//
this.pnlCenter.Controls.Add(this.groupBox1);
this.pnlCenter.Controls.Add(this.pnlCenterBottom);
this.pnlCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlCenter.Location = new System.Drawing.Point(10, 10);
this.pnlCenter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlCenter.Name = "pnlCenter";
this.pnlCenter.Size = new System.Drawing.Size(502, 383);
this.pnlCenter.TabIndex = 2;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.dgvCnas);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.groupBox1.Size = new System.Drawing.Size(502, 344);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "CNAS列";
//
// dgvCnas
//
this.dgvCnas.AllowUserToAddRows = false;
this.dgvCnas.BackgroundColor = System.Drawing.Color.White;
this.dgvCnas.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCnas.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.TableName,
this.TableColumn,
this.DataType,
this.condition,
this.Value});
this.dgvCnas.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCnas.Location = new System.Drawing.Point(3, 20);
this.dgvCnas.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.dgvCnas.Name = "dgvCnas";
this.dgvCnas.RowTemplate.Height = 23;
this.dgvCnas.Size = new System.Drawing.Size(496, 320);
this.dgvCnas.TabIndex = 0;
this.dgvCnas.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellClick);
this.dgvCnas.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellDoubleClick);
this.dgvCnas.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellEndEdit);
this.dgvCnas.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCnas_CellValueChanged);
this.dgvCnas.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvCnas_RowPostPaint);
//
// pnlCenterBottom
//
this.pnlCenterBottom.Controls.Add(this.btnDelete);
this.pnlCenterBottom.Controls.Add(this.btnOK);
this.pnlCenterBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlCenterBottom.Location = new System.Drawing.Point(0, 344);
this.pnlCenterBottom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.pnlCenterBottom.Name = "pnlCenterBottom";
this.pnlCenterBottom.Size = new System.Drawing.Size(502, 39);
this.pnlCenterBottom.TabIndex = 0;
//
// btnDelete
//
this.btnDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnDelete.Location = new System.Drawing.Point(332, 8);
this.btnDelete.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(71, 25);
this.btnDelete.TabIndex = 1;
this.btnDelete.Text = "全部清除";
this.btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnOK.Location = new System.Drawing.Point(409, 4);
this.btnOK.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(90, 30);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// TableName
//
this.TableName.DataPropertyName = "CnasTableName";
this.TableName.HeaderText = "表名";
this.TableName.Name = "TableName";
this.TableName.Visible = false;
this.TableName.Width = 120;
//
// TableColumn
//
this.TableColumn.DataPropertyName = "CnasFieldName";
this.TableColumn.HeaderText = "列名";
this.TableColumn.Name = "TableColumn";
this.TableColumn.ReadOnly = true;
this.TableColumn.Width = 150;
//
// DataType
//
this.DataType.DataPropertyName = "CnasDataType";
this.DataType.HeaderText = "类型";
this.DataType.Name = "DataType";
this.DataType.ReadOnly = true;
this.DataType.Visible = false;
this.DataType.Width = 120;
//
// condition
//
this.condition.HeaderText = "条件";
this.condition.Name = "condition";
this.condition.ReadOnly = true;
this.condition.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// Value
//
this.Value.HeaderText = "值";
this.Value.Name = "Value";
this.Value.Width = 150;
//
// frmCNASValue
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(522, 403);
this.Controls.Add(this.pnlCenter);
this.Controls.Add(this.pnlRight);
this.Controls.Add(this.pnlBottom);
this.Controls.Add(this.pnlTop);
this.Controls.Add(this.pnlLeft);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.Name = "frmCNASValue";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "CNAS条件映射";
this.Load += new System.EventHandler(this.frmCNASValue_Load);
this.pnlCenter.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCnas)).EndInit();
this.pnlCenterBottom.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.Panel pnlTop;
private System.Windows.Forms.Panel pnlBottom;
private System.Windows.Forms.Panel pnlRight;
private System.Windows.Forms.Panel pnlCenter;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGridView dgvCnas;
private System.Windows.Forms.Panel pnlCenterBottom;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.DataGridViewTextBoxColumn TableName;
private System.Windows.Forms.DataGridViewTextBoxColumn TableColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn DataType;
private System.Windows.Forms.DataGridViewTextBoxColumn condition;
private System.Windows.Forms.DataGridViewTextBoxColumn Value;
}
}

+ 0
- 546
CNAS_DBSync/frmCNASValue.cs Переглянути файл

@@ -1,546 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CnasSynchronusClient;
using CnasSynchrousModel;

namespace CNAS_DBSync
{
public partial class frmCNASValue : Form
{
public SyncInstrumentItemInfo syncInstrument;
private ComboBox cbxConditionValue;
private List<string> lstConditionValueType = new List<string>() { "等于", "连接", "若...则...", "截取", "除以", "乘以", "小数位数","数值相加(减)","截断开头(结尾)" };

public frmCNASValue(SyncInstrumentItemInfo syncInstrument)
{
InitializeComponent();

this.syncInstrument = syncInstrument;
}

private void frmCNASValue_Load(object sender, EventArgs e)
{
if (syncInstrument == null || syncInstrument.LstSyncPramas == null|| syncInstrument.LstSyncPramas.Count==0)
{
MessageBox.Show("请先指定至少一个映射字段。");
return;
}
//初始化ComBobox
InnitalComboBox();

//加载数据
LoadShowData();
}

private void InnitalComboBox()
{
cbxConditionValue = new ComboBox();
cbxConditionValue.SelectedIndexChanged += new EventHandler(cbxConditionValue_SelectedIndexChanged);
cbxConditionValue.SelectionChangeCommitted += new EventHandler(cbxConditionValue_SelectionChangedCommitted);

cbxConditionValue.Visible = false;

cbxConditionValue.DataSource = lstConditionValueType;
}

private void cbxConditionValue_SelectionChangedCommitted(object sender, EventArgs e)
{
cbxConditionValue.Visible = false;
}

private void cbxConditionValue_SelectedIndexChanged(object sender, EventArgs e)
{
//当前选中单元格的值将随之发生更改
if (dgvCnas.CurrentCell == null) return;
dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells["condition"].Value = cbxConditionValue.Text;
}

private void LoadShowData()
{
//1.根据映射表中的表名,获取该表所有字段,全部显示
string strTableName = syncInstrument.LstSyncPramas[0].TargetTable;
DataTable dtTableStruct = CnasDataOperationFact.CnasDataOperation().GetCNASTablesStruct(strTableName, syncInstrument.SyncTargetDBInfo);
if (dtTableStruct != null)
{
DataTable dtCnasShow = new DataTable();
dtCnasShow.Columns.Add("CnasTableName");
dtCnasShow.Columns.Add("CnasFieldName");
dtCnasShow.Columns.Add("CnasDataType");
foreach (DataColumn dc in dtTableStruct.Columns)
{
if (dc.ColumnName.ToUpper() == "ID") continue;
dtCnasShow.Rows.Add(new object[] { strTableName,dc.ColumnName, dc.DataType });
}

dgvCnas.DataSource = dtCnasShow;
}
//2.根据已存储数据,匹配后填充到datagridview中
if (syncInstrument.lstFixedValue == null)
syncInstrument.lstFixedValue = new List<CnasConditionMapValue>();
if (syncInstrument.lstFixedValue.Count == 0) return;
foreach (DataGridViewRow dgvRow in dgvCnas.Rows)
{
string strCurrentTable = dgvRow.Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvRow.Cells["TableColumn"].Value.ToString();

if (strCurrentTable == "" || strCurrentColumn == "") continue;
var query=syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count == 1)
{
dgvRow.Cells["Value"].Value = query[0].Value;
dgvRow.Cells["Condition"].Value = GiveShowByCondition(query[0]);
}
}
}

private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}

private void dgvCnas_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 1) //此时是“值”列
{
//如果没有指定条件,无法存储结果
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;

//当前列名
string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
string strCurrentCondition= dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString();

if (dgvCnas.CurrentCell.Value == null)
{
syncInstrument.lstFixedValue.RemoveAll(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn);
return;
}
string strInputValue = dgvCnas.CurrentCell.Value.ToString();

//检查合法性
if (strCurrentColumn == "ID")
{
MessageBox.Show("该列不能指定固定值。");
return;
}
bool bIfSuccess = true;
switch (strCurrentType)
{
case "System.Decimal":
decimal defaultdecimal = 0;
if (!decimal.TryParse(strInputValue, out defaultdecimal))
bIfSuccess = false;
break;
case "System.Int":
int defaultint = 0;
if (!int.TryParse(strInputValue, out defaultint))
bIfSuccess = false;
break;
case "System.String":
default:
break;
}
if (!bIfSuccess)
{
MessageBox.Show("输入格式不正确,请重新输入。");
return;
}

if (GetBytesOfString(strInputValue) > 20)
{
MessageBox.Show("输入内容超出限制,请重新输入。");
dgvCnas.CurrentCell.Value = "";
return;
}

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
GiveConditionByShow(query[0],strCurrentCondition);
//query[0].Condition = strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen: MapCondition.Equal);
query[0].Value = strInputValue;
}
else
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
cnasFixed.TableName = strCurrentTable;
cnasFixed.ColumnName = strCurrentColumn;
cnasFixed.Value = strInputValue;
//cnasFixed.Condition= strCurrentCondition == "Sub" ? MapCondition.Sub : (strCurrentCondition == "IFThen" ? MapCondition.IFThen : MapCondition.Equal);
GiveConditionByShow(cnasFixed, strCurrentCondition);

syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}

public int GetBytesOfString(string Text)
{
int nByte = 0;
byte[] bytes = Encoding.Unicode.GetBytes(Text);
for (int i = 0; i < bytes.GetLength(0); i++)
{
// 偶数位置,如0、2、4等,为UCS2编码中两个字节的第一个字节
if (i % 2 == 0)
{
nByte++; // 在UCS2第一个字节时n加1
}
else
{
// 当UCS2编码的第二个字节大于0时,该UCS2字符为汉字,一个汉字算两个字节
if (bytes[i] > 0)
{
nByte++;
}
}
}

return nByte;
}

public void GiveConditionByShow(CnasConditionMapValue cnasFixed,string strCurrentCondition)
{
switch (strCurrentCondition)
{
case "连接":
cnasFixed.Condition = MapCondition.Sub;
break;
case "若...则...":
cnasFixed.Condition = MapCondition.IFThen;
break;
case "截取":
cnasFixed.Condition = MapCondition.SubString;
break;
case "除以":
cnasFixed.Condition = MapCondition.Divided;
break;
case "乘以":
cnasFixed.Condition = MapCondition.Multiplied;
break;
case "小数位数":
cnasFixed.Condition = MapCondition.DecimalDigits;
break;
case "等于":
cnasFixed.Condition = MapCondition.Equal;
break;
case "数值相加(减)":
cnasFixed.Condition = MapCondition.AddSubtract;
break;
case "截断开头(结尾)":
cnasFixed.Condition = MapCondition.SubstringStartEnd;
break;
default:
break;
}
}
public string GiveShowByCondition(CnasConditionMapValue cnasFixed)
{
string strCurrentCondition = "";
switch (cnasFixed.Condition)
{
case MapCondition.Equal:
strCurrentCondition = "等于";
break;
case MapCondition.Sub:
strCurrentCondition = "连接";
break;
case MapCondition.IFThen:
strCurrentCondition = "若...则...";
break;
case MapCondition.Divided:
strCurrentCondition = "除以";
break;
case MapCondition.Multiplied:
strCurrentCondition = "乘以";
break;
case MapCondition.SubString:
strCurrentCondition = "截取";
break;
case MapCondition.DecimalDigits:
strCurrentCondition = "小数位数";
break;
case MapCondition.AddSubtract:
strCurrentCondition = "数值相加(减)";
break;
case MapCondition.SubstringStartEnd:
strCurrentCondition = "截断开头(结尾)";
break;
}
return strCurrentCondition;
}

private void dgvCnas_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
dgvCnas.RowHeadersWidth - 4,
e.RowBounds.Height);

TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
dgvCnas.RowHeadersDefaultCellStyle.Font,
rectangle,
dgvCnas.RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}

private void dgvCnas_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 0) //如果此时是“条件”列
{
ShowConditionValue();
}
if (e.ColumnIndex == 1)//如果此时是“值”列
{
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "连接")
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue
{
TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
Condition = MapCondition.Sub
};
if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value!=null)
cnasFixed.Value= dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

frmConditionParam frmCondition = new frmConditionParam(syncInstrument, cnasFixed);
if (frmCondition.ShowDialog() == DialogResult.OK)
{
if (frmCondition.conditionvalue.Value != null&& frmCondition.conditionvalue.Value.ToString()!="")
{
dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmCondition.conditionvalue.Value;

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
query[0].Condition = cnasFixed.Condition;
query[0].Value = frmCondition.conditionvalue.Value;
}
else
{
cnasFixed.Value = frmCondition.conditionvalue.Value;
syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}
}
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "若...则...")
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue
{
TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
Condition = MapCondition.IFThen
};
if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

frmIfThenParams frmIfThen = new frmIfThenParams(syncInstrument, cnasFixed);
if (frmIfThen.ShowDialog() == DialogResult.OK)
{
if (frmIfThen.conditionvalue.Value != null && frmIfThen.conditionvalue.Value.ToString() != "")
{
dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmIfThen.conditionvalue.Value;

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
query[0].Condition = cnasFixed.Condition;
query[0].Value = frmIfThen.conditionvalue.Value;
}
else
{
cnasFixed.Value = frmIfThen.conditionvalue.Value;
syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}
}
if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截取")
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue
{
TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
Condition = MapCondition.SubString
};
if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

frmSplitParam frmSplitParam = new frmSplitParam(cnasFixed);
if (frmSplitParam.ShowDialog() == DialogResult.OK)
{
if (frmSplitParam.conditionvalue.Value != null && frmSplitParam.conditionvalue.Value.ToString() != "")
{
dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmSplitParam.conditionvalue.Value;

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
query[0].Condition = cnasFixed.Condition;
query[0].Value = frmSplitParam.conditionvalue.Value;
}
else
{
cnasFixed.Value = frmSplitParam.conditionvalue.Value;
syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}
}

if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "截断开头(结尾)")
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue
{
TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
Condition = MapCondition.SubstringStartEnd
};
if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

frmStartEndSubstring frmStartEnd = new frmStartEndSubstring(cnasFixed);
if (frmStartEnd.ShowDialog() == DialogResult.OK)
{
if (frmStartEnd.conditionvalue.Value != null && frmStartEnd.conditionvalue.Value.ToString() != "")
{
dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmStartEnd.conditionvalue.Value;

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
query[0].Condition = cnasFixed.Condition;
query[0].Value = frmStartEnd.conditionvalue.Value;
}
else
{
cnasFixed.Value = frmStartEnd.conditionvalue.Value;
syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}
}

if (dgvCnas.Rows[e.RowIndex].Cells["condition"].Value.ToString() == "数值相加(减)")
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue
{
TableName = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString(),
ColumnName = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString(),
Condition = MapCondition.AddSubtract
};
if (dgvCnas.Rows[e.RowIndex].Cells["Value"].Value != null)
cnasFixed.Value = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

frmAddSubtract frmAddSubtract = new frmAddSubtract(syncInstrument, cnasFixed);
if (frmAddSubtract.ShowDialog() == DialogResult.OK)
{
if (frmAddSubtract.conditionvalue.Value != null && frmAddSubtract.conditionvalue.Value.ToString() != "")
{
dgvCnas.Rows[e.RowIndex].Cells["Value"].Value = frmAddSubtract.conditionvalue.Value;

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == cnasFixed.TableName && s.ColumnName == cnasFixed.ColumnName).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
query[0].Condition = cnasFixed.Condition;
query[0].Value = frmAddSubtract.conditionvalue.Value;
}
else
{
cnasFixed.Value = frmAddSubtract.conditionvalue.Value;
syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}
}

dgvCnas.EndEdit();
}
}

private void btnDelete_Click(object sender, EventArgs e)
{
if (syncInstrument == null) return;
if (syncInstrument.lstFixedValue == null) return;
if (dgvCnas == null) return;
if (dgvCnas.Rows.Count <= 0) return;
foreach (DataGridViewRow dr in dgvCnas.Rows)
{
dr.Cells["condition"].Value = "";
dr.Cells["Value"].Value = "";
}
syncInstrument.lstFixedValue.Clear();
}

private void dgvCnas_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex <= 0) return;
if (e.ColumnIndex == 0) //此时是“条件”列
{
if (dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value == null) return;
if (dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value == null) return;

//当前列名
string strCurrentTable = dgvCnas.Rows[e.RowIndex].Cells["TableName"].Value.ToString();
string strCurrentColumn = dgvCnas.Rows[e.RowIndex].Cells["TableColumn"].Value.ToString();
string strCurrentType = dgvCnas.Rows[e.RowIndex].Cells["DataType"].Value.ToString();
string strCurrentCondition = dgvCnas.Rows[e.RowIndex].Cells["Condition"].Value.ToString();
string strCurrentValue = dgvCnas.Rows[e.RowIndex].Cells["Value"].Value == null ? "" : dgvCnas.Rows[e.RowIndex].Cells["Value"].Value.ToString();

//将数据插入到数据源中
var query = syncInstrument.lstFixedValue.Where(s => s.TableName == strCurrentTable && s.ColumnName == strCurrentColumn).ToList<CnasConditionMapValue>();
if (query.Count >= 1)
{
GiveConditionByShow(query[0], strCurrentCondition);
}
else
{
CnasConditionMapValue cnasFixed = new CnasConditionMapValue();
cnasFixed.TableName = strCurrentTable;
cnasFixed.ColumnName = strCurrentColumn;
cnasFixed.Value = strCurrentValue;
GiveConditionByShow(cnasFixed, strCurrentCondition);

syncInstrument.lstFixedValue.Add(cnasFixed);
}
}
}

private void dgvCnas_CellClick(object sender, DataGridViewCellEventArgs e)
{
cbxConditionValue.Visible = false;
}

private void ShowConditionValue()
{
Rectangle TmpRect = dgvCnas.GetCellDisplayRectangle(dgvCnas.CurrentCell.ColumnIndex, dgvCnas.CurrentCell.RowIndex, true);
cbxConditionValue.Size = TmpRect.Size;
cbxConditionValue.Top = TmpRect.Top;
cbxConditionValue.Left = TmpRect.Left;
cbxConditionValue.DropDownStyle = ComboBoxStyle.DropDownList;
cbxConditionValue.FormattingEnabled = true;
cbxConditionValue.Visible = true;

if (!this.dgvCnas.Controls.Contains(cbxConditionValue))
this.dgvCnas.Controls.Add(cbxConditionValue);
}
}
}

Деякі файли не було показано, через те що забагато файлів було змінено

Завантаження…
Відмінити
Зберегти