Commit db9764e2 authored by wangwanxh@sina.com's avatar wangwanxh@sina.com

更新,增加了独立共享空间

parent 2ba0fd40

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2002
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GcDevicePc", "GcDevicePc\GcDevicePc.csproj", "{BBCD58CB-247D-4108-A135-F36F8ABA3289}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "VocAnalyzer", "VocAnalyzer\VocAnalyzer.vdproj", "{8260B9BB-618D-42C5-9F82-9881AD0B65FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedSpace", "SharedSpace\SharedSpace.csproj", "{5498F944-5721-461B-B07F-3105EF0BF643}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -35,6 +37,16 @@ Global
{8260B9BB-618D-42C5-9F82-9881AD0B65FA}.Release|Any CPU.ActiveCfg = Release
{8260B9BB-618D-42C5-9F82-9881AD0B65FA}.Release|Mixed Platforms.ActiveCfg = Release
{8260B9BB-618D-42C5-9F82-9881AD0B65FA}.Release|x86.ActiveCfg = Release
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Debug|x86.ActiveCfg = Debug|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Any CPU.Build.0 = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5498F944-5721-461B-B07F-3105EF0BF643}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -715,6 +715,12 @@
<ItemGroup>
<Content Include="logo.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SharedSpace\SharedSpace.csproj">
<Project>{5498f944-5721-461b-b07f-3105ef0bf643}</Project>
<Name>SharedSpace</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -69,6 +69,7 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
this.timerWorker = new System.Windows.Forms.Timer(this.components);
this.menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout();
this.SuspendLayout();
......@@ -101,14 +102,14 @@
// UserLoginMenu
//
this.UserLoginMenu.Name = "UserLoginMenu";
this.UserLoginMenu.Size = new System.Drawing.Size(180, 22);
this.UserLoginMenu.Size = new System.Drawing.Size(124, 22);
this.UserLoginMenu.Text = "用户登录";
this.UserLoginMenu.Click += new System.EventHandler(this.UserLoginMenu_Click);
//
// UserLogoutMenu
//
this.UserLogoutMenu.Name = "UserLogoutMenu";
this.UserLogoutMenu.Size = new System.Drawing.Size(180, 22);
this.UserLogoutMenu.Size = new System.Drawing.Size(124, 22);
this.UserLogoutMenu.Text = "用户注销";
this.UserLogoutMenu.Click += new System.EventHandler(this.UserLogoutMenu_Click);
//
......@@ -126,28 +127,28 @@
// SystemStartMenu
//
this.SystemStartMenu.Name = "SystemStartMenu";
this.SystemStartMenu.Size = new System.Drawing.Size(180, 22);
this.SystemStartMenu.Size = new System.Drawing.Size(124, 22);
this.SystemStartMenu.Text = "系统开启";
this.SystemStartMenu.Click += new System.EventHandler(this.SystemStartMenu_Click);
//
// SystemStopMenu
//
this.SystemStopMenu.Name = "SystemStopMenu";
this.SystemStopMenu.Size = new System.Drawing.Size(180, 22);
this.SystemStopMenu.Size = new System.Drawing.Size(124, 22);
this.SystemStopMenu.Text = "系统关闭";
this.SystemStopMenu.Click += new System.EventHandler(this.SystemStopMenu_Click);
//
// AuxToolMenu
//
this.AuxToolMenu.Name = "AuxToolMenu";
this.AuxToolMenu.Size = new System.Drawing.Size(180, 22);
this.AuxToolMenu.Size = new System.Drawing.Size(124, 22);
this.AuxToolMenu.Text = "辅助工具";
this.AuxToolMenu.Click += new System.EventHandler(this.AuxToolMenu_Click);
//
// ParameterSettingMenu
//
this.ParameterSettingMenu.Name = "ParameterSettingMenu";
this.ParameterSettingMenu.Size = new System.Drawing.Size(180, 22);
this.ParameterSettingMenu.Size = new System.Drawing.Size(124, 22);
this.ParameterSettingMenu.Text = "参数设置";
this.ParameterSettingMenu.Click += new System.EventHandler(this.ParameterSettingMenu_Click);
//
......@@ -168,42 +169,42 @@
// NetWorkMenu
//
this.NetWorkMenu.Name = "NetWorkMenu";
this.NetWorkMenu.Size = new System.Drawing.Size(180, 22);
this.NetWorkMenu.Size = new System.Drawing.Size(148, 22);
this.NetWorkMenu.Text = "网络配置";
this.NetWorkMenu.Click += new System.EventHandler(this.NetWorkMenu_Click);
//
// MethodBatMenu
//
this.MethodBatMenu.Name = "MethodBatMenu";
this.MethodBatMenu.Size = new System.Drawing.Size(180, 22);
this.MethodBatMenu.Size = new System.Drawing.Size(148, 22);
this.MethodBatMenu.Text = "方法批处理";
this.MethodBatMenu.Click += new System.EventHandler(this.MethodBatMenu_Click);
//
// NewMethodMenu
//
this.NewMethodMenu.Name = "NewMethodMenu";
this.NewMethodMenu.Size = new System.Drawing.Size(180, 22);
this.NewMethodMenu.Size = new System.Drawing.Size(148, 22);
this.NewMethodMenu.Text = "新建方法";
this.NewMethodMenu.Click += new System.EventHandler(this.NewMethodMenu_Click);
//
// OpenMethodMenu
//
this.OpenMethodMenu.Name = "OpenMethodMenu";
this.OpenMethodMenu.Size = new System.Drawing.Size(180, 22);
this.OpenMethodMenu.Size = new System.Drawing.Size(148, 22);
this.OpenMethodMenu.Text = "打开方法文件";
this.OpenMethodMenu.Click += new System.EventHandler(this.OpenMethodMenu_Click);
//
// MethodBrowseMenuItem
//
this.MethodBrowseMenuItem.Name = "MethodBrowseMenuItem";
this.MethodBrowseMenuItem.Size = new System.Drawing.Size(180, 22);
this.MethodBrowseMenuItem.Size = new System.Drawing.Size(148, 22);
this.MethodBrowseMenuItem.Text = "方法查阅";
this.MethodBrowseMenuItem.Click += new System.EventHandler(this.MethodBrowseMenuItem_Click);
//
// SettingSeparator
//
this.SettingSeparator.Name = "SettingSeparator";
this.SettingSeparator.Size = new System.Drawing.Size(177, 6);
this.SettingSeparator.Size = new System.Drawing.Size(145, 6);
//
// GCConfigMenuItem
//
......@@ -212,7 +213,7 @@
this.ConfigShowSubMenuItem,
this.ConfigSendSubMenuItem});
this.GCConfigMenuItem.Name = "GCConfigMenuItem";
this.GCConfigMenuItem.Size = new System.Drawing.Size(180, 22);
this.GCConfigMenuItem.Size = new System.Drawing.Size(148, 22);
this.GCConfigMenuItem.Text = "仪器配置";
//
// ConfigCreateSubMenuItem
......@@ -249,21 +250,21 @@
// HistoryDataMenu
//
this.HistoryDataMenu.Name = "HistoryDataMenu";
this.HistoryDataMenu.Size = new System.Drawing.Size(180, 22);
this.HistoryDataMenu.Size = new System.Drawing.Size(152, 22);
this.HistoryDataMenu.Text = "历史数据查询";
this.HistoryDataMenu.Click += new System.EventHandler(this.HistoryDataMenu_Click);
//
// CalibrationMenu
//
this.CalibrationMenu.Name = "CalibrationMenu";
this.CalibrationMenu.Size = new System.Drawing.Size(180, 22);
this.CalibrationMenu.Size = new System.Drawing.Size(152, 22);
this.CalibrationMenu.Text = "校准查看";
this.CalibrationMenu.Click += new System.EventHandler(this.CalibrationMenu_Click);
//
// HistoryPicMenu
//
this.HistoryPicMenu.Name = "HistoryPicMenu";
this.HistoryPicMenu.Size = new System.Drawing.Size(180, 22);
this.HistoryPicMenu.Size = new System.Drawing.Size(152, 22);
this.HistoryPicMenu.Text = "历史谱图";
this.HistoryPicMenu.Click += new System.EventHandler(this.HistoryPicMenu_Click);
//
......@@ -282,27 +283,27 @@
this.SingleStop,
this.SingleCancel});
this.SingleControlMenu.Name = "SingleControlMenu";
this.SingleControlMenu.Size = new System.Drawing.Size(148, 22);
this.SingleControlMenu.Size = new System.Drawing.Size(152, 22);
this.SingleControlMenu.Text = "单次流程控制";
//
// SingleStart
//
this.SingleStart.Name = "SingleStart";
this.SingleStart.Size = new System.Drawing.Size(100, 22);
this.SingleStart.Size = new System.Drawing.Size(152, 22);
this.SingleStart.Text = "开始";
this.SingleStart.Click += new System.EventHandler(this.SingleStart_Click);
//
// SingleStop
//
this.SingleStop.Name = "SingleStop";
this.SingleStop.Size = new System.Drawing.Size(100, 22);
this.SingleStop.Size = new System.Drawing.Size(152, 22);
this.SingleStop.Text = "停止";
this.SingleStop.Click += new System.EventHandler(this.SingleStop_Click);
//
// SingleCancel
//
this.SingleCancel.Name = "SingleCancel";
this.SingleCancel.Size = new System.Drawing.Size(100, 22);
this.SingleCancel.Size = new System.Drawing.Size(152, 22);
this.SingleCancel.Text = "取消";
this.SingleCancel.Click += new System.EventHandler(this.SingleCancel_Click);
//
......@@ -375,6 +376,12 @@
this.backgroundWorker2.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker2_DoWork);
this.backgroundWorker2.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker2_RunWorkerCompleted);
//
// timerWorker
//
this.timerWorker.Enabled = true;
this.timerWorker.Interval = 5000;
this.timerWorker.Tick += new System.EventHandler(this.timerWorker_Tick);
//
// MDIBase
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -440,6 +447,7 @@
private System.Windows.Forms.ToolStripStatusLabel HmiStatus;
private System.Windows.Forms.ToolStripMenuItem HelpMainMenu;
private System.Windows.Forms.ToolStripMenuItem AboutMenu;
private System.Windows.Forms.Timer timerWorker;
}
}
......
......@@ -1726,5 +1726,33 @@ namespace GcDevicePc
}
}
private void timerWorker_Tick(object sender, EventArgs e)
{
try
{
if (SharedSpace.MControl.SetOut && SharedSpace.MControl.SetRun == false) //准备开始校准
{
RunTableOptWithCount(SharedSpace.MControl.path, SharedSpace.MControl.Name, (ushort)SharedSpace.MControl.runcount);
Thread.Sleep(60 * 1000);
SharedSpace.MControl.SetRun = true;//仪器进入校准环境
}
//等待校准结束
if (globaldata.m_hmibuffer.gcinfo.batruncount >= SharedSpace.MControl.runcount - 1)
{
SharedSpace.MControl.IsEnd = true;
Thread.Sleep(60 * 1000);
RunTableOpt(SharedSpace.MControl.defaultPath, SharedSpace.MControl.defaultName);
SharedSpace.MControl.SetOut = false;
SharedSpace.MControl.SetRun = false;
}
}
catch (Exception ex)
{
Trace.Write(ex);
}
}
}
}
......@@ -135,6 +135,9 @@
<metadata name="backgroundWorker2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>601, 17</value>
</metadata>
<metadata name="timerWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>775, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>86</value>
</metadata>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharedSpace
{
/// <summary>
/// 结果数据区域
/// </summary>
public class Data
{
/// <summary>
/// 值区域,不允许清理的
/// </summary>
public static List<DataType> listValue = new List<DataType>();
/// <summary>
/// 值是否改变
/// </summary>
public static bool change = false;
/// <summary>
/// 值是否读取
/// </summary>
public static bool ReadChange = false;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharedSpace
{
/// <summary>
/// 数据类型
/// </summary>
public class DataType
{
/// <summary>
/// 名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 结果浓度 单位PPM
/// </summary>
public double vale { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharedSpace
{
/// <summary>
/// 用于方法控制
/// </summary>
public class MControl
{
/// <summary>
/// 准备开始运行校准
/// </summary>
public static bool SetOut = false;
/// <summary>
/// 方法文件路径
/// </summary>
public static string path = "";
/// <summary>
/// 方法名称
/// </summary>
public static string Name = "";
/// <summary>
/// 仪器已经准备好,可以记录数据
/// </summary>
public static bool SetRun = false;
/// <summary>
/// 流程可结束,恢复默认方法
/// </summary>
public static bool IsEnd = false;
/// <summary>
/// 默认方法路径
/// </summary>
public static string defaultPath="";
/// <summary>
/// 默认方法名称
/// </summary>
public static string defaultName = "";
/// <summary>
/// 最小运行次数
/// </summary>
public static int runcount = 7;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("SharedSpace")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("SharedSpace")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("d1e09c88-f441-4e8f-ba12-5d7d494c22ef")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5498F944-5721-461B-B07F-3105EF0BF643}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SharedSpace</RootNamespace>
<AssemblyName>SharedSpace</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Data.cs" />
<Compile Include="DataType.cs" />
<Compile Include="MControl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment