Commit 2bdddf2a 刘韬

1

1 个父辈 d483b75a
正在显示 65 个修改的文件 包含 122 行增加47 行删除
...@@ -33,20 +33,20 @@ namespace App ...@@ -33,20 +33,20 @@ namespace App
public void ResizeForm() public void ResizeForm()
{ {
if (this.MdiParent != null) //if (this.MdiParent != null)
{ //{
int[] childSize = ((FrmMDI)this.MdiParent).childSize(); // int[] childSize = ((FrmMDI)this.MdiParent).childSize();
//this.StartPosition = childSize[0]; // //this.StartPosition = childSize[0];
//this.Location.Y = childSize[1]; // //this.Location.Y = childSize[1];
if (this.Height < childSize[2] - 5) // if (this.Height < childSize[2] - 5)
{ // {
this.Height = childSize[2] - 5; // this.Height = childSize[2] - 5;
} // }
if (this.Width < childSize[3] - 5) // if (this.Width < childSize[3] - 5)
{ // {
this.Width = childSize[3] - 5; // this.Width = childSize[3] - 5;
} // }
} //}
} }
#region 换语言 #region 换语言
...@@ -333,11 +333,11 @@ namespace App ...@@ -333,11 +333,11 @@ namespace App
} }
} }
#endregion #endregion
if (((Form)control.TopLevelControl).ActiveMdiChild!=null && //if (((Form)control.TopLevelControl).ActiveMdiChild!=null &&
((Form)control.TopLevelControl).ActiveMdiChild.GetType().Name == "frmProduct") // ((Form)control.TopLevelControl).ActiveMdiChild.GetType().Name == "frmProduct")
{ //{
((frmProduct)((Form)control.TopLevelControl).ActiveMdiChild).Init(); // ((frmProduct)((Form)control.TopLevelControl).ActiveMdiChild).Init();
} //}
} }
#region 尚未登录时调用 #region 尚未登录时调用
......
此文件类型无法预览
此文件类型无法预览
...@@ -17,6 +17,7 @@ namespace App ...@@ -17,6 +17,7 @@ namespace App
this.SetLanguage(this); this.SetLanguage(this);
InitializeComponent(); InitializeComponent();
this.mp = mp; this.mp = mp;
this.TopMost = true;
} }
private void saveButton_Click(object sender, EventArgs e) private void saveButton_Click(object sender, EventArgs e)
......
此文件的差异被折叠, 点击展开。
...@@ -72,6 +72,9 @@ namespace App ...@@ -72,6 +72,9 @@ namespace App
pal.Add("Setting", PanelSetting); pal.Add("Setting", PanelSetting);
pal.Add("Calibration", panelCalibration); pal.Add("Calibration", panelCalibration);
panelCalibration.theMachine = theMachine; panelCalibration.theMachine = theMachine;
btnCalibration.Visible = false;
} }
private void InputValueTimer_Tick(object sender, EventArgs e) private void InputValueTimer_Tick(object sender, EventArgs e)
......
...@@ -192,7 +192,16 @@ namespace App ...@@ -192,7 +192,16 @@ namespace App
CalibrationDataOld.Add(b, c); CalibrationDataOld.Add(b, c);
} }
} }
if (!CalibrationDataOld.ContainsKey(0))
{
var cc = new CalStatus()
{
duration = 10,
value = washUpperLimit,
isPass = true
};
CalibrationDataOld.Add(0, cc);
}
//setGridData(dataGridView2, CalibrationDataOld); //setGridData(dataGridView2, CalibrationDataOld);
if (!theMachine.StartConnection()) { if (!theMachine.StartConnection()) {
...@@ -369,7 +378,7 @@ namespace App ...@@ -369,7 +378,7 @@ namespace App
int dataCount = orgData.Count; int dataCount = orgData.Count;
var start = getAvg(orgData,10,50); var start = getAvg(orgData,10,50);
var end = getAvg(orgData, 10); var end = getAvg(orgData, 10);
SecOffset = Math.Abs(start - end) / dataCount; SecOffset = (end- start) / dataCount;
LOGGER.Info($"校准,清洗值:s:{basetime},{theMachine.GetData()},avg:{washmax},washUpperLimit:{washUpperLimit},SecOffset:{SecOffset}"); LOGGER.Info($"校准,清洗值:s:{basetime},{theMachine.GetData()},avg:{washmax},washUpperLimit:{washUpperLimit},SecOffset:{SecOffset}");
theMachine.Close(); theMachine.Close();
Thread.Sleep(500); Thread.Sleep(500);
...@@ -425,7 +434,7 @@ namespace App ...@@ -425,7 +434,7 @@ namespace App
{ {
Current_concentration = 0; Current_concentration = 0;
CalibrationData[0].duration = 10; CalibrationData[0].duration = 10;
CalibrationData[0].value = getAvg(orgData, 10); CalibrationData[0].value = washUpperLimit;//getAvg(orgData, 10);
CalibrationData[0].isPass = true; CalibrationData[0].isPass = true;
setGridData(dataGridView1, CalibrationData); setGridData(dataGridView1, CalibrationData);
} }
...@@ -556,6 +565,8 @@ namespace App ...@@ -556,6 +565,8 @@ namespace App
return; return;
} }
loadingshow("清洗中"); loadingshow("清洗中");
orgData.Clear(); orgData.Clear();
ZedGraphInit(zgcShowCurve, false); ZedGraphInit(zgcShowCurve, false);
......
using System.Drawing;
namespace App
{
partial class FrmBase
{
/// <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(FrmBase));
this.SuspendLayout();
//
// FrmBase
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(686, 360);
this.ControlBox = false;
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(1277, 768);
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Movable = false;
this.Name = "FrmBase";
this.Padding = new System.Windows.Forms.Padding(23, 85, 23, 28);
this.Resizable = false;
this.Text = "FrmBase";
this.TransparencyKey = System.Drawing.Color.Empty;
this.ResumeLayout(false);
}
#endregion
}
}
此文件的差异被折叠, 点击展开。
...@@ -216,23 +216,23 @@ namespace App ...@@ -216,23 +216,23 @@ namespace App
private void btnSetting_Click(object sender, EventArgs e) private void btnSetting_Click(object sender, EventArgs e)
{ {
try //try
{ //{
FrmManageConfig frmManageConfig = new FrmManageConfig(); // FrmManageConfig frmManageConfig = new FrmManageConfig();
frmManageConfig.TopMost = true; // frmManageConfig.TopMost = true;
frmManageConfig.ShowDialog(); // frmManageConfig.ShowDialog();
frmManageConfig.Activate(); // frmManageConfig.Activate();
//¼ì²âÊÇ·ñÒªÖØÆô // //¼ì²âÊÇ·ñÒªÖØÆô
if (frmManageConfig.ReStart) // if (frmManageConfig.ReStart)
{ // {
this.DialogResult = DialogResult.Retry; // this.DialogResult = DialogResult.Retry;
this.Close(); // this.Close();
} // }
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
LOGGER.Info(ex.StackTrace); // LOGGER.Info(ex.StackTrace);
} //}
} }
private void btn_Cancel1_Click(object sender, EventArgs e) private void btn_Cancel1_Click(object sender, EventArgs e)
......
...@@ -297,12 +297,12 @@ Const.MESSAGEBOX_TITLE_NOTE, "", Const.ERROR_NAME_LESSTWO); ...@@ -297,12 +297,12 @@ Const.MESSAGEBOX_TITLE_NOTE, "", Const.ERROR_NAME_LESSTWO);
fuction.CreateParaConfig(m_operate, m_Login, Const.USER_COMP, m_Company) && fuction.CreateParaConfig(m_operate, m_Login, Const.USER_COMP, m_Company) &&
fuction.CreateParaConfig(m_operate, m_Login, Const.USER_DEP, m_Department)); fuction.CreateParaConfig(m_operate, m_Login, Const.USER_DEP, m_Department));
if (ifOpera && m_Login == Fuction.m_UserLogin) //if (ifOpera && m_Login == Fuction.m_UserLogin)
{ //{
((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_FACTORY, m_Company); // ((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_FACTORY, m_Company);
((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_DEP, m_Department); // ((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_DEP, m_Department);
((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_OPERATOR, m_Name); // ((FrmMDI)this.ParentForm).GetRightInfo(Const.TREE_OPERATOR, m_Name);
} //}
} }
} }
......
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
<packages> <packages>
<package id="MetroFramework-1.3.0.0" version="1.3.0.0" targetFramework="net40" /> <package id="MetroFramework-1.3.0.0" version="1.3.0.0" targetFramework="net40" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net40" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net40" />
<package id="ZedGraph" version="5.1.7" targetFramework="net40" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
...@@ -338,7 +338,7 @@ namespace MachineDll ...@@ -338,7 +338,7 @@ namespace MachineDll
double.TryParse(temp, out returnValue); double.TryParse(temp, out returnValue);
} }
LOGGER.Debug($"IO Return: {returnValue}");
return returnValue; return returnValue;
} }
else else
......
//============================================================================ //============================================================================
//ZedGraph Class Library - A Flexible Line Graph/Bar Graph Library in C# //ZedGraph Class Library - A Flexible Line Graph/Bar Graph Library in C#
//Copyright © 2004 John Champion //Copyright ?2004 John Champion
// //
//This library is free software; you can redistribute it and/or //This library is free software; you can redistribute it and/or
//modify it under the terms of the GNU Lesser General Public //modify it under the terms of the GNU Lesser General Public
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!