diff --git a/Rs.SkyLine/Commom/GlobalUser.cs b/Rs.SkyLine/Commom/GlobalUser.cs index fbc4afe..aa7fce5 100644 --- a/Rs.SkyLine/Commom/GlobalUser.cs +++ b/Rs.SkyLine/Commom/GlobalUser.cs @@ -28,7 +28,7 @@ namespace Rs.MotionPlat.Commom } public static bool IsOp() { - if (!string.IsNullOrEmpty(UserName) && UserName == "操作员") + if (!string.IsNullOrEmpty(UserName) && UserName == "Op") { return true; } @@ -37,7 +37,7 @@ namespace Rs.MotionPlat.Commom public static bool IsVender() { - if (!string.IsNullOrEmpty(UserName) && UserName == "厂商") + if (!string.IsNullOrEmpty(UserName) && UserName == "Vender") { return true; } @@ -45,7 +45,7 @@ namespace Rs.MotionPlat.Commom } public static bool IsSuper() { - if(!string.IsNullOrEmpty(UserName) && UserName=="超级用户") + if(!string.IsNullOrEmpty(UserName) && UserName=="Admin") { return true; } diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs index a7f4663..a359688 100644 --- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs @@ -2181,6 +2181,7 @@ namespace Rs.MotionPlat.Flow default: break; } + Thread.Sleep(1); } } diff --git a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs index bfaad92..1142319 100644 --- a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs +++ b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs @@ -3166,6 +3166,7 @@ namespace Rs.MotionPlat.Flow break; } + Thread.Sleep(1); } } diff --git a/Rs.SkyLine/Home.cs b/Rs.SkyLine/Home.cs index 54aef9e..871c40f 100644 --- a/Rs.SkyLine/Home.cs +++ b/Rs.SkyLine/Home.cs @@ -36,7 +36,6 @@ namespace Rs.MotionPlat this.FormBorderStyle = FormBorderStyle.None; this.MaximizedBounds = Screen.PrimaryScreen.WorkingArea; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - } void CloseSubWindow() @@ -195,13 +194,29 @@ namespace Rs.MotionPlat } else if (button == btnPermission) { - selectedButton = null; - BaseFormHeader form; - form = new UserForm(); - form.StartPosition = FormStartPosition.CenterScreen; - form.Opacity = 1; - form.TopMost = true; - form.ShowDialog(this); + if(btnPermission.ShowText.IndexOf("-")>0) + { + DialogResult dr = Msg.ShowQuestion("Are you sure to exit login?"); + if(dr== DialogResult.OK) + { + GlobalUser.UserName = ""; + btnPermission.ShowText=btnPermission.ShowText.Substring(0,btnPermission.ShowText.IndexOf("-")); + } + } + else + { + selectedButton = null; + UserForm form; + form = new UserForm(); + form.OnloginSuccessEvent += (uname) => { + btnPermission.ShowText += $"-({uname})"; + }; + form.StartPosition = FormStartPosition.CenterScreen; + form.Opacity = 1; + form.TopMost = true; + form.ShowDialog(this); + } + } else if (button == btnLanguage) { @@ -225,7 +240,10 @@ namespace Rs.MotionPlat } } - + private void Form_OnloginSuccessEvent(string obj) + { + throw new NotImplementedException(); + } private void ShowBtn(string btnname) { diff --git a/Rs.SkyLine/Home.designer.cs b/Rs.SkyLine/Home.designer.cs index 54a2c58..33daae1 100644 --- a/Rs.SkyLine/Home.designer.cs +++ b/Rs.SkyLine/Home.designer.cs @@ -111,16 +111,16 @@ // // panel8 // - resources.ApplyResources(this.panel8, "panel8"); this.panel8.Controls.Add(this.btnMain); + resources.ApplyResources(this.panel8, "panel8"); this.panel8.Name = "panel8"; // // btnMain // - resources.ApplyResources(this.btnMain, "btnMain"); this.btnMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnMain.ButtonType = Rs.Controls.EButtonType.Main; this.btnMain.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnMain, "btnMain"); this.btnMain.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnMain.ForeColor = System.Drawing.Color.White; this.btnMain.Name = "btnMain"; @@ -134,16 +134,16 @@ // // panel9 // - resources.ApplyResources(this.panel9, "panel9"); this.panel9.Controls.Add(this.btnRecipe); + resources.ApplyResources(this.panel9, "panel9"); this.panel9.Name = "panel9"; // // btnRecipe // - resources.ApplyResources(this.btnRecipe, "btnRecipe"); this.btnRecipe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnRecipe.ButtonType = Rs.Controls.EButtonType.Recipe; this.btnRecipe.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnRecipe, "btnRecipe"); this.btnRecipe.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnRecipe.ForeColor = System.Drawing.Color.White; this.btnRecipe.Name = "btnRecipe"; @@ -157,16 +157,16 @@ // // panel10 // - resources.ApplyResources(this.panel10, "panel10"); this.panel10.Controls.Add(this.btnSystem); + resources.ApplyResources(this.panel10, "panel10"); this.panel10.Name = "panel10"; // // btnSystem // - resources.ApplyResources(this.btnSystem, "btnSystem"); this.btnSystem.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnSystem.ButtonType = Rs.Controls.EButtonType.System; this.btnSystem.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnSystem, "btnSystem"); this.btnSystem.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnSystem.ForeColor = System.Drawing.Color.White; this.btnSystem.Name = "btnSystem"; @@ -180,16 +180,16 @@ // // panel11 // - resources.ApplyResources(this.panel11, "panel11"); this.panel11.Controls.Add(this.btnAbout); + resources.ApplyResources(this.panel11, "panel11"); this.panel11.Name = "panel11"; // // btnAbout // - resources.ApplyResources(this.btnAbout, "btnAbout"); this.btnAbout.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnAbout.ButtonType = Rs.Controls.EButtonType.About; this.btnAbout.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnAbout, "btnAbout"); this.btnAbout.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnAbout.ForeColor = System.Drawing.Color.White; this.btnAbout.Name = "btnAbout"; @@ -203,16 +203,16 @@ // // panel12 // - resources.ApplyResources(this.panel12, "panel12"); this.panel12.Controls.Add(this.btnData); + resources.ApplyResources(this.panel12, "panel12"); this.panel12.Name = "panel12"; // // btnData // - resources.ApplyResources(this.btnData, "btnData"); this.btnData.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnData.ButtonType = Rs.Controls.EButtonType.Language; this.btnData.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnData, "btnData"); this.btnData.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnData.ForeColor = System.Drawing.Color.White; this.btnData.Name = "btnData"; @@ -226,16 +226,16 @@ // // panel13 // - resources.ApplyResources(this.panel13, "panel13"); this.panel13.Controls.Add(this.btnLanguage); + resources.ApplyResources(this.panel13, "panel13"); this.panel13.Name = "panel13"; // // btnLanguage // - resources.ApplyResources(this.btnLanguage, "btnLanguage"); this.btnLanguage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); - this.btnLanguage.ButtonType = Rs.Controls.EButtonType.Data; + this.btnLanguage.ButtonType = Rs.Controls.EButtonType.Calib; this.btnLanguage.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnLanguage, "btnLanguage"); this.btnLanguage.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnLanguage.ForeColor = System.Drawing.Color.White; this.btnLanguage.Name = "btnLanguage"; @@ -249,16 +249,16 @@ // // panel14 // - resources.ApplyResources(this.panel14, "panel14"); this.panel14.Controls.Add(this.btnPermission); + resources.ApplyResources(this.panel14, "panel14"); this.panel14.Name = "panel14"; // // btnPermission // - resources.ApplyResources(this.btnPermission, "btnPermission"); this.btnPermission.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnPermission.ButtonType = Rs.Controls.EButtonType.Permission; this.btnPermission.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnPermission, "btnPermission"); this.btnPermission.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnPermission.ForeColor = System.Drawing.Color.White; this.btnPermission.Name = "btnPermission"; @@ -272,16 +272,16 @@ // // panel15 // - resources.ApplyResources(this.panel15, "panel15"); this.panel15.Controls.Add(this.btnQuit); + resources.ApplyResources(this.panel15, "panel15"); this.panel15.Name = "panel15"; // // btnQuit // - resources.ApplyResources(this.btnQuit, "btnQuit"); this.btnQuit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(52)))), ((int)(((byte)(104))))); this.btnQuit.ButtonType = Rs.Controls.EButtonType.Quit; this.btnQuit.Cursor = System.Windows.Forms.Cursors.Hand; + resources.ApplyResources(this.btnQuit, "btnQuit"); this.btnQuit.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnQuit.ForeColor = System.Drawing.Color.White; this.btnQuit.Name = "btnQuit"; @@ -295,7 +295,6 @@ // // panel1 // - resources.ApplyResources(this.panel1, "panel1"); this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(46)))), ((int)(((byte)(46))))); this.panel1.Controls.Add(this.panel7); this.panel1.Controls.Add(this.panel6); @@ -305,12 +304,13 @@ this.panel1.Controls.Add(this.panelEx2); this.panel1.Controls.Add(this.tableLayoutPanel3); this.panel1.Controls.Add(this.panelEx1); + resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // // panel7 // - resources.ApplyResources(this.panel7, "panel7"); this.panel7.Controls.Add(this.lblMonitorFlow); + resources.ApplyResources(this.panel7, "panel7"); this.panel7.Name = "panel7"; // // lblMonitorFlow @@ -321,8 +321,8 @@ // // panel6 // - resources.ApplyResources(this.panel6, "panel6"); this.panel6.Controls.Add(this.lblInitializeState); + resources.ApplyResources(this.panel6, "panel6"); this.panel6.Name = "panel6"; // // lblInitializeState @@ -333,8 +333,8 @@ // // panel5 // - resources.ApplyResources(this.panel5, "panel5"); this.panel5.Controls.Add(this.lblMemory); + resources.ApplyResources(this.panel5, "panel5"); this.panel5.Name = "panel5"; // // lblMemory @@ -345,8 +345,8 @@ // // panel4 // - resources.ApplyResources(this.panel4, "panel4"); this.panel4.Controls.Add(this.lblTurnoverFlow); + resources.ApplyResources(this.panel4, "panel4"); this.panel4.Name = "panel4"; // // lblTurnoverFlow @@ -357,8 +357,8 @@ // // panel3 // - resources.ApplyResources(this.panel3, "panel3"); this.panel3.Controls.Add(this.lblDischargeFlow); + resources.ApplyResources(this.panel3, "panel3"); this.panel3.Name = "panel3"; // // lblDischargeFlow @@ -369,8 +369,8 @@ // // panelEx2 // - resources.ApplyResources(this.panelEx2, "panelEx2"); this.panelEx2.Controls.Add(this.lblRunState); + resources.ApplyResources(this.panelEx2, "panelEx2"); this.panelEx2.Name = "panelEx2"; // // lblRunState @@ -400,14 +400,14 @@ // // panelEx1 // - resources.ApplyResources(this.panelEx1, "panelEx1"); this.panelEx1.Controls.Add(this.panel2); + resources.ApplyResources(this.panelEx1, "panelEx1"); this.panelEx1.Name = "panelEx1"; // // panel2 // - resources.ApplyResources(this.panel2, "panel2"); this.panel2.Controls.Add(this.lblVersion); + resources.ApplyResources(this.panel2, "panel2"); this.panel2.Name = "panel2"; // // lblVersion diff --git a/Rs.SkyLine/Home.resx b/Rs.SkyLine/Home.resx index ceace35..454ede3 100644 --- a/Rs.SkyLine/Home.resx +++ b/Rs.SkyLine/Home.resx @@ -117,1114 +117,1114 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel4 - - + Fill - - System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 1194, 0 + + 0, 93 - - - 7 + + 1594, 814 - - panel5 + + + 8 - - 0 + + panel_main - - panel3 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 126, 33 + + $this - - 237, 33 + + 0 - - 1 + + 8 - + Fill - - 0, 0 + + Flat - - 215, 33 + + 宋体, 14pt - + 0, 0 - - lblInitializeState + + 0, 0, 0, 0 - + + 0, 0, 30, 0 + + 199, 53 - - Right + + 2 - + + btnMain + + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + + panel8 + + 0 - - 宋体, 14pt + + Fill - - panel3 + + 0, 0 - - 2 + + 0, 0, 0, 0 - - 宋体, 14pt + + 199, 53 - - 0, 0, 30, 0 + + 0 - - Left + + panel8 - + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + 0 - + Fill - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + Flat - - Fill + + 宋体, 14pt - - 3 + + 0, 0 - - 5 + + 0, 0, 0, 0 - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + 199, 53 - + 0 - - Top + + btnRecipe - - panel10 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - 199, 53 + + panel9 - + 0 - + Fill - - 0 + + 199, 0 - - 0 + + 0, 0, 0, 0 + + + 199, 53 1 - - Fill + + panel9 - - Fill + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tableLayoutPanel2 - - btnQuit + + 1 - + Fill - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Flat - - panel12 + + 宋体, 14pt - - 3 + + 0, 0 - - 3 + + 0, 0, 0, 0 - - 281, 33 + + 199, 53 + + + 1 btnSystem - - Discharge: - - - 201, 53 - - + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - tableLayoutPanel2 + + panel10 - - Fill + + 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Fill - - panelEx1 + + 398, 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0, 0, 0 - - MiddleLeft + + 199, 53 - - panel7 + + 2 - - timer3 + + panel10 - - panel11 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + tableLayoutPanel2 - - 0 + + 2 - - btnAbout + + Fill - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Flat - - 546, 0 + + 宋体, 14pt - - panel9 + + 0, 0 - - Flat + + 0, 0, 0, 0 - - Rs.Controls.PanelEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + 199, 53 - - Fill + + 6 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + btnAbout - - 0 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - tableLayoutPanel2 + + panel11 - - panel1 + + 0 - - InitializeState: + + Fill - - tableLayoutPanel3 + + 597, 0 - - Flat + + 0, 0, 0, 0 - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 199, 53 - - btnData + + 3 - - MiddleCenter + + panel11 - - 7 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1594, 940 + + tableLayoutPanel2 - - 199, 53 + + 3 - - panel_main + + Fill - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Flat - + + 宋体, 14pt + + 0, 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0, 0, 0 - - Left + + 199, 53 - - 0, 0 + + 3 - - Fill + + btnData - - 0, 0 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - 5 + + panel12 - - 0, 40 + + 0 - + Fill - - 52, 0 + + 796, 0 - - Right + + 0, 0, 0, 0 - - panel4 + + 199, 53 - - State: + + 4 - - 0 + + panel12 - + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tableLayoutPanel2 - - Noinit + + 4 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Fill - - 5 + + Flat - - panel11 + + 宋体, 14pt - - 3, 0 + + NoControl - + 0, 0 - + 0, 0, 0, 0 - - tableLayoutPanel3 + + 199, 53 - - lblVersion + + 4 - - 237, 33 + + btnLanguage - - 166, 0 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - lblMachineState + + panel13 - - 0, 0, 0, 0 + + 0 - - Home + + Fill - - panel7 + + 995, 0 - + 0, 0, 0, 0 - + 199, 53 - - 69, 0 - - - tableLayoutPanel2 - - - panel5 + + 5 - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + panel13 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lblTurnoverFlow + + tableLayoutPanel2 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - panel14 + + Fill - - 165, 33 + + Flat - - panel1 + + 宋体, 14pt - - panel10 + + 0, 0 - - 215, 33 + + 0, 0, 0, 0 - - 0 + + 199, 53 - - MiddleLeft + + 7 - - 184, 33 - - - 0, 0 + + btnPermission - - 4 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - MiddleLeft + + panel14 - - panel6 + + 0 - - MiddleLeft + + Fill - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1194, 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0, 0, 0 - - panel9 + + 199, 53 - - 1 + + 6 - - 0, 0, 0, 0 + + panel14 - - 1 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 165, 33 + + tableLayoutPanel2 - - Fill + + 6 - + Fill - - panelEx1 - - - Home2 + + Flat - - System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 宋体, 14pt - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0 - - 2 + + 0, 0, 0, 0 - - 1594, 814 + + 201, 53 - - 6 + + 5 - - 宋体, 14pt + + btnQuit - - 6 + + Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - 2 + + panel15 - + 0 - - 1231, 0 - - - panel1 - - - panel1 - - - 199, 53 + + Fill - - 199, 53 + + 1393, 0 0, 0, 0, 0 - - MiddleCenter - - - panel1 - - - timer1 - - - panel13 - - - MiddleCenter - - - Fill - - - panel1 - - - 6 + + 201, 53 - - 168, 33 + + 7 - - 2 + + panel15 - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - RunState: - - - 1 - - - timer2 - - - 0, 0, 0, 0 - - - 199, 0 + + tableLayoutPanel2 - + 7 - - 5 - - - Bottom - - - panel1 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="panel8" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panel9" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="panel10" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="panel11" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="panel12" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="panel13" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="panel14" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="panel15" Row="0" RowSpan="1" Column="7" ColumnSpan="1" /></Controls><Columns Styles="Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5" /><Rows Styles="Percent,100" /></TableLayoutSettings> + + Top - - 126, 33 + + 0, 40 - - 4 + + 0, 0, 0, 0 - - lblMonitorFlow + + 1 - - 0 + + 1594, 53 - - 0 + + 6 - - 1 + + tableLayoutPanel2 System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 166, 33 + + $this - - 43, 33 + + 1 - + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="panel8" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panel9" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="panel10" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="panel11" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="panel12" Row="0" RowSpan="1" Column="4" ColumnSpan="1" /><Control Name="panel13" Row="0" RowSpan="1" Column="5" ColumnSpan="1" /><Control Name="panel14" Row="0" RowSpan="1" Column="6" ColumnSpan="1" /><Control Name="panel15" Row="0" RowSpan="1" Column="7" ColumnSpan="1" /></Controls><Columns Styles="Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5,Percent,12.5" /><Rows Styles="Percent,100" /></TableLayoutSettings> + + Fill 0, 0 - - panel2 - - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null - - - 0 - - - tableLayoutPanel2 - - - 4 + + 184, 33 - + 3 - - 1594, 33 - - - 168, 33 - - - Fill - - - Flat + + Monitor: - - tableLayoutPanel3 + + MiddleLeft - - 2 + + lblMonitorFlow - - 199, 53 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 宋体, 14pt + + panel7 0 - - Fill + + Left - - 3 + + 1064, 0 - - Monitor: + + 184, 33 - - Fill + + 7 - - 0, 907 + + panel7 - - panel13 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 宋体, 14pt + + panel1 - + + 0 + + Fill - + 0, 0 - - tableLayoutPanel2 + + 237, 33 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3 - - 0 + + InitializeState: - - 8 + + MiddleLeft - - 0, 0 + + lblInitializeState - - Fill + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 panel6 - - 1594, 53 + + 0 - - 331, 0 + + Left - - 0 + + 827, 0 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 237, 33 - - panel14 + + 6 - - 3 + + panel6 - - 4 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + panel1 - + 1 - - 199, 53 + + Fill - - 0 + + 0, 0 - - Right + + 126, 33 - - 宋体, 14pt + + 0 - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblMachineState" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,30,Percent,70" /><Rows Styles="Percent,100" /></TableLayoutSettings> + + MiddleCenter - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + lblMemory - - Rs.MotionPlat.BaseFormHeader, Rs.MotionPlat, Version=3.20.24.9, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel5 - + 0 - - Turnover: + + Right - - 0, 0, 0, 0 + + 1231, 0 - - 2 + + 126, 33 - - 0, 0, 0, 0 + + 5 - - 0, 0, 0, 0 + + panel5 - - Flat + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + panel1 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 - + + Fill + + 0, 0 - - 0 + + 281, 33 - - 6 + + 3 - - 111, 33 + + Turnover: - - 0, 0 + + MiddleLeft - - lblRunState + + lblTurnoverFlow - - Fill + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + panel4 - - $this + + 0 - - Flat + + Left - - $this + + 546, 0 - - 0, 0 + + 281, 33 - + 4 - - btnMain + + panel4 - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanel2 + + panel1 - - 184, 33 + + 3 - - 199, 53 + + Fill - - btnPermission + + 0, 0 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 215, 33 - - lblMemory + + 3 - - Left + + Discharge: - - tableLayoutPanel2 + + MiddleLeft - - 597, 0 + + lblDischargeFlow - - 5 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + panel3 - - 3 + + 0 - - Fill + + Left - - 8 + + 331, 0 - - 1 + + 215, 33 - - 宋体, 14pt + + 3 - - panel12 + + panel3 - - NoControl + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 398, 0 + + panel1 - - 0, 0, 0, 0 + + 4 - - panel2 + + Fill 0, 0 - - $this + + 165, 33 - + 2 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill + + RunState: - - Rs.Controls.ButtonEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + MiddleLeft - - 7 + + lblRunState - - 0, 0, 0, 0 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 199, 53 + + panelEx2 - + 0 - - lblDischargeFlow + + Left - - 宋体, 14pt + + 166, 0 - - Flat + + 165, 33 - - 199, 53 + + 2 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + panelEx2 + + + Rs.Controls.PanelEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null panel1 - - CenterScreen + + 5 - - btnRecipe + + 2 - - 201, 53 + + Fill - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 0 - - 3 + + 43, 33 + + + 0 + + + State: - - panel8 + + MiddleCenter label1 - - MiddleLeft - - - 7 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 827, 0 + + tableLayoutPanel3 - - 0, 0, 0, 0 + + 0 - + Fill - - 995, 0 + + 52, 0 - - 0, 0 + + 111, 33 - - 0, 93 + + 1 - - 2 + + Noinit - - 0, 0, 0, 0 + + MiddleLeft - - 0, 0, 0, 0 + + lblMachineState - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Flat + + tableLayoutPanel3 - - 6 + + 1 - + Left - - panel15 + + 0, 0 - - 6, 12 + + 1 - - 796, 0 + + 166, 33 - - 199, 53 + + 1 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tableLayoutPanel3 - - Left + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 237, 33 + + panel1 - - 3 + + 6 - - 1357, 0 + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblMachineState" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,30,Percent,70" /><Rows Styles="Percent,100" /></TableLayoutSettings> - - Left + + Fill - - 0, 0, 0, 0 + + 0, 0 - - 1064, 0 + + 168, 33 - - btnLanguage + + 0 + + + MiddleCenter + + + lblVersion + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 0 - - 199, 53 + + Right - - panelEx2 + + 69, 0 - - 0, 0 + + 168, 33 - - MiddleLeft + + 0 - - 281, 33 + + panel2 - - panelEx2 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel15 + + panelEx1 - - 0, 0, 0, 0 + + 0 - - Flat + + Right - - 1393, 0 + + 1357, 0 - - panel1 + + 237, 33 - - 0, 0, 0, 0 + + 0 - - 1 + + panelEx1 - - Fill + + Rs.Controls.PanelEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + + panel1 7 - - 0 + + Bottom - - 0 + + 0, 907 - - 199, 53 + + 1594, 33 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 7 - - 6 + + panel1 - - Rs.Controls.PanelEx, Rs.Controls, Version=2.20.24.4, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 0 + + $this - - panel8 + + 2 - - 197, 17 - 17, 17 107, 17 + + 197, 17 + True + + 6, 12 + + + 1594, 940 + + + CenterScreen + + + Home2 + + + timer1 + + + System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + timer2 + + + System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + timer3 + + + System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Home + + + Rs.MotionPlat.BaseFormHeader, Rs.MotionPlat, Version=3.20.24.14, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs index f97ef64..3e51cbe 100644 --- a/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs +++ b/Rs.SkyLine/SysConfig/CommonConfig.Designer.cs @@ -57,6 +57,7 @@ this.cboxEnableWorkEnviromentCheck = new System.Windows.Forms.CheckBox(); this.cboxDisableNPressCheck = new System.Windows.Forms.CheckBox(); this.cboxEnableTestFixtureFiberCheck = new System.Windows.Forms.CheckBox(); + this.cboxEnableIndexTimeStatistics = new System.Windows.Forms.CheckBox(); this.cboxRunSpace = new System.Windows.Forms.CheckBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox10 = new System.Windows.Forms.GroupBox(); @@ -115,7 +116,6 @@ this.txtControlCenterPort = new System.Windows.Forms.TextBox(); this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox(); this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox(); - this.cboxEnableIndexTimeStatistics = new System.Windows.Forms.CheckBox(); this.tableLayoutPanel1.SuspendLayout(); this.groupBox8.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -363,6 +363,13 @@ this.cboxEnableTestFixtureFiberCheck.UseVisualStyleBackColor = true; this.cboxEnableTestFixtureFiberCheck.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged); // + // cboxEnableIndexTimeStatistics + // + resources.ApplyResources(this.cboxEnableIndexTimeStatistics, "cboxEnableIndexTimeStatistics"); + this.cboxEnableIndexTimeStatistics.Name = "cboxEnableIndexTimeStatistics"; + this.cboxEnableIndexTimeStatistics.UseVisualStyleBackColor = true; + this.cboxEnableIndexTimeStatistics.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged); + // // cboxRunSpace // resources.ApplyResources(this.cboxRunSpace, "cboxRunSpace"); @@ -694,6 +701,7 @@ this.groupBox4.Controls.Add(this.cboxEnableExceptionHandlingNozzle); this.groupBox4.Controls.Add(this.cboxEnableScanBarCodeByDownCamera); resources.ApplyResources(this.groupBox4, "groupBox4"); + this.groupBox4.ForeColor = System.Drawing.Color.White; this.groupBox4.Name = "groupBox4"; this.groupBox4.TabStop = false; // @@ -814,13 +822,6 @@ this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera"; this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true; // - // cboxEnableIndexTimeStatistics - // - resources.ApplyResources(this.cboxEnableIndexTimeStatistics, "cboxEnableIndexTimeStatistics"); - this.cboxEnableIndexTimeStatistics.Name = "cboxEnableIndexTimeStatistics"; - this.cboxEnableIndexTimeStatistics.UseVisualStyleBackColor = true; - this.cboxEnableIndexTimeStatistics.CheckedChanged += new System.EventHandler(this.cbox_CheckedChanged); - // // CommonConfig // resources.ApplyResources(this, "$this"); diff --git a/Rs.SkyLine/SysConfig/CommonConfig.cs b/Rs.SkyLine/SysConfig/CommonConfig.cs index e050ea5..6af2757 100644 --- a/Rs.SkyLine/SysConfig/CommonConfig.cs +++ b/Rs.SkyLine/SysConfig/CommonConfig.cs @@ -124,13 +124,13 @@ namespace Rs.MotionPlat.SysConfig { dataGridView1.DataSource = dt; } - if (GlobalUser.IsVender()) + if (GlobalUser.IsSuper()) { - dataGridView1.Visible = true; + groupBox4.Visible = true; } else { - dataGridView1.Visible = false; + groupBox4.Visible = false; } } private void btnSaveSpeedParam_Click(object sender, EventArgs e) diff --git a/Rs.SkyLine/SysConfig/CommonConfig.resx b/Rs.SkyLine/SysConfig/CommonConfig.resx index 882c70d..75e0cfc 100644 --- a/Rs.SkyLine/SysConfig/CommonConfig.resx +++ b/Rs.SkyLine/SysConfig/CommonConfig.resx @@ -2533,7 +2533,7 @@ 4 - groupBox4 + Menu groupBox4 @@ -2623,6 +2623,6 @@ CommonConfig - Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=3.20.24.10, Culture=neutral, PublicKeyToken=null + Rs.MotionPlat.BaseForm, Rs.MotionPlat, Version=3.20.24.14, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/Rs.SkyLine/UserForm.cs b/Rs.SkyLine/UserForm.cs index d313e00..d8edca5 100644 --- a/Rs.SkyLine/UserForm.cs +++ b/Rs.SkyLine/UserForm.cs @@ -14,6 +14,8 @@ namespace Rs.MotionPlat { public partial class UserForm : BaseFormHeader { + + public event Action OnloginSuccessEvent; public UserForm() { InitializeComponent(); @@ -33,10 +35,11 @@ namespace Rs.MotionPlat { string username = cboxUsers.SelectedItem.ToString(); string userpwd = txtPassword.Text.Trim(); - if(username=="操作员") + if(username=="Op") { if(userpwd == "123") { + OnloginSuccessEvent?.Invoke(username); GlobalUser.UserLevel = EUserLevel.Op; GlobalUser.UserName = username; this.Close(); @@ -47,10 +50,11 @@ namespace Rs.MotionPlat txtPassword.Text = ""; } } - else if (username == "超级用户") + else if (username == "Admin") { if (userpwd == "lhiven@123") { + OnloginSuccessEvent?.Invoke(username); GlobalUser.UserLevel = EUserLevel.Admin; GlobalUser.UserName = username; this.Close(); @@ -61,10 +65,11 @@ namespace Rs.MotionPlat txtPassword.Text = ""; } } - else if (username == "厂商") + else if (username == "Vender") { if (userpwd == "rs@rs") { + OnloginSuccessEvent?.Invoke(username); GlobalUser.UserLevel = EUserLevel.Vender; GlobalUser.UserName = username; this.Close(); diff --git a/Rs.SkyLine/UserForm.designer.cs b/Rs.SkyLine/UserForm.designer.cs index 3801ed2..2abc524 100644 --- a/Rs.SkyLine/UserForm.designer.cs +++ b/Rs.SkyLine/UserForm.designer.cs @@ -50,13 +50,14 @@ // cboxUsers // this.cboxUsers.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(11)))), ((int)(((byte)(16)))), ((int)(((byte)(36))))); + this.cboxUsers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboxUsers.Font = new System.Drawing.Font("宋体", 15F); this.cboxUsers.ForeColor = System.Drawing.Color.White; this.cboxUsers.FormattingEnabled = true; this.cboxUsers.Items.AddRange(new object[] { - "操作员", - "超级用户", - "厂商"}); + "Op", + "Admin", + "Vender"}); this.cboxUsers.Location = new System.Drawing.Point(135, 77); this.cboxUsers.Name = "cboxUsers"; this.cboxUsers.Size = new System.Drawing.Size(172, 28); @@ -108,6 +109,7 @@ // // UserForm // + this.AcceptButton = this.btnLogin; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(389, 236);