添加项目文件。

This commit is contained in:
17860779768
2023-02-23 14:52:43 +08:00
parent 1db01eda58
commit 157613603c
508 changed files with 94132 additions and 0 deletions

View File

@ -0,0 +1,86 @@
using System;
using System.Configuration;
using System.Windows.Forms;
namespace BRS.UI.Main
{
public partial class AdvancedPwdFrm : Form
{
public static Action<bool> OnLoginOK { get; set; }
string pwd = "";
string PWD
{
get
{
if (string.IsNullOrWhiteSpace(pwd))
{
var pwdSetting = ConfigurationManager.AppSettings["Pwd"];
if (!string.IsNullOrWhiteSpace(pwdSetting))
{
pwd = pwdSetting.ToString();
}
else
{
pwd = "p@ssw0rd";
}
}
return pwd;
}
}
public AdvancedPwdFrm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void button2_Click(object sender, EventArgs e)
{
CheckInputPassword();
}
private void CheckInputPassword()
{
string input = txtPwd.Text.Trim();
if (string.IsNullOrWhiteSpace(input))
{
MessageBox.Show("Please input password");
return;
}
if (input == PWD)
{
OnLoginOK?.Invoke(true);
DialogResult = DialogResult.OK;
}
else
{
MessageBox.Show("Wrong Password");
DialogResult = DialogResult.Cancel;
}
}
private void txtPwd_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
CheckInputPassword();
}
}
private void btnExitLogin_Click(object sender, EventArgs e)
{
OnLoginOK?.Invoke(false);
this.DialogResult = DialogResult.Abort;
}
}
}

122
src/BRS.UI.Main/AdvancedPwdFrm.designer.cs generated Normal file
View File

@ -0,0 +1,122 @@
namespace BRS.UI.Main
{
partial class AdvancedPwdFrm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtPwd = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.btnExitLogin = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txtPwd
//
this.txtPwd.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPwd.Location = new System.Drawing.Point(126, 28);
this.txtPwd.Name = "txtPwd";
this.txtPwd.PasswordChar = '*';
this.txtPwd.Size = new System.Drawing.Size(236, 23);
this.txtPwd.TabIndex = 0;
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyDown);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(32, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(52, 14);
this.label1.TabIndex = 1;
this.label1.Text = "密码:";
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(208, 63);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.button1_Click);
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOK.Location = new System.Drawing.Point(289, 63);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.button2_Click);
//
// btnExitLogin
//
this.btnExitLogin.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnExitLogin.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExitLogin.Location = new System.Drawing.Point(12, 63);
this.btnExitLogin.Name = "btnExitLogin";
this.btnExitLogin.Size = new System.Drawing.Size(75, 23);
this.btnExitLogin.TabIndex = 2;
this.btnExitLogin.Text = "退出登录";
this.btnExitLogin.UseVisualStyleBackColor = true;
this.btnExitLogin.Click += new System.EventHandler(this.btnExitLogin_Click);
//
// AdvancedPwdFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(388, 98);
this.ControlBox = false;
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnExitLogin);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtPwd);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "AdvancedPwdFrm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "用户验证";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtPwd;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnExitLogin;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,81 @@
<?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"/>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="BRS.UI.Main.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
<appSettings>
<add key="AuthorityCheck" value="False"/>
<add key="Pwd" value="123"/>
<add key="AuthorityServer" value="192.168.1.255:11001"/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
<add key="ExportPath" value="D:\PROJECTS\M071\Export"/>
<add key="MAC" value="E4-62-B7-BC-33-EE-EA-54-E2-13-85-30-86-57-AD-B5"/>
</appSettings>
<entityFramework>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
<!--<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.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"/>
<remove invariant="MySql.Data.MySqlClient"/>
<!--<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.8.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />-->
</DbProviderFactories>
</system.data>
<connectionStrings>
<add name="ProcessDB" connectionString="data source=D:\PROJECTS\A020\DataBase\ProcessDB.db;BinaryGUID=False" providerName="System.Data.SQLite"/>
<!--<add name="ServerModel" connectionString="data source=localhost;initial catalog=P099Server;user id=P099;password=p@ssw0rd" providerName="MySql.Data.MySqlClient" />-->
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.114.0" newVersion="1.0.114.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.114.0" newVersion="1.0.114.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.8.8.0" newVersion="6.8.8.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WeifenLuo.WinFormsUI.Docking" publicKeyToken="5cded1a1a0a7b481" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<userSettings>
<BRS.UI.Main.Properties.Settings>
<setting name="DefaultProcess" serializeAs="String">
<value>A020</value>
</setting>
</BRS.UI.Main.Properties.Settings>
</userSettings>
</configuration>

View File

@ -0,0 +1,367 @@
<?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>{DD02C60E-560B-40C0-AD7F-523F0B4AA4FD}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>BRS.UI.Main</RootNamespace>
<AssemblyName>BRS.UI.Main</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>2</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Images\Logo-128.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug1\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>2</WarningLevel>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>2</WarningLevel>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\Release\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug1|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug1\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>2</WarningLevel>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=4.9.4.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\..\packages\Autofac.4.9.4\lib\net45\Autofac.dll</HintPath>
</Reference>
<Reference Include="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\libs\halcon12\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HslCommunication, Version=10.6.1.0, Culture=neutral, PublicKeyToken=3d72ad3b6b5ec0e3, processorArchitecture=MSIL">
<HintPath>..\..\packages\HslCommunication.10.6.1\lib\net451\HslCommunication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
<HintPath>..\..\packages\OpenCvSharp4.4.3.0.20200405\lib\net461\OpenCvSharp.dll</HintPath>
</Reference>
<Reference Include="OpenCvSharp.Blob, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
<HintPath>..\..\packages\OpenCvSharp4.4.3.0.20200405\lib\net461\OpenCvSharp.Blob.dll</HintPath>
</Reference>
<Reference Include="OpenCvSharp.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
<HintPath>..\..\packages\OpenCvSharp4.4.3.0.20200405\lib\net461\OpenCvSharp.Extensions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.7.0.0-preview.2.22152.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>..\..\packages\DockPanelSuite.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2015, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>..\..\packages\DockPanelSuite.ThemeVS2015.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2015.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MenuForms\FrmAlarm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmAlarm.Designer.cs">
<DependentUpon>FrmAlarm.cs</DependentUpon>
</Compile>
<Compile Include="ProductionCodeEditForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProductionCodeEditForm.designer.cs">
<DependentUpon>ProductionCodeEditForm.cs</DependentUpon>
</Compile>
<Compile Include="AdvancedPwdFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AdvancedPwdFrm.designer.cs">
<DependentUpon>AdvancedPwdFrm.cs</DependentUpon>
</Compile>
<Compile Include="Ctrls\CtrlDeviceState.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Ctrls\CtrlDeviceState.Designer.cs">
<DependentUpon>CtrlDeviceState.cs</DependentUpon>
</Compile>
<Compile Include="Ctrls\CtrlMethodInvoke.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Ctrls\CtrlMethodInvoke.Designer.cs">
<DependentUpon>CtrlMethodInvoke.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmCalib.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmCalib.Designer.cs">
<DependentUpon>FrmCalib.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmLog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmLog.Designer.cs">
<DependentUpon>FrmLog.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmOperation.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmOperation.Designer.cs">
<DependentUpon>FrmOperation.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmStatistic.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmStatistic.Designer.cs">
<DependentUpon>FrmStatistic.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmConfig.Designer.cs">
<DependentUpon>FrmConfig.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\FrmTest.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MenuForms\FrmTest.Designer.cs">
<DependentUpon>FrmTest.cs</DependentUpon>
</Compile>
<Compile Include="MainFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainFrm.Designer.cs">
<DependentUpon>MainFrm.cs</DependentUpon>
</Compile>
<Compile Include="MenuForms\ViewNode.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SampleHelper.cs" />
<EmbeddedResource Include="MenuForms\FrmAlarm.resx">
<DependentUpon>FrmAlarm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProductionCodeEditForm.resx">
<DependentUpon>ProductionCodeEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AdvancedPwdFrm.resx">
<DependentUpon>AdvancedPwdFrm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Ctrls\CtrlDeviceState.resx">
<DependentUpon>CtrlDeviceState.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Ctrls\CtrlMethodInvoke.resx">
<DependentUpon>CtrlMethodInvoke.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmCalib.resx">
<DependentUpon>FrmCalib.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmConfig.resx">
<DependentUpon>FrmConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainFrm.resx">
<DependentUpon>MainFrm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmLog.resx">
<DependentUpon>FrmLog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmOperation.resx">
<DependentUpon>FrmOperation.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmStatistic.resx">
<DependentUpon>FrmStatistic.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MenuForms\FrmTest.resx">
<DependentUpon>FrmTest.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.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BRS.Process\BRS.Process.csproj">
<Project>{197C5AA8-9609-4D1C-B1E3-5879006EAAF4}</Project>
<Name>BRS.Process</Name>
</ProjectReference>
<ProjectReference Include="..\BRS.Common.Model\BRS.Common.Model.csproj">
<Project>{1A3CBFE7-3F78-42C3-95C5-10360450DBEA}</Project>
<Name>BRS.Common.Model</Name>
</ProjectReference>
<ProjectReference Include="..\BRS.Common.Device\BRS.Common.Device.csproj">
<Project>{987308dd-8baa-463a-94e2-77d62e01a5bf}</Project>
<Name>BRS.Common.Device</Name>
</ProjectReference>
<ProjectReference Include="..\BRS.UI.Model.Winform\BRS.UI.Model.Winform.csproj">
<Project>{741F6491-57C7-479A-B391-09BBA9FBA9DC}</Project>
<Name>BRS.UI.Model.Winform</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Images\BRS.png" />
<Content Include="Images\BRS2.png" />
<Content Include="Images\load_32px.png" />
<Content Include="Images\Logo-128.ico" />
<Content Include="Images\Logo-32.ico" />
<Content Include="Images\Logo-64.ico" />
<Content Include="Images\Logo-882.png" />
<Content Include="Images\Logo_882.jpg" />
<Content Include="Images\Res.jpg" />
<Content Include="Images\save_24px.png" />
<Content Include="Images\start_32px.png" />
<Content Include="Images\stop_32px.png" />
<Content Include="Images\we.png" />
<None Include="Resources\Config1.json" />
<None Include="Resources\labelme.exe" />
<None Include="Resources\load.bmp" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,819 @@
using A036.Process;
using Autofac;
using Bro.Common.Helper;
using Bro.Common.Interface;
using Bro.Common.Model;
using Bro.Common.PubSub;
using Bro.Common.UI;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static Bro.Common.Helper.EnumHelper;
namespace A034.Config
{
public partial class ConfigFrm : Form
{
private IStationProcess Process { get; set; } = null;
IStationConfig _config = null;
IStationConfig Config
{
get => _config;
set
{
_config = value;
if (Process != null)
{
InitialCalibrationMethod();
InitialAllTestMethod();
InitialDevices();
}
}
}
ProcessConfig ProcessConfig
{
get => Config as ProcessConfig;
}
Canvas canvasImage = new Canvas();
#region
private bool isLogin = false;
public bool IsLogin
{
get => isLogin;
set
{
isLogin = value;
tsslLoginStatus.Text = isLogin ? "已登录" : "未登录";
}
}
private void tsslLoginStatus_Click(object sender, EventArgs e)
{
if (!IsLogin)
{
IsLogin = UserLogin();
}
}
private bool UserLogin()
{
AdvancedPwdFrm pwdFrm = new AdvancedPwdFrm();
return pwdFrm.ShowDialog() == DialogResult.OK;
}
#endregion
public ConfigFrm()
{
InitializeComponent();
canvasImage = new Canvas();
canvasImage.IsShowElementList = false;
canvasImage.Dock = DockStyle.Fill;
plCanvas.Controls.Add(canvasImage);
}
private void Form1_Load(object sender, EventArgs e)
{
FillProductionCodes();
//_servicePanel.Dock = DockStyle.Fill;
//_servicePanel.OnServiceStateChanged = OnServiceStateChanged;
//_servicePanel.GetServiceStatus();
//tabControl1.TabPages["tbService"].Controls.Add(_servicePanel);
if (cboProductionCode.Text == "Default")
{
LoadProcess("Default");
}
}
private void FillProductionCodes()
{
List<string> codes = new List<string>();
string configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Setting.json");
if (File.Exists(configPath))
{
using (StreamReader reader = new StreamReader(configPath, System.Text.Encoding.UTF8))
{
string dataStr = reader.ReadToEnd();
JObject data = JsonConvert.DeserializeObject<JObject>(dataStr);
if (data.ContainsKey("ProductionCodes"))
{
codes = JsonConvert.DeserializeObject<List<string>>(data.Value<string>("ProductionCodes"));
}
}
}
if (codes == null || codes.Count == 0)
{
codes = new List<string>() { "Default" };
}
UIHelper.SetCombo(cboProductionCode, codes, "", "");
}
//private object OnExceptionUpdate(ISubscriber arg1, object arg2, object arg3)
//{
// Exception ex = arg3 as Exception;
// RecordException(arg2.ToString() + "\r\n" + ex?.GetExceptionMessage());
// return null;
//}
private void btnSaveProcess_Click(object sender, EventArgs e)
{
//if (!OpBeforeSaveConfig())
//{
// return;
//}
//string msg = "";
//if (Process == null || Process.StationConfig.StationCode != cboStationCode.Text.Trim())
// Process = StationFactory.CreateStationProcess(cboStationCode.Text.Trim(), "xcd", out msg);
if (Process == null)
Process = new ProcessControl();
if (!IsLogin)
{
IsLogin = UserLogin();
}
if (IsLogin)
{
Process.SaveStationConfig(propConfig.SelectedObject as IStationConfig);
MessageBox.Show(@"Save done");
}
else
{
MessageBox.Show("未通过用户验证,无法保存配置");
}
}
private void btnLoadProcess_Click(object sender, EventArgs e)
{
LoadProcess(cboProductionCode.Text);
MessageBox.Show(@"Load done");
}
private void LoadProcess(string productionCode)
{
Process = new ProcessControl(productionCode);
propConfig.SelectedObject = Config = Process.StationConfig;
//InitialService((Process.StationConfig as ProcessConfig).ServicePort);
LoadCameras();
(Process as ProcessControl).OnLog = OnProcessLog;
}
private void btnStartProcess_Click(object sender, EventArgs e)
{
Process.Open();
MessageBox.Show(@"Start!");
btnStartProcess.Visible = false;
btnStopProcess.Visible = true;
}
private async void OnProcessLog(DateTime dt, string prefix, string msg)
{
await Task.Run(() =>
{
RecordMsg(dt, prefix, msg);
});
}
private void btnStopProcess_Click(object sender, EventArgs e)
{
chkContinueMode.Checked = false;
Process.Close();
MessageBox.Show(@"Stop!");
btnStartProcess.Visible = true;
btnStopProcess.Visible = false;
}
#region
Dictionary<ProcessMethodAttribute, MethodInfo> _calibrationMethodDict = new Dictionary<ProcessMethodAttribute, MethodInfo>();
MethodInfo _calibrationMethod = null;
private void InitialCalibrationMethod()
{
_calibrationMethodDict.Clear();
Process.GetType().GetMethods().ToList().ForEach(m =>
{
var attr = m.GetCustomAttribute<ProcessMethodAttribute>();
if (attr != null && attr.InvokeType == InvokeType.CalibInvoke)
{
_calibrationMethodDict[attr] = m;
}
});
UIHelper.SetCombo(cboCalibrationMethod, _calibrationMethodDict.Keys.ToList(), "MethodDesc", "MethodCode");
cboCalibrationMethod.SelectedIndexChanged -= cboCalibrationMethod_SelectedIndexChanged;
cboCalibrationMethod.SelectedIndexChanged += cboCalibrationMethod_SelectedIndexChanged;
}
private void cboCalibrationMethod_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboCalibrationMethod.SelectedIndex >= 0)
{
string methodCode = cboCalibrationMethod.SelectedValue.ToString();
_calibrationMethod = _calibrationMethodDict[_calibrationMethodDict.Keys.FirstOrDefault(u => u.MethodCode == methodCode)];
if (Process.StationConfig.ProcessOpConfigDict.Keys.Contains(methodCode))
{
propCalibrationConfig.SelectedObject = Process.StationConfig.ProcessOpConfigDict[methodCode];
}
else
{
MessageBox.Show(@"Config of " + methodCode + @" is not found");
}
}
}
private void btnStartCalibration_Click(object sender, EventArgs e)
{
btnStartCalibration.Enabled = false;
IDevice sourceDevice = cboCalibSourceDevices.SelectedItem as IDevice;
IDevice executeDevice = cboCalibExecuteDevice.SelectedItem as IDevice;
IOperationConfig config = propCalibrationConfig.SelectedObject as IOperationConfig;
Task.Run(() =>
{
try
{
if (config != null)
{
config.InputPara = null;
}
_calibrationMethod.Invoke(Process, new object[] { config, executeDevice, sourceDevice });
}
catch (Exception ex)
{
MessageBox.Show(@"Calibration cancel\r\n" + ex.GetExceptionMessage());
return;
}
finally
{
if (this.InvokeRequired)
{
this.Invoke(new Action(() => btnStartCalibration.Enabled = true));
}
else
{
btnStartCalibration.Enabled = true;
}
}
MessageBox.Show(@"Operation Done");
});
}
#endregion
#region Test
Dictionary<ProcessMethodAttribute, MethodInfo> _allTestMethod = new Dictionary<ProcessMethodAttribute, MethodInfo>();
MethodInfo _testMethod = null;
private void InitialDevices()
{
List<IDevice> deviceList = new List<IDevice>();
using (var scope = GlobalVar.Container.BeginLifetimeScope())
{
deviceList = scope.Resolve<List<IDevice>>();
}
List<ISimpleDevice> list = deviceList.Select(u => u as ISimpleDevice).ToList();
UIHelper.SetCombo(cboCalibSourceDevices, new List<ISimpleDevice>(list), "Name", "Id");
UIHelper.SetCombo(cboTestSourceDevices, new List<ISimpleDevice>(list), "Name", "Id");
UIHelper.SetCombo(cboCalibExecuteDevice, new List<ISimpleDevice>(list), "Name", "Id");
UIHelper.SetCombo(cboTestExecuteDevice, new List<ISimpleDevice>(list), "Name", "Id");
}
private void InitialAllTestMethod()
{
_allTestMethod.Clear();
Process.GetType().GetMethods().ToList().ForEach(m =>
{
var attr = m.GetCustomAttribute<ProcessMethodAttribute>();
if (attr != null && attr.InvokeType == InvokeType.TestInvoke)
{
_allTestMethod[attr] = m;
}
});
UIHelper.SetCombo(cboTestMethod, _allTestMethod.Keys.ToList(), "MethodDesc", "MethodCode");
cboTestMethod.SelectedIndexChanged -= cboTestMethod_SelectedIndexChanged;
cboTestMethod.SelectedIndexChanged += cboTestMethod_SelectedIndexChanged;
}
private void cboTestMethod_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboTestMethod.SelectedIndex >= 0)
{
string methodCode = cboTestMethod.SelectedValue.ToString();
var attr = _allTestMethod.Keys.FirstOrDefault(u => u.MethodCode == methodCode);
if (attr == null)
return;
_testMethod = _allTestMethod[attr];
if (Process.StationConfig.ProcessOpConfigDict.Keys.Contains(methodCode))
{
propGridTestMethod.SelectedObject = Process.StationConfig.ProcessOpConfigDict[methodCode];
}
else
{
MessageBox.Show(@"Config of " + methodCode + @" is not found");
}
}
}
private void btnManualTrigger_Click(object sender, EventArgs e)
{
IDevice sourceDevice = cboTestSourceDevices.SelectedItem as IDevice;
IDevice executeDevice = cboTestExecuteDevice.SelectedItem as IDevice;
new Task((m) =>
{
MethodInfo method = m as MethodInfo;
int invokeTimes = 1;
if (!int.TryParse(txtInvokeTimes.Text.Trim(), out invokeTimes))
{
invokeTimes = 1;
}
ProcessResponse response = null;
if (invokeTimes == 1)
{
try
{
Stopwatch sw = new Stopwatch();
sw.Start();
response = method.Invoke(Process, new object[] { propGridTestMethod.SelectedObject as IOperationConfig, executeDevice, sourceDevice }) as ProcessResponse;
sw.Stop();
//RecordMsg($"{method.Name}调用耗时:{sw.ElapsedMilliseconds}ms");
(Process as ProcessControl).LogAsync(DateTime.Now, $"{method.Name}调用耗时:{sw.ElapsedMilliseconds}ms", "");
}
catch (Exception ex)
{
MessageBox.Show("Method cancel\r\n\r\n" + ex.InnerException.GetExceptionMessage());
return;
}
MessageBox.Show("Method done\r\n" + JsonConvert.SerializeObject(response, new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.None }));
}
else
{
for (int i = 0; i < invokeTimes; i++)
{
try
{
response = method.Invoke(Process, new object[] { propGridTestMethod.SelectedObject as IOperationConfig }) as ProcessResponse;
}
catch (Exception ex)
{
RecordMsg(DateTime.Now, $"Method Cancel,Time:{i + 1}", ex.InnerException.GetExceptionMessage());
}
RecordMsg(DateTime.Now, $"Method Done", JsonConvert.SerializeObject(response, new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.None }));
Thread.Sleep(250);
}
}
}, _testMethod).Start();
}
#endregion
private void ConfigFrm_FormClosing(object sender, FormClosingEventArgs e)
{
try
{
Process.Close();
(Process as ProcessControl).OnLog = null;
Thread.Sleep(500);
}
catch (Exception) { }
}
#region
public void RecordMsg(DateTime dt, string prefix, string msg, bool isLog = false)
{
if (this.InvokeRequired)
{
this.Invoke(new Action<DateTime, string, string, bool>(RecordMsg), dt, prefix, msg, isLog);
}
else
{
if (isLog)
{
LogAsync(dt, prefix, msg);
}
txtError.AppendText($"{dt.ToString("HH:mm:ss.fff")}\t{prefix}\t{msg}\r\n");
while (txtError.Lines.Length > 1000)
{
txtError.Lines = txtError.Lines.Skip(500).ToArray();
}
}
}
private void btnClearError_Click(object sender, EventArgs e)
{
txtError.Clear();
}
static object lockObj = new object();
public async void LogAsync(DateTime dt, string prefix, string msg)
{
await Task.Run(() =>
{
string logPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ExLog_" + DateTime.Today.ToString("yyyyMMdd") + ".txt");
lock (lockObj)
{
using (StreamWriter writer = new StreamWriter(logPath, true))
{
writer.WriteLine($"{dt.ToString("HH:mm:ss")}\t{prefix}\t{msg}");
writer.WriteLine();
writer.Flush();
writer.Close();
}
}
});
}
private void LoadCameras()
{
cboCameras.DataSource = null;
List<dynamic> cameras = new List<dynamic>() { new { Desc = "All", Id = "" } };
(Config as ProcessConfig).CameraConfigCollection.ForEach(c =>
{
cameras.Add(new { Desc = c.Name, Id = c.Id });
});
UIHelper.SetCombo(cboCameras, cameras, "Desc", "Id");
cboCameras.SelectedIndex = 0;
(Process as ProcessControl).OnBitmapOutput -= UpdateImage;
(Process as ProcessControl).OnBitmapOutput += UpdateImage;
}
private static object _imgLock = new object();
private void UpdateImage(string cameraId, Bitmap image)
{
if (this.InvokeRequired)
{
this.Invoke(new Action(() => UpdateImage(cameraId, image)));
}
else
{
//lock (_imgLock)
{
try
{
if (string.IsNullOrWhiteSpace(cboCameras.SelectedValue?.ToString()))
{
canvasImage.LoadImage(image);
}
else
{
if (cboCameras.SelectedValue.ToString() == cameraId)
{
canvasImage.LoadImage(image);
}
}
}
catch (Exception)
{
}
_imgShowedHandle.Set();
}
}
}
#endregion
#region advanced使用
private void btnNewConfig_Click(object sender, EventArgs e)
{
Config = new ProcessConfig();
propConfig.SelectedObject = Config;
}
private void btnLoadLocal_Click(object sender, EventArgs e)
{
if (Process == null)
{
MessageBox.Show("流程不能为空,请先载入流程");
return;
}
if ((Process as ProcessControl).ProcessState == DeviceState.DSOpen)
{
MessageBox.Show("流程执行中,请先停止流程");
return;
}
OpenFileDialog ofd = new OpenFileDialog();
ofd.Multiselect = false;
ofd.Filter = "JSON配置文件|*.json";
if (ofd.ShowDialog() == DialogResult.OK)
{
Process = new ProcessControl(cboProductionCode.Text, ofd.FileName);
MessageBox.Show("流程载入配置文件成功");
}
}
#region
string _oldConfigStr = "";
/// <summary>
/// 保存配置前检查
/// </summary>
/// <returns>true 可以继续保存配置 false不再保存配置 </returns>
private bool OpBeforeSaveConfig()
{
//if (string.IsNullOrWhiteSpace(_oldConfigStr))
// return true;
string newConfigStr = JsonConvert.SerializeObject(propConfig.SelectedObject);
if (newConfigStr == _oldConfigStr)
{
return true;
}
else
{
Process.SaveStationConfig(propConfig.SelectedObject as ProcessConfig);
return true;
}
}
#endregion
private void btnAdvanced_Click(object sender, EventArgs e)
{
AdvancedPwdFrm pFrm = new AdvancedPwdFrm();
if (pFrm.ShowDialog() == DialogResult.OK)
{
plBasic.Visible = false;
plAdvanced.Visible = true;
}
else
{
plBasic.Visible = true;
plAdvanced.Visible = false;
}
}
private void btnExitAdvanced_Click(object sender, EventArgs e)
{
plAdvanced.Visible = false;
plBasic.Visible = true;
}
private void propConfig_SelectedObjectsChanged(object sender, EventArgs e)
{
if (propConfig.SelectedObject != null)
{
_oldConfigStr = JsonConvert.SerializeObject(propConfig.SelectedObject);
}
}
#endregion
#region
float FrameRate
{
set
{
if (this.InvokeRequired)
{
this.Invoke(new Action(() => lblFrameRate.Text = value.ToString() + " ms"));
}
else
{
lblFrameRate.Text = value.ToString() + " ms";
}
}
}
AutoResetEvent _imgShowedHandle = new AutoResetEvent(false);
private void btnSnap_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(cboCameras.SelectedValue.ToString()))
{
MessageBox.Show("请先选择操作相机");
return;
}
PubSubCenter.GetInstance().Publish(PubTag.DeviceOperation.ToString(), cboCameras.SelectedValue.ToString(), "Snap");
//string folderPath = "";
//FolderBrowserDialog fbd = new FolderBrowserDialog();
//if (fbd.ShowDialog() == DialogResult.OK)
//{
// folderPath = fbd.SelectedPath;
//}
//else
//{
// return;
//}
//Task.Run(() =>
//{
// DirectoryInfo dir = new DirectoryInfo(folderPath);
// dir.GetFiles("*.jpg").Select(u => u.FullName).ToList().ForEach(f =>
// {
// //Task.Run(() =>
// //{
// UpdateImage("", (Bitmap)Image.FromFile(f));
// //});
// //Task.Run(() =>
// //{
// List<ElementBase> list = new List<ElementBase>();
// Random r = new Random((int)DateTime.Now.Ticks);
// for (int i = 0; i < 10; i++)
// {
// list.Add(new PointIndicator(r.Next(2448), r.Next(2048)));
// }
// UpdateVisionResult("", list);
// //});
// //Thread.Sleep(10);
// });
//});
}
private void chkContinueMode_CheckedChanged(object sender, EventArgs e)
{
if (!chkContinueMode.Checked)
{
cboCameras.Enabled = true;
lblFrameRate.Text = "";
return;
}
if (string.IsNullOrWhiteSpace(cboCameras.SelectedValue.ToString()))
{
MessageBox.Show("请先选择操作相机");
return;
}
cboCameras.Enabled = false;
string cameraId = cboCameras.SelectedValue.ToString();
Task.Run(() =>
{
Stopwatch sw = new Stopwatch();
sw.Start();
while (chkContinueMode.Checked)
{
try
{
sw.Stop();
FrameRate = sw.ElapsedMilliseconds;
sw.Restart();
PubSubCenter.GetInstance().Publish(PubTag.DeviceOperation.ToString(), cameraId, "Snap", false);
_imgShowedHandle.WaitOne(3000);
}
catch (Exception)
{
}
}
});
}
private void chkHardwareTrigger_CheckedChanged(object sender, EventArgs e)
{
//if (cboCameras.SelectedIndex > 0)
//{
// var cameraConfig = ProcessConfig.CameraConfigs.FirstOrDefault(u => u.ID == cboCameras.SelectedValue.ToString());
// if (cameraConfig != null)
// {
// cameraConfig.IsHardwareTrigger = chkHardwareTrigger.Checked;
// }
//}
}
private void cboCameras_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboCameras.SelectedIndex > 0)
{
var cameraConfig = ProcessConfig.CameraConfigCollection.FirstOrDefault(u => u.Id == cboCameras.SelectedValue.ToString());
if (cameraConfig == null)
{
MessageBox.Show("未能获取正确的相机配置");
return;
}
//else
//{
// chkHardwareTrigger.Checked = cameraConfig.IsHardwareTrigger;
//}
}
}
#endregion
#region
//CtrlServicePanel _servicePanel = new CtrlServicePanel();
//private void InitialService(int port)
//{
// _servicePanel.Port = port;
// _servicePanel.OnLogBroadcast = OnServiceLogBroadcast;
// _servicePanel.OnBitmapBroadcast = OnServiceImageBroadcast;
//}
//private void OnServiceImageBroadcast(string cameraId, string imagePath)
//{
// UpdateImage(cameraId, new Bitmap(imagePath));
//}
//private void OnServiceLogBroadcast(DateTime dt, string prefix, string msg)
//{
// RecordMsg(dt, prefix, msg);
//}
//private void OnServiceStateChanged(bool isServiceRunning)
//{
// if (this.InvokeRequired)
// {
// this.Invoke(new Action(() =>
// {
// btnStartProcess.Enabled = btnStopProcess.Enabled = !isServiceRunning;
// }));
// }
// else
// {
// btnStartProcess.Enabled = btnStopProcess.Enabled = !isServiceRunning;
// }
//}
#endregion
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (tabControl1.SelectedTab.Name != "tbLog")
{
chkContinueMode.Checked = false;
}
}
private void button1_Click(object sender, EventArgs e)
{
//(Process as ProcessControl).Robot_Monitor_FullTrayFull(new OperationConfigBase() { InputPara = new List<int>() { 1 } }, new HikCameraDriver { Id = "3680EBF8-D9F8-4E14-8B0D-6E53BE3BB96D" });
//var list = (Process.StationConfig as ProcessConfig).StorageCells;
//list.Clear();
//for (int i = 0; i < 20000; i++)
//{
// list.Add(new Bro.Common.RMQBus.CellInfo() { CellCode = Guid.NewGuid().ToString() });
//}
MessageBox.Show("Done");
}
}
}

811
src/BRS.UI.Main/ConfigFrm.designer.cs generated Normal file
View File

@ -0,0 +1,811 @@
namespace A034.Config
{
partial class ConfigFrm
{
/// <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(ConfigFrm));
this.propConfig = new System.Windows.Forms.PropertyGrid();
this.btnNewConfig = new System.Windows.Forms.Button();
this.btnSaveProcess = new System.Windows.Forms.Button();
this.btnLoadProcess = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tbConfig = new System.Windows.Forms.TabPage();
this.tbCalibration = new System.Windows.Forms.TabPage();
this.label9 = new System.Windows.Forms.Label();
this.cboCalibExecuteDevice = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.cboCalibSourceDevices = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.propCalibrationConfig = new System.Windows.Forms.PropertyGrid();
this.btnStartCalibration = new System.Windows.Forms.Button();
this.cboCalibrationMethod = new System.Windows.Forms.ComboBox();
this.tbTest = new System.Windows.Forms.TabPage();
this.label3 = new System.Windows.Forms.Label();
this.txtInvokeTimes = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cboTestExecuteDevice = new System.Windows.Forms.ComboBox();
this.propGridTestMethod = new System.Windows.Forms.PropertyGrid();
this.cboTestSourceDevices = new System.Windows.Forms.ComboBox();
this.btnTrigger = new System.Windows.Forms.Button();
this.cboTestMethod = new System.Windows.Forms.ComboBox();
this.tbService = new System.Windows.Forms.TabPage();
this.label7 = new System.Windows.Forms.Label();
this.tbLog = new System.Windows.Forms.TabPage();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.plCanvas = new System.Windows.Forms.Panel();
this.chkHardwareTrigger = new System.Windows.Forms.CheckBox();
this.lblFrameRate = new System.Windows.Forms.Label();
this.chkContinueMode = new System.Windows.Forms.CheckBox();
this.btnSnap = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.cboCameras = new System.Windows.Forms.ComboBox();
this.txtError = new System.Windows.Forms.TextBox();
this.btnClearError = new System.Windows.Forms.Button();
this.btnStartProcess = new System.Windows.Forms.Button();
this.btnStopProcess = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.btnLoadWarningFromFile = new System.Windows.Forms.Button();
this.btnLoadLocal = new System.Windows.Forms.Button();
this.plAdvanced = new System.Windows.Forms.Panel();
this.btnExitAdvanced = new System.Windows.Forms.Button();
this.btnPrintCheck = new System.Windows.Forms.Button();
this.btnDeleteRecord = new System.Windows.Forms.Button();
this.btnLoadHistory = new System.Windows.Forms.Button();
this.btnAdvanced = new System.Windows.Forms.Button();
this.plBasic = new System.Windows.Forms.Panel();
this.cboProductionCode = new System.Windows.Forms.ComboBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.tsslLoginStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.tabControl1.SuspendLayout();
this.tbConfig.SuspendLayout();
this.tbCalibration.SuspendLayout();
this.tbTest.SuspendLayout();
this.tbService.SuspendLayout();
this.tbLog.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.plAdvanced.SuspendLayout();
this.plBasic.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// propConfig
//
this.propConfig.Dock = System.Windows.Forms.DockStyle.Fill;
this.propConfig.Location = new System.Drawing.Point(3, 3);
this.propConfig.Name = "propConfig";
this.propConfig.Size = new System.Drawing.Size(570, 639);
this.propConfig.TabIndex = 0;
this.propConfig.ToolbarVisible = false;
this.propConfig.SelectedObjectsChanged += new System.EventHandler(this.propConfig_SelectedObjectsChanged);
//
// btnNewConfig
//
this.btnNewConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnNewConfig.Location = new System.Drawing.Point(10, 156);
this.btnNewConfig.Name = "btnNewConfig";
this.btnNewConfig.Size = new System.Drawing.Size(88, 23);
this.btnNewConfig.TabIndex = 1;
this.btnNewConfig.Text = "NewConfig";
this.btnNewConfig.UseVisualStyleBackColor = true;
this.btnNewConfig.Click += new System.EventHandler(this.btnNewConfig_Click);
//
// btnSaveProcess
//
this.btnSaveProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveProcess.Location = new System.Drawing.Point(8, 20);
this.btnSaveProcess.Name = "btnSaveProcess";
this.btnSaveProcess.Size = new System.Drawing.Size(88, 23);
this.btnSaveProcess.TabIndex = 1;
this.btnSaveProcess.Text = "SaveProcess";
this.btnSaveProcess.UseVisualStyleBackColor = true;
this.btnSaveProcess.Click += new System.EventHandler(this.btnSaveProcess_Click);
//
// btnLoadProcess
//
this.btnLoadProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoadProcess.Location = new System.Drawing.Point(8, 49);
this.btnLoadProcess.Name = "btnLoadProcess";
this.btnLoadProcess.Size = new System.Drawing.Size(88, 23);
this.btnLoadProcess.TabIndex = 1;
this.btnLoadProcess.Text = "LoadProcess";
this.btnLoadProcess.UseVisualStyleBackColor = true;
this.btnLoadProcess.Click += new System.EventHandler(this.btnLoadProcess_Click);
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tbConfig);
this.tabControl1.Controls.Add(this.tbCalibration);
this.tabControl1.Controls.Add(this.tbTest);
this.tabControl1.Controls.Add(this.tbService);
this.tabControl1.Controls.Add(this.tbLog);
this.tabControl1.Location = new System.Drawing.Point(7, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(584, 671);
this.tabControl1.TabIndex = 3;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tbConfig
//
this.tbConfig.Controls.Add(this.propConfig);
this.tbConfig.Location = new System.Drawing.Point(4, 22);
this.tbConfig.Name = "tbConfig";
this.tbConfig.Padding = new System.Windows.Forms.Padding(3);
this.tbConfig.Size = new System.Drawing.Size(576, 645);
this.tbConfig.TabIndex = 0;
this.tbConfig.Text = "配置";
this.tbConfig.UseVisualStyleBackColor = true;
//
// tbCalibration
//
this.tbCalibration.Controls.Add(this.label9);
this.tbCalibration.Controls.Add(this.cboCalibExecuteDevice);
this.tbCalibration.Controls.Add(this.label6);
this.tbCalibration.Controls.Add(this.cboCalibSourceDevices);
this.tbCalibration.Controls.Add(this.label1);
this.tbCalibration.Controls.Add(this.propCalibrationConfig);
this.tbCalibration.Controls.Add(this.btnStartCalibration);
this.tbCalibration.Controls.Add(this.cboCalibrationMethod);
this.tbCalibration.Location = new System.Drawing.Point(4, 22);
this.tbCalibration.Name = "tbCalibration";
this.tbCalibration.Padding = new System.Windows.Forms.Padding(3);
this.tbCalibration.Size = new System.Drawing.Size(576, 645);
this.tbCalibration.TabIndex = 1;
this.tbCalibration.Text = "标定";
this.tbCalibration.UseVisualStyleBackColor = true;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(160, 12);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(53, 12);
this.label9.TabIndex = 13;
this.label9.Text = "执行设备";
//
// cboCalibExecuteDevice
//
this.cboCalibExecuteDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboCalibExecuteDevice.FormattingEnabled = true;
this.cboCalibExecuteDevice.Location = new System.Drawing.Point(150, 33);
this.cboCalibExecuteDevice.Name = "cboCalibExecuteDevice";
this.cboCalibExecuteDevice.Size = new System.Drawing.Size(109, 20);
this.cboCalibExecuteDevice.TabIndex = 12;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(31, 12);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 13;
this.label6.Text = "触发设备";
//
// cboCalibSourceDevices
//
this.cboCalibSourceDevices.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboCalibSourceDevices.FormattingEnabled = true;
this.cboCalibSourceDevices.Location = new System.Drawing.Point(21, 33);
this.cboCalibSourceDevices.Name = "cboCalibSourceDevices";
this.cboCalibSourceDevices.Size = new System.Drawing.Size(109, 20);
this.cboCalibSourceDevices.TabIndex = 12;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(262, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 7;
this.label1.Text = "标定方法";
//
// propCalibrationConfig
//
this.propCalibrationConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propCalibrationConfig.Location = new System.Drawing.Point(11, 67);
this.propCalibrationConfig.Name = "propCalibrationConfig";
this.propCalibrationConfig.Size = new System.Drawing.Size(452, 572);
this.propCalibrationConfig.TabIndex = 5;
this.propCalibrationConfig.ToolbarVisible = false;
//
// btnStartCalibration
//
this.btnStartCalibration.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnStartCalibration.Location = new System.Drawing.Point(469, 596);
this.btnStartCalibration.Name = "btnStartCalibration";
this.btnStartCalibration.Size = new System.Drawing.Size(97, 42);
this.btnStartCalibration.TabIndex = 1;
this.btnStartCalibration.Text = "Start Calibration";
this.btnStartCalibration.UseVisualStyleBackColor = true;
this.btnStartCalibration.Click += new System.EventHandler(this.btnStartCalibration_Click);
//
// cboCalibrationMethod
//
this.cboCalibrationMethod.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cboCalibrationMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboCalibrationMethod.FormattingEnabled = true;
this.cboCalibrationMethod.Location = new System.Drawing.Point(282, 33);
this.cboCalibrationMethod.Name = "cboCalibrationMethod";
this.cboCalibrationMethod.Size = new System.Drawing.Size(256, 20);
this.cboCalibrationMethod.TabIndex = 4;
//
// tbTest
//
this.tbTest.Controls.Add(this.label3);
this.tbTest.Controls.Add(this.txtInvokeTimes);
this.tbTest.Controls.Add(this.label8);
this.tbTest.Controls.Add(this.label5);
this.tbTest.Controls.Add(this.label2);
this.tbTest.Controls.Add(this.cboTestExecuteDevice);
this.tbTest.Controls.Add(this.propGridTestMethod);
this.tbTest.Controls.Add(this.cboTestSourceDevices);
this.tbTest.Controls.Add(this.btnTrigger);
this.tbTest.Controls.Add(this.cboTestMethod);
this.tbTest.Location = new System.Drawing.Point(4, 22);
this.tbTest.Name = "tbTest";
this.tbTest.Padding = new System.Windows.Forms.Padding(3);
this.tbTest.Size = new System.Drawing.Size(576, 645);
this.tbTest.TabIndex = 2;
this.tbTest.Text = "测试";
this.tbTest.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(470, 550);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(71, 12);
this.label3.TabIndex = 13;
this.label3.Text = "InvokeTimes";
//
// txtInvokeTimes
//
this.txtInvokeTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.txtInvokeTimes.Location = new System.Drawing.Point(470, 569);
this.txtInvokeTimes.Name = "txtInvokeTimes";
this.txtInvokeTimes.Size = new System.Drawing.Size(93, 21);
this.txtInvokeTimes.TabIndex = 12;
this.txtInvokeTimes.Text = "1";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(160, 12);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(53, 12);
this.label8.TabIndex = 11;
this.label8.Text = "执行设备";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 12);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 11;
this.label5.Text = "触发设备";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(292, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 11;
this.label2.Text = "测试方法";
//
// cboTestExecuteDevice
//
this.cboTestExecuteDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestExecuteDevice.FormattingEnabled = true;
this.cboTestExecuteDevice.Location = new System.Drawing.Point(150, 33);
this.cboTestExecuteDevice.Name = "cboTestExecuteDevice";
this.cboTestExecuteDevice.Size = new System.Drawing.Size(109, 20);
this.cboTestExecuteDevice.TabIndex = 9;
this.cboTestExecuteDevice.SelectedIndexChanged += new System.EventHandler(this.cboTestMethod_SelectedIndexChanged);
//
// propGridTestMethod
//
this.propGridTestMethod.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propGridTestMethod.Location = new System.Drawing.Point(11, 67);
this.propGridTestMethod.Name = "propGridTestMethod";
this.propGridTestMethod.Size = new System.Drawing.Size(452, 572);
this.propGridTestMethod.TabIndex = 10;
this.propGridTestMethod.ToolbarVisible = false;
//
// cboTestSourceDevices
//
this.cboTestSourceDevices.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestSourceDevices.FormattingEnabled = true;
this.cboTestSourceDevices.Location = new System.Drawing.Point(21, 33);
this.cboTestSourceDevices.Name = "cboTestSourceDevices";
this.cboTestSourceDevices.Size = new System.Drawing.Size(109, 20);
this.cboTestSourceDevices.TabIndex = 9;
this.cboTestSourceDevices.SelectedIndexChanged += new System.EventHandler(this.cboTestMethod_SelectedIndexChanged);
//
// btnTrigger
//
this.btnTrigger.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnTrigger.Location = new System.Drawing.Point(469, 596);
this.btnTrigger.Name = "btnTrigger";
this.btnTrigger.Size = new System.Drawing.Size(97, 42);
this.btnTrigger.TabIndex = 8;
this.btnTrigger.Text = "ManualInvoke";
this.btnTrigger.UseVisualStyleBackColor = true;
this.btnTrigger.Click += new System.EventHandler(this.btnManualTrigger_Click);
//
// cboTestMethod
//
this.cboTestMethod.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cboTestMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestMethod.FormattingEnabled = true;
this.cboTestMethod.Location = new System.Drawing.Point(282, 33);
this.cboTestMethod.Name = "cboTestMethod";
this.cboTestMethod.Size = new System.Drawing.Size(256, 20);
this.cboTestMethod.TabIndex = 9;
this.cboTestMethod.SelectedIndexChanged += new System.EventHandler(this.cboTestMethod_SelectedIndexChanged);
//
// tbService
//
this.tbService.Controls.Add(this.label7);
this.tbService.Location = new System.Drawing.Point(4, 22);
this.tbService.Name = "tbService";
this.tbService.Size = new System.Drawing.Size(576, 645);
this.tbService.TabIndex = 4;
this.tbService.Text = "服务";
this.tbService.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(13, 12);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(149, 12);
this.label7.TabIndex = 0;
this.label7.Text = "本项目不支持服务类型功能";
//
// tbLog
//
this.tbLog.Controls.Add(this.splitContainer1);
this.tbLog.Location = new System.Drawing.Point(4, 22);
this.tbLog.Name = "tbLog";
this.tbLog.Padding = new System.Windows.Forms.Padding(3);
this.tbLog.Size = new System.Drawing.Size(576, 645);
this.tbLog.TabIndex = 3;
this.tbLog.Text = "显示/日志";
this.tbLog.UseVisualStyleBackColor = true;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(3, 3);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.plCanvas);
this.splitContainer1.Panel1.Controls.Add(this.chkHardwareTrigger);
this.splitContainer1.Panel1.Controls.Add(this.lblFrameRate);
this.splitContainer1.Panel1.Controls.Add(this.chkContinueMode);
this.splitContainer1.Panel1.Controls.Add(this.btnSnap);
this.splitContainer1.Panel1.Controls.Add(this.label4);
this.splitContainer1.Panel1.Controls.Add(this.cboCameras);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.txtError);
this.splitContainer1.Panel2.Controls.Add(this.btnClearError);
this.splitContainer1.Size = new System.Drawing.Size(570, 639);
this.splitContainer1.SplitterDistance = 497;
this.splitContainer1.TabIndex = 2;
//
// plCanvas
//
this.plCanvas.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.plCanvas.Location = new System.Drawing.Point(3, 39);
this.plCanvas.Name = "plCanvas";
this.plCanvas.Size = new System.Drawing.Size(564, 455);
this.plCanvas.TabIndex = 7;
//
// chkHardwareTrigger
//
this.chkHardwareTrigger.AutoSize = true;
this.chkHardwareTrigger.Location = new System.Drawing.Point(220, 12);
this.chkHardwareTrigger.Name = "chkHardwareTrigger";
this.chkHardwareTrigger.Size = new System.Drawing.Size(60, 16);
this.chkHardwareTrigger.TabIndex = 6;
this.chkHardwareTrigger.Text = "硬触发";
this.chkHardwareTrigger.UseVisualStyleBackColor = true;
this.chkHardwareTrigger.CheckedChanged += new System.EventHandler(this.chkHardwareTrigger_CheckedChanged);
//
// lblFrameRate
//
this.lblFrameRate.AutoSize = true;
this.lblFrameRate.Location = new System.Drawing.Point(481, 14);
this.lblFrameRate.Name = "lblFrameRate";
this.lblFrameRate.Size = new System.Drawing.Size(35, 12);
this.lblFrameRate.TabIndex = 5;
this.lblFrameRate.Text = " ";
//
// chkContinueMode
//
this.chkContinueMode.AutoSize = true;
this.chkContinueMode.Location = new System.Drawing.Point(402, 12);
this.chkContinueMode.Name = "chkContinueMode";
this.chkContinueMode.Size = new System.Drawing.Size(72, 16);
this.chkContinueMode.TabIndex = 4;
this.chkContinueMode.Text = "连续模式";
this.chkContinueMode.UseVisualStyleBackColor = true;
this.chkContinueMode.CheckedChanged += new System.EventHandler(this.chkContinueMode_CheckedChanged);
//
// btnSnap
//
this.btnSnap.Location = new System.Drawing.Point(319, 7);
this.btnSnap.Name = "btnSnap";
this.btnSnap.Size = new System.Drawing.Size(75, 23);
this.btnSnap.TabIndex = 3;
this.btnSnap.Text = "拍照";
this.btnSnap.UseVisualStyleBackColor = true;
this.btnSnap.Click += new System.EventHandler(this.btnSnap_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(10, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(65, 12);
this.label4.TabIndex = 2;
this.label4.Text = "选择相机:";
//
// cboCameras
//
this.cboCameras.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboCameras.FormattingEnabled = true;
this.cboCameras.Location = new System.Drawing.Point(81, 10);
this.cboCameras.Name = "cboCameras";
this.cboCameras.Size = new System.Drawing.Size(121, 20);
this.cboCameras.TabIndex = 1;
this.cboCameras.SelectedIndexChanged += new System.EventHandler(this.cboCameras_SelectedIndexChanged);
//
// txtError
//
this.txtError.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtError.Location = new System.Drawing.Point(3, 3);
this.txtError.Multiline = true;
this.txtError.Name = "txtError";
this.txtError.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtError.Size = new System.Drawing.Size(483, 131);
this.txtError.TabIndex = 0;
//
// btnClearError
//
this.btnClearError.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearError.Location = new System.Drawing.Point(490, 3);
this.btnClearError.Name = "btnClearError";
this.btnClearError.Size = new System.Drawing.Size(75, 23);
this.btnClearError.TabIndex = 1;
this.btnClearError.Text = "清空信息";
this.btnClearError.UseVisualStyleBackColor = true;
this.btnClearError.Click += new System.EventHandler(this.btnClearError_Click);
//
// btnStartProcess
//
this.btnStartProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStartProcess.Location = new System.Drawing.Point(8, 92);
this.btnStartProcess.Name = "btnStartProcess";
this.btnStartProcess.Size = new System.Drawing.Size(88, 23);
this.btnStartProcess.TabIndex = 1;
this.btnStartProcess.Text = "StartProcess";
this.btnStartProcess.UseVisualStyleBackColor = true;
this.btnStartProcess.Click += new System.EventHandler(this.btnStartProcess_Click);
//
// btnStopProcess
//
this.btnStopProcess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopProcess.Location = new System.Drawing.Point(8, 121);
this.btnStopProcess.Name = "btnStopProcess";
this.btnStopProcess.Size = new System.Drawing.Size(88, 23);
this.btnStopProcess.TabIndex = 1;
this.btnStopProcess.Text = "StopProcess";
this.btnStopProcess.UseVisualStyleBackColor = true;
this.btnStopProcess.Visible = false;
this.btnStopProcess.Click += new System.EventHandler(this.btnStopProcess_Click);
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(8, 438);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Test";
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// btnLoadWarningFromFile
//
this.btnLoadWarningFromFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnLoadWarningFromFile.Location = new System.Drawing.Point(10, 115);
this.btnLoadWarningFromFile.Name = "btnLoadWarningFromFile";
this.btnLoadWarningFromFile.Size = new System.Drawing.Size(88, 24);
this.btnLoadWarningFromFile.TabIndex = 1;
this.btnLoadWarningFromFile.Text = "LoadWarning";
this.btnLoadWarningFromFile.UseVisualStyleBackColor = true;
this.btnLoadWarningFromFile.Visible = false;
//
// btnLoadLocal
//
this.btnLoadLocal.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnLoadLocal.Location = new System.Drawing.Point(10, 35);
this.btnLoadLocal.Name = "btnLoadLocal";
this.btnLoadLocal.Size = new System.Drawing.Size(88, 23);
this.btnLoadLocal.TabIndex = 1;
this.btnLoadLocal.Text = "LoadLocal";
this.btnLoadLocal.UseVisualStyleBackColor = true;
this.btnLoadLocal.Click += new System.EventHandler(this.btnLoadLocal_Click);
//
// plAdvanced
//
this.plAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.plAdvanced.Controls.Add(this.btnExitAdvanced);
this.plAdvanced.Controls.Add(this.btnPrintCheck);
this.plAdvanced.Controls.Add(this.btnDeleteRecord);
this.plAdvanced.Controls.Add(this.btnNewConfig);
this.plAdvanced.Controls.Add(this.btnLoadWarningFromFile);
this.plAdvanced.Controls.Add(this.btnLoadHistory);
this.plAdvanced.Controls.Add(this.btnLoadLocal);
this.plAdvanced.Location = new System.Drawing.Point(592, 55);
this.plAdvanced.Name = "plAdvanced";
this.plAdvanced.Size = new System.Drawing.Size(108, 614);
this.plAdvanced.TabIndex = 4;
this.plAdvanced.Visible = false;
//
// btnExitAdvanced
//
this.btnExitAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnExitAdvanced.Location = new System.Drawing.Point(10, 575);
this.btnExitAdvanced.Name = "btnExitAdvanced";
this.btnExitAdvanced.Size = new System.Drawing.Size(88, 23);
this.btnExitAdvanced.TabIndex = 1;
this.btnExitAdvanced.Text = "EXIT";
this.btnExitAdvanced.UseVisualStyleBackColor = true;
this.btnExitAdvanced.Click += new System.EventHandler(this.btnExitAdvanced_Click);
//
// btnPrintCheck
//
this.btnPrintCheck.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnPrintCheck.Location = new System.Drawing.Point(10, 263);
this.btnPrintCheck.Name = "btnPrintCheck";
this.btnPrintCheck.Size = new System.Drawing.Size(88, 23);
this.btnPrintCheck.TabIndex = 1;
this.btnPrintCheck.Text = "PrinterCheck";
this.btnPrintCheck.UseVisualStyleBackColor = true;
this.btnPrintCheck.Visible = false;
//
// btnDeleteRecord
//
this.btnDeleteRecord.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDeleteRecord.Location = new System.Drawing.Point(10, 292);
this.btnDeleteRecord.Name = "btnDeleteRecord";
this.btnDeleteRecord.Size = new System.Drawing.Size(88, 23);
this.btnDeleteRecord.TabIndex = 1;
this.btnDeleteRecord.Text = "DataMigration";
this.btnDeleteRecord.UseVisualStyleBackColor = true;
this.btnDeleteRecord.Visible = false;
//
// btnLoadHistory
//
this.btnLoadHistory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnLoadHistory.Location = new System.Drawing.Point(10, 75);
this.btnLoadHistory.Name = "btnLoadHistory";
this.btnLoadHistory.Size = new System.Drawing.Size(88, 23);
this.btnLoadHistory.TabIndex = 1;
this.btnLoadHistory.Text = "ViewHistory";
this.btnLoadHistory.UseVisualStyleBackColor = true;
this.btnLoadHistory.Visible = false;
//
// btnAdvanced
//
this.btnAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdvanced.Location = new System.Drawing.Point(8, 569);
this.btnAdvanced.Name = "btnAdvanced";
this.btnAdvanced.Size = new System.Drawing.Size(88, 23);
this.btnAdvanced.TabIndex = 1;
this.btnAdvanced.Text = "Advanced";
this.btnAdvanced.UseVisualStyleBackColor = true;
this.btnAdvanced.Click += new System.EventHandler(this.btnAdvanced_Click);
//
// plBasic
//
this.plBasic.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.plBasic.Controls.Add(this.btnSaveProcess);
this.plBasic.Controls.Add(this.btnStartProcess);
this.plBasic.Controls.Add(this.btnLoadProcess);
this.plBasic.Controls.Add(this.btnStopProcess);
this.plBasic.Controls.Add(this.btnAdvanced);
this.plBasic.Controls.Add(this.button1);
this.plBasic.Location = new System.Drawing.Point(593, 56);
this.plBasic.Name = "plBasic";
this.plBasic.Size = new System.Drawing.Size(106, 609);
this.plBasic.TabIndex = 4;
//
// cboProductionCode
//
this.cboProductionCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cboProductionCode.FormattingEnabled = true;
this.cboProductionCode.Location = new System.Drawing.Point(602, 23);
this.cboProductionCode.Name = "cboProductionCode";
this.cboProductionCode.Size = new System.Drawing.Size(87, 20);
this.cboProductionCode.TabIndex = 5;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsslLoginStatus});
this.statusStrip1.Location = new System.Drawing.Point(0, 686);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(701, 22);
this.statusStrip1.TabIndex = 6;
this.statusStrip1.Text = "statusStrip1";
//
// tsslLoginStatus
//
this.tsslLoginStatus.Margin = new System.Windows.Forms.Padding(15, 3, 0, 2);
this.tsslLoginStatus.Name = "tsslLoginStatus";
this.tsslLoginStatus.Size = new System.Drawing.Size(44, 17);
this.tsslLoginStatus.Text = "未登录";
this.tsslLoginStatus.Click += new System.EventHandler(this.tsslLoginStatus_Click);
//
// ConfigFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(701, 708);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.cboProductionCode);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.plBasic);
this.Controls.Add(this.plAdvanced);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ConfigFrm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConfigFrm_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
this.tabControl1.ResumeLayout(false);
this.tbConfig.ResumeLayout(false);
this.tbCalibration.ResumeLayout(false);
this.tbCalibration.PerformLayout();
this.tbTest.ResumeLayout(false);
this.tbTest.PerformLayout();
this.tbService.ResumeLayout(false);
this.tbService.PerformLayout();
this.tbLog.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.plAdvanced.ResumeLayout(false);
this.plBasic.ResumeLayout(false);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PropertyGrid propConfig;
private System.Windows.Forms.Button btnNewConfig;
private System.Windows.Forms.Button btnSaveProcess;
private System.Windows.Forms.Button btnLoadProcess;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tbConfig;
private System.Windows.Forms.TabPage tbCalibration;
private System.Windows.Forms.Button btnStartProcess;
private System.Windows.Forms.Button btnStopProcess;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PropertyGrid propCalibrationConfig;
private System.Windows.Forms.Button btnStartCalibration;
private System.Windows.Forms.ComboBox cboCalibrationMethod;
private System.Windows.Forms.TabPage tbTest;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.PropertyGrid propGridTestMethod;
private System.Windows.Forms.Button btnTrigger;
private System.Windows.Forms.ComboBox cboTestMethod;
private System.Windows.Forms.TabPage tbLog;
private System.Windows.Forms.Button btnClearError;
private System.Windows.Forms.TextBox txtError;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnLoadWarningFromFile;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtInvokeTimes;
private System.Windows.Forms.Button btnLoadLocal;
private System.Windows.Forms.Panel plAdvanced;
private System.Windows.Forms.Button btnExitAdvanced;
private System.Windows.Forms.Button btnLoadHistory;
private System.Windows.Forms.Button btnAdvanced;
private System.Windows.Forms.Button btnDeleteRecord;
private System.Windows.Forms.Button btnPrintCheck;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cboCameras;
private System.Windows.Forms.Panel plBasic;
private System.Windows.Forms.ComboBox cboProductionCode;
private System.Windows.Forms.CheckBox chkContinueMode;
private System.Windows.Forms.Button btnSnap;
private System.Windows.Forms.Label lblFrameRate;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel tsslLoginStatus;
private System.Windows.Forms.CheckBox chkHardwareTrigger;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox cboTestSourceDevices;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox cboCalibSourceDevices;
private System.Windows.Forms.TabPage tbService;
private System.Windows.Forms.Panel plCanvas;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox cboTestExecuteDevice;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox cboCalibExecuteDevice;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,111 @@
namespace BRS.UI.Main
{
partial class CtrlDeviceState
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.plState = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkDevice = new System.Windows.Forms.CheckBox();
this.lblName = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// plState
//
this.plState.Anchor = System.Windows.Forms.AnchorStyles.None;
this.plState.BackColor = System.Drawing.SystemColors.Control;
this.plState.Location = new System.Drawing.Point(98, 3);
this.plState.Name = "plState";
this.plState.Size = new System.Drawing.Size(19, 19);
this.plState.TabIndex = 1;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.Controls.Add(this.plState, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.chkDevice, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblName, 1, 0);
this.tableLayoutPanel1.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.tableLayoutPanel1.Location = new System.Drawing.Point(1, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(120, 25);
this.tableLayoutPanel1.TabIndex = 2;
//
// chkDevice
//
this.chkDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.chkDevice.AutoSize = true;
this.chkDevice.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkDevice.Location = new System.Drawing.Point(3, 3);
this.chkDevice.Name = "chkDevice";
this.chkDevice.Size = new System.Drawing.Size(15, 19);
this.chkDevice.TabIndex = 2;
this.chkDevice.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.chkDevice.UseVisualStyleBackColor = true;
//
// lblName
//
this.lblName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(24, 0);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(68, 25);
this.lblName.TabIndex = 3;
this.lblName.Text = "label1";
this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// CtrlDeviceState
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.tableLayoutPanel1);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.Name = "CtrlDeviceState";
this.Size = new System.Drawing.Size(122, 29);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plState;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.CheckBox chkDevice;
private System.Windows.Forms.Label lblName;
}
}

View File

@ -0,0 +1,101 @@
using BRS.Common.Factory;
using BRS.Common.Model.Helper;
using BRS.Common.Interface;
using System;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
namespace BRS.UI.Main
{
public partial class CtrlDeviceState : UserControl
{
public event Action<string, bool> OnDeviceCheckedChanged;
private IDevice device = null;
public IDevice Device
{
get => device;
set
{
if (value != null)
{
device = value;
lblName.Text = device.Name;
device.OnDeviceStateChanged += Device_OnDeviceStateChanged;
Device_OnDeviceStateChanged(device, device.CurrentState);
CheckDeviceRunCtrlEnabled();
chkDevice.CheckedChanged -= ChkDevice_CheckedChanged;
chkDevice.CheckedChanged += ChkDevice_CheckedChanged;
}
}
}
public bool IsChecked
{
get => chkDevice.Checked;
set
{
chkDevice.CheckedChanged -= ChkDevice_CheckedChanged;
chkDevice.Checked = value;
chkDevice.CheckedChanged += ChkDevice_CheckedChanged;
}
}
private void ChkDevice_CheckedChanged(object sender, EventArgs e)
{
OnDeviceCheckedChanged?.Invoke(Device.Id, chkDevice.Checked);
}
private void CheckDeviceRunCtrlEnabled()
{
string typeCode = Device.GetType().GetCustomAttribute<DeviceAttribute>()?.TypeCode;
if (!string.IsNullOrWhiteSpace(typeCode))
{
chkDevice.Enabled = UIFactory.IsDeviceCtrlExisted(typeCode, EnumHelper.DeviceAttributeType.RunCtrl);
}
else
{
chkDevice.Enabled = false;
}
//if (chkDevice.Enabled)
//{
// chkDevice.Checked = true;
//}
}
private void Device_OnDeviceStateChanged(IDevice device, EnumHelper.DeviceState deviceState)
{
//Graphics g = plState.CreateGraphics();
//g.Clear(SystemColors.Control);
//g.FillEllipse(new SolidBrush(deviceState.GetEnumSelectedColor()), plState.ClientRectangle);
plState.Refresh();
}
public CtrlDeviceState()
{
InitializeComponent();
}
public CtrlDeviceState(IDevice _device)
{
InitializeComponent();
Device = _device;
plState.Paint += PlState_Paint;
}
private void PlState_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
g.Clear(SystemColors.Control);
g.FillEllipse(new SolidBrush(Device.CurrentState.GetEnumSelectedColor()), plState.ClientRectangle);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,178 @@
namespace BRS.UI.Main.Ctrls
{
partial class CtrlMethodInvoke
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label8 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cboTestExecuteDevice = new System.Windows.Forms.ComboBox();
this.propOpConfig = new System.Windows.Forms.PropertyGrid();
this.cboTestSourceDevices = new System.Windows.Forms.ComboBox();
this.cboTestMethod = new System.Windows.Forms.ComboBox();
this.btnInvoke = new System.Windows.Forms.Button();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(138, 20);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(55, 13);
this.label8.TabIndex = 16;
this.label8.Text = "执行设备";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(23, 20);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(55, 13);
this.label5.TabIndex = 17;
this.label5.Text = "触发设备";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(253, 20);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 13);
this.label2.TabIndex = 18;
this.label2.Text = "测试方法";
//
// cboTestExecuteDevice
//
this.cboTestExecuteDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestExecuteDevice.FormattingEnabled = true;
this.cboTestExecuteDevice.Location = new System.Drawing.Point(138, 36);
this.cboTestExecuteDevice.Name = "cboTestExecuteDevice";
this.cboTestExecuteDevice.Size = new System.Drawing.Size(109, 21);
this.cboTestExecuteDevice.TabIndex = 12;
//
// propOpConfig
//
this.propOpConfig.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.SetColumnSpan(this.propOpConfig, 4);
this.propOpConfig.Location = new System.Drawing.Point(23, 64);
this.propOpConfig.Name = "propOpConfig";
this.propOpConfig.Size = new System.Drawing.Size(553, 360);
this.propOpConfig.TabIndex = 15;
this.propOpConfig.ToolbarVisible = false;
//
// cboTestSourceDevices
//
this.cboTestSourceDevices.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestSourceDevices.FormattingEnabled = true;
this.cboTestSourceDevices.Location = new System.Drawing.Point(23, 36);
this.cboTestSourceDevices.Name = "cboTestSourceDevices";
this.cboTestSourceDevices.Size = new System.Drawing.Size(109, 21);
this.cboTestSourceDevices.TabIndex = 13;
//
// cboTestMethod
//
this.cboTestMethod.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cboTestMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboTestMethod.FormattingEnabled = true;
this.cboTestMethod.Location = new System.Drawing.Point(253, 36);
this.cboTestMethod.Name = "cboTestMethod";
this.cboTestMethod.Size = new System.Drawing.Size(242, 21);
this.cboTestMethod.TabIndex = 14;
//
// btnInvoke
//
this.btnInvoke.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnInvoke.Location = new System.Drawing.Point(501, 35);
this.btnInvoke.Margin = new System.Windows.Forms.Padding(3, 2, 3, 3);
this.btnInvoke.Name = "btnInvoke";
this.btnInvoke.Size = new System.Drawing.Size(75, 23);
this.btnInvoke.TabIndex = 19;
this.btnInvoke.Text = "调 用";
this.btnInvoke.UseVisualStyleBackColor = true;
this.btnInvoke.Click += new System.EventHandler(this.btnInvoke_Click);
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 6;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Controls.Add(this.propOpConfig, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.cboTestMethod, 3, 2);
this.tableLayoutPanel1.Controls.Add(this.cboTestExecuteDevice, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.cboTestSourceDevices, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.label8, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.label5, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.label2, 3, 1);
this.tableLayoutPanel1.Controls.Add(this.btnInvoke, 4, 2);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(20);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(599, 427);
this.tableLayoutPanel1.TabIndex = 20;
//
// CtrlMethodInvoke
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.Name = "CtrlMethodInvoke";
this.Size = new System.Drawing.Size(599, 427);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cboTestExecuteDevice;
private System.Windows.Forms.PropertyGrid propOpConfig;
private System.Windows.Forms.ComboBox cboTestSourceDevices;
private System.Windows.Forms.ComboBox cboTestMethod;
private System.Windows.Forms.Button btnInvoke;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}

View File

@ -0,0 +1,202 @@
using Autofac;
using BRS.Common.Model.Helper;
using BRS.Common.Interface;
using BRS.Common.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BRS.UI.Main.Ctrls
{
public partial class CtrlMethodInvoke : UserControl, IProcessObserver, ILogOutput
{
public CtrlMethodInvoke()
{
InitializeComponent();
}
InvokeType _invokeType = InvokeType.NoneInvoke;
List<string> _avaiableMethods { get; set; } = new List<string>();
private IProcess process = null;
public IProcess Process
{
get => process;
set
{
if (process != value)
{
process = value;
OnProcessUpdated();
}
}
}
#region ILogoutput
public event Action<LogMsg> OnLogMsgOutput;
public void LogDisplay(LogMsg msg)
{
}
#endregion
public CtrlMethodInvoke(InvokeType invokeType)
{
InitializeComponent();
_invokeType = invokeType;
}
public void OnProcessUpdated()
{
if (InvokeRequired)
{
Invoke(new Action(() => OnProcessUpdated()));
}
else
{
if (Process != null)
{
_avaiableMethods = Process.ProcessMethodCollection.Where(u => u.InvokeType == _invokeType).Select(u => u.MethodCode).ToList();
LoadDevices();
LoadProcessMethods();
}
}
}
public void DownloadProcess(IProcess process)
{
Process = process;
}
private void LoadProcessMethods()
{
var monitorSet = Process.IConfig.GetAllMonitorSet();
var msList = monitorSet.Where(monitor => _avaiableMethods.Contains(monitor.MethodCode)).ToList();
//_avaiableMethods.ForEach(u =>
//{
// if (!msList.Any(m => m.MethodCode == u))
// {
// SimpleMonitorSet ms = new SimpleMonitorSet()
// {
// MethodCode = u,
// Name = "无调用/无绑定",
// };
// msList.Add(ms);
// }
//});
UIHelper.SetCombo(cboTestMethod, msList, "DisplayText", "Id");
cboTestMethod.SelectedIndexChanged += cboTestMethod_SelectedIndexChanged;
cboTestMethod_SelectedIndexChanged(null, null);
}
private void LoadDevices()
{
if (Process.DeviceCollection.Count > 0)
{
List<IDevice> devices = new List<IDevice>(Process.DeviceCollection);
List<ISimpleDevice> sDevices = new List<ISimpleDevice>(devices);
sDevices.Insert(0, new SimpleDevice() { Id = "", Name = "未指定" });
UIHelper.SetCombo(cboTestExecuteDevice, new List<ISimpleDevice>(sDevices), "Name", "Id");
UIHelper.SetCombo(cboTestSourceDevices, new List<ISimpleDevice>(sDevices), "Name", "Id");
}
}
#region event
IDevice _sourceDevice = null, _invokeDevice = null;
string _methodCode = "";
MethodInfo _method = null;
private void cboTestMethod_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboTestMethod.SelectedIndex >= 0)
{
IMonitorSet ms = cboTestMethod.SelectedItem as IMonitorSet;
_methodCode = ms.MethodCode;
_method = Process.ProcessMethodDict[_methodCode];
propOpConfig.SelectedObject = ms.OpConfig;
cboTestSourceDevices.SelectedValue = ms.SourceDeviceId;
cboTestSourceDevices.Enabled = string.IsNullOrWhiteSpace(ms.SourceDeviceId);
cboTestExecuteDevice.SelectedValue = ms.ExecuteDevice;
cboTestExecuteDevice.Enabled = string.IsNullOrWhiteSpace(ms.ExecuteDevice);
}
}
/// <summary>
/// 调用按钮点击事件
/// </summary>
private void btnInvoke_Click(object sender, EventArgs e)
{
if (cboTestSourceDevices.SelectedIndex >= 0)
{
_sourceDevice = cboTestSourceDevices.SelectedItem as IDevice;
}
if (cboTestExecuteDevice.SelectedIndex >= 0)
{
_invokeDevice = cboTestExecuteDevice.SelectedItem as IDevice;
}
if (_sourceDevice == null || _invokeDevice == null)
{
if (MessageBox.Show("发起设备或者执行设备为空,是否继续", "设备为空提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
return;
}
IOperationConfig opConfig = propOpConfig.SelectedObject as IOperationConfig;
Task.Run(() =>
{
OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, EnumHelper.LogLevel.Action, $"{_methodCode}调用开始"));
try
{
ResponseMessage response = _method.Invoke(Process, new object[] { opConfig, _invokeDevice, _sourceDevice }) as ResponseMessage;
if (response != null)
{
OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, EnumHelper.LogLevel.Action, $"{_methodCode}调用完成,反馈:{JsonConvert.SerializeObject(response)}"));
}
}
catch (Exception ex)
{
OnLogMsgOutput?.Invoke(new LogMsg(DateTime.Now, EnumHelper.LogLevel.Warning, $"{_methodCode}调用异常:{ex.GetExceptionMessage()}"));
}
});
}
#endregion
}
//public class FullMonitorSet : IComplexDisplay
//{
// public IMonitorSet MonitorSetInfo { get; set; }
// public IDevice SourceDevice { get; set; }
// public string GetDisplayText()
// {
// string desc = MonitorSetInfo.DisplayText;
// desc = $"{SourceDevice?.Name ?? "无源设备"} " + desc;
// return desc;
// }
//}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

313
src/BRS.UI.Main/FrmEditModel.Designer.cs generated Normal file
View File

@ -0,0 +1,313 @@
namespace Bro.UI.Config
{
partial class FrmEditModel
{
/// <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.plImage = new System.Windows.Forms.Panel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tpEditModel = new System.Windows.Forms.TabPage();
this.pgCreateModel = new System.Windows.Forms.PropertyGrid();
this.btnSaveModel = new System.Windows.Forms.Button();
this.btnCreateModel = new System.Windows.Forms.Button();
this.btnLoadImage = new System.Windows.Forms.Button();
this.tpTestModel = new System.Windows.Forms.TabPage();
this.dgvImages = new System.Windows.Forms.DataGridView();
this.clName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clMatchNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pgFindConfig = new System.Windows.Forms.PropertyGrid();
this.lblImageFolder = new System.Windows.Forms.Label();
this.lblModel = new System.Windows.Forms.Label();
this.btnLoadImageFolder = new System.Windows.Forms.Button();
this.btnTestAll = new System.Windows.Forms.Button();
this.btnTestNext = new System.Windows.Forms.Button();
this.btnTestCurrent = new System.Windows.Forms.Button();
this.btnLoadModel = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tpEditModel.SuspendLayout();
this.tpTestModel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvImages)).BeginInit();
this.SuspendLayout();
//
// plImage
//
this.plImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.plImage.Location = new System.Drawing.Point(4, 2);
this.plImage.Name = "plImage";
this.plImage.Size = new System.Drawing.Size(535, 448);
this.plImage.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tpEditModel);
this.tabControl1.Controls.Add(this.tpTestModel);
this.tabControl1.Location = new System.Drawing.Point(545, 2);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(253, 448);
this.tabControl1.TabIndex = 1;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tpEditModel
//
this.tpEditModel.Controls.Add(this.pgCreateModel);
this.tpEditModel.Controls.Add(this.btnSaveModel);
this.tpEditModel.Controls.Add(this.btnCreateModel);
this.tpEditModel.Controls.Add(this.btnLoadImage);
this.tpEditModel.Location = new System.Drawing.Point(4, 22);
this.tpEditModel.Name = "tpEditModel";
this.tpEditModel.Padding = new System.Windows.Forms.Padding(3);
this.tpEditModel.Size = new System.Drawing.Size(245, 422);
this.tpEditModel.TabIndex = 0;
this.tpEditModel.Text = "编辑模板";
this.tpEditModel.UseVisualStyleBackColor = true;
//
// pgCreateModel
//
this.pgCreateModel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pgCreateModel.Location = new System.Drawing.Point(7, 36);
this.pgCreateModel.Name = "pgCreateModel";
this.pgCreateModel.Size = new System.Drawing.Size(232, 349);
this.pgCreateModel.TabIndex = 1;
//
// btnSaveModel
//
this.btnSaveModel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveModel.Location = new System.Drawing.Point(164, 391);
this.btnSaveModel.Name = "btnSaveModel";
this.btnSaveModel.Size = new System.Drawing.Size(75, 23);
this.btnSaveModel.TabIndex = 0;
this.btnSaveModel.Text = "保存模板";
this.btnSaveModel.UseVisualStyleBackColor = true;
this.btnSaveModel.Click += new System.EventHandler(this.btnSaveModel_Click);
//
// btnCreateModel
//
this.btnCreateModel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCreateModel.Location = new System.Drawing.Point(7, 391);
this.btnCreateModel.Name = "btnCreateModel";
this.btnCreateModel.Size = new System.Drawing.Size(75, 23);
this.btnCreateModel.TabIndex = 0;
this.btnCreateModel.Text = "建立模板";
this.btnCreateModel.UseVisualStyleBackColor = true;
this.btnCreateModel.Click += new System.EventHandler(this.btnCreateModel_Click);
//
// btnLoadImage
//
this.btnLoadImage.Location = new System.Drawing.Point(6, 6);
this.btnLoadImage.Name = "btnLoadImage";
this.btnLoadImage.Size = new System.Drawing.Size(75, 23);
this.btnLoadImage.TabIndex = 0;
this.btnLoadImage.Text = "载入图片";
this.btnLoadImage.UseVisualStyleBackColor = true;
this.btnLoadImage.Click += new System.EventHandler(this.btnLoadImage_Click);
//
// tpTestModel
//
this.tpTestModel.Controls.Add(this.dgvImages);
this.tpTestModel.Controls.Add(this.pgFindConfig);
this.tpTestModel.Controls.Add(this.lblImageFolder);
this.tpTestModel.Controls.Add(this.lblModel);
this.tpTestModel.Controls.Add(this.btnLoadImageFolder);
this.tpTestModel.Controls.Add(this.btnTestAll);
this.tpTestModel.Controls.Add(this.btnTestNext);
this.tpTestModel.Controls.Add(this.btnTestCurrent);
this.tpTestModel.Controls.Add(this.btnLoadModel);
this.tpTestModel.Location = new System.Drawing.Point(4, 22);
this.tpTestModel.Name = "tpTestModel";
this.tpTestModel.Padding = new System.Windows.Forms.Padding(3);
this.tpTestModel.Size = new System.Drawing.Size(245, 422);
this.tpTestModel.TabIndex = 1;
this.tpTestModel.Text = "测试模板";
this.tpTestModel.UseVisualStyleBackColor = true;
//
// dgvImages
//
this.dgvImages.AllowUserToAddRows = false;
this.dgvImages.AllowUserToDeleteRows = false;
this.dgvImages.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dgvImages.BackgroundColor = System.Drawing.SystemColors.Control;
this.dgvImages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvImages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.clName,
this.clMatchNum});
this.dgvImages.Location = new System.Drawing.Point(6, 150);
this.dgvImages.MultiSelect = false;
this.dgvImages.Name = "dgvImages";
this.dgvImages.ReadOnly = true;
this.dgvImages.RowHeadersVisible = false;
this.dgvImages.RowTemplate.Height = 23;
this.dgvImages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvImages.Size = new System.Drawing.Size(233, 115);
this.dgvImages.TabIndex = 4;
this.dgvImages.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvImages_CellDoubleClick);
//
// clName
//
this.clName.DataPropertyName = "Name";
this.clName.HeaderText = "图片名称";
this.clName.Name = "clName";
this.clName.ReadOnly = true;
//
// clMatchNum
//
this.clMatchNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.clMatchNum.DataPropertyName = "ModelMatchNum";
this.clMatchNum.HeaderText = "匹配数量";
this.clMatchNum.Name = "clMatchNum";
this.clMatchNum.ReadOnly = true;
this.clMatchNum.Width = 80;
//
// pgFindConfig
//
this.pgFindConfig.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pgFindConfig.Location = new System.Drawing.Point(6, 271);
this.pgFindConfig.Name = "pgFindConfig";
this.pgFindConfig.Size = new System.Drawing.Size(233, 143);
this.pgFindConfig.TabIndex = 3;
this.pgFindConfig.ToolbarVisible = false;
//
// lblImageFolder
//
this.lblImageFolder.AutoSize = true;
this.lblImageFolder.Location = new System.Drawing.Point(10, 89);
this.lblImageFolder.Name = "lblImageFolder";
this.lblImageFolder.Size = new System.Drawing.Size(22, 13);
this.lblImageFolder.TabIndex = 1;
this.lblImageFolder.Text = " ";
//
// lblModel
//
this.lblModel.AutoSize = true;
this.lblModel.Location = new System.Drawing.Point(10, 39);
this.lblModel.Name = "lblModel";
this.lblModel.Size = new System.Drawing.Size(22, 13);
this.lblModel.TabIndex = 1;
this.lblModel.Text = " ";
//
// btnLoadImageFolder
//
this.btnLoadImageFolder.Location = new System.Drawing.Point(6, 57);
this.btnLoadImageFolder.Name = "btnLoadImageFolder";
this.btnLoadImageFolder.Size = new System.Drawing.Size(113, 23);
this.btnLoadImageFolder.TabIndex = 0;
this.btnLoadImageFolder.Text = "载入图片文件夹";
this.btnLoadImageFolder.UseVisualStyleBackColor = true;
this.btnLoadImageFolder.Click += new System.EventHandler(this.btnLoadImageFolder_Click);
//
// btnTestAll
//
this.btnTestAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnTestAll.Location = new System.Drawing.Point(164, 121);
this.btnTestAll.Name = "btnTestAll";
this.btnTestAll.Size = new System.Drawing.Size(75, 23);
this.btnTestAll.TabIndex = 0;
this.btnTestAll.Text = "测试全部";
this.btnTestAll.UseVisualStyleBackColor = true;
this.btnTestAll.Click += new System.EventHandler(this.btnTestAll_Click);
//
// btnTestNext
//
this.btnTestNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnTestNext.Location = new System.Drawing.Point(85, 121);
this.btnTestNext.Name = "btnTestNext";
this.btnTestNext.Size = new System.Drawing.Size(75, 23);
this.btnTestNext.TabIndex = 0;
this.btnTestNext.Text = "测试下一项";
this.btnTestNext.UseVisualStyleBackColor = true;
this.btnTestNext.Click += new System.EventHandler(this.btnTestNext_Click);
//
// btnTestCurrent
//
this.btnTestCurrent.Location = new System.Drawing.Point(6, 121);
this.btnTestCurrent.Name = "btnTestCurrent";
this.btnTestCurrent.Size = new System.Drawing.Size(75, 23);
this.btnTestCurrent.TabIndex = 0;
this.btnTestCurrent.Text = "测试当前项";
this.btnTestCurrent.UseVisualStyleBackColor = true;
this.btnTestCurrent.Click += new System.EventHandler(this.btnTestCurrent_Click);
//
// btnLoadModel
//
this.btnLoadModel.Location = new System.Drawing.Point(6, 6);
this.btnLoadModel.Name = "btnLoadModel";
this.btnLoadModel.Size = new System.Drawing.Size(75, 23);
this.btnLoadModel.TabIndex = 0;
this.btnLoadModel.Text = "载入模板";
this.btnLoadModel.UseVisualStyleBackColor = true;
this.btnLoadModel.Click += new System.EventHandler(this.btnLoadModel_Click);
//
// FrmEditModel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.plImage);
this.Name = "FrmEditModel";
this.Text = "FrmEditModel";
this.tabControl1.ResumeLayout(false);
this.tpEditModel.ResumeLayout(false);
this.tpTestModel.ResumeLayout(false);
this.tpTestModel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvImages)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plImage;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tpEditModel;
private System.Windows.Forms.TabPage tpTestModel;
private System.Windows.Forms.PropertyGrid pgCreateModel;
private System.Windows.Forms.Button btnSaveModel;
private System.Windows.Forms.Button btnCreateModel;
private System.Windows.Forms.Button btnLoadImage;
private System.Windows.Forms.Label lblImageFolder;
private System.Windows.Forms.Label lblModel;
private System.Windows.Forms.Button btnLoadImageFolder;
private System.Windows.Forms.Button btnLoadModel;
private System.Windows.Forms.PropertyGrid pgFindConfig;
private System.Windows.Forms.Button btnTestNext;
private System.Windows.Forms.Button btnTestCurrent;
private System.Windows.Forms.DataGridView dgvImages;
private System.Windows.Forms.DataGridViewTextBoxColumn clName;
private System.Windows.Forms.DataGridViewTextBoxColumn clMatchNum;
private System.Windows.Forms.Button btnTestAll;
}
}

View File

@ -0,0 +1,637 @@
using Bro.Common.Helper;
using Bro.UI.Config.Helper;
using Bro.UI.Config.MenuForms;
using Bro.UI.Model.Winform;
using HalconDotNet;
using HDisplay;
using HDisplay.ViewROI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Bro.UI.Config
{
[MenuNode("EditModel", "模板编辑", 4, "View2", true)]
public partial class FrmEditModel : MenuFrmBase
{
CanvasImage canvas = new CanvasImage();
HTuple modelId = null;
HalconDisplay hDisplay = new HalconDisplay();
CreateShapeModelConfig modelConfig = new CreateShapeModelConfig();
FindShapeModelConfig findConfig = new FindShapeModelConfig();
public FrmEditModel()
{
InitializeComponent();
//canvas.Dock = DockStyle.Fill;
//plImage.Controls.Clear();
//plImage.Controls.Add(canvas);
hDisplay.Dock = DockStyle.Fill;
plImage.Controls.Clear();
plImage.Controls.Add(hDisplay);
pgCreateModel.SelectedObject = modelConfig;
pgFindConfig.SelectedObject = findConfig;
dgvImages.AutoGenerateColumns = false;
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (tabControl1.SelectedIndex == 1)
{
canvas.Elements.Clear();
}
}
private void btnLoadImage_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Multiselect = false;
ofd.Filter = "图片文件|*.bmp;*.png;*.jpg;*.jpeg;*.tif|所有文件|*.*";
if (ofd.ShowDialog() == DialogResult.OK)
{
//Bitmap map = (Bitmap)Bitmap.FromFile(ofd.FileName);
//canvas.LoadImage(map);
LoadImage(ofd.FileName);
}
}
private void LoadImage(string imgFileName)
{
hDisplay.ClearDisplay();
hDisplay.Image?.Dispose();
HImage hImage = new HImage();
hImage.ReadImage(imgFileName);
hDisplay.Image = hImage;
hDisplay.Refresh();
}
private void btnCreateModel_Click(object sender, EventArgs e)
{
if (hDisplay.Image == null)
{
MessageBox.Show("请先载入产品图片");
return;
}
if (hDisplay.ROIController.ROIList.Count != 1)
{
MessageBox.Show("请仅设置一个矩阵ROI");
return;
}
HOperatorSet.ClearAllShapeModels();
modelId = null;
HObject rectObj = null;
HOperatorSet.HomMat2dIdentity(out HTuple identityMatrix);
HTuple transformMatrix = null;
if (hDisplay.ROIController.ROIList[0] is ROIRectangle1 rect1)
{
HOperatorSet.GenRectangle1(out rectObj, rect1.Row1, rect1.Col1, rect1.Row2, rect1.Col2);
HOperatorSet.HomMat2dTranslate(identityMatrix, (rect1.Row1 + rect1.Row2) / 2.0, (rect1.Col1 + rect1.Col2) / 2.0, out transformMatrix);
}
else if (hDisplay.ROIController.ROIList[0] is ROIRectangle2 rect2)
{
HOperatorSet.GenRectangle2(out rectObj, rect2.MidR, rect2.MidC, rect2.Phi, rect2.Length1, rect2.Length2);
HOperatorSet.HomMat2dTranslate(identityMatrix, rect2.MidR, rect2.MidC, out transformMatrix);
}
else
{
MessageBox.Show("请仅设置一个矩阵ROI");
return;
}
HOperatorSet.ReduceDomain(hDisplay.Image, rectObj, out HObject imageReduced);
HTuple config = modelConfig.GetHTuple();
HOperatorSet.CreateShapeModel(imageReduced, config[0], config[1], config[2], config[3], config[4], config[5], config[6], config[7], out modelId);
HOperatorSet.GetShapeModelContours(out HObject modelContours, modelId, 1);
HOperatorSet.AffineTransContourXld(modelContours, out HObject countoursAffinTrans, transformMatrix);
hDisplay.ClearGraphicStack();
hDisplay.AddObjectToGraphicStack(hDisplay.Image);
hDisplay.AddObjectToGraphicStack(countoursAffinTrans);
hDisplay.Refresh();
MessageBox.Show("模板创建成功");
}
private void btnSaveModel_Click(object sender, EventArgs e)
{
if (modelId == null)
{
MessageBox.Show("模板句柄为空,无法保存");
return;
}
SaveFileDialog sfd = new SaveFileDialog();
sfd.SupportMultiDottedExtensions = false;
sfd.Filter = "模板文件|*.shm";
sfd.DefaultExt = "shm";
if (sfd.ShowDialog() == DialogResult.OK)
{
HOperatorSet.WriteShapeModel(modelId, sfd.FileName);
MessageBox.Show("模板保存完成");
}
}
private void btnLoadModel_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "模板文件|*.shm";
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
lblModel.Text = "";
HOperatorSet.ReadShapeModel(ofd.FileName, out modelId);
lblModel.Text = ofd.FileName;
}
}
private void btnLoadImageFolder_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.ShowNewFolderButton = false;
if (fbd.ShowDialog() == DialogResult.OK)
{
lblImageFolder.Text = fbd.SelectedPath;
DirectoryInfo dir = new DirectoryInfo(fbd.SelectedPath);
List<string> suffixList = new List<string>() { "bmp", "png", "jpg", "jpeg", "tif" };
var imgFileNames = dir.GetFiles().ToList().Where(u => suffixList.Any(s => u.Name.ToLower().EndsWith(s)))
.Select(u =>
{
TestCase tc = new TestCase();
tc.Name = u.Name;
tc.FullName = u.FullName;
tc.ModelMatchNum = 0;
return tc;
}).ToList();
dgvImages.DataSource = imgFileNames;
}
}
private void dgvImages_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (dgvImages.Rows[e.RowIndex].DataBoundItem is TestCase tc)
{
LoadImage(tc.FullName);
}
}
private void btnTestCurrent_Click(object sender, EventArgs e)
{
if (!CheckBeforeTest())
{
return;
}
RunSelected();
}
private bool RunSelected(int step = 0)
{
int selectedIndex = dgvImages.SelectedRows[0].Index;
if (step != 0)
{
int afterIndex = selectedIndex + step;
if (afterIndex < 0)
{
//MessageBox.Show("当前已经是第一项");
return false;
}
if (afterIndex >= dgvImages.Rows.Count)
{
//MessageBox.Show("当前已经是最后一项");
return false;
}
dgvImages.Rows[selectedIndex].Selected = false;
dgvImages.Rows[afterIndex].Selected = true;
dgvImages.FirstDisplayedScrollingRowIndex = afterIndex;
}
TestCase tc = dgvImages.SelectedRows[0].DataBoundItem as TestCase;
LoadImage(tc.FullName);
HTuple findConfigTuple = findConfig.GetHTuple();
HOperatorSet.FindShapeModel(hDisplay.Image, modelId, findConfigTuple[0], findConfigTuple[1], findConfigTuple[2], findConfigTuple[3], findConfigTuple[4], findConfigTuple[5], findConfigTuple[6], findConfigTuple[7], out HTuple rows, out HTuple cols, out HTuple angles, out HTuple scores);
tc.ModelMatchNum = scores.Length;
HOperatorSet.GetShapeModelContours(out HObject modelContours, modelId, 1);
HOperatorSet.CountObj(modelContours, out HTuple objCount);
HOperatorSet.HomMat2dIdentity(out HTuple identityMatrix);
for (int i = 0; i < tc.ModelMatchNum; i++)
{
HOperatorSet.CopyObj(modelContours, out HObject model, 1, objCount);
HOperatorSet.HomMat2dRotate(identityMatrix, angles[i], 0, 0, out HTuple transformMatrix);
HOperatorSet.HomMat2dTranslate(transformMatrix, rows[i], cols[i], out transformMatrix);
HOperatorSet.AffineTransContourXld(model, out HObject affinedContour, transformMatrix);
hDisplay.AddObjectToGraphicStack(affinedContour);
}
hDisplay.Refresh();
dgvImages.Invalidate();
return true;
}
private bool CheckBeforeTest()
{
if (modelId == null)
{
MessageBox.Show("当前未编辑或者载入模板,请创建模板或者选择模板文件载入");
return false;
}
if (dgvImages.SelectedRows.Count == 0)
{
MessageBox.Show("当前图片列表未选择测试项,请选择需要测试的图片");
return false;
}
return true;
}
private void btnTestNext_Click(object sender, EventArgs e)
{
if (!CheckBeforeTest())
{
return;
}
if (!RunSelected(1))
{
MessageBox.Show("当前已经是最后一项");
}
}
private void btnTestAll_Click(object sender, EventArgs e)
{
if (dgvImages.Rows.Count <= 0)
{
MessageBox.Show("当前无待检测图片");
return;
}
dgvImages.FirstDisplayedScrollingRowIndex = 0;
dgvImages.Rows[0].Selected = true;
bool flag = RunSelected(0);
while (flag)
{
flag = RunSelected(1);
}
MessageBox.Show("检测完成");
}
}
public class TestCase
{
public string Name { get; set; }
public string FullName { get; set; }
public int ModelMatchNum { get; set; } = 0;
}
#region Halcon Model
public abstract class StrictedListConvert : StringConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return true;
}
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
List<string> portNames = GetSupportedValueList();
return new StandardValuesCollection(portNames);
}
protected abstract List<string> GetSupportedValueList();
}
public abstract class ModelConfig
{
public abstract HTuple GetHTuple();
protected void IntCheck(ref ArrayList list, string desc)
{
if (int.TryParse(desc, out int convertValue))
{
list.Add(convertValue);
}
else
{
list.Add(desc);
}
}
protected void DoubleCheck(ref ArrayList list, string desc)
{
if (double.TryParse(desc, out double convertValue))
{
list.Add(convertValue);
}
else
{
list.Add(desc);
}
}
}
#region Create Model
public class NumLevelsConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "auto", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
}
}
public class AngleStartConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "-3.14", "-1.57", "-0.79", "-0.39", "-0.20", "0.0" };
}
}
public class AngleExtentConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "6.29", "3.14", "1.57", "0.79", "0.39" };
}
}
public class AngleStepConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "auto", "0.0175", "0.0349", "0.0524", "0.0698", "0.0873" };
}
}
public enum Optimization
{
auto,
no_pregeneration,
none,
point_reduction_high,
point_reduction_low,
point_reduction_medium,
pregeneration,
}
public enum Metric
{
use_polarity,
ignore_color_polarity,
ignore_global_polarity,
ignore_local_polarity,
}
public class ContrastConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "auto", "auto_contrast", "auto_contrast_hyst", "auto_min_size", "10", "20", "30", "40", "60", "80", "100", "120", "140", "160" };
}
}
public class MinContrastConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "auto", "1", "2", "3", "5", "7", "10", "20", "30", "40" };
}
}
public class CreateShapeModelConfig : ModelConfig
{
[Category("建立模板配置")]
[DisplayName("层次数量")]
[TypeConverter(typeof(NumLevelsConvert))]
public string NumLevles { get; set; } = "auto";
[Category("建立模板配置")]
[DisplayName("起始角度")]
[TypeConverter(typeof(AngleStartConvert))]
public string AngleStart { get; set; } = "-0.39";
[Category("建立模板配置")]
[DisplayName("角度范围")]
[TypeConverter(typeof(AngleExtentConvert))]
public string AngleExtent { get; set; } = "0.79";
[Category("建立模板配置")]
[DisplayName("角度步长")]
[TypeConverter(typeof(AngleStepConvert))]
public string AngleStep { get; set; } = "auto";
[Category("建立模板配置")]
[DisplayName("最优化选择")]
public Optimization Optimization { get; set; } = Optimization.auto;
[Category("建立模板配置")]
[DisplayName("极性")]
public Metric Metric { get; set; } = Metric.use_polarity;
[Category("建立模板配置")]
[DisplayName("对比度")]
[TypeConverter(typeof(ContrastConvert))]
public string Contrast { get; set; } = "auto";
[Category("建立模板配置")]
[DisplayName("最小对比度")]
[TypeConverter(typeof(MinContrastConvert))]
public string MinContrast { get; set; } = "auto";
public override HTuple GetHTuple()
{
ArrayList list = new ArrayList();
IntCheck(ref list, NumLevles);
DoubleCheck(ref list, AngleStart);
DoubleCheck(ref list, AngleExtent);
DoubleCheck(ref list, AngleStep);
list.Add(Optimization.ToString());
list.Add(Metric.ToString());
IntCheck(ref list, Contrast);
IntCheck(ref list, MinContrast);
HTuple hTuple = new HTuple(list.ToArray());
return hTuple;
}
}
#endregion
#region Find Model
public class AngleStartConvert_Find : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "-3.14", "-1.57", "-0.78", "-0.39", "-0.20", "0.0" };
}
}
public class AngleExtentConvert_Find : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "6.29", "3.14", "1.57", "0.78", "0.39", "0.0" };
}
}
public class MinScoreConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0" };
}
}
public class NumMatchesConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "0", "1", "2", "3", "4", "5", "10", "20" };
}
}
public class MaxOverlapConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "0.0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0" };
}
}
public enum SubPixel
{
interpolation,
least_squares,
least_squares_high,
least_squares_very_high,
[Description("max_deformation 1")]
max_deformation_1,
[Description("max_deformation 2")]
max_deformation_2,
[Description("max_deformation 3")]
max_deformation_3,
[Description("max_deformation 4")]
max_deformation_4,
[Description("max_deformation 5")]
max_deformation_5,
[Description("max_deformation 6")]
max_deformation_6,
none,
}
public class NumLevelsConvert_Find : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
}
}
public class GreedinessConvert : StrictedListConvert
{
protected override List<string> GetSupportedValueList()
{
return new List<string>() { "0.0", "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0" };
}
}
public class FindShapeModelConfig : ModelConfig
{
[Category("定位模板配置")]
[DisplayName("起始角度")]
[TypeConverter(typeof(AngleStartConvert_Find))]
public string AngleStart { get; set; } = "-0.39";
[Category("定位模板配置")]
[DisplayName("角度范围")]
[TypeConverter(typeof(AngleExtentConvert_Find))]
public string AngleExtent { get; set; } = "0.78";
[Category("定位模板配置")]
[DisplayName("最小得分")]
[TypeConverter(typeof(MinScoreConvert))]
public string MinScore { get; set; } = "0.7";
[Category("定位模板配置")]
[DisplayName("匹配数量")]
[TypeConverter(typeof(NumMatchesConvert))]
public string NumMatches { get; set; } = "0";
[Category("定位模板配置")]
[DisplayName("最大重叠设置")]
[TypeConverter(typeof(MaxOverlapConvert))]
public string MaxOverlap { get; set; } = "0.5";
[Category("定位模板配置")]
[DisplayName("亚像素设置")]
public SubPixel SubPixel { get; set; } = SubPixel.least_squares;
[Category("定位模板配置")]
[DisplayName("层次数量")]
[TypeConverter(typeof(NumLevelsConvert_Find))]
public string NumLevles { get; set; } = "0";
[Category("定位模板配置")]
[DisplayName("Greediness")]
[TypeConverter(typeof(GreedinessConvert))]
public string Greediness { get; set; } = "0.9";
public override HTuple GetHTuple()
{
ArrayList list = new ArrayList();
DoubleCheck(ref list, AngleStart);
DoubleCheck(ref list, AngleExtent);
DoubleCheck(ref list, MinScore);
IntCheck(ref list, NumMatches);
DoubleCheck(ref list, MaxOverlap);
list.Add(SubPixel.GetEnumDescription());
IntCheck(ref list, NumLevles);
DoubleCheck(ref list, Greediness);
HTuple hTuple = new HTuple(list.ToArray());
return hTuple;
}
}
#endregion
#endregion
}

View File

@ -0,0 +1,126 @@
<?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="clName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clMatchNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -0,0 +1,44 @@
using System;
using WeifenLuo.WinFormsUI.Docking;
namespace Bro.UI.Config.Helper
{
public class MenuNodeAttribute : Attribute
{
public string MenuCode { get; set; }
public string MenuName { get; set; }
public int MenuOrder { get; set; }
public string ParentMenuCode { get; set; }
/// <summary>
/// 表示该窗体是实际显示窗体还是只是父节点
/// </summary>
public bool IsActualForm { get; set; }
public MenuNodeAttribute(string menuCode, string menuName, int menuOrder, string parentMenuCode, bool isActualForm)
{
MenuCode = menuCode;
MenuName = menuName;
MenuOrder = menuOrder;
ParentMenuCode = parentMenuCode;
IsActualForm = isActualForm;
//DockState = dockState;
}
}
public class DockOptionAttribute : Attribute
{
public DockState DockState { get; set; }
public int DefaultWidth { get; set; }
public int DefaultHeight { get; set; }
public DockOptionAttribute(DockState dockState, int defaultWidth, int defaultHeight)
{
DockState = dockState;
DefaultWidth = defaultWidth;
DefaultHeight = defaultHeight;
}
}
}

View File

@ -0,0 +1,67 @@
using Bro.UI.Config.MenuForms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Bro.UI.Model.Helper
{
public static class MenuFormFactory
{
private static Dictionary<MenuNodeAttribute, Type> menuFrmTypeDict = null;
public static Dictionary<MenuNodeAttribute, Type> MenuFrmTypeDict
{
get
{
if (menuFrmTypeDict == null)
{
menuFrmTypeDict = AppDomain.CurrentDomain.GetAssemblies().ToList()
.SelectMany(a => a.GetTypes())
.Where(t =>
{
if (t.GetInterfaces().Contains(typeof(IMenuNode)))
{
var attr = t.GetCustomAttribute<MenuNodeAttribute>();
return attr != null;
}
else
{
return false;
}
}).ToDictionary(t => t.GetCustomAttribute<MenuNodeAttribute>(), t => t);
}
return menuFrmTypeDict;
}
}
public static MenuFrmBase GetMenuFrm(string frmCode)
{
Type frmType = GetMenuFrmType(frmCode);
if (frmType == null)
{
return null;
}
var menu = Activator.CreateInstance(frmType) as MenuFrmBase;
menu.Tag = frmCode;
return menu;
}
public static Type GetMenuFrmType(string frmCode)
{
Type frmType = null;
foreach (KeyValuePair<MenuNodeAttribute, Type> pair in MenuFrmTypeDict)
{
if (pair.Key.MenuCode == frmCode)
{
frmType = pair.Value;
break;
}
}
return frmType;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

288
src/BRS.UI.Main/MainFrm.Designer.cs generated Normal file
View File

@ -0,0 +1,288 @@
namespace BRS.UI.Main
{
partial class MainFrm
{
/// <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.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm));
this.menuMain = new System.Windows.Forms.MenuStrip();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.dockPanelMain = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.ststripDevices = new System.Windows.Forms.StatusStrip();
this.tsslLoginStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.stsStripLayout = new System.Windows.Forms.StatusStrip();
this.tssBtnLayout = new System.Windows.Forms.ToolStripSplitButton();
this.tsmiSaveLayout = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiResetLayout = new System.Windows.Forms.ToolStripMenuItem();
this.stsStripWarning = new System.Windows.Forms.StatusStrip();
this.tsslWarning = new System.Windows.Forms.ToolStripStatusLabel();
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.ctmsExit = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiExitProgram = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiSaveLayoutAs = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.ststripDevices.SuspendLayout();
this.stsStripLayout.SuspendLayout();
this.stsStripWarning.SuspendLayout();
this.ctmsExit.SuspendLayout();
this.SuspendLayout();
//
// menuMain
//
this.menuMain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.menuMain.AutoSize = false;
this.menuMain.Dock = System.Windows.Forms.DockStyle.None;
this.menuMain.Location = new System.Drawing.Point(0, 0);
this.menuMain.Name = "menuMain";
this.menuMain.Padding = new System.Windows.Forms.Padding(6, 1, 0, 1);
this.menuMain.Size = new System.Drawing.Size(728, 24);
this.menuMain.TabIndex = 1;
this.menuMain.Text = "menuStrip1";
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem3.Text = "2";
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem4.Text = "3";
//
// dockPanelMain
//
this.dockPanelMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dockPanelMain.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.dockPanelMain.Location = new System.Drawing.Point(0, 24);
this.dockPanelMain.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.dockPanelMain.Name = "dockPanelMain";
this.dockPanelMain.Size = new System.Drawing.Size(800, 310);
this.dockPanelMain.TabIndex = 2;
//
// ststripDevices
//
this.ststripDevices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ststripDevices.AutoSize = false;
this.ststripDevices.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(96)))), ((int)(((byte)(130)))));
this.ststripDevices.Dock = System.Windows.Forms.DockStyle.None;
this.ststripDevices.GripMargin = new System.Windows.Forms.Padding(0);
this.ststripDevices.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsslLoginStatus});
this.ststripDevices.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.ststripDevices.Location = new System.Drawing.Point(0, 333);
this.ststripDevices.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.ststripDevices.Name = "ststripDevices";
this.ststripDevices.Size = new System.Drawing.Size(651, 25);
this.ststripDevices.SizingGrip = false;
this.ststripDevices.TabIndex = 5;
this.ststripDevices.Text = "statusStrip1";
//
// tsslLoginStatus
//
this.tsslLoginStatus.ForeColor = System.Drawing.SystemColors.Control;
this.tsslLoginStatus.Name = "tsslLoginStatus";
this.tsslLoginStatus.Padding = new System.Windows.Forms.Padding(15, 0, 5, 0);
this.tsslLoginStatus.Size = new System.Drawing.Size(64, 20);
this.tsslLoginStatus.Text = "未登录";
this.tsslLoginStatus.Click += new System.EventHandler(this.tsslLoginStatus_Click);
//
// stsStripLayout
//
this.stsStripLayout.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.stsStripLayout.AutoSize = false;
this.stsStripLayout.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(96)))), ((int)(((byte)(130)))));
this.stsStripLayout.Dock = System.Windows.Forms.DockStyle.None;
this.stsStripLayout.GripMargin = new System.Windows.Forms.Padding(0);
this.stsStripLayout.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tssBtnLayout});
this.stsStripLayout.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
this.stsStripLayout.Location = new System.Drawing.Point(612, 333);
this.stsStripLayout.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.stsStripLayout.Name = "stsStripLayout";
this.stsStripLayout.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.stsStripLayout.Size = new System.Drawing.Size(186, 25);
this.stsStripLayout.SizingGrip = false;
this.stsStripLayout.TabIndex = 8;
this.stsStripLayout.Text = "statusStrip1";
//
// tssBtnLayout
//
this.tssBtnLayout.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tssBtnLayout.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator1,
this.tsmiSaveLayout,
this.tsmiResetLayout,
this.tsmiSaveLayoutAs});
this.tssBtnLayout.ForeColor = System.Drawing.SystemColors.Control;
this.tssBtnLayout.Image = ((System.Drawing.Image)(resources.GetObject("tssBtnLayout.Image")));
this.tssBtnLayout.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tssBtnLayout.Name = "tssBtnLayout";
this.tssBtnLayout.Size = new System.Drawing.Size(72, 23);
this.tssBtnLayout.Text = "布局配置";
this.tssBtnLayout.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
this.tssBtnLayout.Click += new System.EventHandler(this.tssBtnLayout_Click);
//
// tsmiSaveLayout
//
this.tsmiSaveLayout.Name = "tsmiSaveLayout";
this.tsmiSaveLayout.Size = new System.Drawing.Size(180, 22);
this.tsmiSaveLayout.Text = "保存布局";
this.tsmiSaveLayout.Click += new System.EventHandler(this.tsmiSaveLayout_Click);
//
// tsmiResetLayout
//
this.tsmiResetLayout.Name = "tsmiResetLayout";
this.tsmiResetLayout.Size = new System.Drawing.Size(180, 22);
this.tsmiResetLayout.Text = "重置布局";
this.tsmiResetLayout.Click += new System.EventHandler(this.tsmiResetLayout_Click);
//
// stsStripWarning
//
this.stsStripWarning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.stsStripWarning.Dock = System.Windows.Forms.DockStyle.None;
this.stsStripWarning.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsslWarning});
this.stsStripWarning.Location = new System.Drawing.Point(698, 0);
this.stsStripWarning.MinimumSize = new System.Drawing.Size(100, 24);
this.stsStripWarning.Name = "stsStripWarning";
this.stsStripWarning.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.stsStripWarning.Size = new System.Drawing.Size(100, 24);
this.stsStripWarning.SizingGrip = false;
this.stsStripWarning.TabIndex = 11;
this.stsStripWarning.Text = "statusStrip1";
//
// tsslWarning
//
this.tsslWarning.AutoToolTip = true;
this.tsslWarning.BackColor = System.Drawing.Color.Red;
this.tsslWarning.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tsslWarning.ForeColor = System.Drawing.SystemColors.Control;
this.tsslWarning.Margin = new System.Windows.Forms.Padding(15, 3, 0, 2);
this.tsslWarning.Name = "tsslWarning";
this.tsslWarning.Size = new System.Drawing.Size(0, 19);
this.tsslWarning.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// notifyIcon
//
this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.notifyIcon.BalloonTipTitle = "asdasd";
this.notifyIcon.ContextMenuStrip = this.ctmsExit;
this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
this.notifyIcon.Text = "notifyIcon1";
this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
//
// ctmsExit
//
this.ctmsExit.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiExitProgram});
this.ctmsExit.Name = "ctmsExit";
this.ctmsExit.Size = new System.Drawing.Size(125, 26);
//
// tsmiExitProgram
//
this.tsmiExitProgram.Name = "tsmiExitProgram";
this.tsmiExitProgram.Size = new System.Drawing.Size(124, 22);
this.tsmiExitProgram.Text = "退出程序";
this.tsmiExitProgram.Click += new System.EventHandler(this.tsmiExitProgram_Click);
//
// tsmiSaveLayoutAs
//
this.tsmiSaveLayoutAs.Name = "tsmiSaveLayoutAs";
this.tsmiSaveLayoutAs.Size = new System.Drawing.Size(180, 22);
this.tsmiSaveLayoutAs.Text = "布局另存为";
this.tsmiSaveLayoutAs.Click += new System.EventHandler(this.tsmiSaveLayoutAs_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
//
// MainFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(798, 358);
this.Controls.Add(this.stsStripWarning);
this.Controls.Add(this.menuMain);
this.Controls.Add(this.stsStripLayout);
this.Controls.Add(this.ststripDevices);
this.Controls.Add(this.dockPanelMain);
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.KeyPreview = true;
this.MainMenuStrip = this.menuMain;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "MainFrm";
this.Text = "MainFrm";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFrm_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainFrm_FormClosed);
this.Load += new System.EventHandler(this.MainFrm_Load);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainFrm_KeyUp);
this.ststripDevices.ResumeLayout(false);
this.ststripDevices.PerformLayout();
this.stsStripLayout.ResumeLayout(false);
this.stsStripLayout.PerformLayout();
this.stsStripWarning.ResumeLayout(false);
this.stsStripWarning.PerformLayout();
this.ctmsExit.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuMain;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanelMain;
private System.Windows.Forms.StatusStrip ststripDevices;
private System.Windows.Forms.ToolStripStatusLabel tsslLoginStatus;
private System.Windows.Forms.StatusStrip stsStripLayout;
private System.Windows.Forms.ToolStripSplitButton tssBtnLayout;
private System.Windows.Forms.ToolStripMenuItem tsmiSaveLayout;
private System.Windows.Forms.ToolStripMenuItem tsmiResetLayout;
private System.Windows.Forms.StatusStrip stsStripWarning;
private System.Windows.Forms.ToolStripStatusLabel tsslWarning;
private System.Windows.Forms.NotifyIcon notifyIcon;
private System.Windows.Forms.ContextMenuStrip ctmsExit;
private System.Windows.Forms.ToolStripMenuItem tsmiExitProgram;
private System.Windows.Forms.ToolStripMenuItem tsmiSaveLayoutAs;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
//private Sunny.UI.UIWaitingBar waitBar;
}
}

1080
src/BRS.UI.Main/MainFrm.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,517 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ststripDevices.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<metadata name="stsStripLayout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>292, 15</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tssBtnLayout.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="stsStripWarning.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>427, 15</value>
</metadata>
<metadata name="notifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 53</value>
</metadata>
<metadata name="ctmsExit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>128, 53</value>
</metadata>
<data name="notifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AADuUQFk7VIBdAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAOxSAlTtUgFiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA///////+f////n////gf///AB///gAf//gAH//wOf//8Pn8f+H5+H/D+
fw/w/n8P8fg/j+Hwb4fh8E+HgAAAAYAAAAHh8A+H4fgPh/H8H4/w/n8P+P5/D/h+fh/8Pnwf/g5wP/8A
AH//gAD//+AD///8H////n////5///////8=
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAY1cA6FEETOlVBFybUDUCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA6lQDSvBRAP/xUQD/61ICdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOZVBDTvUQD58FEA/+lVA1oAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4lYIIuVW
BS4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA///////////////+f/////////w//////////D/////////8P/////////w/////////+B//
//////8AAP///////AAAP//////wAAAf/////8AAAB//////gAAAP/////4AAAA//////AAMMH/////4
AHw+f/////AB/D//z///8Af8P/+H///gD/w//wf//8Af/D/+A///wD/8P/wB//+Af/w//gH//4D//D//
AP//AP/+P/8A//8B//w//4D//wH/8A//gH/+A//AH//Af/4D/4Ad/8B//gP/gDj/wH/+A/8AMP/gP/4H
/wBg/+A/wAAAAEAAAAOAAAAAAAAAAYAAAAAAAAAB4AACAABAAAf+B/8AAP/gP/4D/wAA/+A//gP/gAH/
wH/+A/+AAf/Af/4D/8AD/8B//wH/8A//gH//Af/8P/+Af/8A//4//wD//4B//D//AP//gH/8P/4B///A
P/w//AH//8Af/D/4A///4A/8P/AD///wA/w/4Af///gB/D+AD///+AA8PgAf///8AAQgAD////8AAAAA
f////4AAAAD/////wAAAA//////wAAAH//////wAAB///////4AA/////////D/////////8P///////
//w//////////D/////////8P/////////5///////////////8=
</value>
</data>
</root>

View File

@ -0,0 +1,59 @@
namespace Bro.UI.Config.MenuForms
{
partial class FrmDisplay
{
/// <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.plMain = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.SuspendLayout();
//
// plMain
//
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(0, 0);
this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(800, 450);
this.plMain.TabIndex = 0;
//
// FrmDisplay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.plMain);
this.Name = "FrmDisplay";
this.Text = "FrmDisplay";
this.Load += new System.EventHandler(this.FrmDisplay_Load);
this.ResumeLayout(false);
}
#endregion
private WeifenLuo.WinFormsUI.Docking.DockPanel plMain;
}
}

View File

@ -0,0 +1,49 @@
using Bro.Common.Factory;
using Bro.Common.Helper;
using Bro.UI.Config.Helper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace Bro.UI.Config.MenuForms
{
//[DockOption(WeifenLuo.WinFormsUI.Docking.DockState.Document, 0, 0)]
//[MenuNode("Display", "显示", 1, "View1", true)]
public partial class FrmDisplay : MenuFrmBase
{
FrmDisplay_DeviceList _frmDeviceList = new FrmDisplay_DeviceList();
public FrmDisplay()
{
InitializeComponent();
//_frmDeviceList.MdiParent = this;
//_frmDeviceList.DockHandler.DockPanel = plMain;
//_frmDeviceList.DockState = DockState.DockLeft;
//plMain.DockLeftPortion= _frmDeviceList.AutoHidePortion = _frmDeviceList.Width;
}
public override void OnProcessUpdated()
{
this.IsMdiContainer = true;
_frmDeviceList.MdiParent = this;
_frmDeviceList.DockHandler.DockPanel = plMain;
_frmDeviceList.DockState = DockState.DockLeft;
plMain.DockLeftPortion = _frmDeviceList.AutoHidePortion = _frmDeviceList.Width;
}
private void FrmDisplay_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,39 @@
namespace BRS.UI.Main.MenuForms
{
partial class Form1
{
/// <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.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
}
#endregion
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BRS.UI.Main.MenuForms
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,173 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmAlarm
{
/// <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.dgvAlarms = new System.Windows.Forms.DataGridView();
this.clAlarmSource = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clRaiseTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clResetTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clAlarmMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsmiLogSources = new System.Windows.Forms.ToolStripDropDownButton();
this.tsmiClearAlarm = new System.Windows.Forms.ToolStripButton();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.dgvAlarms)).BeginInit();
this.toolStrip1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// dgvAlarms
//
this.dgvAlarms.AllowUserToAddRows = false;
this.dgvAlarms.AllowUserToDeleteRows = false;
this.dgvAlarms.BackgroundColor = System.Drawing.SystemColors.Control;
this.dgvAlarms.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvAlarms.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.clAlarmSource,
this.clRaiseTime,
this.clResetTime,
this.clAlarmMsg});
this.dgvAlarms.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvAlarms.Location = new System.Drawing.Point(0, 26);
this.dgvAlarms.Margin = new System.Windows.Forms.Padding(0);
this.dgvAlarms.Name = "dgvAlarms";
this.dgvAlarms.ReadOnly = true;
this.dgvAlarms.RowTemplate.Height = 23;
this.dgvAlarms.Size = new System.Drawing.Size(715, 303);
this.dgvAlarms.TabIndex = 4;
this.dgvAlarms.DataSourceChanged += new System.EventHandler(this.dgvAlarms_DataSourceChanged);
this.dgvAlarms.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.dgvAlarms_CellPainting);
//
// clAlarmSource
//
this.clAlarmSource.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.clAlarmSource.DataPropertyName = "Source";
this.clAlarmSource.HeaderText = "报警来源";
this.clAlarmSource.Name = "clAlarmSource";
this.clAlarmSource.ReadOnly = true;
this.clAlarmSource.Width = 80;
//
// clRaiseTime
//
this.clRaiseTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.clRaiseTime.DataPropertyName = "RaiseTime";
this.clRaiseTime.HeaderText = "报警时间";
this.clRaiseTime.Name = "clRaiseTime";
this.clRaiseTime.ReadOnly = true;
this.clRaiseTime.Width = 80;
//
// clResetTime
//
this.clResetTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.clResetTime.DataPropertyName = "ResetTime";
this.clResetTime.HeaderText = "重置时间";
this.clResetTime.Name = "clResetTime";
this.clResetTime.ReadOnly = true;
this.clResetTime.Width = 80;
//
// clAlarmMsg
//
this.clAlarmMsg.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.clAlarmMsg.DataPropertyName = "AlarmMsg";
this.clAlarmMsg.HeaderText = "报警信息";
this.clAlarmMsg.Name = "clAlarmMsg";
this.clAlarmMsg.ReadOnly = true;
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiLogSources,
this.tsmiClearAlarm});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(715, 26);
this.toolStrip1.TabIndex = 5;
this.toolStrip1.Text = "toolStrip1";
//
// tsmiLogSources
//
this.tsmiLogSources.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tsmiLogSources.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsmiLogSources.Name = "tsmiLogSources";
this.tsmiLogSources.Size = new System.Drawing.Size(69, 22);
this.tsmiLogSources.Text = "警报来源";
//
// tsmiClearAlarm
//
this.tsmiClearAlarm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tsmiClearAlarm.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsmiClearAlarm.Name = "tsmiClearAlarm";
this.tsmiClearAlarm.Size = new System.Drawing.Size(60, 22);
this.tsmiClearAlarm.Text = "清空警报";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.toolStrip1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.dgvAlarms, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(715, 329);
this.tableLayoutPanel1.TabIndex = 6;
//
// FrmAlarm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(715, 329);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmAlarm";
this.Text = "报警信息";
((System.ComponentModel.ISupportInitialize)(this.dgvAlarms)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dgvAlarms;
private System.Windows.Forms.DataGridViewTextBoxColumn clAlarmSource;
private System.Windows.Forms.DataGridViewTextBoxColumn clRaiseTime;
private System.Windows.Forms.DataGridViewTextBoxColumn clResetTime;
private System.Windows.Forms.DataGridViewTextBoxColumn clAlarmMsg;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripDropDownButton tsmiLogSources;
private System.Windows.Forms.ToolStripButton tsmiClearAlarm;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
//private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
}
}

View File

@ -0,0 +1,147 @@
using BRS.UI.Model.Winform;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace BRS.UI.Main.MenuForms
{
[DockOption(WeifenLuo.WinFormsUI.Docking.DockState.DockBottom, 0, 200)]
[MenuNode("Alarm", "报警信息", 4, "View1", true)]
public partial class FrmAlarm : MenuFormBase
{
public FrmAlarm()
{
InitializeComponent();
this.Load += (s, e) =>
{
dgvAlarms.AutoGenerateColumns = false;
dgvAlarms.DataSource = _allAlarms;
};
this.FormClosed += (s, e) =>
{
Process.OnAlarmRaised -= Process_OnAlarmUpdate;
};
}
static object _alarmDisplayLock = new object();
List<AlarmDisplay> _allAlarms = new List<AlarmDisplay>();
public override void OnProcessUpdated()
{
Invoke(new Action(() =>
{
_showDevice.Clear();
tsmiLogSources.DropDownItems.Clear();
ToolStripMenuItem processItem = new ToolStripMenuItem(SOURCE_PROCESS);
processItem.CheckOnClick = true;
processItem.Checked = true;
processItem.CheckedChanged += SourceItem_CheckedChanged;
tsmiLogSources.DropDownItems.Add(processItem);
_showDevice.Add(SOURCE_PROCESS);
Process.DeviceCollection.ForEach(d =>
{
ToolStripMenuItem item = new ToolStripMenuItem(d.Name);
item.CheckOnClick = true;
item.Checked = true;
item.CheckedChanged += SourceItem_CheckedChanged;
tsmiLogSources.DropDownItems.Add(item);
_showDevice.Add(d.Name);
});
Process.OnAlarmRaised -= Process_OnAlarmUpdate;
Process.OnAlarmRaised += Process_OnAlarmUpdate;
}));
}
private void Process_OnAlarmUpdate(Common.Interface.IWarningSet w)
{
lock (_alarmDisplayLock)
{
var existed = _allAlarms.FirstOrDefault(u => u.Source == w.SourceDevice && u.AlarmMsg == w.WarningDescription && u.ResetTime == "");
if (w.CurrentStatus)
{
if (existed == null)
{
if (_allAlarms.Count > ALARM_NUM_LIMIT * 2)
{
_allAlarms = _allAlarms.Skip(_allAlarms.Count - ALARM_NUM_LIMIT).ToList();
}
_allAlarms.Add(new AlarmDisplay() { Source = w.SourceDevice, RaiseTime = w.TriggerTime.ToString("HH:mm:ss"), ResetTime = "", AlarmMsg = w.WarningDescription });
}
}
else
{
if (existed != null)
{
existed.ResetTime = w.TriggerTime.ToString("HH:mm:ss");
}
}
this.Invoke(new Action(() =>
{
dgvAlarms.DataSource = null;
dgvAlarms.DataSource = _allAlarms;
}));
}
}
private void SourceItem_CheckedChanged(object sender, EventArgs e)
{
_showDevice.Clear();
foreach (ToolStripMenuItem item in tsmiLogSources.DropDownItems)
{
if (item.Checked)
{
_showDevice.Add(item.Text);
}
}
}
List<string> _showDevice = new List<string>();
const string SOURCE_PROCESS = "流程";
const int ALARM_NUM_LIMIT = 200;
private void dgvAlarms_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex > -1)
{
var reset = (dgvAlarms.Rows[e.RowIndex].Cells["clResetTime"].Value ?? "").ToString();
if (string.IsNullOrWhiteSpace(reset))
{
dgvAlarms.Rows[e.RowIndex].DefaultCellStyle.BackColor = System.Drawing.Color.Red;
}
else
{
dgvAlarms.Rows[e.RowIndex].DefaultCellStyle.BackColor = System.Drawing.SystemColors.Control;
}
}
}
private void tsmiClearAlarm_Click(object sender, EventArgs e)
{
_allAlarms.Clear();
dgvAlarms.DataSource = null;
dgvAlarms.DataSource = _allAlarms;
}
private void dgvAlarms_DataSourceChanged(object sender, EventArgs e)
{
if (dgvAlarms.DataSource != null && dgvAlarms.Rows.Count > 0)
{
dgvAlarms.FirstDisplayedScrollingRowIndex = dgvAlarms.Rows.Count - 1;
}
}
}
public class AlarmDisplay
{
public string Source { get; set; }
public string RaiseTime { get; set; }
public string ResetTime { get; set; }
public string AlarmMsg { get; set; }
}
}

View File

@ -0,0 +1,135 @@
<?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="clAlarmSource.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clRaiseTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clResetTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clAlarmMsg.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>302, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,59 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmCalib
{
/// <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.plMain = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// plMain
//
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(0, 0);
this.plMain.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(800, 487);
this.plMain.TabIndex = 0;
//
// FrmCalib
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 487);
this.Controls.Add(this.plMain);
this.Name = "FrmCalib";
this.Text = "标定";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plMain;
}
}

View File

@ -0,0 +1,28 @@
using BRS.UI.Main.Ctrls;
using BRS.UI.Model.Winform;
using System.Windows.Forms;
namespace BRS.UI.Main.MenuForms
{
//[MenuNode("Calib", "标定", 3, "View2", true)]
public partial class FrmCalib : MenuFormBase
{
readonly CtrlMethodInvoke ctrlMethodInvoker = new CtrlMethodInvoke(Common.Model.Helper.InvokeType.CalibInvoke);
public FrmCalib()
{
InitializeComponent();
ctrlMethodInvoker.Dock = DockStyle.Fill;
plMain.Controls.Add(ctrlMethodInvoker);
ctrlMethodInvoker.OnLogMsgOutput -= LogAsync;
ctrlMethodInvoker.OnLogMsgOutput += LogAsync;
}
public override void OnProcessUpdated()
{
ctrlMethodInvoker.DownloadProcess(Process);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,145 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmConfig
{
/// <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.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmConfig));
this.propGrid = new System.Windows.Forms.PropertyGrid();
this.btnSave = new System.Windows.Forms.Button();
this.imgList = new System.Windows.Forms.ImageList(this.components);
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.buttonCreateConfig = new System.Windows.Forms.Button();
this.labelPNo = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// propGrid
//
this.propGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.SetColumnSpan(this.propGrid, 3);
this.propGrid.Location = new System.Drawing.Point(2, 44);
this.propGrid.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.propGrid.Name = "propGrid";
this.propGrid.Size = new System.Drawing.Size(796, 440);
this.propGrid.TabIndex = 0;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnSave.ImageKey = "save_24px.png";
this.btnSave.ImageList = this.imgList;
this.btnSave.Location = new System.Drawing.Point(635, 3);
this.btnSave.Margin = new System.Windows.Forms.Padding(2, 3, 15, 3);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(150, 35);
this.btnSave.TabIndex = 1;
this.btnSave.Text = " 保 存";
this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// imgList
//
this.imgList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgList.ImageStream")));
this.imgList.TransparentColor = System.Drawing.Color.Transparent;
this.imgList.Images.SetKeyName(0, "save_24px.png");
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.propGrid, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.btnSave, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.buttonCreateConfig, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.labelPNo, 1, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 487);
this.tableLayoutPanel1.TabIndex = 2;
//
// buttonCreateConfig
//
this.buttonCreateConfig.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonCreateConfig.Location = new System.Drawing.Point(3, 3);
this.buttonCreateConfig.Name = "buttonCreateConfig";
this.buttonCreateConfig.Size = new System.Drawing.Size(175, 35);
this.buttonCreateConfig.TabIndex = 2;
this.buttonCreateConfig.Text = "从当前配置派生新产品";
this.buttonCreateConfig.UseVisualStyleBackColor = true;
this.buttonCreateConfig.Click += new System.EventHandler(this.buttonCreateConfig_Click);
//
// labelPNo
//
this.labelPNo.AutoSize = true;
this.labelPNo.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.labelPNo.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelPNo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelPNo.ForeColor = System.Drawing.Color.Lime;
this.labelPNo.Location = new System.Drawing.Point(350, 5);
this.labelPNo.Margin = new System.Windows.Forms.Padding(10, 5, 10, 5);
this.labelPNo.Name = "labelPNo";
this.labelPNo.Size = new System.Drawing.Size(100, 31);
this.labelPNo.TabIndex = 3;
this.labelPNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labelPNo.Visible = false;
//
// FrmConfig
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(800, 487);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmConfig";
this.Text = "配置";
this.Load += new System.EventHandler(this.FrmConfig_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PropertyGrid propGrid;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.ImageList imgList;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button buttonCreateConfig;
private System.Windows.Forms.Label labelPNo;
}
}

View File

@ -0,0 +1,79 @@
using BRS.Common.Interface;
using BRS.Common.PubSub;
using BRS.UI.Model.Winform;
using System;
using System.Windows.Forms;
using static BRS.Common.Model.Helper.EnumHelper;
namespace BRS.UI.Main.MenuForms
{
[MenuNode("Config", "配置", 1, "View2", true)]
public partial class FrmConfig : MenuFormBase
{
public FrmConfig()
{
InitializeComponent();
}
public override void OnProcessUpdated()
{
if (this.InvokeRequired)
{
this.BeginInvoke(new Action(OnProcessUpdated));
}
else
{
propGrid.SelectedObject = Process?.IConfig;
labelPNo.Text = Process?.ProductionCode;
}
}
private void FrmConfig_Load(object sender, EventArgs e)
{
OnProcessUpdated();
}
private void btnSave_Click(object sender, EventArgs e)
{
if (!IsLogin)
{
AdvancedPwdFrm pwdForm = new AdvancedPwdFrm();
pwdForm.ShowDialog();
}
if (!IsLogin)
{
LogAsync(DateTime.Now, LogLevel.Assist, "保存配置前必须先登录");
return;
}
Process.SaveProcessConfig(propGrid.SelectedObject as IProcessConfig);
LogAsync(DateTime.Now, LogLevel.Assist, "配置保存完成");
}
private void buttonCreateConfig_Click(object sender, EventArgs e)
{
ProductionCodeEditForm productionCodeEditForm = new ProductionCodeEditForm();
if (productionCodeEditForm.ShowDialog(this) == DialogResult.OK)
{
string newPCode = productionCodeEditForm.PCode;
double pOutsideDiameter = productionCodeEditForm.POutsideDiameter;
double pHeight = productionCodeEditForm.PHeight;
productionCodeEditForm.Dispose();
if (string.IsNullOrWhiteSpace(newPCode))
{
MessageBox.Show("请输入产品编码!");
return;
}
Process.CreateNewConfig(propGrid.SelectedObject as IProcessConfig, newPCode, pOutsideDiameter, pHeight);
PubSubCenter.GetInstance().Publish(PubSubCenterMessageType.UpdateProductionCodes.ToString(), labelPNo.Text, null);
MessageBox.Show("创建新配置完成");
}
}
}
}

View File

@ -0,0 +1,167 @@
<?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="imgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="imgList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjA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AH/AZkBZgEAAf8CmQEAAf8BmQHM
AQAB/wGZAf8BAAH/AcwCAAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEA
AcwB/wFmAQAC/wGZAQAC/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEA
ASEBAAGlAQADXwEAA3cBAAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7
Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/8CAAH/AfIBugi5CLMBugHy
Af9JAAH/ARkJuQuzAfAB/0gAAfIJuQ2zAfJIAAG6CLkCswK5CrMBukgACLkBugEZAfQC/wH0ARkBugiz
SAAHuQEZCP8BGQG5BrNIAAa5ARkK/wEZAbkFs0gABbkBGQX/AhkF/wEZBbNIAAS5AboF/wEZArkB8wX/
AboEs0gABLkBGQX/AboCuQG6Bf8BGQSzSAAEuQH0BP8BugS5AboE/wH0BLNIAAO5AboE/wEZAbsBugK5
AboBuwEZBP8BuQOzSAADuQG6Bv8BuwK5AbsG/wG5ArMBuUgABLkB9AX/AbsCuQG7Bf8B9AKzArlIAAS5
ARkF/wG7ArkBuwX/ARkBswO5SAAEuQG6Bf8BCQK5AQkF/wG6BLlIAAW5ARkE/wH0AhkB9AT/ARkFuUgA
BrkBGQr/ARkGuUgAB7kBGQj/ARkHuUgACLkBugEZAfQC/wH0ARkBugO5AboBuwO5SAABugq5AroGuQG7
AQkCuQG6SAAB8ha5AfJIAAH/ARkUuQEZAf9JAAH/AfIBuhC5AboB8gH/SQABQgFNAT4HAAE+AwABKAMA
AWADAAEYAwABAQEAAQEFAAEgAQEWAAP/AQABgAEAAQH/ABIAAYABAAEBCQAL
</value>
</data>
</root>

View File

@ -0,0 +1,58 @@
namespace Bro.UI.Config.MenuForms
{
partial class FrmDevices
{
/// <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.plMain = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// plMain
//
this.plMain.AutoScroll = true;
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(0, 0);
this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(120, 488);
this.plMain.TabIndex = 0;
//
// FrmDevices
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(120, 488);
this.Controls.Add(this.plMain);
this.Name = "FrmDevices";
this.Text = "FrmDisplay_DeviceList";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel plMain;
}
}

View File

@ -0,0 +1,78 @@
using Bro.UI.Config.Helper;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Windows.Forms;
namespace Bro.UI.Config.MenuForms
{
//[DockOption(WeifenLuo.WinFormsUI.Docking.DockState.DockLeft, 150, 0)]
//[MenuNode("Device", "设备列表", 1, "View1", true)]
public partial class FrmDevices : MenuFrmBase
{
public event Action<List<string>> OnCheckedDeviceListChanged;
readonly System.Threading.Timer _checkChangedTimer = null;
public FrmDevices()
{
InitializeComponent();
_checkChangedTimer = new System.Threading.Timer(OnCheckChangedDone, null, Timeout.Infinite, Timeout.Infinite);
}
private void OnCheckChangedDone(object state)
{
List<string> checkedDeviceIdList = new List<string>();
foreach (Control ctrl in plMain.Controls)
{
var c = (ctrl as CtrlDeviceState);
if (c != null && c.IsChecked)
{
checkedDeviceIdList.Add(c.Device.Id);
}
}
OnCheckedDeviceListChanged?.Invoke(checkedDeviceIdList);
}
public void OnDeviceDisplayFrmClosed(string deviceId)
{
foreach (Control ctrl in plMain.Controls)
{
var c = (ctrl as CtrlDeviceState);
if (c != null && c.Device.Id == deviceId)
{
c.IsChecked = false;
}
}
}
public override void OnProcessUpdated()
{
if (InvokeRequired)
{
Invoke(new Action(() => OnProcessUpdated()));
}
else
{
plMain.Controls.Clear();
Process.DeviceCollection.ForEach(d =>
{
CtrlDeviceState deviceStateCtrl = new CtrlDeviceState(d);
deviceStateCtrl.OnDeviceCheckedChanged += DeviceStateCtrl_OnDeviceCheckedChanged;
plMain.Controls.Add(deviceStateCtrl);
});
DeviceStateCtrl_OnDeviceCheckedChanged(null, true);
}
}
private void DeviceStateCtrl_OnDeviceCheckedChanged(string deviceId, bool isChecked)
{
_checkChangedTimer.Change(1000, Timeout.Infinite);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,148 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmLog
{
/// <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.components = new System.ComponentModel.Container();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiClearLog = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.tsmiLogLevels = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiLogSources = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiClearLog2 = new System.Windows.Forms.ToolStripMenuItem();
this.lvLog = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiClearLog});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(125, 26);
//
// tsmiClearLog
//
this.tsmiClearLog.Name = "tsmiClearLog";
this.tsmiClearLog.Size = new System.Drawing.Size(124, 22);
this.tsmiClearLog.Text = "清空日志";
this.tsmiClearLog.Click += new System.EventHandler(this.tsmiClearLog_Click);
//
// menuStrip1
//
this.menuStrip1.BackColor = System.Drawing.Color.Transparent;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiLogLevels,
this.tsmiLogSources,
this.tsmiClearLog2});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(800, 25);
this.menuStrip1.TabIndex = 3;
this.menuStrip1.Text = "menuStrip1";
//
// tsmiLogLevels
//
this.tsmiLogLevels.Name = "tsmiLogLevels";
this.tsmiLogLevels.Size = new System.Drawing.Size(68, 21);
this.tsmiLogLevels.Text = "日志级别";
//
// tsmiLogSources
//
this.tsmiLogSources.Name = "tsmiLogSources";
this.tsmiLogSources.Size = new System.Drawing.Size(68, 21);
this.tsmiLogSources.Text = "日志来源";
//
// tsmiClearLog2
//
this.tsmiClearLog2.Name = "tsmiClearLog2";
this.tsmiClearLog2.Size = new System.Drawing.Size(68, 21);
this.tsmiClearLog2.Text = "清空日志";
this.tsmiClearLog2.Click += new System.EventHandler(this.tsmiClearLog2_Click);
//
// lvLog
//
this.lvLog.BackColor = System.Drawing.SystemColors.Control;
this.lvLog.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.lvLog.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3});
this.lvLog.ContextMenuStrip = this.contextMenuStrip1;
this.lvLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvLog.FullRowSelect = true;
this.lvLog.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lvLog.HideSelection = false;
this.lvLog.Location = new System.Drawing.Point(0, 25);
this.lvLog.MultiSelect = false;
this.lvLog.Name = "lvLog";
this.lvLog.Size = new System.Drawing.Size(800, 463);
this.lvLog.TabIndex = 5;
this.lvLog.UseCompatibleStateImageBehavior = false;
this.lvLog.View = System.Windows.Forms.View.Details;
this.lvLog.SizeChanged += new System.EventHandler(this.lvLog_SizeChanged);
//
// columnHeader1
//
this.columnHeader1.Width = 80;
//
// FrmLog
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(800, 488);
this.Controls.Add(this.lvLog);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "FrmLog";
this.Text = "日志";
this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem tsmiClearLog;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem tsmiLogLevels;
private System.Windows.Forms.ToolStripMenuItem tsmiLogSources;
private System.Windows.Forms.ListView lvLog;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ToolStripMenuItem tsmiClearLog2;
//private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem;
}
}

View File

@ -0,0 +1,256 @@
using BRS.Common.Model.Helper;
using BRS.UI.Model.Winform;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static BRS.Common.Model.Helper.EnumHelper;
namespace BRS.UI.Main.MenuForms
{
[DockOption(WeifenLuo.WinFormsUI.Docking.DockState.DockBottom, 0, 200)]
[MenuNode("Log", "日志", 3, "View1", true)]
public partial class FrmLog : MenuFormBase
{
public FrmLog()
{
InitializeComponent();
lvLog.ShowItemToolTips = true;
this.Load += (s, e) =>
{
_showLevels.Clear();
tsmiLogLevels.DropDownItems.Clear();
JsonConvert.DeserializeObject<List<dynamic>>(JsonConvert.SerializeObject(EnumHelper.GetEnumListByType(typeof(LogLevel)))).ForEach(d =>
{
LogLevel lvl = (LogLevel)((int)d.Value);
ToolStripMenuItem item = new ToolStripMenuItem(d.Desc.ToString());
item.CheckOnClick = true;
item.Checked = true;
item.Tag = lvl;
item.CheckedChanged += LevelItem_CheckedChanged;
item.BackColor = lvl.GetEnumSelectedColor();
item.ForeColor = lvl.GetEnumSelectedFontColor();
tsmiLogLevels.DropDownItems.Add(item);
_showLevels.Add(lvl);
});
};
}
public override void OnProcessUpdated()
{
//flPanelLogLevel.Controls.Clear();
//JsonConvert.DeserializeObject<List<dynamic>>(JsonConvert.SerializeObject(EnumHelper.GetEnumListByType(typeof(LogLevel)))).ForEach(d =>
//{
// CheckBox chk = new CheckBox();
// chk.Tag = d.Value;
// chk.Text = d.Desc;
// chk.Checked = true;
// chk.AutoSize = true;
// flPanelLogLevel.Controls.Add(chk);
//});
//flPanelDevices.Controls.Clear();
//CheckBox processChk = new CheckBox();
//processChk.Text = "流程";
//processChk.Checked = true;
//processChk.AutoSize = true;
//flPanelDevices.Controls.Add(processChk);
//Process.DeviceCollection.ForEach(d =>
//{
// CheckBox chk = new CheckBox();
// chk.Text = d.Name;
// chk.Checked = true;
// chk.AutoSize = true;
// flPanelDevices.Controls.Add(chk);
//});
Invoke(new Action(() =>
{
_showDevice.Clear();
tsmiLogSources.DropDownItems.Clear();
ToolStripMenuItem processItem = new ToolStripMenuItem(SOURCE_PROCESS);
processItem.CheckOnClick = true;
processItem.Checked = true;
processItem.CheckedChanged += SourceItem_CheckedChanged;
tsmiLogSources.DropDownItems.Add(processItem);
_showDevice.Add(SOURCE_PROCESS);
Process.DeviceCollection.ForEach(d =>
{
ToolStripMenuItem item = new ToolStripMenuItem(d.Name);
item.CheckOnClick = true;
item.Checked = true;
item.CheckedChanged += SourceItem_CheckedChanged;
tsmiLogSources.DropDownItems.Add(item);
_showDevice.Add(d.Name);
});
}));
}
private void LevelItem_CheckedChanged(object sender, EventArgs e)
{
_showLevels.Clear();
foreach (ToolStripMenuItem item in tsmiLogLevels.DropDownItems)
{
if (item.Checked)
{
LogLevel lv = (LogLevel)Convert.ToInt32(item.Tag);
_showLevels.Add(lv);
}
}
RefreshLogs();
}
private void SourceItem_CheckedChanged(object sender, EventArgs e)
{
_showDevice.Clear();
foreach (ToolStripMenuItem item in tsmiLogSources.DropDownItems)
{
if (item.Checked)
{
_showDevice.Add(item.Text);
}
}
RefreshLogs();
}
//public TaskFactory _taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.LongRunning);
readonly ConcurrentQueue<LogMsg> _logQueue = new ConcurrentQueue<LogMsg>();
Task _logTask = null;
static readonly object _logLock = new object();
List<LogMsg> _logBuffer = new List<LogMsg>();
List<LogLevel> _showLevels = new List<LogLevel>();
List<string> _showDevice = new List<string>();
const string SOURCE_PROCESS = "流程";
const int LOG_NUM_LIMIT = 20;
public override void LogDisplay(LogMsg msg)
{
_logQueue.Enqueue(msg);
lock (_logLock)
{
if (_logTask == null)
{
_logTask = Task.Run(async () =>
{
while (true)
{
try
{
Invoke(new Action(() =>
{
bool isNeedScroll = false;
while (_logQueue.TryDequeue(out LogMsg log))
{
_logBuffer.Add(log);
if (_showLevels.Contains(log.LogLevel) && (_showDevice.Count == 0 || (string.IsNullOrWhiteSpace(log.MsgSource) && _showDevice.Contains(SOURCE_PROCESS)) || _showDevice.Contains(log.MsgSource)))
{
isNeedScroll = true;
ListViewItem item = new ListViewItem($"{log.LogTime.ToString("HH:mm:ss.fff")}");
item.SubItems.Add($"{log.MsgSource}[{log.ThreadId}]");
item.SubItems.Add(log.Msg);
item.ToolTipText = log.Msg;
item.ForeColor = log.LogLevel.GetEnumSelectedFontColor();
item.BackColor = log.LogLevel.GetEnumSelectedColor();
lvLog.Items.Add(item);
}
}
if (_logBuffer.Count > LOG_NUM_LIMIT * 2)
{
_logBuffer = _logBuffer.Skip(_logBuffer.Count - LOG_NUM_LIMIT).ToList();
RefreshLogs();
isNeedScroll = true;
}
if (isNeedScroll && lvLog.Items.Count > 0)
{
RefreshLvLayout();
}
}));
}
catch (Exception ex)
{
}
await Task.Delay(2000);
}
});
}
}
}
private void RefreshLogs()
{
lvLog.Items.Clear();
_logBuffer.ForEach(log =>
{
if (_showLevels.Contains(log.LogLevel) && ((string.IsNullOrWhiteSpace(log.MsgSource) && _showDevice.Contains(SOURCE_PROCESS)) || _showDevice.Contains(log.MsgSource)))
{
ListViewItem item = new ListViewItem($"{log.LogTime.ToString("HH:mm:ss.fff")}");
item.SubItems.Add($"{log.MsgSource}[{log.ThreadId}]");
item.SubItems.Add(log.Msg);
item.ToolTipText = log.Msg;
item.ForeColor = log.LogLevel.GetEnumSelectedFontColor();
item.BackColor = log.LogLevel.GetEnumSelectedColor();
lvLog.Items.Add(item);
}
});
RefreshLvLayout();
}
private void lvLog_SizeChanged(object sender, EventArgs e)
{
RefreshLvLayout();
}
int width_1stCol = 80;
private void RefreshLvLayout()
{
if (lvLog.Columns.Count <= 0)
return;
lvLog.Columns[0].Width = width_1stCol;
if (lvLog.Width <= lvLog.Height)
{
lvLog.Columns[1].Width = 0;
}
else
{
lvLog.Columns[1].AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
}
lvLog.Columns[2].Width = lvLog.Width - width_1stCol - lvLog.Columns[1].Width - 10;
if (lvLog.Items.Count > 0)
lvLog.EnsureVisible(lvLog.Items.Count - 1);
}
private void tsmiClearLog_Click(object sender, EventArgs e)
{
lvLog.Items.Clear();
}
private void tsmiClearLog2_Click(object sender, EventArgs e)
{
lvLog.Items.Clear();
}
}
}

View File

@ -0,0 +1,126 @@
<?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="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>182, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,221 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmOperation
{
/// <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.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmOperation));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnStart = new System.Windows.Forms.Button();
this.imgList = new System.Windows.Forms.ImageList(this.components);
this.plProcess = new System.Windows.Forms.Panel();
this.cboProcessCode = new System.Windows.Forms.ComboBox();
this.lblProcessCode = new System.Windows.Forms.Label();
this.btnLoad = new System.Windows.Forms.Button();
this.imgListLoad = new System.Windows.Forms.ImageList(this.components);
this.plProduct = new System.Windows.Forms.Panel();
this.cboProductionCode = new System.Windows.Forms.ComboBox();
this.lblProductionCode = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.plProcess.SuspendLayout();
this.plProduct.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.btnStart, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.plProcess, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.btnLoad, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.plProduct, 0, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(15, 3, 15, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 9;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 5F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 5F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 5F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 5F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(184, 427);
this.tableLayoutPanel1.TabIndex = 0;
//
// btnStart
//
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnStart.AutoSize = true;
this.btnStart.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnStart.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnStart.ImageIndex = 0;
this.btnStart.ImageList = this.imgList;
this.btnStart.Location = new System.Drawing.Point(3, 132);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(178, 35);
this.btnStart.TabIndex = 1;
this.btnStart.Text = " 启 动";
this.btnStart.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// imgList
//
this.imgList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgList.ImageStream")));
this.imgList.TransparentColor = System.Drawing.Color.Transparent;
this.imgList.Images.SetKeyName(0, "start_32px.png");
this.imgList.Images.SetKeyName(1, "stop_32px.png");
//
// plProcess
//
this.plProcess.AutoSize = true;
this.plProcess.Controls.Add(this.cboProcessCode);
this.plProcess.Controls.Add(this.lblProcessCode);
this.plProcess.Dock = System.Windows.Forms.DockStyle.Fill;
this.plProcess.Location = new System.Drawing.Point(3, 8);
this.plProcess.Name = "plProcess";
this.plProcess.Size = new System.Drawing.Size(178, 29);
this.plProcess.TabIndex = 0;
//
// cboProcessCode
//
this.cboProcessCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cboProcessCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboProcessCode.FormattingEnabled = true;
this.cboProcessCode.Location = new System.Drawing.Point(76, 5);
this.cboProcessCode.Name = "cboProcessCode";
this.cboProcessCode.Size = new System.Drawing.Size(95, 21);
this.cboProcessCode.TabIndex = 1;
this.cboProcessCode.Visible = false;
//
// lblProcessCode
//
this.lblProcessCode.AutoSize = true;
this.lblProcessCode.Location = new System.Drawing.Point(4, 8);
this.lblProcessCode.Name = "lblProcessCode";
this.lblProcessCode.Size = new System.Drawing.Size(67, 13);
this.lblProcessCode.TabIndex = 0;
this.lblProcessCode.Text = "流程代码:";
this.lblProcessCode.Visible = false;
//
// btnLoad
//
this.btnLoad.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnLoad.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoad.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoad.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnLoad.ImageKey = "load_32px.png";
this.btnLoad.ImageList = this.imgListLoad;
this.btnLoad.Location = new System.Drawing.Point(3, 86);
this.btnLoad.Name = "btnLoad";
this.btnLoad.Size = new System.Drawing.Size(178, 35);
this.btnLoad.TabIndex = 0;
this.btnLoad.Text = " 载 入";
this.btnLoad.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnLoad.UseMnemonic = false;
this.btnLoad.UseVisualStyleBackColor = false;
this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
//
// imgListLoad
//
this.imgListLoad.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgListLoad.ImageStream")));
this.imgListLoad.TransparentColor = System.Drawing.Color.Transparent;
this.imgListLoad.Images.SetKeyName(0, "load_32px.png");
//
// plProduct
//
this.plProduct.AutoSize = true;
this.plProduct.Controls.Add(this.cboProductionCode);
this.plProduct.Controls.Add(this.lblProductionCode);
this.plProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.plProduct.Location = new System.Drawing.Point(3, 48);
this.plProduct.Name = "plProduct";
this.plProduct.Size = new System.Drawing.Size(178, 27);
this.plProduct.TabIndex = 1;
//
// cboProductionCode
//
this.cboProductionCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cboProductionCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboProductionCode.FormattingEnabled = true;
this.cboProductionCode.Location = new System.Drawing.Point(76, 3);
this.cboProductionCode.Name = "cboProductionCode";
this.cboProductionCode.Size = new System.Drawing.Size(95, 21);
this.cboProductionCode.TabIndex = 1;
//
// lblProductionCode
//
this.lblProductionCode.AutoSize = true;
this.lblProductionCode.Location = new System.Drawing.Point(4, 6);
this.lblProductionCode.Name = "lblProductionCode";
this.lblProductionCode.Size = new System.Drawing.Size(67, 13);
this.lblProductionCode.TabIndex = 0;
this.lblProductionCode.Text = "产品代码:";
//
// FrmOperation
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(184, 427);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "FrmOperation";
this.Text = "系统操作";
this.Load += new System.EventHandler(this.FrmOperation_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.plProcess.ResumeLayout(false);
this.plProcess.PerformLayout();
this.plProduct.ResumeLayout(false);
this.plProduct.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel plProcess;
private System.Windows.Forms.Panel plProduct;
private System.Windows.Forms.ComboBox cboProcessCode;
private System.Windows.Forms.Label lblProcessCode;
private System.Windows.Forms.ComboBox cboProductionCode;
private System.Windows.Forms.Label lblProductionCode;
private System.Windows.Forms.Button btnLoad;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.ImageList imgList;
private System.Windows.Forms.ImageList imgListLoad;
}
}

View File

@ -0,0 +1,263 @@
using BRS.Common.Factory;
using BRS.Common.Model.Helper;
using BRS.Common.PubSub;
using BRS.UI.Model.Winform;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using static BRS.Common.Model.Helper.EnumHelper;
namespace BRS.UI.Main.MenuForms
{
/// <summary>
/// 操作窗口类,启动设备
/// </summary>
[DockOption(DockState.DockRight, 200, 0)]
[MenuNode("Operation", "操作", 2, "View1", true)]
public partial class FrmOperation : MenuFormBase
{
public FrmOperation()
{
InitializeComponent();
PubSubCenter.GetInstance().RemoveSubscribers(PubSubCenterMessageType.UpdateProductionCodes.ToString());
PubSubCenter.GetInstance().Subscribe(PubSubCenterMessageType.UpdateProductionCodes.ToString(), OnUpdateProductionCodes);
LoadProcessCode();
LoadProductionCode();
}
#region Load Codes
string _processCode = "";
string _productionCode = "";
string _currentProcssCode = "";
string _currentProductionCode = "";
private object OnUpdateProductionCodes(ISubscriber arg1, object arg2, object arg3)
{
LoadProductionCode();
return null;
}
private void LoadProcessCode()
{
var systemProcessCodes = ProcessFactory.GetProcessCodes();
var avaiableProcessCodes = SettingHelper.GetProcessCodes();
List<string> pCodes = new List<string>();
if (avaiableProcessCodes.Count > 0)
{
pCodes = avaiableProcessCodes.Intersect(systemProcessCodes).ToList();
}
else
{
pCodes = systemProcessCodes;
}
if (pCodes.Count == 1)
{
plProcess.Visible = false;
_processCode = pCodes[0];
return;
}
else
{
pCodes.RemoveAll(p => string.IsNullOrWhiteSpace(p));
}
if (pCodes.Count > 1)
{
plProcess.Visible = true;
cboProcessCode.SelectedIndexChanged -= cboProcessCode_SelectedIndexChanged;
UIHelper.SetCombo(cboProcessCode, pCodes, "", "");
cboProcessCode.SelectedIndexChanged += cboProcessCode_SelectedIndexChanged;
cboProcessCode_SelectedIndexChanged(null, null);
}
else if (pCodes.Count == 1)
{
plProcess.Visible = false;
_processCode = pCodes[0];
}
else
{
throw new ProcessException("未能获取流程代码");
}
}
private void LoadProductionCode()
{
var pCodes = SettingHelper.GetProductionCodes();
if (pCodes.Count > 1)
{
plProduct.Visible = true;
cboProductionCode.SelectedIndexChanged -= cboProductionCode_SelectedIndexChanged;
UIHelper.SetCombo(cboProductionCode, pCodes, "", "");
cboProductionCode.SelectedIndexChanged += cboProductionCode_SelectedIndexChanged;
cboProductionCode_SelectedIndexChanged(null, null);
}
else
{
plProduct.Visible = false;
}
}
private void cboProcessCode_SelectedIndexChanged(object sender, System.EventArgs e)
{
_processCode = cboProcessCode.Text;
//if (_processCode != _currentProcssCode)
//{
// btnStart.Enabled = false;
//}
//else
//{
btnStart.Enabled = true;
//}
}
private void cboProductionCode_SelectedIndexChanged(object sender, System.EventArgs e)
{
_productionCode = cboProductionCode.Text;
//if (_productionCode != _currentProductionCode)
//{
// btnStart.Enabled = false;
//}
//else
//{
btnStart.Enabled = true;
btnLoad.Enabled = true;
//}
}
#endregion
private void FrmOperation_Load(object sender, System.EventArgs e)
{
_currentProcssCode = _processCode = cboProcessCode.Text;
_currentProductionCode = _productionCode = cboProductionCode.Text;
btnStart.Enabled = true;
cboProcessCode.Enabled = cboProductionCode.Enabled = btnLoad.Enabled = false;
}
private void btnLoad_Click(object sender, System.EventArgs e)
{
LogAsync(DateTime.Now, LogLevel.Action, "载入流程");
LoadProcess();
SettingHelper.SetDefault(_processCode, _productionCode);
btnStart.Enabled = true;
}
bool isStart = true;
/// <summary>
/// 操作启动按钮
/// </summary>
private async void btnStart_Click(object sender, System.EventArgs e)
{
if (Process == null)
{
MessageBox.Show("无法操作空流程");
return;
}
btnStart.Enabled = false;
try
{
if (isStart)
{
await ProcessOperation(true);
}
else
{
await ProcessOperation(false);
}
isStart = !isStart;
}
catch (Exception ex)
{
//MessageBox.Show(ex.GetExceptionMessage());
}
finally
{
btnStart.Enabled = true;
}
}
private void LoadProcess()
{
if (_processCode != _currentProcssCode || _productionCode != _currentProductionCode || Process == null)
{
Process = ProcessFactory.CreateStationProcess(_processCode, _productionCode, out string msg);
if (!string.IsNullOrWhiteSpace(msg))
{
Process = null;
LogAsync(DateTime.Now, LogLevel.Warning, $"Process创建失败{msg}");
return;
}
_currentProcssCode = _processCode;
_currentProductionCode = _productionCode;
}
Process.InitialProcess("");
OnUploadProcess?.Invoke(Id, Process);
}
/// <summary>
/// 流程操作
/// </summary>
/// <param name="isStart">是否启动</param>
/// <returns></returns>
private async Task ProcessOperation(bool isStart)
{
if (isStart)
{
await Task.Run(() =>
{
Process.Open();
});
btnStart.Text = " 停 止";
btnStart.ImageIndex = 1;
btnStart.BackColor = Color.FromArgb(0x7f, Color.LimeGreen);
btnLoad.Enabled = false;
}
else
{
await Task.Run(() => Process.Close());
btnStart.Text = " 启 动";
btnStart.ImageIndex = 0;
btnStart.BackColor = SystemColors.Control;
btnLoad.Enabled = false;
}
}
public override void SetLoginStatus(bool isLogin)
{
base.SetLoginStatus(isLogin);
btnLoad.Enabled = cboProductionCode.Enabled = cboProcessCode.Enabled = IsLogin;
}
}
}

View File

@ -0,0 +1,226 @@
<?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="imgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="imgList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCA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DQAAQgHVgGXAfAB9BAAAfQBvAFvChcBbwGTAfQ1AAEIBVYBeAEIAfMTAAH0
ARsBlAHjBhcB4wGUARoB9DYAARsBlwNWAZkB8wH0FgAB9AHzARoBBwKUAZoBGgHyAfQB/zcAAfQB8QGX
AZgB8wH/WQABQgFNAT4HAAE+AwABKAMAAWADAAEYAwABAQEAAQEFAAEgAQEWAAP/AQABgAP/AQAB/wYA
AYABPwH/Af4BAAE/BgABgAEfAf8B+AEAAQ8GAAGAAQcB/wHwAQABBwYAAYABAQH/AeABAAEDBgABgAEA
AX8BwAEAAQMGAAGAAQABPwGAAQABAQYAAYABAAEPAYABAAEBBgABgAEAAQMBgAgAAYABAAEBAYAIAAGA
AgABgAgAAYACAAGACAABgAIAAYAIAAGAAgABgAgAAYABAAEDAYAIAAGAAQABBwGACAABgAEAAQ8BgAEA
AQEGAAGAAQABfwHAAQABAwYAAYABAAH/AcABAAEDBgABgAEBAf8B4AEAAQcGAAGAAQ8B/wHwAQABDwYA
AYABPwH/AfgBAAEfBgABgAF/Af8B/gEAAT8GAAGBBf8GAAs=
</value>
</data>
<metadata name="imgListLoad.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>111, 17</value>
</metadata>
<data name="imgListLoad.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD4
CAAAAk1TRnQBSQFMAwEBAAGYAQIBmAECARgBAAEYAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
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jAQAD6gEAA/EBAAP4AQAB8AH7
Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/8JAAL/AfYC/wH2Av9XAAH/
ARoBmgR6AZoBGgH0Af9TAAH/ARoBeglZARoB/1EAAf8BmgxZAXoB9AH/TgAB/wGaDlkBegH0TQAB/wGa
EFkBegH/SwAB/wEbCFkCeghZARoB/0oAAf8BmgdZAXoBwwH2AXoIWQH0SgAB9AF6B1kBwwL/AcMBegdZ
ARoB/0kAARoHWQGaBP8BwwdZAZoB/0kAARoGWQGaBv8BwwZZAXoB9kkAAZoFWQF6AfYH/wGaBVkBegH/
SQABmgVZAXoImgF6BVkBegH/SQABGgVZAXoImgF6BVkBegH2SQABGwVZARoI/wHDAXoEWQGaAf9JAAH0
AXoEWQEaCP8BwwF6BFkBGgH/SQAB/wGaBFkBeggaAZoEWQF6AfZLAAH0ElkBGkwAAf8BGhBZAZoB/00A
Af8BGg5ZAZoB/08AAf8BGgxZAZoB/1EAAf8B9AGaAXoGWQF6AZoBGwH/VAAB/wH0ARsBGgKaAhoB9AL/
rgABQgFNAT4HAAE+AwABKAMAAWADAAEYAwABAQEAAQEFAAEgAQEWAAP/AQAB/wEAAf8JAAH+AQABPwkA
AfgBAAEfCQAB8AEAAQcJAAHgAQABBwkAAcABAAEDCQABgAEAAQEJAAGAAQABAQkAAYALAAGACwABgAsA
AYALAAGACwABgAsAAYALAAGACwABgAEAAQEJAAHAAQABAwkAAcABAAEDCQAB4AEAAQcJAAHwAQABDwkA
AfgBAAEfCQAB/gEAAT8JAAP/CQAL
</value>
</data>
</root>

View File

@ -0,0 +1,606 @@

namespace BRS.UI.Main.MenuForms
{
partial class FrmStatistic
{
/// <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 dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.lblCT = new System.Windows.Forms.Label();
this.lblUPH = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.lblStartTime = new System.Windows.Forms.Label();
this.lblTotalTime = new System.Windows.Forms.Label();
this.lblRunTime = new System.Windows.Forms.Label();
this.lblIdleTime = new System.Windows.Forms.Label();
this.lblDownTime = new System.Windows.Forms.Label();
this.lblOEE_Total = new System.Windows.Forms.Label();
this.lblOEE_OK = new System.Windows.Forms.Label();
this.lblOEE_Rate = new System.Windows.Forms.Label();
this.btnClearOEE = new System.Windows.Forms.Button();
this.btnRefreshOEE = new System.Windows.Forms.Button();
this.lblIdealUPH = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnClearProductNum = new System.Windows.Forms.Button();
this.dgvProductNums = new System.Windows.Forms.DataGridView();
this.colType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNums = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel4.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProductNums)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.AutoScroll = true;
this.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel2, 0, 2);
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel3, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel1, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 3;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(255, 481);
this.tableLayoutPanel4.TabIndex = 1;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.AutoScroll = true;
this.tableLayoutPanel2.AutoSize = true;
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.label4, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.label5, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.lblCT, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.lblUPH, 1, 1);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 404);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.Size = new System.Drawing.Size(249, 74);
this.tableLayoutPanel2.TabIndex = 0;
//
// label4
//
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Location = new System.Drawing.Point(3, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(118, 33);
this.label4.TabIndex = 0;
this.label4.Text = "CT";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label5
//
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
this.label5.Location = new System.Drawing.Point(3, 33);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(118, 41);
this.label5.TabIndex = 1;
this.label5.Text = "UPH";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblCT
//
this.lblCT.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblCT.Location = new System.Drawing.Point(127, 0);
this.lblCT.Name = "lblCT";
this.lblCT.Size = new System.Drawing.Size(119, 33);
this.lblCT.TabIndex = 2;
this.lblCT.Text = "0";
this.lblCT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblUPH
//
this.lblUPH.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblUPH.Location = new System.Drawing.Point(127, 33);
this.lblUPH.Name = "lblUPH";
this.lblUPH.Size = new System.Drawing.Size(119, 41);
this.lblUPH.TabIndex = 3;
this.lblUPH.Text = "0";
this.lblUPH.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel3.AutoScroll = true;
this.tableLayoutPanel3.AutoSize = true;
this.tableLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel3.ColumnCount = 4;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel3.Controls.Add(this.label6, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.label7, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.label8, 2, 1);
this.tableLayoutPanel3.Controls.Add(this.label9, 0, 2);
this.tableLayoutPanel3.Controls.Add(this.label10, 2, 2);
this.tableLayoutPanel3.Controls.Add(this.label11, 0, 3);
this.tableLayoutPanel3.Controls.Add(this.label12, 2, 3);
this.tableLayoutPanel3.Controls.Add(this.label13, 0, 4);
this.tableLayoutPanel3.Controls.Add(this.label14, 2, 4);
this.tableLayoutPanel3.Controls.Add(this.lblStartTime, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.lblTotalTime, 1, 1);
this.tableLayoutPanel3.Controls.Add(this.lblRunTime, 3, 1);
this.tableLayoutPanel3.Controls.Add(this.lblIdleTime, 1, 2);
this.tableLayoutPanel3.Controls.Add(this.lblDownTime, 3, 2);
this.tableLayoutPanel3.Controls.Add(this.lblOEE_Total, 1, 3);
this.tableLayoutPanel3.Controls.Add(this.lblOEE_OK, 1, 4);
this.tableLayoutPanel3.Controls.Add(this.lblOEE_Rate, 3, 4);
this.tableLayoutPanel3.Controls.Add(this.btnClearOEE, 0, 5);
this.tableLayoutPanel3.Controls.Add(this.btnRefreshOEE, 2, 5);
this.tableLayoutPanel3.Controls.Add(this.lblIdealUPH, 3, 3);
this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 200);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 6;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(249, 198);
this.tableLayoutPanel3.TabIndex = 0;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Location = new System.Drawing.Point(3, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(43, 33);
this.label6.TabIndex = 0;
this.label6.Text = "开启时间";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Location = new System.Drawing.Point(3, 33);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(43, 33);
this.label7.TabIndex = 1;
this.label7.Text = "运行时间";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Dock = System.Windows.Forms.DockStyle.Fill;
this.label8.Location = new System.Drawing.Point(126, 33);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(43, 33);
this.label8.TabIndex = 2;
this.label8.Text = "有效时间";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Dock = System.Windows.Forms.DockStyle.Fill;
this.label9.Location = new System.Drawing.Point(3, 66);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(43, 33);
this.label9.TabIndex = 3;
this.label9.Text = "空闲时间";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Location = new System.Drawing.Point(126, 66);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(43, 33);
this.label10.TabIndex = 4;
this.label10.Text = "宕机时间";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Dock = System.Windows.Forms.DockStyle.Fill;
this.label11.Location = new System.Drawing.Point(3, 99);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(43, 33);
this.label11.TabIndex = 5;
this.label11.Text = "总数";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Dock = System.Windows.Forms.DockStyle.Fill;
this.label12.Location = new System.Drawing.Point(126, 99);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(43, 33);
this.label12.TabIndex = 6;
this.label12.Text = "理想UPH";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Dock = System.Windows.Forms.DockStyle.Fill;
this.label13.Location = new System.Drawing.Point(3, 132);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(43, 33);
this.label13.TabIndex = 7;
this.label13.Text = "OK";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Dock = System.Windows.Forms.DockStyle.Fill;
this.label14.Location = new System.Drawing.Point(126, 132);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(43, 33);
this.label14.TabIndex = 8;
this.label14.Text = "OEE";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lblStartTime
//
this.lblStartTime.AutoSize = true;
this.tableLayoutPanel3.SetColumnSpan(this.lblStartTime, 3);
this.lblStartTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblStartTime.Location = new System.Drawing.Point(52, 0);
this.lblStartTime.Name = "lblStartTime";
this.lblStartTime.Size = new System.Drawing.Size(194, 33);
this.lblStartTime.TabIndex = 9;
this.lblStartTime.Text = " ";
this.lblStartTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblTotalTime
//
this.lblTotalTime.AutoSize = true;
this.lblTotalTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblTotalTime.Location = new System.Drawing.Point(52, 33);
this.lblTotalTime.Name = "lblTotalTime";
this.lblTotalTime.Size = new System.Drawing.Size(68, 33);
this.lblTotalTime.TabIndex = 11;
this.lblTotalTime.Text = "00:00:00";
this.lblTotalTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblRunTime
//
this.lblRunTime.AutoSize = true;
this.lblRunTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblRunTime.Location = new System.Drawing.Point(175, 33);
this.lblRunTime.Name = "lblRunTime";
this.lblRunTime.Size = new System.Drawing.Size(71, 33);
this.lblRunTime.TabIndex = 11;
this.lblRunTime.Text = "00:00:00";
this.lblRunTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblIdleTime
//
this.lblIdleTime.AutoSize = true;
this.lblIdleTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblIdleTime.Location = new System.Drawing.Point(52, 66);
this.lblIdleTime.Name = "lblIdleTime";
this.lblIdleTime.Size = new System.Drawing.Size(68, 33);
this.lblIdleTime.TabIndex = 12;
this.lblIdleTime.Text = "00:00:00";
this.lblIdleTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblDownTime
//
this.lblDownTime.AutoSize = true;
this.lblDownTime.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblDownTime.Location = new System.Drawing.Point(175, 66);
this.lblDownTime.Name = "lblDownTime";
this.lblDownTime.Size = new System.Drawing.Size(71, 33);
this.lblDownTime.TabIndex = 13;
this.lblDownTime.Text = "00:00:00";
this.lblDownTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblOEE_Total
//
this.lblOEE_Total.AutoSize = true;
this.lblOEE_Total.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblOEE_Total.Location = new System.Drawing.Point(52, 99);
this.lblOEE_Total.Name = "lblOEE_Total";
this.lblOEE_Total.Size = new System.Drawing.Size(68, 33);
this.lblOEE_Total.TabIndex = 14;
this.lblOEE_Total.Text = "0";
this.lblOEE_Total.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblOEE_OK
//
this.lblOEE_OK.AutoSize = true;
this.lblOEE_OK.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblOEE_OK.Location = new System.Drawing.Point(52, 132);
this.lblOEE_OK.Name = "lblOEE_OK";
this.lblOEE_OK.Size = new System.Drawing.Size(68, 33);
this.lblOEE_OK.TabIndex = 15;
this.lblOEE_OK.Text = "0";
this.lblOEE_OK.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblOEE_Rate
//
this.lblOEE_Rate.AutoSize = true;
this.lblOEE_Rate.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblOEE_Rate.Location = new System.Drawing.Point(175, 132);
this.lblOEE_Rate.Name = "lblOEE_Rate";
this.lblOEE_Rate.Size = new System.Drawing.Size(71, 33);
this.lblOEE_Rate.TabIndex = 16;
this.lblOEE_Rate.Text = "0";
this.lblOEE_Rate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnClearOEE
//
this.btnClearOEE.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.tableLayoutPanel3.SetColumnSpan(this.btnClearOEE, 2);
this.btnClearOEE.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClearOEE.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnClearOEE.Font = new System.Drawing.Font("Tahoma", 10F);
this.btnClearOEE.ForeColor = System.Drawing.Color.Black;
this.btnClearOEE.Location = new System.Drawing.Point(3, 168);
this.btnClearOEE.MinimumSize = new System.Drawing.Size(1, 1);
this.btnClearOEE.Name = "btnClearOEE";
this.btnClearOEE.Size = new System.Drawing.Size(117, 27);
this.btnClearOEE.TabIndex = 17;
this.btnClearOEE.Text = "清 零";
this.btnClearOEE.UseVisualStyleBackColor = false;
this.btnClearOEE.Visible = false;
this.btnClearOEE.Click += new System.EventHandler(this.btnClearOEE_Click);
//
// btnRefreshOEE
//
this.tableLayoutPanel3.SetColumnSpan(this.btnRefreshOEE, 2);
this.btnRefreshOEE.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshOEE.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnRefreshOEE.Font = new System.Drawing.Font("Tahoma", 10F);
this.btnRefreshOEE.Location = new System.Drawing.Point(126, 168);
this.btnRefreshOEE.MinimumSize = new System.Drawing.Size(1, 1);
this.btnRefreshOEE.Name = "btnRefreshOEE";
this.btnRefreshOEE.Size = new System.Drawing.Size(120, 27);
this.btnRefreshOEE.TabIndex = 18;
this.btnRefreshOEE.Text = "刷 新";
this.btnRefreshOEE.Click += new System.EventHandler(this.btnRefreshOEE_Click);
//
// lblIdealUPH
//
this.lblIdealUPH.AutoSize = true;
this.lblIdealUPH.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblIdealUPH.Location = new System.Drawing.Point(175, 99);
this.lblIdealUPH.Name = "lblIdealUPH";
this.lblIdealUPH.Size = new System.Drawing.Size(71, 33);
this.lblIdealUPH.TabIndex = 16;
this.lblIdealUPH.Text = "0";
this.lblIdealUPH.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.btnClearProductNum, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.dgvProductNums, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(249, 191);
this.tableLayoutPanel1.TabIndex = 2;
//
// btnClearProductNum
//
this.btnClearProductNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.btnClearProductNum.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClearProductNum.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnClearProductNum.Font = new System.Drawing.Font("Tahoma", 10F);
this.btnClearProductNum.ForeColor = System.Drawing.Color.Black;
this.btnClearProductNum.Location = new System.Drawing.Point(3, 161);
this.btnClearProductNum.MinimumSize = new System.Drawing.Size(1, 1);
this.btnClearProductNum.Name = "btnClearProductNum";
this.btnClearProductNum.Size = new System.Drawing.Size(243, 27);
this.btnClearProductNum.TabIndex = 2;
this.btnClearProductNum.Text = "清 零";
this.btnClearProductNum.UseVisualStyleBackColor = false;
this.btnClearProductNum.Visible = false;
this.btnClearProductNum.Click += new System.EventHandler(this.btnClearProductNum_Click);
//
// dgvProductNums
//
this.dgvProductNums.AllowUserToAddRows = false;
this.dgvProductNums.AllowUserToDeleteRows = false;
this.dgvProductNums.AllowUserToResizeColumns = false;
this.dgvProductNums.AllowUserToResizeRows = false;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.Silver;
this.dgvProductNums.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
this.dgvProductNums.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvProductNums.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.dgvProductNums.BackgroundColor = System.Drawing.SystemColors.Control;
this.dgvProductNums.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dgvProductNums.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SunkenHorizontal;
this.dgvProductNums.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
this.dgvProductNums.ColumnHeadersHeight = 4;
this.dgvProductNums.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dgvProductNums.ColumnHeadersVisible = false;
this.dgvProductNums.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colType,
this.colNums,
this.colRate});
this.dgvProductNums.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProductNums.Location = new System.Drawing.Point(3, 15);
this.dgvProductNums.Margin = new System.Windows.Forms.Padding(3, 15, 3, 15);
this.dgvProductNums.MultiSelect = false;
this.dgvProductNums.Name = "dgvProductNums";
this.dgvProductNums.ReadOnly = true;
this.dgvProductNums.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
this.dgvProductNums.RowHeadersVisible = false;
this.dgvProductNums.RowTemplate.Height = 23;
this.dgvProductNums.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvProductNums.Size = new System.Drawing.Size(243, 128);
this.dgvProductNums.TabIndex = 3;
//
// colType
//
this.colType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.colType.DataPropertyName = "ResultDesc";
this.colType.HeaderText = "Type";
this.colType.MinimumWidth = 30;
this.colType.Name = "colType";
this.colType.ReadOnly = true;
//
// colNums
//
this.colNums.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.colNums.DataPropertyName = "ProductAmount";
this.colNums.HeaderText = "Nums";
this.colNums.Name = "colNums";
this.colNums.ReadOnly = true;
//
// colRate
//
this.colRate.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.colRate.DataPropertyName = "PercentStr";
this.colRate.HeaderText = "Rate";
this.colRate.MinimumWidth = 30;
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.dataGridViewTextBoxColumn1.DataPropertyName = "ProductType";
this.dataGridViewTextBoxColumn1.HeaderText = "Type";
this.dataGridViewTextBoxColumn1.MinimumWidth = 30;
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
this.dataGridViewTextBoxColumn2.DataPropertyName = "Amount";
this.dataGridViewTextBoxColumn2.HeaderText = "Nums";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
this.dataGridViewTextBoxColumn3.DataPropertyName = "RateStr";
this.dataGridViewTextBoxColumn3.HeaderText = "Rate";
this.dataGridViewTextBoxColumn3.MinimumWidth = 30;
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
//
// FrmStatistic
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(255, 481);
this.Controls.Add(this.tableLayoutPanel4);
this.Name = "FrmStatistic";
this.Text = "生产信息";
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvProductNums)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button btnClearProductNum;
private System.Windows.Forms.DataGridView dgvProductNums;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label lblStartTime;
private System.Windows.Forms.Label lblTotalTime;
private System.Windows.Forms.Label lblRunTime;
private System.Windows.Forms.Label lblIdleTime;
private System.Windows.Forms.Label lblDownTime;
private System.Windows.Forms.Label lblOEE_Total;
private System.Windows.Forms.Label lblOEE_OK;
private System.Windows.Forms.Label lblOEE_Rate;
private System.Windows.Forms.Button btnClearOEE;
private System.Windows.Forms.Button btnRefreshOEE;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label lblCT;
private System.Windows.Forms.Label lblUPH;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.Label lblIdealUPH;
private System.Windows.Forms.DataGridViewTextBoxColumn colType;
private System.Windows.Forms.DataGridViewTextBoxColumn colNums;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
}
}

View File

@ -0,0 +1,151 @@
using BRS.Process;
using BRS.UI.Model.Winform;
using System;
using System.Drawing;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using static BRS.Common.Model.Helper.EnumHelper;
namespace BRS.UI.Main.MenuForms
{
[DockOption(DockState.DockRight, 230, 0)]
[MenuNode("Statistic", "生产信息", 2, "View1", true)]
public partial class FrmStatistic : MenuFormBase
{
#region Timer
System.Windows.Forms.Timer _refreshUITimer = new Timer();
#endregion
public FrmStatistic()
{
InitializeComponent();
this.Load += (s, e) =>
{
_refreshUITimer.Interval = 1000;
_refreshUITimer.Tick += _refreshUITimer_Tick;
_refreshUITimer.Enabled = true;
};
}
private void _refreshUITimer_Tick(object sender, EventArgs e)
{
_refreshUITimer.Enabled = false;
if (ProcessControl != null)
{
lblStartTime.Text = ProcessControl.StartTime == null ? "" : ProcessControl.StartTime.Value.ToString("yyyy/MM/dd HH:mm:ss");
lblTotalTime.Text = ProcessControl.TotalTime.ToString();
lblRunTime.Text = ProcessControl.RunTime.ToString();
lblIdleTime.Text = ProcessControl.IdleTime.ToString();
lblDownTime.Text = ProcessControl.DownTime.ToString();
lblOEE_Total.Text = ProcessControl.ProductNum_Total.ToString();
lblOEE_OK.Text = ProcessControl.ProductNum_OK.ToString();
}
_refreshUITimer.Enabled = true;
}
ProcessConfigBase Config => Process.IConfig as ProcessConfigBase;
ProcessControl ProcessControl => Process as ProcessControl;
public override void OnProcessUpdated()
{
InitialProductNumsView();
Process.OnUpdateResult -= UpdateResult;
Process.OnUpdateCT -= UpdateCT;
Process.OnUpdateResult += UpdateResult;
Process.OnUpdateCT += UpdateCT;
Process.OnProcessStateChanged -= Process_OnProcessStateChanged;
Process.OnProcessStateChanged += Process_OnProcessStateChanged;
this.Invoke(new Action(() =>
{
//0726
// lblIdealUPH.Text = Config.IdealUPH.ToString();
}));
}
private void Process_OnProcessStateChanged(DeviceState obj)
{
if (ProcessControl.ProcessState == DeviceState.DSOpen)
{
this.Invoke(new Action(() =>
{
lblCT.Text = lblUPH.Text = lblOEE_OK.Text = lblOEE_Total.Text = lblOEE_Rate.Text = "0";
}));
}
}
private void UpdateResult(DateTime updateTime, object objData, string result)
{
this.Invoke(new Action(() =>
{
dgvProductNums.DataSource = null;
dgvProductNums.DataSource = ProcessControl.ProductSummaries;
if (dgvProductNums.Rows.Count > 0)
{
dgvProductNums.Height = dgvProductNums.Rows[0].Height * dgvProductNums.Rows.Count + 15;
}
else
{
dgvProductNums.Height = 15;
}
lblOEE_Rate.Text = ProcessControl.OEE.ToString("f2") + " %";
lblUPH.Text = ProcessControl.UPH.ToString();
}));
}
#region CT/UPH
private void UpdateCT(object objData, float ctTime)
{
this.Invoke(new Action(() =>
{
lblCT.Text = ctTime.ToString("f2") + " 秒";
}));
}
#endregion
#region OEE related
private void btnClearOEE_Click(object sender, EventArgs e)
{
ProcessControl.ResetOEETimeDistribute();
}
private void btnRefreshOEE_Click(object sender, EventArgs e)
{
ProcessControl.CalculateOEE();
}
#endregion
#region ProductionNums
private void InitialProductNumsView()
{
dgvProductNums.AutoGenerateColumns = false;
dgvProductNums.DefaultCellStyle.Font = new Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.World);
dgvProductNums.DataSource = null;
dgvProductNums.DataSource = ProcessControl.ProductSummaries;
}
private void btnClearProductNum_Click(object sender, EventArgs e)
{
ProcessControl.ResetProductSummaries();
dgvProductNums.DataSource = null;
dgvProductNums.DataSource = ProcessControl.ProductSummaries;
dgvProductNums.Height = 15;
}
#endregion
}
}

View File

@ -0,0 +1,129 @@
<?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="colType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colNums.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -0,0 +1,57 @@
namespace BRS.UI.Main.MenuForms
{
partial class FrmTest
{
/// <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.plMain = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// plMain
//
this.plMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.plMain.Location = new System.Drawing.Point(0, 0);
this.plMain.Name = "plMain";
this.plMain.Size = new System.Drawing.Size(800, 488);
this.plMain.TabIndex = 0;
//
// FrmTest
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(800, 488);
this.Controls.Add(this.plMain);
this.Name = "FrmTest";
this.Text = "测试";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel plMain;
}
}

View File

@ -0,0 +1,32 @@
using BRS.UI.Main.Ctrls;
using BRS.UI.Model.Winform;
using System.Windows.Forms;
namespace BRS.UI.Main.MenuForms
{
/// <summary>
/// 方法测试窗口
/// </summary>
// [MenuNode("Test", "测试", 2, "View2", true)]
public partial class FrmTest : MenuFormBase
{
readonly CtrlMethodInvoke ctrlMethodInvoker = new CtrlMethodInvoke(Common.Model.Helper.InvokeType.TestInvoke);
public FrmTest()
{
InitializeComponent();
ctrlMethodInvoker.Dock = DockStyle.Fill;
plMain.Controls.Add(ctrlMethodInvoker);
ctrlMethodInvoker.OnLogMsgOutput -= LogAsync;
ctrlMethodInvoker.OnLogMsgOutput += LogAsync;
}
public override void OnProcessUpdated()
{
ctrlMethodInvoker.DownloadProcess(Process);
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,47 @@
namespace Bro.UI.Config.MenuForms
{
partial class MenuFrmBase
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// MenuFrmBase
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(474, 344);
this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
this.Name = "MenuFrmBase";
this.Text = "MenuFrmBase";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,112 @@
using Bro.Common.Helper;
using Bro.Common.Interface;
//using Bro.UI.Config.Helper;
using System;
using System.Reflection;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
namespace Bro.UI.Config.MenuForms
{
public interface IMenuNode
{
//IProcess Process { get; set; }
//void DownloadProcess(IProcess process);
//Action<IProcess> OnUploadProcess { get; set; }
}
public interface IProcessObserver
{
IProcess Process { get; set; }
void OnProcessUpdated();
void DownloadProcess(IProcess process);
}
public interface ILogOutput
{
Action<LogMsg> OnLogMsgOutput { get; set; }
void LogDisplay(LogMsg msg);
}
public partial class MenuFrmBase : DockContent, IMenuNode, IProcessObserver, ILogOutput
{
public Action<string, IProcess> OnUploadProcess { get; set; }
public Action<LogMsg> OnLogMsgOutput { get; set; }
public string Id { get; set; } = Guid.NewGuid().ToString();
private IProcess process = null;
public IProcess Process
{
get => process;
set
{
//if (process != value)
{
process = value;
OnProcessUpdated();
}
}
}
public MenuFrmBase()
{
InitializeComponent();
var dockAttr = GetType().GetCustomAttribute<DockOptionAttribute>();
if (dockAttr != null)
{
FormClosing += MenuFrmBase_FormClosing;
}
}
protected virtual void MenuFrmBase_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason != CloseReason.MdiFormClosing)
{
e.Cancel = true;
if (DockHandler.DockPanel != null)
Hide();
}
}
#region IProcessObserver
public virtual void OnProcessUpdated()
{
}
public virtual void DownloadProcess(IProcess process)
{
Process = process;
}
#endregion
#region ILogOutput
public virtual void LogDisplay(LogMsg msg)
{
}
protected virtual void LogAsync(LogMsg msg)
{
OnLogMsgOutput?.Invoke(msg);
}
protected virtual void LogAsync(DateTime dt, string prefix, string msg = "")
{
OnLogMsgOutput?.Invoke(new LogMsg(dt, prefix, msg));
}
#endregion
#region Login
protected bool IsLogin { get; set; }
public virtual void SetLoginStatus(bool isLogin)
{
IsLogin = isLogin;
}
#endregion
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,15 @@
using BRS.Common.Interface;
using BRS.UI.Model.Winform;
namespace BRS.UI.Main.MenuForms
{
[MenuNode("View1", "普通窗口", 1, "", false)]
public class ViewNode1 : IMenuNode
{
}
[MenuNode("View2", "高级窗口", 2, "", false)]
public class ViewNode2 : IMenuNode
{
}
}

View File

@ -0,0 +1,33 @@
using System;
using System.Windows.Forms;
namespace BRS.UI.Main
{
public partial class ProductionCodeEditForm : Form
{
public string PCode { get; set; }
public double POutsideDiameter { get; set; }
public double PHeight { get; set; }
public ProductionCodeEditForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
PCode = txtPCode.Text;
POutsideDiameter = Convert.ToDouble(txtPOutsideDiameter.Text) ;
PHeight = Convert.ToDouble(txtPHeight.Text) ;
this.Close();
}
}
}

View File

@ -0,0 +1,153 @@
namespace BRS.UI.Main
{
partial class ProductionCodeEditForm
{
/// <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.txtPCode = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.txtPOutsideDiameter = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtPHeight = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// txtPCode
//
this.txtPCode.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPCode.Location = new System.Drawing.Point(126, 28);
this.txtPCode.Name = "txtPCode";
this.txtPCode.Size = new System.Drawing.Size(236, 23);
this.txtPCode.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(9, 31);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(82, 14);
this.label1.TabIndex = 1;
this.label1.Text = "产品编码:";
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(206, 180);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 2;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.button1_Click);
//
// btnOK
//
this.btnOK.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOK.Location = new System.Drawing.Point(287, 180);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 2;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.button2_Click);
//
// txtPOutsideDiameter
//
this.txtPOutsideDiameter.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPOutsideDiameter.Location = new System.Drawing.Point(126, 70);
this.txtPOutsideDiameter.Name = "txtPOutsideDiameter";
this.txtPOutsideDiameter.Size = new System.Drawing.Size(236, 23);
this.txtPOutsideDiameter.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(9, 73);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(82, 14);
this.label2.TabIndex = 1;
this.label2.Text = "产品外径:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(9, 117);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(82, 14);
this.label3.TabIndex = 1;
this.label3.Text = "产品高度:";
//
// txtPHeight
//
this.txtPHeight.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPHeight.Location = new System.Drawing.Point(126, 114);
this.txtPHeight.Name = "txtPHeight";
this.txtPHeight.Size = new System.Drawing.Size(236, 23);
this.txtPHeight.TabIndex = 0;
//
// ProductionCodeEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(380, 229);
this.ControlBox = false;
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtPHeight);
this.Controls.Add(this.txtPOutsideDiameter);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtPCode);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ProductionCodeEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新产品机种信息";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtPCode;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.TextBox txtPOutsideDiameter;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPHeight;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

158
src/BRS.UI.Main/Program.cs Normal file
View File

@ -0,0 +1,158 @@
using BRS.Common.Model.Helper;
using BRS.Common.Model.Authority;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Management;
using System.Security.Cryptography;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Win32;
using System.IO;
using BRS.UI.Main.Properties;
using System.Reflection;
using System.Resources;
namespace BRS.UI.Main
{
static class Program
{
static MainFrm mainFrm = null;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
AutoStart(true);
if (!AuthorityCheck.AuthorityCheckOperation())
{
MessageBox.Show("加密狗本地检测和远程检测失败!请本地插入加密狗或确认远程加密服务就绪。");
Environment.Exit(1);
}
//"3f0d870f-0fcc-4f0b-9836-123a679d8bc6"
if (!HslCommunication.Authorization.SetAuthorizationCode("f562cc4c-4772-4b32-bdcd-f3e122c534e3"))
{
MessageBox.Show("软件授权失败,系统关闭!");
Environment.Exit(1);
}
bool isAppRunning = false;
Mutex mutex = new Mutex(true, System.Diagnostics.Process.GetCurrentProcess().ProcessName, out isAppRunning);
if (!isAppRunning)
{
MessageBox.Show("程序已运行,不能再次打开!");
Environment.Exit(1);
}
Application.SetCompatibleTextRenderingDefault(false);
// 如果没有配置文件,则初始化示例数据
if (!SettingHelper.IsSettingFileValid())
{
SampleHelper.Init();
}
Application.EnableVisualStyles();
System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.ThreadException += Application_ThreadException;
mainFrm = new MainFrm();
Application.Run(mainFrm);
AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException;
Application.ThreadException -= Application_ThreadException;
}
private static bool CheckMacAddress()
{
//return true;
string matchStr = ConfigurationManager.AppSettings["MAC"];
if (string.IsNullOrWhiteSpace(matchStr))
return false;
List<string> macList = new List<string>();
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc2 = mc.GetInstances();
foreach (ManagementObject mo in moc2)
{
{
string madAddr = mo["MacAddress"]?.ToString() ?? "";
madAddr = madAddr.Replace(':', '-');
macList.Add(madAddr);
}
mo.Dispose();
}
for (int i = 0; i < macList.Count; i++)
{
string macStr = MD5Crypted(macList[i], 2);
if (macStr == matchStr)
return true;
}
return false;
}
private static string MD5Crypted(string origin, int cryptedTimes)
{
MD5 md5 = MD5.Create();
string pwd = origin;
do
{
pwd = string.Join("-", md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(pwd)).ToList().ConvertAll(b => b.ToString("X2").ToUpper()));
cryptedTimes--;
} while (cryptedTimes > 0);
return pwd;
}
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
string msg = e.Exception.GetExceptionMessage();
mainFrm.DockFrm_OnLogMsgOutput(new LogMsg(DateTime.Now, EnumHelper.LogLevel.Exception, msg));
//MessageBox.Show(msg, "线程异常报警");
}
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
string msg = (e.ExceptionObject as Exception).GetExceptionMessage();
mainFrm.DockFrm_OnLogMsgOutput(new LogMsg(DateTime.Now, EnumHelper.LogLevel.Exception, msg));
//MessageBox.Show(msg, "未处理异常");
}
/// <summary>
/// 修改程序在注册表中的键值
/// </summary>
/// <param name="isAuto">true:开机启动,false:不开机自启</param>
private static void AutoStart(bool isAuto = true)
{
if (isAuto == true)
{
RegistryKey R_local = Registry.CurrentUser;
RegistryKey R_run = R_local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
R_run.SetValue("ProjectName", System.Windows.Forms.Application.ExecutablePath);
R_run.Close();
R_local.Close();
}
else
{
RegistryKey R_local = Registry.CurrentUser;
RegistryKey R_run = R_local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
R_run.DeleteValue("ProjectName", false);
R_run.Close();
R_local.Close();
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("磁环分选系统")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BRS.UI.Main")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("dd02c60e-560b-40c0-ad7f-523f0b4aa4fd")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BRS.UI.Main.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BRS.UI.Main.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找类似 {&quot;$type&quot;:&quot;BRS.Process.A020.A020Config,BRS.Process.A020&quot;,&quot;StationCode&quot;:null,&quot;CameraConfigCollection&quot;:{&quot;$type&quot;:&quot;System.Collections.Generic.List`1[[BRS.Common.Interface.IInitialConfig,BRS.Common.Model]],mscorlib&quot;,&quot;$values&quot;:[{&quot;$type&quot;:&quot;XKRS.Device.VirtualCamera.VirtualCameraInitialConfig,XKRS.Device.VirtualCamera&quot;,&quot;OfflineImagesDir&quot;:&quot;%SAMPLE_OFFLINE_IMAGE_DIR%&quot;,&quot;LoopMode&quot;:false,&quot;ImageEmitInterval&quot;:1500,&quot;DriverType&quot;:&quot;VirtualCamera&quot;,&quot;ImgDirectory&quot;:&quot;../Images&quot;,&quot;SaveImageDayLimit&quot;:10,&quot;ImageSaveOption&quot;:{&quot;$type&quot;:&quot;BRS. [字符串的其余部分被截断]&quot;; 的本地化字符串。
/// </summary>
internal static string DefaultConfigStr {
get {
return ResourceManager.GetString("DefaultConfigStr", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,123 @@
<?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>
<data name="DefaultConfigStr" xml:space="preserve">
<value>{"$type":"BRS.Process.A020.A020Config,BRS.Process.A020","StationCode":null,"CameraConfigCollection":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Interface.IInitialConfig,BRS.Common.Model]],mscorlib","$values":[{"$type":"XKRS.Device.VirtualCamera.VirtualCameraInitialConfig,XKRS.Device.VirtualCamera","OfflineImagesDir":"%SAMPLE_OFFLINE_IMAGE_DIR%","LoopMode":false,"ImageEmitInterval":1500,"DriverType":"VirtualCamera","ImgDirectory":"../Images","SaveImageDayLimit":10,"ImageSaveOption":{"$type":"BRS.Common.Interface.ImageSaveOption,BRS.Common.Model","IsEnabled":false,"ImageSaveDirectory":null,"ImageFormat":"Png"},"Id":"5AF2C9B2-D844-4AAC-93AC-0F2FBE558A30","Name":"虚拟相机","IsEnabled":true,"LogPath":"%SAMPLE_LOG_PATH%","IsEnableLog":true,"IsEnableCSV":false}]},"DeviceConfigs":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Interface.IInitialConfig,BRS.Common.Model]],mscorlib","$values":[{"$type":"BRS.Device.VisionDetection.VisionDetectionInitialConfig,BRS.Device.VisionDetection","DriverType":"视觉检测","DetectionConfigs":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Base.DetectionConfig,BRS.Common.Device]],mscorlib","$values":[{"$type":"BRS.Common.Base.DetectionConfig,BRS.Common.Device","Id":"4d16bcc4-87f8-4f54-ace5-881168f2c32b","Name":"缺陷检测","DetectionDeviceType":0,"PreheatImagePath":null,"ImageSaveOption":{"$type":"BRS.Common.Interface.VisionImageSaveOption,BRS.Common.Model","IsSaveDetectionOriginImage":true,"IsSaveFitImage":true,"AddtionalSaveType":"NG","ImageSaveDirectory":"%SAMPLE_IMAGE_SAVE_DIR%","IsEnabled":true,"ImageFormat":"Png"},"MLModelPath":"%SAMPLE_MODEL_PATH%","MLLablePath":"%SAMPLE_LABEL_PATH%","confThreshold":0.3,"iouThreshold":0.4,"IsEnabled":true,"in_node_name":"images","out_node_name":"output","ImageChannels":3,"ImageWidth":640,"ImageHeight":640,"CameraSourceId":"5AF2C9B2-D844-4AAC-93AC-0F2FBE558A30","IsShowInUI":true,"ShowLocation":{"$type":"BRS.Common.Model.CustomizedPoint,BRS.Common.Model","X":0.0,"Y":0.0},"ColumnSpan":1,"RowSpan":1}]},"ImageSaveDirectory":"%SAMPLE_IMAGE_SAVE_DIR%","IsSaveImage":true,"Id":"C20CF3F0-2144-4DA5-B5A7-7DB856CC8E10","Name":"视觉检测","IsEnabled":true,"LogPath":"%SAMPLE_LOG_PATH%","IsEnableLog":true,"IsEnableCSV":true}]},"IsLogEnabled":true,"DefaultLogLevel":2,"IsCSVOutputEnabled":false,"LogPath":"%SAMPLE_LOG_PATH%","IsSelectPic":false,"SelectPICImagesDir":"","IsSelectCut":true,"CutSelectPicPath":""}</value>
</data>
</root>

View File

@ -0,0 +1,38 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BRS.UI.Main.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("A020")]
public string DefaultProcess {
get {
return ((string)(this["DefaultProcess"]));
}
set {
this["DefaultProcess"] = value;
}
}
}
}

View File

@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BRS.UI.Main.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="DefaultProcess" Type="System.String" Scope="User">
<Value Profile="(Default)">A020</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -0,0 +1 @@
{"$type":"BRS.Process.A020.A020Config,BRS.Process.A020","StationCode":null,"CameraConfigCollection":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Interface.IInitialConfig,BRS.Common.Model]],mscorlib","$values":[{"$type":"XKRS.Device.VirtualCamera.VirtualCameraInitialConfig,XKRS.Device.VirtualCamera","OfflineImagesDir":"%SAMPLE_OFFLINE_IMAGE_DIR%","LoopMode":false,"ImageEmitInterval":1500,"DriverType":"VirtualCamera","ImgDirectory":"../Images","SaveImageDayLimit":10,"ImageSaveOption":{"$type":"BRS.Common.Interface.ImageSaveOption,BRS.Common.Model","IsEnabled":false,"ImageSaveDirectory":null,"ImageFormat":"Png"},"Id":"5AF2C9B2-D844-4AAC-93AC-0F2FBE558A30","Name":"虚拟相机","IsEnabled":true,"LogPath":"%SAMPLE_LOG_PATH%","IsEnableLog":true,"IsEnableCSV":false}]},"DeviceConfigs":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Interface.IInitialConfig,BRS.Common.Model]],mscorlib","$values":[{"$type":"BRS.Device.VisionDetection.VisionDetectionInitialConfig,BRS.Device.VisionDetection","DriverType":"视觉检测","DetectionConfigs":{"$type":"System.Collections.Generic.List`1[[BRS.Common.Base.DetectionConfig,BRS.Common.Device]],mscorlib","$values":[{"$type":"BRS.Common.Base.DetectionConfig,BRS.Common.Device","Id":"4d16bcc4-87f8-4f54-ace5-881168f2c32b","Name":"缺陷检测","DetectionDeviceType":0,"PreheatImagePath":null,"ImageSaveOption":{"$type":"BRS.Common.Interface.VisionImageSaveOption,BRS.Common.Model","IsSaveDetectionOriginImage":true,"IsSaveFitImage":true,"AddtionalSaveType":"NG","ImageSaveDirectory":"%SAMPLE_IMAGE_SAVE_DIR%","IsEnabled":true,"ImageFormat":"Png"},"MLModelPath":"%SAMPLE_MODEL_PATH%","MLLablePath":"%SAMPLE_LABEL_PATH%","confThreshold":0.3,"iouThreshold":0.4,"IsEnabled":true,"in_node_name":"images","out_node_name":"output","ImageChannels":3,"ImageWidth":640,"ImageHeight":640,"CameraSourceId":"5AF2C9B2-D844-4AAC-93AC-0F2FBE558A30","IsShowInUI":true,"ShowLocation":{"$type":"BRS.Common.Model.CustomizedPoint,BRS.Common.Model","X":0.0,"Y":0.0},"ColumnSpan":1,"RowSpan":1}]},"ImageSaveDirectory":"%SAMPLE_IMAGE_SAVE_DIR%","IsSaveImage":true,"Id":"C20CF3F0-2144-4DA5-B5A7-7DB856CC8E10","Name":"视觉检测","IsEnabled":true,"LogPath":"%SAMPLE_LOG_PATH%","IsEnableLog":true,"IsEnableCSV":true}]},"IsLogEnabled":true,"DefaultLogLevel":2,"IsCSVOutputEnabled":false,"LogPath":"%SAMPLE_LOG_PATH%","IsSelectPic":false,"SelectPICImagesDir":"","IsSelectCut":true,"CutSelectPicPath":""}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,237 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using BRS.Common.Model.Helper;
using System.Windows.Forms;
using BRS.UI.Main.Properties;
using System.Reflection;
using System.Resources;
namespace BRS.UI.Main
{
/// <summary>
/// 配置文件夹以及示例数据处理
/// </summary>
public static class SampleHelper
{
private static readonly List<string> Folders = new List<string> {
"Configs",
//"DataBase",
//"Images",
"Logs",
//"Models",
//"Result",
//"Samples",
//"Vision",
};
/// <summary>
/// 初始化文件夹
/// </summary>
/// <param name="path"></param>
private static void InitFolder(string path)
{
Folders.ForEach(folder =>
{
Directory.CreateDirectory(Path.Combine(path, folder));
});
}
/// <summary>
/// 解压缩Sample数据
/// </summary>
/// <param name="path"></param>
private static void Extract(string path)
{
// 7z.exe x FN_Inference.7z -pxkrs0425 -o"J:\test data"
var currentDir = Environment.CurrentDirectory;
var _7z = Path.Combine(currentDir, "7z.exe");
var sampleFile = Path.Combine(currentDir, "data", "Sample.7z");
ProcessStartInfo psi = new ProcessStartInfo(_7z);
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
psi.Arguments = $"x {sampleFile} -pxkrs0425 -o\"{path}\"";
System.Diagnostics.Process.Start(psi);
}
private static void GenerateConfig(string basePath)
{
// 初始化配置文件
Assembly assem = Assembly.GetEntryAssembly();
ResourceManager rm = new ResourceManager("BRS.UI.Main.Properties.Resources", assem);
string defaultConfigStr = rm.GetString("DefaultConfigStr"); //资源文件名称不带扩展名
object defaultConfig = rm.GetObject("DefaultConfig");
// 离线图片目录
string strOfflineImgDir = Path.Combine(basePath, "SampleImages").Replace("\\", "\\\\");
defaultConfigStr = defaultConfigStr.Replace("%SAMPLE_OFFLINE_IMAGE_DIR%", strOfflineImgDir);
// 模型
string strModelPath = Path.Combine(basePath, "Models", "FN_Model.onnx").Replace("\\", "\\\\");
defaultConfigStr = defaultConfigStr.Replace("%SAMPLE_MODEL_PATH%", strModelPath);
//标签
string strLabelPath = Path.Combine(basePath, "Models", "FN_Class.txt").Replace("\\", "\\\\");
defaultConfigStr = defaultConfigStr.Replace("%SAMPLE_LABEL_PATH%", strLabelPath);
// 图片保存路径
string strImgSaveDir = Path.Combine(basePath, "Images").Replace("\\", "\\\\");
defaultConfigStr = defaultConfigStr.Replace("%SAMPLE_IMAGE_SAVE_DIR%", strImgSaveDir);
// 日志
string strLogPath = Path.Combine(basePath, "Logs").Replace("\\", "\\\\");
defaultConfigStr = defaultConfigStr.Replace("%SAMPLE_LOG_PATH%", strLogPath);
// 配置文件保存路径
string strConfigPath = Path.Combine(basePath, "Configs", "Config.json");
using (StreamWriter writer = new StreamWriter(strConfigPath, false, Encoding.UTF8))
{
writer.WriteLine(defaultConfigStr);
writer.Flush();
}
}
/// <summary>
/// 初始化配置数据
/// </summary>
public static void Init()
{
bool settingChecked = false;
// 配置文件不存在
while (!settingChecked)
{
if (settingChecked)
{
Environment.Exit(1);
}
// 设置目录
string myDoc = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
var retPath = Path.Combine(myDoc, "A020");
// var retPath = Path.Combine(dialog.SelectedPath, "Configs");
// 将配置写入文件
string defaultSetting = "{\"ProcessCodes\":[],\"ProductionCodes\":[\"Default\"],\"DefaultProcess\":\"A020\",\"DefaultProduction\":\"\",\"ConfigPath\":\""
+ Path.Combine(retPath, "Configs").Replace("\\", "\\\\")
+ "\",\"Description\":\"振动盘供料缺陷检测系统\",\"IconPath\":null,\"CurrLayout\":\"Default\",\"IsMinimumWhenClose\":false}";
SettingHelper.InitWithContent(defaultSetting);
settingChecked = true;
// 创建文件夹
InitFolder(retPath);
// 解压缩示例数据
// Extract(retPath);
// 生成配置文件
GenerateConfig(retPath);
}
}
///// <summary>
///// 初始化配置数据
///// </summary>
//public static void Init()
//{
// bool settingChecked = false;
// // 配置文件不存在
// while (!settingChecked)
// {
// if (settingChecked)
// {
// Environment.Exit(1);
// }
// // 设置目录
// MessageBox.Show("首次使用软件,请选择一个空文件夹作为数据目录,路径中请勿包含中文", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// bool dirOk = false;
// FolderBrowserDialog dialog = new FolderBrowserDialog();
// dialog.ShowNewFolderButton = true;
// dialog.Description = "请选择数据目录(不允许中文路径)";
// while (!dirOk) // 检查是否选择好了目录
// {
// if (dialog.ShowDialog() == DialogResult.OK)
// {
// bool haveChinese = dialog.SelectedPath.ToCharArray().Any(c => c > 0xff);
// if (haveChinese)
// {
// MessageBox.Show("路径中包含中文,请重新选择", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// continue;
// }
// var subEntities = Directory.GetFileSystemEntries(dialog.SelectedPath).Length;
// if (subEntities > 0)
// {
// MessageBox.Show("目录非空", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
// continue;
// }
// dirOk = true;
// }
// else
// {
// MessageBox.Show("请选择数据目录", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// }
// }
// var retPath = dialog.SelectedPath; //Path.Combine(dialog.SelectedPath, "DefectDetectionData");
// // var retPath = Path.Combine(dialog.SelectedPath, "Configs");
// // 将配置写入文件
// string defaultSetting = "{\"ProcessCodes\":[],\"ProductionCodes\":[\"Default\"],\"DefaultProcess\":\"A020\",\"DefaultProduction\":\"\",\"ConfigPath\":\""
// + Path.Combine(dialog.SelectedPath, "Configs").Replace("\\", "\\\\")
// + "\",\"Description\":\"振动盘供料缺陷检测系统\",\"IconPath\":null,\"CurrLayout\":\"Default\",\"IsMinimumWhenClose\":false}";
// SettingHelper.InitWithContent(defaultSetting);
// settingChecked = true;
// // 创建文件夹
// InitFolder(retPath);
// // 解压缩示例数据
// Extract(retPath);
// // 生成配置文件
// GenerateConfig(retPath);
// }
//}
}
}

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
元素。
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="4.9.4" targetFramework="net472" />
<package id="DockPanelSuite" version="3.1.0" targetFramework="net461" />
<package id="DockPanelSuite.ThemeVS2015" version="3.1.0" targetFramework="net461" />
<package id="HslCommunication" version="10.6.1" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
<package id="OpenCvSharp4" version="4.3.0.20200405" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="7.0.0-preview.2.22152.2" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" requireReinstallation="true" />
</packages>