From 559735ecf928b2eccf36d53f0323e1377ec1f8ff Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Tue, 20 Feb 2024 14:22:02 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E6=B2=BB=E5=85=B7=E7=9C=9F=E7=A9=BA=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=202=E3=80=81=E5=BD=93=E5=BC=B9=E7=AA=97=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=87=8D=E8=AF=95=E6=88=96=E8=80=85=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E6=8C=89=E9=92=AE=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=89=A9=E7=90=86=E9=87=8D=E8=AF=95=E8=B7=B3=E8=BF=87=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=97=B6=E5=BC=B9=E6=A1=86=E4=B8=8D=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Commom/GlobalVar.cs | 9 + Rs.SkyLine/Commom/Scheduling.cs | 8 + Rs.SkyLine/Commom/TestCenterMessageBox.cs | 24 + Rs.SkyLine/Flow/LoadAndUnloadTask.cs | 35 ++ Rs.SkyLine/Flow/MonitorSystemButton.cs | 4 +- Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs | 9 + Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs | 2 +- Rs.SkyLine/Flow/SubFlow/LaserFlow.cs | 2 +- Rs.SkyLine/Flow/TestCenter.cs | 3 + Rs.SkyLine/Home.cs | 7 + Rs.SkyLine/MonitorFlow.Designer.cs | 495 ++++++++++++++++++++ Rs.SkyLine/MonitorFlow.cs | 77 +++ Rs.SkyLine/MonitorFlow.resx | 123 +++++ Rs.SkyLine/Properties/AssemblyInfo.cs | 2 +- Rs.SkyLine/Rs.SkyLine.csproj | 9 + Rs.SkyLine/TestFrm.Designer.cs | 13 + Rs.SkyLine/TestFrm.cs | 5 + 17 files changed, 822 insertions(+), 5 deletions(-) create mode 100644 Rs.SkyLine/MonitorFlow.Designer.cs create mode 100644 Rs.SkyLine/MonitorFlow.cs create mode 100644 Rs.SkyLine/MonitorFlow.resx diff --git a/Rs.SkyLine/Commom/GlobalVar.cs b/Rs.SkyLine/Commom/GlobalVar.cs index 7ce8d03..5d6b7c8 100644 --- a/Rs.SkyLine/Commom/GlobalVar.cs +++ b/Rs.SkyLine/Commom/GlobalVar.cs @@ -941,5 +941,14 @@ namespace Rs.Framework return SysConfigParam.GetValue(nameof(DisableDoor)); } } + + /// + /// 是否屏蔽治具真空检测 + /// + public static bool DisableFixtureVacuumCheck + { + get; + set; + } } } diff --git a/Rs.SkyLine/Commom/Scheduling.cs b/Rs.SkyLine/Commom/Scheduling.cs index ca73120..d879159 100644 --- a/Rs.SkyLine/Commom/Scheduling.cs +++ b/Rs.SkyLine/Commom/Scheduling.cs @@ -704,6 +704,14 @@ namespace Rs.MotionPlat.Commom /// 测试机状态 /// TesterState, + /// + /// 一圈 + /// + OneCycle, + /// + /// 是否屏蔽治具真空检测 + /// + DisableFixtureVacuumCheck } } diff --git a/Rs.SkyLine/Commom/TestCenterMessageBox.cs b/Rs.SkyLine/Commom/TestCenterMessageBox.cs index 3bc3392..1874b04 100644 --- a/Rs.SkyLine/Commom/TestCenterMessageBox.cs +++ b/Rs.SkyLine/Commom/TestCenterMessageBox.cs @@ -13,6 +13,7 @@ namespace Rs.MotionPlat.Commom { public class TestCenterMessageBox { + static Dictionary msgList; static Dictionary msgSentEvent; static Dictionary resultMessageBox; static object msgLock = new object(); @@ -20,6 +21,7 @@ namespace Rs.MotionPlat.Commom { msgSentEvent = new Dictionary(); resultMessageBox = new Dictionary(); + msgList = new Dictionary(); } public static void Show(int id, string message, ETipButton button,bool bNeedStop=false) @@ -43,6 +45,10 @@ namespace Rs.MotionPlat.Commom msgBox.Button = button; msgBox.Instruction = EInstruction.ShowMessage; msgBox.ID = id; + if(!msgList.ContainsKey(id)) + { + msgList.Add(id, msgBox); + } TestCenter.Instance.ShowMsgBox(msgBox); if(!msgSentEvent.ContainsKey(id)) { @@ -78,6 +84,7 @@ namespace Rs.MotionPlat.Commom msgSentEvent.Remove(id); box = resultMessageBox[id]; resultMessageBox.Remove(id); + msgList.Remove(id); } return box; } @@ -90,5 +97,22 @@ namespace Rs.MotionPlat.Commom } return -1; } + + /// + /// 根据按钮的类型获取弹框的ID + /// + /// + public static int GetMsgID(ETipButton btnType) + { + if(msgList!=null && msgList.Count>0) + { + foreach (var button in msgList.Values.ToList()) + { + if (button.Button.HasFlag(btnType)) + return button.ID; + } + } + return -1; + } } } diff --git a/Rs.SkyLine/Flow/LoadAndUnloadTask.cs b/Rs.SkyLine/Flow/LoadAndUnloadTask.cs index 190c6a0..4bc2773 100644 --- a/Rs.SkyLine/Flow/LoadAndUnloadTask.cs +++ b/Rs.SkyLine/Flow/LoadAndUnloadTask.cs @@ -884,6 +884,41 @@ namespace Rs.MotionPlat.Flow else return slotIndex + 16; } + /// + /// 创建周转盘清料任务 + /// + public void CreateTurnoverTrayCleanTask() + { + lock(this) + { + for (int i = 0; i < 32; i++) + { + TurnoverInfo ti = new TurnoverInfo(); + ti.GUID = GuidHelper.Create(); + ti.FromType = TurnoverType.Turnover; + ti.FromFloor = 1; + ti.FromIndex = i; + ti.SN = ""; + ti.ToType = TurnoverType.Multifunction; + ti.ToFloor = 1; + ti.ToIndex = 0; + ti.taskMode = ETaskType.Unload; + ti.Instruction = EInstruction.LoadAndUnload; + ti.GroupID = 0; + ti.TurnoverID = 0; + unloadTaskList.Add(ti); + } + } + } + + /// + /// 创建测试治具清料任务 + /// + private void CreateFixtureCleanTask() + { + + } + } /// diff --git a/Rs.SkyLine/Flow/MonitorSystemButton.cs b/Rs.SkyLine/Flow/MonitorSystemButton.cs index fb8d881..852b1f6 100644 --- a/Rs.SkyLine/Flow/MonitorSystemButton.cs +++ b/Rs.SkyLine/Flow/MonitorSystemButton.cs @@ -284,7 +284,7 @@ namespace Rs.MotionPlat.Flow case EMonitorButtonStep.SkipButtonPressed: //关闭消息 MessageQueue.Instance.Insert("跳过按钮按下"); - msgID = TestCenterMessageBox.GetMsgID(); + msgID = TestCenterMessageBox.GetMsgID( SchedulingMessageBox.ETipButton.Skip); if (msgID>0) { SchedulingMessageBox box = new SchedulingMessageBox(); @@ -307,7 +307,7 @@ namespace Rs.MotionPlat.Flow case EMonitorButtonStep.RetryButtonPressed: //关闭消息 MessageQueue.Instance.Insert("重试按钮按下"); - msgID = TestCenterMessageBox.GetMsgID(); + msgID = TestCenterMessageBox.GetMsgID( SchedulingMessageBox.ETipButton.Retry); if (msgID > 0) { SchedulingMessageBox box = new SchedulingMessageBox(); diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs index c507137..621b967 100644 --- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs @@ -2195,6 +2195,15 @@ namespace Rs.MotionPlat.Flow { return $"{trayType}盘{slotIndex+1}穴位"; } + + /// + /// 复位流程步序 + /// + private void ResetFlow() + { + flowStep = EDischargeFlowStep.等待任务; + + } } } diff --git a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs index 2335bd7..2597cb9 100644 --- a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs @@ -962,7 +962,7 @@ namespace Rs.MotionPlat.Flow } if(nozzle.IsHasProduct) { - if (Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测") || GlobalVar.RunSpace) + if (Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测") || GlobalVar.RunSpace || GlobalVar.DisableFixtureVacuumCheck) { GlobalTray.TestTray.ChangeStatus(nozzle.NozzleIndex, ESlotStatus.Have); TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle); diff --git a/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs b/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs index 2b18d77..638b429 100644 --- a/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs +++ b/Rs.SkyLine/Flow/SubFlow/LaserFlow.cs @@ -21,7 +21,7 @@ namespace Rs.MotionPlat.Flow.SubFlow 测高完成 } /// - /// 镭射头到穴位上方 + /// 镭射头测高 /// public class LaserFlow { diff --git a/Rs.SkyLine/Flow/TestCenter.cs b/Rs.SkyLine/Flow/TestCenter.cs index f207c4d..176c3bd 100644 --- a/Rs.SkyLine/Flow/TestCenter.cs +++ b/Rs.SkyLine/Flow/TestCenter.cs @@ -41,6 +41,9 @@ namespace Rs.MotionPlat.Flow { switch (ssi.Type) { + case SchedulingStatusInfo.InfoType.DisableFixtureVacuumCheck: + GlobalVar.DisableFixtureVacuumCheck = bool.Parse(ssi.Info); + break; case SchedulingStatusInfo.InfoType.State: break; case SchedulingStatusInfo.InfoType.RunStatus: diff --git a/Rs.SkyLine/Home.cs b/Rs.SkyLine/Home.cs index dbc6709..897103b 100644 --- a/Rs.SkyLine/Home.cs +++ b/Rs.SkyLine/Home.cs @@ -228,6 +228,13 @@ namespace Rs.MotionPlat //monitorTray.ShowInTaskbar = false; monitorTray.Show(); }); + + new HotKeyManager(Keys.F, 1, (o, arg) => { + MonitorFlow mf = new MonitorFlow(); + mf.StartPosition= FormStartPosition.CenterParent; + mf.HeaderBackgroundColor = Color.Gray; + mf.Show(); + }); } private void SetFormStyle() diff --git a/Rs.SkyLine/MonitorFlow.Designer.cs b/Rs.SkyLine/MonitorFlow.Designer.cs new file mode 100644 index 0000000..fc029ca --- /dev/null +++ b/Rs.SkyLine/MonitorFlow.Designer.cs @@ -0,0 +1,495 @@ +namespace Rs.MotionPlat +{ + partial class MonitorFlow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tv_DischargeFlow = new System.Windows.Forms.TreeView(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.tv_TurnoverFlow = new System.Windows.Forms.TreeView(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.groupBox11 = new System.Windows.Forms.GroupBox(); + this.groupBox12 = new System.Windows.Forms.GroupBox(); + this.groupBox13 = new System.Windows.Forms.GroupBox(); + this.groupBox14 = new System.Windows.Forms.GroupBox(); + this.groupBox15 = new System.Windows.Forms.GroupBox(); + this.groupBox16 = new System.Windows.Forms.GroupBox(); + this.groupBox17 = new System.Windows.Forms.GroupBox(); + this.groupBox18 = new System.Windows.Forms.GroupBox(); + this.groupBox19 = new System.Windows.Forms.GroupBox(); + this.groupBox20 = new System.Windows.Forms.GroupBox(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.tv_TakeTrayFlow = new System.Windows.Forms.TreeView(); + this.tv_DischargeDumpFlow = new System.Windows.Forms.TreeView(); + this.tv_FiberWarningPressFlow = new System.Windows.Forms.TreeView(); + this.treeView4 = new System.Windows.Forms.TreeView(); + this.treeView5 = new System.Windows.Forms.TreeView(); + this.treeView6 = new System.Windows.Forms.TreeView(); + this.treeView7 = new System.Windows.Forms.TreeView(); + this.treeView8 = new System.Windows.Forms.TreeView(); + this.tableLayoutPanel2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.groupBox8.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.groupBox10.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 10; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F)); + this.tableLayoutPanel2.Controls.Add(this.groupBox1, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox2, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox3, 2, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox4, 3, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox5, 4, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox6, 5, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox7, 6, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox8, 7, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox9, 8, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox10, 9, 0); + this.tableLayoutPanel2.Controls.Add(this.groupBox11, 0, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox12, 1, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox13, 2, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox14, 3, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox15, 4, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox16, 5, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox17, 6, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox18, 7, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox19, 8, 1); + this.tableLayoutPanel2.Controls.Add(this.groupBox20, 9, 1); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 40); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 2; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(1808, 820); + this.tableLayoutPanel2.TabIndex = 3; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.tv_DischargeFlow); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.ForeColor = System.Drawing.Color.White; + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(174, 404); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "排料流程"; + // + // tv_DischargeFlow + // + this.tv_DischargeFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv_DischargeFlow.Location = new System.Drawing.Point(3, 17); + this.tv_DischargeFlow.Name = "tv_DischargeFlow"; + this.tv_DischargeFlow.Size = new System.Drawing.Size(168, 384); + this.tv_DischargeFlow.TabIndex = 0; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.tv_TurnoverFlow); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.ForeColor = System.Drawing.Color.White; + this.groupBox2.Location = new System.Drawing.Point(183, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(174, 404); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "周转流程"; + // + // tv_TurnoverFlow + // + this.tv_TurnoverFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv_TurnoverFlow.Location = new System.Drawing.Point(3, 17); + this.tv_TurnoverFlow.Name = "tv_TurnoverFlow"; + this.tv_TurnoverFlow.Size = new System.Drawing.Size(168, 384); + this.tv_TurnoverFlow.TabIndex = 0; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.tv_TakeTrayFlow); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.ForeColor = System.Drawing.Color.White; + this.groupBox3.Location = new System.Drawing.Point(363, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(174, 404); + this.groupBox3.TabIndex = 0; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "料盘搬运流程"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.tv_DischargeDumpFlow); + this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox4.ForeColor = System.Drawing.Color.White; + this.groupBox4.Location = new System.Drawing.Point(543, 3); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(174, 404); + this.groupBox4.TabIndex = 0; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "排料取料失败放料流程"; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.tv_FiberWarningPressFlow); + this.groupBox5.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox5.ForeColor = System.Drawing.Color.White; + this.groupBox5.Location = new System.Drawing.Point(723, 3); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(174, 404); + this.groupBox5.TabIndex = 0; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "光纤异常下压一次流程"; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.treeView4); + this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox6.ForeColor = System.Drawing.Color.White; + this.groupBox6.Location = new System.Drawing.Point(903, 3); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(174, 404); + this.groupBox6.TabIndex = 0; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "groupBox1"; + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.treeView5); + this.groupBox7.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox7.ForeColor = System.Drawing.Color.White; + this.groupBox7.Location = new System.Drawing.Point(1083, 3); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(174, 404); + this.groupBox7.TabIndex = 0; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "groupBox1"; + // + // groupBox8 + // + this.groupBox8.Controls.Add(this.treeView6); + this.groupBox8.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox8.ForeColor = System.Drawing.Color.White; + this.groupBox8.Location = new System.Drawing.Point(1263, 3); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(174, 404); + this.groupBox8.TabIndex = 0; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "groupBox1"; + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.treeView7); + this.groupBox9.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox9.ForeColor = System.Drawing.Color.White; + this.groupBox9.Location = new System.Drawing.Point(1443, 3); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(174, 404); + this.groupBox9.TabIndex = 0; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "groupBox1"; + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.treeView8); + this.groupBox10.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox10.ForeColor = System.Drawing.Color.White; + this.groupBox10.Location = new System.Drawing.Point(1623, 3); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(182, 404); + this.groupBox10.TabIndex = 0; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "groupBox1"; + // + // groupBox11 + // + this.groupBox11.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox11.ForeColor = System.Drawing.Color.White; + this.groupBox11.Location = new System.Drawing.Point(3, 413); + this.groupBox11.Name = "groupBox11"; + this.groupBox11.Size = new System.Drawing.Size(174, 404); + this.groupBox11.TabIndex = 0; + this.groupBox11.TabStop = false; + this.groupBox11.Text = "groupBox1"; + // + // groupBox12 + // + this.groupBox12.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox12.ForeColor = System.Drawing.Color.White; + this.groupBox12.Location = new System.Drawing.Point(183, 413); + this.groupBox12.Name = "groupBox12"; + this.groupBox12.Size = new System.Drawing.Size(174, 404); + this.groupBox12.TabIndex = 0; + this.groupBox12.TabStop = false; + this.groupBox12.Text = "groupBox1"; + // + // groupBox13 + // + this.groupBox13.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox13.ForeColor = System.Drawing.Color.White; + this.groupBox13.Location = new System.Drawing.Point(363, 413); + this.groupBox13.Name = "groupBox13"; + this.groupBox13.Size = new System.Drawing.Size(174, 404); + this.groupBox13.TabIndex = 0; + this.groupBox13.TabStop = false; + this.groupBox13.Text = "groupBox1"; + // + // groupBox14 + // + this.groupBox14.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox14.ForeColor = System.Drawing.Color.White; + this.groupBox14.Location = new System.Drawing.Point(543, 413); + this.groupBox14.Name = "groupBox14"; + this.groupBox14.Size = new System.Drawing.Size(174, 404); + this.groupBox14.TabIndex = 0; + this.groupBox14.TabStop = false; + this.groupBox14.Text = "groupBox1"; + // + // groupBox15 + // + this.groupBox15.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox15.ForeColor = System.Drawing.Color.White; + this.groupBox15.Location = new System.Drawing.Point(723, 413); + this.groupBox15.Name = "groupBox15"; + this.groupBox15.Size = new System.Drawing.Size(174, 404); + this.groupBox15.TabIndex = 0; + this.groupBox15.TabStop = false; + this.groupBox15.Text = "groupBox1"; + // + // groupBox16 + // + this.groupBox16.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox16.ForeColor = System.Drawing.Color.White; + this.groupBox16.Location = new System.Drawing.Point(903, 413); + this.groupBox16.Name = "groupBox16"; + this.groupBox16.Size = new System.Drawing.Size(174, 404); + this.groupBox16.TabIndex = 0; + this.groupBox16.TabStop = false; + this.groupBox16.Text = "groupBox1"; + // + // groupBox17 + // + this.groupBox17.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox17.ForeColor = System.Drawing.Color.White; + this.groupBox17.Location = new System.Drawing.Point(1083, 413); + this.groupBox17.Name = "groupBox17"; + this.groupBox17.Size = new System.Drawing.Size(174, 404); + this.groupBox17.TabIndex = 0; + this.groupBox17.TabStop = false; + this.groupBox17.Text = "groupBox1"; + // + // groupBox18 + // + this.groupBox18.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox18.ForeColor = System.Drawing.Color.White; + this.groupBox18.Location = new System.Drawing.Point(1263, 413); + this.groupBox18.Name = "groupBox18"; + this.groupBox18.Size = new System.Drawing.Size(174, 404); + this.groupBox18.TabIndex = 0; + this.groupBox18.TabStop = false; + this.groupBox18.Text = "groupBox1"; + // + // groupBox19 + // + this.groupBox19.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox19.ForeColor = System.Drawing.Color.White; + this.groupBox19.Location = new System.Drawing.Point(1443, 413); + this.groupBox19.Name = "groupBox19"; + this.groupBox19.Size = new System.Drawing.Size(174, 404); + this.groupBox19.TabIndex = 0; + this.groupBox19.TabStop = false; + this.groupBox19.Text = "groupBox1"; + // + // groupBox20 + // + this.groupBox20.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox20.ForeColor = System.Drawing.Color.White; + this.groupBox20.Location = new System.Drawing.Point(1623, 413); + this.groupBox20.Name = "groupBox20"; + this.groupBox20.Size = new System.Drawing.Size(182, 404); + this.groupBox20.TabIndex = 0; + this.groupBox20.TabStop = false; + this.groupBox20.Text = "groupBox1"; + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // tv_TakeTrayFlow + // + this.tv_TakeTrayFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv_TakeTrayFlow.Location = new System.Drawing.Point(3, 17); + this.tv_TakeTrayFlow.Name = "tv_TakeTrayFlow"; + this.tv_TakeTrayFlow.Size = new System.Drawing.Size(168, 384); + this.tv_TakeTrayFlow.TabIndex = 0; + // + // tv_DischargeDumpFlow + // + this.tv_DischargeDumpFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv_DischargeDumpFlow.Location = new System.Drawing.Point(3, 17); + this.tv_DischargeDumpFlow.Name = "tv_DischargeDumpFlow"; + this.tv_DischargeDumpFlow.Size = new System.Drawing.Size(168, 384); + this.tv_DischargeDumpFlow.TabIndex = 0; + // + // tv_FiberWarningPressFlow + // + this.tv_FiberWarningPressFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv_FiberWarningPressFlow.Location = new System.Drawing.Point(3, 17); + this.tv_FiberWarningPressFlow.Name = "tv_FiberWarningPressFlow"; + this.tv_FiberWarningPressFlow.Size = new System.Drawing.Size(168, 384); + this.tv_FiberWarningPressFlow.TabIndex = 0; + // + // treeView4 + // + this.treeView4.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView4.Location = new System.Drawing.Point(3, 17); + this.treeView4.Name = "treeView4"; + this.treeView4.Size = new System.Drawing.Size(168, 384); + this.treeView4.TabIndex = 0; + // + // treeView5 + // + this.treeView5.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView5.Location = new System.Drawing.Point(3, 17); + this.treeView5.Name = "treeView5"; + this.treeView5.Size = new System.Drawing.Size(168, 384); + this.treeView5.TabIndex = 0; + // + // treeView6 + // + this.treeView6.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView6.Location = new System.Drawing.Point(3, 17); + this.treeView6.Name = "treeView6"; + this.treeView6.Size = new System.Drawing.Size(168, 384); + this.treeView6.TabIndex = 0; + // + // treeView7 + // + this.treeView7.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView7.Location = new System.Drawing.Point(3, 17); + this.treeView7.Name = "treeView7"; + this.treeView7.Size = new System.Drawing.Size(168, 384); + this.treeView7.TabIndex = 0; + // + // treeView8 + // + this.treeView8.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeView8.Location = new System.Drawing.Point(3, 17); + this.treeView8.Name = "treeView8"; + this.treeView8.Size = new System.Drawing.Size(176, 384); + this.treeView8.TabIndex = 0; + // + // MonitorFlow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1808, 860); + this.Controls.Add(this.tableLayoutPanel2); + this.Name = "MonitorFlow"; + this.Text = "MonitorFlow"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.MonitorFlow_Load); + this.Controls.SetChildIndex(this.tableLayoutPanel2, 0); + this.tableLayoutPanel2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + this.groupBox7.ResumeLayout(false); + this.groupBox8.ResumeLayout(false); + this.groupBox9.ResumeLayout(false); + this.groupBox10.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.GroupBox groupBox8; + private System.Windows.Forms.GroupBox groupBox9; + private System.Windows.Forms.GroupBox groupBox10; + private System.Windows.Forms.GroupBox groupBox11; + private System.Windows.Forms.GroupBox groupBox12; + private System.Windows.Forms.GroupBox groupBox13; + private System.Windows.Forms.GroupBox groupBox14; + private System.Windows.Forms.GroupBox groupBox15; + private System.Windows.Forms.GroupBox groupBox16; + private System.Windows.Forms.GroupBox groupBox17; + private System.Windows.Forms.GroupBox groupBox18; + private System.Windows.Forms.GroupBox groupBox19; + private System.Windows.Forms.GroupBox groupBox20; + private System.Windows.Forms.TreeView tv_DischargeFlow; + private System.Windows.Forms.TreeView tv_TurnoverFlow; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.TreeView tv_TakeTrayFlow; + private System.Windows.Forms.TreeView tv_DischargeDumpFlow; + private System.Windows.Forms.TreeView tv_FiberWarningPressFlow; + private System.Windows.Forms.TreeView treeView4; + private System.Windows.Forms.TreeView treeView5; + private System.Windows.Forms.TreeView treeView6; + private System.Windows.Forms.TreeView treeView7; + private System.Windows.Forms.TreeView treeView8; + } +} \ No newline at end of file diff --git a/Rs.SkyLine/MonitorFlow.cs b/Rs.SkyLine/MonitorFlow.cs new file mode 100644 index 0000000..f855860 --- /dev/null +++ b/Rs.SkyLine/MonitorFlow.cs @@ -0,0 +1,77 @@ +using Rs.MotionPlat.Flow; +using Rs.MotionPlat.Flow.SubFlow; +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 Rs.MotionPlat +{ + public partial class MonitorFlow : BaseFormHeader + { + public MonitorFlow() + { + this.StartPosition = FormStartPosition.Manual; + InitializeComponent(); + this.FormBorderStyle = FormBorderStyle.None; + this.MaximizedBounds = Screen.PrimaryScreen.WorkingArea; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + } + + private void MonitorFlow_Load(object sender, EventArgs e) + { + LoadFlowStep< EDischargeFlowStep>("DischargeFlow", tv_DischargeFlow); + LoadFlowStep("TurnoverFlow", tv_TurnoverFlow); + LoadFlowStep("TakeTrayFlow", tv_TakeTrayFlow); + LoadFlowStep("DischargeDumpFlow", tv_DischargeDumpFlow); + LoadFlowStep("FiberWarningPressFlow", tv_FiberWarningPressFlow); + } + + void LoadFlowStep(string flowname,TreeView tv) where T : Enum + { + string[] stepnames = Enum.GetNames(typeof(T)); + TreeNode root = new TreeNode(); + root.Text = flowname; + foreach (string stepname in stepnames) + { + root.Nodes.Add(new TreeNode(stepname)); + } + tv.Nodes.Add(root); + tv.ExpandAll(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + string stepname = DischargeFlow.Instance.GetCurStep(); + foreach (TreeNode tn in tv_DischargeFlow.Nodes[0].Nodes) + { + if(tn.Text== stepname) + { + tn.ForeColor = Color.Red; + } + else + { + tn.ForeColor = Color.Black; + } + } + + stepname = TurnoverFlow.Instance.GetStep(); + foreach (TreeNode tn in tv_TurnoverFlow.Nodes[0].Nodes) + { + if (tn.Text == stepname) + { + tn.ForeColor = Color.Red; + } + else + { + tn.ForeColor = Color.Black; + } + } + } + } +} diff --git a/Rs.SkyLine/MonitorFlow.resx b/Rs.SkyLine/MonitorFlow.resx new file mode 100644 index 0000000..1f666f2 --- /dev/null +++ b/Rs.SkyLine/MonitorFlow.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Rs.SkyLine/Properties/AssemblyInfo.cs b/Rs.SkyLine/Properties/AssemblyInfo.cs index 0fc1e25..b26e15c 100644 --- a/Rs.SkyLine/Properties/AssemblyInfo.cs +++ b/Rs.SkyLine/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ using System.Runtime.InteropServices; // //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: - [assembly: AssemblyVersion("2.20.24.9")] + [assembly: AssemblyVersion("2.20.24.10")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Rs.SkyLine/Rs.SkyLine.csproj b/Rs.SkyLine/Rs.SkyLine.csproj index c92dae2..f57a1d9 100644 --- a/Rs.SkyLine/Rs.SkyLine.csproj +++ b/Rs.SkyLine/Rs.SkyLine.csproj @@ -280,6 +280,12 @@ MonitorConfig.cs + + Form + + + MonitorFlow.cs + Form @@ -555,6 +561,9 @@ MonitorConfig.cs + + MonitorFlow.cs + MonitorTray.cs diff --git a/Rs.SkyLine/TestFrm.Designer.cs b/Rs.SkyLine/TestFrm.Designer.cs index d4eb996..241c2ea 100644 --- a/Rs.SkyLine/TestFrm.Designer.cs +++ b/Rs.SkyLine/TestFrm.Designer.cs @@ -60,6 +60,7 @@ this.button24 = new System.Windows.Forms.Button(); this.button25 = new System.Windows.Forms.Button(); this.button26 = new System.Windows.Forms.Button(); + this.button27 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // btnTurnoverSlotException @@ -382,11 +383,22 @@ this.button26.UseVisualStyleBackColor = true; this.button26.Click += new System.EventHandler(this.button26_Click); // + // button27 + // + this.button27.Location = new System.Drawing.Point(571, 567); + this.button27.Name = "button27"; + this.button27.Size = new System.Drawing.Size(166, 60); + this.button27.TabIndex = 4; + this.button27.Text = "生成清料任务"; + this.button27.UseVisualStyleBackColor = true; + this.button27.Click += new System.EventHandler(this.button27_Click); + // // TestFrm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1336, 854); + this.Controls.Add(this.button27); this.Controls.Add(this.button26); this.Controls.Add(this.button24); this.Controls.Add(this.button23); @@ -459,5 +471,6 @@ private System.Windows.Forms.Button button24; private System.Windows.Forms.Button button25; private System.Windows.Forms.Button button26; + private System.Windows.Forms.Button button27; } } \ No newline at end of file diff --git a/Rs.SkyLine/TestFrm.cs b/Rs.SkyLine/TestFrm.cs index 310ac12..e8b79c1 100644 --- a/Rs.SkyLine/TestFrm.cs +++ b/Rs.SkyLine/TestFrm.cs @@ -264,5 +264,10 @@ namespace Rs.MotionPlat Msg.ShowInfo(button.ToString()); }); } + + private void button27_Click(object sender, EventArgs e) + { + LoadAndUnloadTask.Instance.CreateTurnoverTrayCleanTask(); + } } }