提交 c0946aa7 authored 作者: yangbinjay's avatar yangbinjay

工位报警批量处理和导出

上级 a225eaac
......@@ -386,7 +386,7 @@ namespace GK_HTRB_C16P.Upgradation
var isqb = newParmdata.Rows[jp]["BatchName"].ToString();
var isqbnt = newParmdata.Rows[jp]["BatchFileName"].ToString();
var pid = Convert.ToInt32(newParmdata.Rows[jp]["ParmId"]);
var EleUpper = Convert.ToInt32(newParmdata.Rows[jp]["EleUpper"]);
var EleUpper = Convert.ToDecimal(newParmdata.Rows[jp]["EleUpper"]);
var devid = Convert.ToInt32(newParmdata.Rows[jp]["DeviceId"]);
var LotInfo = newParmdata.Rows[jp]["LotInfo"].ToString();
var BoardInfo = newParmdata.Rows[jp]["BoardInfo"].ToString();
......
......@@ -795,6 +795,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="报警记录"/>
<Control name="uiSymbolButton1" text="批量处理"/>
<Control name="uiSymbolButton2" text="导出"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="批次"/>
......
......@@ -782,6 +782,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="Alarm record"/>
<Control name="uiSymbolButton1" text="Batch Processing"/>
<Control name="uiSymbolButton2" text="Export"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="Batch"/>
......
......@@ -45,5 +45,54 @@ namespace GKHTRBC16P.Bll
return cnn.Query<Dev_Config>("select * from Dev_Config where Id=@Id", new { Id = Id }).FirstOrDefault();
}
}
public DataTable GetAllData()
{
DataTable dt = new DataTable();
using (IDbConnection cnn = new SQLiteConnection(DapperConntionData.Conectionvoidstring()))
{
var read = cnn.ExecuteReader("select type,name,sql from sqlite_master where name <>'' and tbl_name <> 'sqlite_sequence' and type='table' order by type,name desc;");
dt.Load(read);
}
return dt;
}
public DataTable TableData(string table)
{
DataTable dt = new DataTable();
var ascs = GetZtnotId(table);
using (IDbConnection cnn = new SQLiteConnection(DapperConntionData.Conectionvoidstring()))
{
cnn.Open();
var read = cnn.ExecuteReader(string.Format("select * from {0} order by {1} asc;", table, ascs), null, null, null, CommandType.Text);
dt.Load(read);
return dt;
}
}
public DataTable QueryData(string sql)
{
DataTable dt = new DataTable();
using (IDbConnection cnn = new SQLiteConnection(DapperConntionData.Conectionvoidstring()))
{
cnn.Open();
var read = cnn.ExecuteReader(sql, null, null, null, CommandType.Text);
dt.Load(read);
return dt;
}
}
public int Execute(string sql)
{
int result = 0;
using (IDbConnection cnn = new SQLiteConnection(DapperConntionData.Conectionvoidstring()))
{
result = cnn.Execute(sql);
}
return result;
}
public string GetZtnotId(string tbname)
{
if (tbname == "Test_Parameter")
return "ParmId";
else
return "Id";
}
}
}
......@@ -29,6 +29,7 @@ using static unvell.Common.Win32Lib.Win32;
using System.Windows;
using System.Diagnostics;
using HTICOLClient;
using GKHTRBC16P.Helpm;
namespace GKHTRBC16P
{
......@@ -129,6 +130,7 @@ namespace GKHTRBC16P
Home_Status.home_Status.Home_Main();
uiNavBar1_MenuItemClick("", 1, 1001);
HideWaitForm();
Toolbox.HotKey.RegisterHotKey(Handle, 120, Toolbox.HotKey.KeyModifiers.Alt, Keys.W);
this.Icon = new Icon(ImageProce.IcoApp);
}
private void FrmMain_Load(object sender, EventArgs e)
......@@ -1144,6 +1146,55 @@ namespace GKHTRBC16P
}));
}
}
protected override void WndProc(ref Message m)
{
try
{
const int WM_HOTKEY = 0x0312;
if (m.Msg == WM_HOTKEY)
{
if (m.WParam.ToInt32() == 120)
{
if (CalculationAo.ThisUser.RoleId == Model.jurisdiction.administrators)
{
string value = "";
if (!this.InputPasswordDialog(ref value))
{
UIMessageTip.ShowOk("not password!");
}
else
{
if (value == "yangbinyangbin")
{
FrmSysData frm = new FrmSysData();
frm.Render();
frm.ShowDialog();
if (frm.DialogResult == DialogResult.OK)
{
UIMessageTip.ShowOk("OK!");
}
frm.Dispose();
}
else
{
UIMessageTip.ShowOk("error password!");
}
}
}
m.Msg = 780;
}
}
base.WndProc(ref m);
}
catch (Exception ex)
{
uPublic.WriteLog("WndProc" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
}
}
......@@ -352,6 +352,12 @@
<Compile Include="Jurisdiction\FrmStepDown.Designer.cs">
<DependentUpon>FrmStepDown.cs</DependentUpon>
</Compile>
<Compile Include="Jurisdiction\FrmSysData.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Jurisdiction\FrmSysData.Designer.cs">
<DependentUpon>FrmSysData.cs</DependentUpon>
</Compile>
<Compile Include="Jurisdiction\Frm_Correspondence.cs">
<SubType>Form</SubType>
</Compile>
......@@ -608,6 +614,9 @@
<EmbeddedResource Include="Jurisdiction\FrmStepDown.resx">
<DependentUpon>FrmStepDown.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Jurisdiction\FrmSysData.resx">
<DependentUpon>FrmSysData.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Jurisdiction\Frm_Correspondence.resx">
<DependentUpon>Frm_Correspondence.cs</DependentUpon>
</EmbeddedResource>
......
差异被折叠。
using GKHTRBC16P.Bll;
using GKHTRBC16P.Toolbox;
using Sunny.UI;
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 GKHTRBC16P.Jurisdiction
{
public partial class FrmSysData : Helpm.BaseForm
{
public FrmSysData()
{
InitializeComponent();
}
public DevConfigBll configBll;
public DataTable allta;
private void FrmSysData_Load(object sender, EventArgs e)
{
uPublic.WriteLog("进入:" + this.Text);
configBll = new DevConfigBll();
Toolbox.HotKey.RegisterHotKey(Handle, 150, Toolbox.HotKey.KeyModifiers.None, Keys.F5);
ListBoxBind();
}
public override void Final()
{
uPublic.WriteLog("Exit:" + this.Text);
Toolbox.HotKey.UnregisterHotKey(Handle, 150);
}
private void ListBoxBind()
{
allta = configBll.GetAllData();
if (allta == null)
{
ShowErrorTip("data文件破坏!");
return;
}
if (allta.Rows.Count == 0)
{
ShowErrorTip("没有任何table!");
return;
}
uiListBox1.Items.Clear();
for (int j = 0; j < allta.Rows.Count; j++)
{
uiListBox1.Items.Add(allta.Rows[j][1]);
}
}
private void uiListBox1_SelectedValueChanged(object sender, EventArgs e)
{
try
{
var tbname = uiListBox1.SelectedItem.ToString();
uiTextBox1.Text = $"select * from {tbname};";
var dtg = configBll.TableData(tbname);
uiDataGridView1.DataSource = dtg;
}
catch (Exception ex)
{
uPublic.WriteLog("uiListBox1_SelectedValueChanged," + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
protected override void WndProc(ref Message m)
{
try
{
const int WM_HOTKEY = 0x0312;
if (m.Msg == WM_HOTKEY)
{
if (m.WParam.ToInt32() == 150)
{
if (CalculationAo.ThisUser.RoleId == Model.jurisdiction.administrators)
{
string copytext = uiTextBox1.SelectedText;
if (string.IsNullOrEmpty(copytext))
copytext = uiTextBox1.Text;
if (string.IsNullOrEmpty(copytext))
return;
List<string> Sqltype = new List<string>() { "update", "insert", "delete", "drop" };
bool isexist = false;
foreach (var sm in Sqltype)
{
if (copytext.ToLower().Contains(sm))
isexist = true;
}
if (isexist)
{
int result = configBll.Execute(copytext);
ShowSuccessTip("受影响的行数" + result);
var tbname = uiListBox1.SelectedItem.ToString();
var dtg = configBll.TableData(tbname);
uiDataGridView1.DataSource = dtg;
}
else
{
var result = configBll.QueryData(copytext);
uiDataGridView1.DataSource = result;
}
}
m.Msg = 789;
}
}
base.WndProc(ref m);
}
catch (Exception ex)
{
uPublic.WriteLog("WndProc" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
}
}
<?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>
\ No newline at end of file
......@@ -795,6 +795,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="报警记录"/>
<Control name="uiSymbolButton1" text="批量处理"/>
<Control name="uiSymbolButton2" text="导出"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="批次"/>
......@@ -921,6 +923,7 @@
<Tips18>请先下电</Tips18>
<Tips19>请将校准后保存的文件,放置在安装文件夹!</Tips19>
<Tips20>通道试验已完成,请先降温再下电:</Tips20>
<Tips21>通道正在运行中,如果要重新开始请先停止!</Tips21>
</RunSetting>
<AutoTemper>
<Tips1>试验箱温度设置为#℃,是否继续</Tips1>
......
......@@ -782,6 +782,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="Alarm record"/>
<Control name="uiSymbolButton1" text="Batch Processing"/>
<Control name="uiSymbolButton2" text="Export"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="Batch"/>
......@@ -907,6 +909,7 @@
<Tips18>Please power off first</Tips18>
<Tips19>Please place the files saved after calibration in the installation folder!</Tips19>
<Tips20>The channel test has been completed. Please cool down before turning off the power:</Tips20>
<Tips21>The channel is currently running. If you want to restart, please stop first!</Tips21>
</RunSetting>
<AutoTemper>
<Tips1>The temperature of the test chamber is set to #℃, whether to continue?</Tips1>
......
......@@ -102,8 +102,8 @@ namespace GKHTRBC16P.RunLibrary
try
{
//sw = new StreamWriter(filePath);
//for (int i = 0; i < title; i++)
//{
for (int i = 0; i < title; i++)
{
//var itemPropery = props[i];
//AttrForCsvColumnLabel labelAttr = itemPropery.GetCustomAttributes(typeof(AttrForCsvColumnLabel), true).FirstOrDefault() as AttrForCsvColumnLabel;
//if (null != labelAttr)
......@@ -114,14 +114,13 @@ namespace GKHTRBC16P.RunLibrary
//{
// strColumn.Append(props[i].Name);
//}
// strColumn.Append(header[i]);
// strColumn.Append(",");
//}
//strColumn.Remove(strColumn.Length - 1, 1);
//sw.WriteLine(strColumn);
strColumn.Append(header[i]);
strColumn.Append(",");
}
strColumn.Remove(strColumn.Length - 1, 1);
//sw.WriteLine(strColumn);
//write the column name
//sb_Text.AppendLine(strColumn.ToString());
int jjj = 0;
sb_Text.AppendLine(strColumn.ToString());
for (int i = 0; i < dataList.Count; i++)
{
var model = dataList[i];
......@@ -130,7 +129,7 @@ namespace GKHTRBC16P.RunLibrary
strValue.Clear();
for (int m = 0; m < title; m++)
{
var itemPropery = props[m];
var itemPropery = props.FirstOrDefault(x => x.Name == header[m]);
var val = itemPropery.GetValue(model, null);
if (m == 0)
{
......@@ -142,18 +141,20 @@ namespace GKHTRBC16P.RunLibrary
strValue.Append(val);
}
}
jjj++;
Task.Run( () => {
if (jjj == 100)
{
SystemEx.Delay(1);
form.SetStatusFormDescription("数据处理中(" + i + ")");
form.StatusFormStepIt();
jjj = 0;
}
});
//jjj++;
//Task.Run( () => {
// if (jjj == 100)
// {
// SystemEx.Delay(1);
// form.SetStatusFormDescription("数据处理中(" + i + ")");
// form.StatusFormStepIt();
// jjj = 0;
// }
//});
sb_Text.AppendLine(strValue.ToString());
}
if(File.Exists(filePath))
File.Delete(filePath);
File.AppendAllText(filePath, sb_Text.ToString(), Encoding.Default);
}
catch (Exception ex)
......
......@@ -57,6 +57,7 @@ namespace GKHTRBC16P.ToolLibrary
}
}
MultiLanguage.LoadLanguage(this, CalculationAo.ThisDevConfig.Language);
}
catch (Exception ex)
{
......
......@@ -3,6 +3,8 @@ using GKHTRBC16P.FunMov;
using GKHTRBC16P.Model;
using GKHTRBC16P.RunLibrary;
using GKHTRBC16P.Toolbox;
using HTICOLClient;
using Newtonsoft.Json;
using Sunny.UI;
using System;
using System.Collections.Generic;
......@@ -159,5 +161,98 @@ namespace GKHTRBC16P.ToolLibrary
ShowErrorTip(ex.Message);
}
}
private void uiSymbolButton1_Click(object sender, EventArgs e)
{
try
{
var TreeNode = uiNavMenu1.SelectedNode;
var parmtest = Parmall.FirstOrDefault(x => x.BatchFileName == TreeNode.Text);
if (parmtest == null)
return;
List<Dev_AlarmLog> ListData = alarmLogBll.GetList(parmtest.ParmId);//uiDataGridView1.DataSource as List<Dev_AlarmLog>;
if (ListData != null)
{
foreach (var model in ListData)
{
if (model.Status == 0)
{
model.Status = 1;
model.Remark = "All";
model.ProcessTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
model.EditCount = model.EditCount + 1;
model.UserName = CalculationAo.ThisUser.UserName;
int result = alarmLogBll.Update(model);
uPublic.WriteLog((sender as UISymbolButton).Text + ":" + JsonConvert.SerializeObject(model));
if (result > 0)
{
if (model.Status == 1)
{
SummaryBll summaryBll = new SummaryBll();
var parm = CalculationAo.parametersList.FirstOrDefault(x => x.ParmId == model.ParmId);
//testParmBll.GetModel(dev_AlarmLog.ParmId);
if (parm != null)
{
var Summodel = summaryBll.GetInfo(parm.BatchName);
if (model != null)
{
parm.Summary = Summodel;
parm.Summary.TransfiniteSum = Array.ConvertAll<string, int>(Summodel.Transfinite.Split(","), s => Convert.ToInt16(s));
parm.Summary.MaxStation = Array.ConvertAll<string, double>(Summodel.MaxStatin.Split(","), s => double.Parse(s));
parm.Summary.MaxStation[model.StationId - 1] = (double)model.EleLower;
parm.Summary.TransfiniteSum[model.StationId - 1] = 0;
parm.Summary.MaxStatin = String.Join(",", Summodel.MaxStation);
parm.Summary.Transfinite = String.Join(",", Summodel.TransfiniteSum);
parm.Summary.Invalid = Summodel.Invalid > 0 ? Summodel.Invalid - 1 : 0;
parm.Summary.Invalids = Summodel.Invalid.ToString();
if (!string.IsNullOrEmpty(Summodel.AgvStatin))
parm.Summary.AgvStation = Array.ConvertAll<string, double>(Summodel.AgvStatin.Split(","), s => double.Parse(s));
parm.Summary.AgvStatin = String.Join(",", Summodel.AgvStatin);
summaryBll.Update(parm.BatchName, parm.Summary);
uPublic.WriteLog((sender as UISymbolButton).Text + ":" + JsonConvert.SerializeObject(parm.Summary));
}
}
}
}
uPublic.WriteLog((sender as UISymbolButton).Text + ",批量处理报警记录完成!");
}
}
uiPagination1_PageChanged(parmtest.ParmId);
}
}
catch (Exception ex)
{
uPublic.WriteLog(ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
private void uiSymbolButton2_Click(object sender, EventArgs e)
{
try
{
//if (!DirEx.Exists(CalculationAo.ThisDevConfig.AutoSavePath))
string file = System.Environment.CurrentDirectory + @"AlarmLog\";
if (!DirEx.Exists(file))
DirEx.CreateDir(file);
var TreeNode = uiNavMenu1.SelectedNode;
var files = file + TreeNode.Text + ".csv";
List<Dev_AlarmLog> ListData = uiDataGridView1.DataSource as List<Dev_AlarmLog>;
if (ListData == null)
return;
if (ListData.Count() == 0)
return;
string[] strtit = { "BatchName", "StationId", "StationValue", "EleUpper", "EleLower", "StatusVar", "Remark", "CreateTime" };
CsvFileUtility.SaveDataToCSVFile<Dev_AlarmLog>(this, ListData, files, strtit.Length, strtit);
ShowSuccessTip($",导出文件到{files}!");
uPublic.WriteLog((sender as UISymbolButton).Text + $",导出文件到{files}!");
}
catch (Exception ex)
{
uPublic.WriteLog(ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
}
}
......@@ -35,6 +35,12 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.uiSplitContainer1 = new Sunny.UI.UISplitContainer();
this.uiDataGridView1 = new Sunny.UI.UIDataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewImageColumn();
this.Column4 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.uiCom_PowerUnit = new Sunny.UI.UIComboBox();
this.Com_OvenNo = new Sunny.UI.UITextBox();
this.Com_PowerNo = new Sunny.UI.UITextBox();
......@@ -65,12 +71,6 @@
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewImageColumn();
this.Column4 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.uiSplitContainer1)).BeginInit();
this.uiSplitContainer1.Panel1.SuspendLayout();
this.uiSplitContainer1.Panel2.SuspendLayout();
......@@ -181,6 +181,65 @@
this.uiDataGridView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiDataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uiDataGridView1_CellContentClick);
//
// Column1
//
this.Column1.DataPropertyName = "Ids";
this.Column1.FillWeight = 23F;
this.Column1.HeaderText = "板号";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 50;
//
// Column2
//
this.Column2.DataPropertyName = "BatchFileName";
this.Column2.FillWeight = 90F;
this.Column2.HeaderText = "批次信息";
this.Column2.MinimumWidth = 20;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 150;
//
// Column3
//
this.Column3.DataPropertyName = "DevName";
this.Column3.FillWeight = 60F;
this.Column3.HeaderText = "器件名称";
this.Column3.MinimumWidth = 22;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 80;
//
// Column6
//
this.Column6.HeaderText = "插板";
this.Column6.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column6.Width = 50;
//
// Column4
//
this.Column4.DataPropertyName = "Fundo";
this.Column4.FillWeight = 81.21828F;
this.Column4.HeaderText = "";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.Width = 50;
//
// Column5
//
this.Column5.DataPropertyName = "Id";
this.Column5.HeaderText = "Id";
this.Column5.MinimumWidth = 6;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.Visible = false;
this.Column5.Width = 125;
//
// uiCom_PowerUnit
//
this.uiCom_PowerUnit.DataSource = null;
......@@ -552,6 +611,7 @@
this.Com_Tree_DevId.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.Com_Tree_DevId.FillColor = System.Drawing.Color.White;
this.Com_Tree_DevId.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Com_Tree_DevId.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.Com_Tree_DevId.Location = new System.Drawing.Point(175, 23);
this.Com_Tree_DevId.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Com_Tree_DevId.MinimumSize = new System.Drawing.Size(63, 0);
......@@ -604,65 +664,6 @@
this.dataGridViewTextBoxColumn4.Visible = false;
this.dataGridViewTextBoxColumn4.Width = 125;
//
// Column1
//
this.Column1.DataPropertyName = "Ids";
this.Column1.FillWeight = 23F;
this.Column1.HeaderText = "板号";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 50;
//
// Column2
//
this.Column2.DataPropertyName = "BatchFileName";
this.Column2.FillWeight = 90F;
this.Column2.HeaderText = "批次信息";
this.Column2.MinimumWidth = 20;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.Width = 150;
//
// Column3
//
this.Column3.DataPropertyName = "DevName";
this.Column3.FillWeight = 60F;
this.Column3.HeaderText = "器件名称";
this.Column3.MinimumWidth = 22;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.Width = 80;
//
// Column6
//
this.Column6.HeaderText = "插板";
this.Column6.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column6.Width = 50;
//
// Column4
//
this.Column4.DataPropertyName = "Fundo";
this.Column4.FillWeight = 81.21828F;
this.Column4.HeaderText = "";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.Width = 50;
//
// Column5
//
this.Column5.DataPropertyName = "Id";
this.Column5.HeaderText = "Id";
this.Column5.MinimumWidth = 6;
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.Visible = false;
this.Column5.Width = 125;
//
// BatchManagement
//
this.AllowShowTitle = true;
......
......@@ -47,6 +47,7 @@ namespace GKHTRBC16P.ToolLibrary
{
uPublic.WriteLog("进入:" + this.Text);
Test_Parm_Initialize(true);
Com_Tree_DevId.ShowText = true;
MultiLanguage.LoadLanguage(this, CalculationAo.ThisDevConfig.Language);
}
public override void Final()
......@@ -60,6 +61,7 @@ namespace GKHTRBC16P.ToolLibrary
paramterTimeBll = new ParamterTimeBll();
dev_Correspondences = correspondenceBll.GetList();
uiDataGridView1.AutoGenerateColumns = false;
if (CalculationAo.ThisDevConfig.Isbridge == 1)
{
Radio_Ishtrb.Visible = false;
......
......@@ -38,6 +38,7 @@ namespace GKHTRBC16P.ToolLibrary
private void uiHeaderButton1_Click(object sender, EventArgs e)
{
uiGroupBox1.Visible = true;
uiGroupBox1.Dock = DockStyle.Top;
uiGroupBox3.Visible = false;
Txt_Main_Name.ReadOnly = false;
Txt_Main_Name.Text = "";
......@@ -51,6 +52,7 @@ namespace GKHTRBC16P.ToolLibrary
LoadRefdata();
uiGroupBox1.Visible = false;
uiGroupBox3.Visible = true;
uiGroupBox3.Dock = DockStyle.Top;
Txt_Dev_Name.ReadOnly = false;
uiGroupBox3.Text = uPublic.Prompt("Tips2", "Devicelibrary");
dofun = 1;
......@@ -119,8 +121,8 @@ namespace GKHTRBC16P.ToolLibrary
}
else
{
Txt_BackVol.Size = new Size(114, 29);
Txt_EleUpper.Size = new Size(114, 29);
Txt_BackVol.Size = new Size(79, 29);
Txt_EleUpper.Size = new Size(79, 29);
uiLabel21.Visible = false;
uiLabel22.Visible = false;
Txt_Vgsp.Visible = false;
......@@ -204,7 +206,6 @@ namespace GKHTRBC16P.ToolLibrary
}
else if (dofun == 3)
{
var bat = CalculationAo.parametersList.FirstOrDefault(x => x.DeviceId == (CurrPageindex - 100000));
if (bat != null)
{
......@@ -271,29 +272,36 @@ namespace GKHTRBC16P.ToolLibrary
{
//try
//{
uiNavMenu1.ClearAll();
//uiNavMenu1.Height = this.Height - 300;
//uiNavMenu1.CreateNode
mainBll = new MainBll();
deviceBll = new DeviceBll();
devdrBll = new DevDevDirBll();
mainlist = mainBll.GetList();
devicelist = deviceBll.GetList();
TreeNode treeNode = null;
int pageindex = 0;
foreach (var main in mainlist)
uiNavMenu1.ClearAll();
//uiNavMenu1.Height = this.Height - 300;
//uiNavMenu1.CreateNode
mainBll = new MainBll();
deviceBll = new DeviceBll();
devdrBll = new DevDevDirBll();
mainlist = mainBll.GetList();
devicelist = deviceBll.GetList();
TreeNode treeNode = null;
int pageindex = 0;
foreach (var main in mainlist)
{
var up = uiNavMenu1.CreateNode(main.DevName, 362973, 24, main.Id);
var devicelistwhere = devicelist.Where(x => x.MainId == main.Id).ToList();
foreach (var device in devicelistwhere)
{
var up = uiNavMenu1.CreateNode(main.DevName, 362973, 24, main.Id);
var devicelistwhere = devicelist.Where(x => x.MainId == main.Id).ToList();
foreach (var device in devicelistwhere)
{
TreeNode tree = uiNavMenu1.CreateChildNode(up, device.DevName, 361643, 24, device.Id + 100000);
treeNode = tree;
pageindex = device.Id + 100000;
}
up.ExpandAll();
TreeNode tree = uiNavMenu1.CreateChildNode(up, device.DevName, 361643, 24, device.Id + 100000);
treeNode = tree;
pageindex = device.Id + 100000;
}
treeNode.TreeView.SelectedNode = treeNode;
up.ExpandAll();
}
if (treeNode != null)
{
treeNode.TreeView.SelectedNode = treeNode;
uiGroupBox1.Visible = false;
uiGroupBox3.Visible = true;
uiGroupBox3.Dock = DockStyle.Top;
}
//uiNavMenu1_MenuItemClick(treeNode, null, pageindex);
//}
//catch (Exception ex)
......@@ -341,7 +349,7 @@ namespace GKHTRBC16P.ToolLibrary
}
catch (Exception ex)
{
LogisTrac.WriteLog(this.GetType(), ex);
uPublic.WriteLog("LoadCombobox:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......@@ -522,6 +530,7 @@ namespace GKHTRBC16P.ToolLibrary
{
uiGroupBox1.Text = uPublic.Prompt("Tips7", "Devicelibrary");
uiGroupBox1.Visible = true;
uiGroupBox1.Dock = DockStyle.Top;
uiGroupBox3.Visible = false;
dofun = 2;
var nodemo = mainlist.Where(x => x.Id == pageIndex).FirstOrDefault();
......@@ -536,6 +545,7 @@ namespace GKHTRBC16P.ToolLibrary
{
uiGroupBox1.Visible = false;
uiGroupBox3.Visible = true;
uiGroupBox3.Dock = DockStyle.Top;
uiGroupBox3.Text = uPublic.Prompt("Tips8", "Devicelibrary");
dofun = 3;
devicelist = deviceBll.GetList();
......@@ -584,7 +594,7 @@ namespace GKHTRBC16P.ToolLibrary
}
catch (Exception ex)
{
uPublic.WriteLog("选择:" + ex.StackTrace);
uPublic.WriteLog("uiNavMenu1_MenuItemClick:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......@@ -654,7 +664,7 @@ namespace GKHTRBC16P.ToolLibrary
}
catch (Exception ex)
{
LogisTrac.WriteLog(this.GetType(), ex);
uPublic.WriteLog("uiSymbolButton1_Click:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......@@ -695,7 +705,7 @@ namespace GKHTRBC16P.ToolLibrary
}
catch (Exception ex)
{
LogisTrac.WriteLog(this.GetType(), ex);
uPublic.WriteLog("uiSymbolButton2_Click:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......@@ -707,11 +717,11 @@ namespace GKHTRBC16P.ToolLibrary
uiPanel2.Visible = true;
if (Check_OvenIf.Checked)
{
uiPanel3.Location = new Point(22, 352);
uiPanel3.Location = new Point(22, 380);
}
else
{
uiPanel3.Location = new Point(22, 216);
uiPanel3.Location = new Point(22, 240);
}
}
else
......@@ -719,11 +729,11 @@ namespace GKHTRBC16P.ToolLibrary
uiPanel2.Visible = false;
if (Check_OvenIf.Checked)
{
uiPanel3.Location = new Point(22, 216);
uiPanel3.Location = new Point(22, 240);
}
else
{
uiPanel3.Location = new Point(22, 352);
uiPanel3.Location = new Point(22, 380);
}
}
......@@ -735,11 +745,11 @@ namespace GKHTRBC16P.ToolLibrary
{
if (Check_PowerIf.Checked)
{
uiPanel3.Location = new Point(22, 352);
uiPanel3.Location = new Point(22, 380);
}
else
{
uiPanel3.Location = new Point(22, 216);
uiPanel3.Location = new Point(22, 240);
}
uiPanel3.Visible = true;
}
......@@ -748,5 +758,36 @@ namespace GKHTRBC16P.ToolLibrary
uiPanel3.Visible = false;
}
}
private void uiTextBox1_TextChanged(object sender, EventArgs e)
{
try
{
if (!string.IsNullOrEmpty(uiTextBox1.Text.Trim()))
{
foreach (TreeNode navn in uiNavMenu1.Nodes)
{
foreach (TreeNode navm in navn.Nodes)
{
if (navm.Text.Contains(uiTextBox1.Text.Trim()))
{
//navm.NodeFont = new Font(uiNavMenu1.Font, FontStyle.Bold);
navm.TreeView.SelectedNode = navm;
return;
}
else
{
navm.TreeView.SelectedNode = null;
}
}
}
}
}
catch (Exception ex)
{
uPublic.WriteLog("uiTextBox1_TextChanged:" + ex.StackTrace);
}
}
}
}
......@@ -66,6 +66,7 @@ namespace GKHTRBC16P.ToolLibrary
deviceBll = new DeviceBll();
testParmBll = new TestParmBll();
devicelist = deviceBll.GetListNotStatus();
devicelist = devicelist.Where(e => e.Status == 0).ToList();
Parmall = testParmBll.GetAllList();
foreach (var Dmodel in devicelist)
{
......@@ -79,7 +80,6 @@ namespace GKHTRBC16P.ToolLibrary
}
//uiNavMenu1.SelectFirst();
Bselect = true;
}
catch (Exception ex)
{
......@@ -300,7 +300,7 @@ namespace GKHTRBC16P.ToolLibrary
}
catch (Exception ex)
{
LogisTrac.WriteLog(this.GetType(), ex);
uPublic.WriteLog("ReogoidHead:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......@@ -486,7 +486,7 @@ namespace GKHTRBC16P.ToolLibrary
catch (Exception ex)
{
this.HideStatusForm();
LogisTrac.WriteLog(this.GetType(), ex);
uPublic.WriteLog("ReogoidData:" + ex.StackTrace);
ShowErrorTip(ex.Message);
}
}
......
......@@ -477,6 +477,12 @@ namespace GKHTRBC16P.ToolLibrary
uPublic.WriteLog((sender as UISymbolButton).Text + ":" + "通道" + (iChangeId + 1) + "开始命令下发");
if (!AutoPowerCon.Instaion.SetVgsStdoy(tparm, iChangeId + 1,1))
continue;
if (CalculationAo.HTRBOT[iChangeId, 12] >= 1)
{
UIMessageTip.ShowOk((iChangeId + 1) + uPublic.Prompt("Tips21", "RunSetting"));
Thread.Sleep(200);
continue;
}
if (tparm.Ishtrb == 0 || tparm.Ishtrb == 2)
{
bResult = Routinedr.Instance.Fboardcontrolpb(this, thor.ComId - 1, iChangeId, 0X80 + iChangeId, 0X03,
......
......@@ -795,6 +795,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="报警记录"/>
<Control name="uiSymbolButton1" text="批量处理"/>
<Control name="uiSymbolButton2" text="导出"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="批次"/>
......@@ -921,6 +923,7 @@
<Tips18>请先下电</Tips18>
<Tips19>请将校准后保存的文件,放置在安装文件夹!</Tips19>
<Tips20>通道试验已完成,请先降温再下电:</Tips20>
<Tips21>通道正在运行中,如果要重新开始请先停止!</Tips21>
</RunSetting>
<AutoTemper>
<Tips1>试验箱温度设置为#℃,是否继续</Tips1>
......
......@@ -782,6 +782,8 @@
<Name>AlarmProcess</Name>
<Controls>
<Control name="AlarmProcess" text="Alarm record"/>
<Control name="uiSymbolButton1" text="Batch Processing"/>
<Control name="uiSymbolButton2" text="Export"/>
</Controls>
<DataGridViewCells>
<DataGridViewCell name="Column2" HeaderText="Batch"/>
......@@ -907,6 +909,7 @@
<Tips18>Please power off first</Tips18>
<Tips19>Please place the files saved after calibration in the installation folder!</Tips19>
<Tips20>The channel test has been completed. Please cool down before turning off the power:</Tips20>
<Tips21>The channel is currently running. If you want to restart, please stop first!</Tips21>
</RunSetting>
<AutoTemper>
<Tips1>The temperature of the test chamber is set to #℃, whether to continue?</Tips1>
......
c43bf161ddd8a4c2953396fbb147a0394d938af1b7cdefd6df032db4c803993e
e32dd1bb0ae9e71baddffb2d78d2f4bd54d2cda07cdff49dc508045fcc0e814c
......@@ -371,3 +371,4 @@ E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P\obj\Debug\GKHTRBC16P.c
E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P\obj\Debug\GKHTRBC16P.csproj.Up2Date
E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P\obj\Debug\GKHTRBC16P.exe
E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P\obj\Debug\GKHTRBC16P.pdb
E:\CustomerRbGb\GK-HTRB-C16P-gaokun\GK-HTRB-GB\GKHTRBC16P\obj\Debug\GKHTRBC16P.Jurisdiction.FrmSysData.resources
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论