增加客户日志事件的记录

master
lhiven 11 months ago
parent 1a6257aa85
commit 8dc93df7cf

@ -12,7 +12,7 @@ namespace Rs.MotionPlat.Commom
{
public static class DevLog
{
private static string fileDir = "D:\\Summary";
private static string fileDir = "D:\\Break_Event_Summary_Unit";
public static void EventTracker(string keyword,int errorcode,string errormsg,string message)
{
string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\EventTracker_{DateTime.Now.ToString("yyyyMMdd")}.csv";
@ -30,18 +30,21 @@ namespace Rs.MotionPlat.Commom
File.AppendAllText(filename, content);
}
public static void Breakdown()
public static void Breakdown(string category,string detail)
{
string filename = "";
string csvTitle = "Machine,Tester Category,Tester_Sequence_Item Detail,TimeStamp,Time(ms)";
if (!File.Exists(filename))
string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\EventTracker_{DateTime.Now.ToString("yyyyMMdd")}.csv";
string csvTitle = "Machin,Tester Category,Tester_Sequence_Item Detail,TimeStamp,Time(ms)\r\n";
if (!Directory.Exists(Path.GetDirectoryName(filename)))
{
File.AppendAllText(filename, csvTitle);
Directory.CreateDirectory(Path.GetDirectoryName(filename));
}
else
if (!File.Exists(filename))
{
File.AppendAllText(filename, csvTitle);
}
string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
string content = $"{GlobalVar.MachineID},{category},{detail},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")},0\r\n";
File.AppendAllText(filename, content);
}
public static void UnitTracker()

@ -654,6 +654,7 @@ namespace Rs.MotionPlat.Entitys
break;
case "Vlog":
//dataEvent.Set();
DevLog.Breakdown(items[1], items[2]);
break;
case "Reset":
dataEvent.Set();

@ -49,14 +49,16 @@
this.panel15 = new System.Windows.Forms.Panel();
this.btnQuit = new Rs.Controls.ButtonEx();
this.panel1 = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel();
this.panel16 = new System.Windows.Forms.Panel();
this.lblMonitorFlow = new System.Windows.Forms.Label();
this.panel7 = new System.Windows.Forms.Panel();
this.lblFixtureTakeFlow = new System.Windows.Forms.Label();
this.panel6 = new System.Windows.Forms.Panel();
this.lblStockPlaceFlow = new System.Windows.Forms.Label();
this.lblFixturePlaceFlow = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.lblMemory = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.lblFixturePlaceFlow = new System.Windows.Forms.Label();
this.lblStockPlaceFlow = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.lblStockLoadProductFlow = new System.Windows.Forms.Label();
this.panelEx2 = new Rs.Controls.PanelEx();
@ -70,8 +72,6 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.timer3 = new System.Windows.Forms.Timer(this.components);
this.panel16 = new System.Windows.Forms.Panel();
this.lblFixtureTakeFlow = new System.Windows.Forms.Label();
this.tableLayoutPanel2.SuspendLayout();
this.panel8.SuspendLayout();
this.panel9.SuspendLayout();
@ -82,6 +82,7 @@
this.panel14.SuspendLayout();
this.panel15.SuspendLayout();
this.panel1.SuspendLayout();
this.panel16.SuspendLayout();
this.panel7.SuspendLayout();
this.panel6.SuspendLayout();
this.panel5.SuspendLayout();
@ -91,7 +92,6 @@
this.tableLayoutPanel3.SuspendLayout();
this.panelEx1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel16.SuspendLayout();
this.SuspendLayout();
//
// panel_main
@ -311,11 +311,11 @@
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// panel7
// panel16
//
this.panel7.Controls.Add(this.lblFixtureTakeFlow);
resources.ApplyResources(this.panel7, "panel7");
this.panel7.Name = "panel7";
this.panel16.Controls.Add(this.lblMonitorFlow);
resources.ApplyResources(this.panel16, "panel16");
this.panel16.Name = "panel16";
//
// lblMonitorFlow
//
@ -323,17 +323,29 @@
this.lblMonitorFlow.ForeColor = System.Drawing.Color.White;
this.lblMonitorFlow.Name = "lblMonitorFlow";
//
// panel7
//
this.panel7.Controls.Add(this.lblFixtureTakeFlow);
resources.ApplyResources(this.panel7, "panel7");
this.panel7.Name = "panel7";
//
// lblFixtureTakeFlow
//
resources.ApplyResources(this.lblFixtureTakeFlow, "lblFixtureTakeFlow");
this.lblFixtureTakeFlow.ForeColor = System.Drawing.Color.White;
this.lblFixtureTakeFlow.Name = "lblFixtureTakeFlow";
//
// panel6
//
this.panel6.Controls.Add(this.lblFixturePlaceFlow);
resources.ApplyResources(this.panel6, "panel6");
this.panel6.Name = "panel6";
//
// lblStockPlaceFlow
// lblFixturePlaceFlow
//
resources.ApplyResources(this.lblStockPlaceFlow, "lblStockPlaceFlow");
this.lblStockPlaceFlow.ForeColor = System.Drawing.Color.White;
this.lblStockPlaceFlow.Name = "lblStockPlaceFlow";
resources.ApplyResources(this.lblFixturePlaceFlow, "lblFixturePlaceFlow");
this.lblFixturePlaceFlow.ForeColor = System.Drawing.Color.White;
this.lblFixturePlaceFlow.Name = "lblFixturePlaceFlow";
//
// panel5
//
@ -353,11 +365,11 @@
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4";
//
// lblFixturePlaceFlow
// lblStockPlaceFlow
//
resources.ApplyResources(this.lblFixturePlaceFlow, "lblFixturePlaceFlow");
this.lblFixturePlaceFlow.ForeColor = System.Drawing.Color.White;
this.lblFixturePlaceFlow.Name = "lblFixturePlaceFlow";
resources.ApplyResources(this.lblStockPlaceFlow, "lblStockPlaceFlow");
this.lblStockPlaceFlow.ForeColor = System.Drawing.Color.White;
this.lblStockPlaceFlow.Name = "lblStockPlaceFlow";
//
// panel3
//
@ -435,18 +447,6 @@
//
this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
//
// panel16
//
this.panel16.Controls.Add(this.lblMonitorFlow);
resources.ApplyResources(this.panel16, "panel16");
this.panel16.Name = "panel16";
//
// lblFixtureTakeFlow
//
resources.ApplyResources(this.lblFixtureTakeFlow, "lblFixtureTakeFlow");
this.lblFixtureTakeFlow.ForeColor = System.Drawing.Color.White;
this.lblFixtureTakeFlow.Name = "lblFixtureTakeFlow";
//
// Home
//
resources.ApplyResources(this, "$this");
@ -456,6 +456,7 @@
this.Controls.Add(this.panel1);
this.HeadText = "Dewey tester";
this.Name = "Home";
this.ShowMax = false;
this.Load += new System.EventHandler(this.Home2_Load);
this.Controls.SetChildIndex(this.panel1, 0);
this.Controls.SetChildIndex(this.tableLayoutPanel2, 0);
@ -470,6 +471,7 @@
this.panel14.ResumeLayout(false);
this.panel15.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel16.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel5.ResumeLayout(false);
@ -479,7 +481,6 @@
this.tableLayoutPanel3.ResumeLayout(false);
this.panelEx1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel16.ResumeLayout(false);
this.ResumeLayout(false);
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save