|  | @@ -100,7 +100,16 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      var rgvsatatus = new RGVSatatus();
 | 
	
		
			
				|  |  |                      rgvsatatus.RGVName = item;
 | 
	
		
			
				|  |  | -                    int index = Convert.ToInt32(item.Substring(3, 1).ToString());
 | 
	
		
			
				|  |  | +                    int index;                    
 | 
	
		
			
				|  |  | +                    if (item.Length > 4)
 | 
	
		
			
				|  |  | +                    {
 | 
	
		
			
				|  |  | +                         index = Convert.ToInt32(item.Substring(3, 2).ToString());
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    else
 | 
	
		
			
				|  |  | +                    {
 | 
	
		
			
				|  |  | +                         index = Convert.ToInt32(item.Substring(3, 1).ToString());
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    
 | 
	
		
			
				|  |  |                      rgvsatatus.G = (PictureBox)FindControl("GV" + index);
 | 
	
		
			
				|  |  |                      rgvsatatus.RGVMode = (Label)FindControl("rgvMode" + index);
 | 
	
		
			
				|  |  |                      rgvsatatus.RGVStatus = (Label)FindControl("rgvStatus" + index);
 | 
	
	
		
			
				|  | @@ -297,10 +306,10 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                          ////状态
 | 
	
		
			
				|  |  |                          rgvstatus.RGVStatus.Text = item.D521.SystemStatus.ToString();
 | 
	
		
			
				|  |  | -                        ////任务Id
 | 
	
		
			
				|  |  | +                        //任务Id
 | 
	
		
			
				|  |  |                          if (item.D521.TaskID_1.ToString().Length > 3)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  | -                            rgvstatus.RGVOrdId.Text = item.D521.TaskID_1.ToString();
 | 
	
		
			
				|  |  | +                            //rgvstatus.RGVOrdId.Text = item.D521.TaskID_1.ToString();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                              //作业类型
 | 
	
		
			
				|  |  |                              rgvstatus.RGVOptType.Text = item.D521.TaskType_1.ToString();
 | 
	
	
		
			
				|  | @@ -313,7 +322,7 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else if (item.D521.TaskID_2.ToString().Length > 3)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  | -                            rgvstatus.RGVOrdId.Text = item.D521.TaskID_2.ToString();
 | 
	
		
			
				|  |  | +                            //rgvstatus.RGVOrdId.Text = item.D521.TaskID_2.ToString();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                              //作业类型
 | 
	
		
			
				|  |  |                              rgvstatus.RGVOptType.Text = item.D521.TaskType_2.ToString();
 | 
	
	
		
			
				|  | @@ -325,18 +334,50 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              rgvstatus.RGVPosTo.Text = item.D521.DestPosition_2.ToString();
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else
 | 
	
		
			
				|  |  | -                            rgvstatus.RGVOrdId.Text = item.D521.TaskID_1.ToString();
 | 
	
		
			
				|  |  | +                        {
 | 
	
		
			
				|  |  | +                            rgvstatus.RGVOrdId.Text = "";//item.D521.TaskID_1.ToString();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            //作业类型
 | 
	
		
			
				|  |  | +                            rgvstatus.RGVOptType.Text = item.D521.TaskType_1.ToString();
 | 
	
		
			
				|  |  | +                                                            //当前位置
 | 
	
		
			
				|  |  | +                                                            //rgvstatus.RGVPosCurr.Text = item.D521.Position.ToString();
 | 
	
		
			
				|  |  | +                                                            //起始位置
 | 
	
		
			
				|  |  | +                            rgvstatus.RGVPosFrom.Text = ""; //item.D521.StartPosition_1.ToString();
 | 
	
		
			
				|  |  | +                                                            //目标位置
 | 
	
		
			
				|  |  | +                            rgvstatus.RGVPosTo.Text = item.D521.DestPosition_1.ToString();
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                        var control = FindControl(item.Code);
 | 
	
		
			
				|  |  | +                        if (control != null)
 | 
	
		
			
				|  |  | +                        {
 | 
	
		
			
				|  |  | +                            if (control is Conveyor_R)
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                var con = (Conveyor_R)control;
 | 
	
		
			
				|  |  | +                                con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  | +                                if (item.D523.Fault != 0) con.BackColor = Color.Red;
 | 
	
		
			
				|  |  | +                                else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | +                                else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | +                                if (item.D521.Status_1.HasFlag(WCS.Entity.Protocol.RGVStatus.光电))
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                    {
 | 
	
		
			
				|  |  | +                                        con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor_R.png");//1009L1.png
 | 
	
		
			
				|  |  | +                                        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                                else
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    if (con.button1.Tag.ToString() != "empty")
 | 
	
		
			
				|  |  | +                                    {
 | 
	
		
			
				|  |  | +                                        con.button1.BackgroundImage = Image.FromFile("Resources/1009L1.png");//1009L1.png
 | 
	
		
			
				|  |  | +                                        con.button1.Tag = "empty";
 | 
	
		
			
				|  |  | +                                    }
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                        //作业类型
 | 
	
		
			
				|  |  | -                        rgvstatus.RGVOptType.Text = item.D521.TaskType_1.ToString();
 | 
	
		
			
				|  |  | -                        //当前位置
 | 
	
		
			
				|  |  | -                        //rgvstatus.RGVPosCurr.Text = item.D521.Position.ToString();
 | 
	
		
			
				|  |  | -                        //起始位置
 | 
	
		
			
				|  |  | -                        rgvstatus.RGVPosFrom.Text = item.D521.StartPosition_1.ToString();
 | 
	
		
			
				|  |  | -                        //目标位置
 | 
	
		
			
				|  |  | -                        rgvstatus.RGVPosTo.Text = item.D521.DestPosition_1.ToString();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                        //var control = FindControl("con" + item.Code);
 | 
	
		
			
				|  |  |                          //if (control != null)
 | 
	
		
			
				|  |  |                          //{
 | 
	
		
			
				|  |  |                          //    if (control is Conveyor6)
 | 
	
	
		
			
				|  | @@ -400,22 +441,22 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  |                              else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  |                              con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  | -                            //if (item.D521.PH_STATUS == true)
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/Rgv02.png");
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | -                            //else
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "empty")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/shelf16UD.png");
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "empty";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | +                            if (item.D521.Status.HasFlag(WCS.Entity.Protocol.IstationStatus.光电状态))
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor.png");
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                            else
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "empty")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/shelf16UD.png");
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "empty";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          #region condition
 | 
	
		
			
				|  |  |                          else if (control is Conveyor_L)
 | 
	
	
		
			
				|  | @@ -423,16 +464,16 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              var con = (Conveyor_L)control;
 | 
	
		
			
				|  |  |                              con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  |                              if (item.D523.Alarm != 0) con.BackColor = Color.Red;
 | 
	
		
			
				|  |  | -                            //else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | -                            //else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | -                            //if (item.D521.PH_STATUS == true)
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor_L.png");//1009L11.png
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | +                            else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | +                            else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | +                            if (item.D521.Status.HasFlag(WCS.Entity.Protocol.IstationStatus.光电状态))
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor_L.png");//1009L11.png
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                              else
 | 
	
		
			
				|  |  |                              {
 | 
	
		
			
				|  |  |                                  if (con.button1.Tag.ToString() != "empty")
 | 
	
	
		
			
				|  | @@ -447,16 +488,16 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              var con = (Conveyor_R)control;
 | 
	
		
			
				|  |  |                              con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  |                              if (item.D523.Alarm != 0) con.BackColor = Color.Red;
 | 
	
		
			
				|  |  | -                            //else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | -                            //else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | -                            //if (item.D521.PH_STATUS == true)
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor_R.png");//1009L1.png
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | +                            else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | +                            else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | +                            if (item.D521.Status.HasFlag(WCS.Entity.Protocol.IstationStatus.光电状态))
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor_R.png");//1009L1.png
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                              else
 | 
	
		
			
				|  |  |                              {
 | 
	
		
			
				|  |  |                                  if (con.button1.Tag.ToString() != "empty")
 | 
	
	
		
			
				|  | @@ -471,16 +512,16 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              var con = (Conveyor3_A)control;
 | 
	
		
			
				|  |  |                              con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  |                              if (item.D523.Alarm != 0) con.BackColor = Color.Red;
 | 
	
		
			
				|  |  | -                            //else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | -                            //else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | -                            //if (item.D521.PH_STATUS == true)
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor3_A_Box.png");//Conveyor3_A_Box.png
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | +                            else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | +                            else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | +                            if (item.D521.Status.HasFlag(WCS.Entity.Protocol.IstationStatus.光电状态))
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/Conveyor3_A_Box.png");//Conveyor3_A_Box.png
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                              else
 | 
	
		
			
				|  |  |                              {
 | 
	
		
			
				|  |  |                                  if (con.button1.Tag.ToString() != "empty")
 | 
	
	
		
			
				|  | @@ -495,16 +536,16 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |                              var con = (Conveyor3_B)control;
 | 
	
		
			
				|  |  |                              con.button1.Text = item.Code.ToString();
 | 
	
		
			
				|  |  |                              if (item.D523.Alarm != 0) con.BackColor = Color.Red;
 | 
	
		
			
				|  |  | -                            //else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | -                            //else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | -                            //if (item.D521.PH_STATUS == true)
 | 
	
		
			
				|  |  | -                            //{
 | 
	
		
			
				|  |  | -                            //    if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | -                            //    {
 | 
	
		
			
				|  |  | -                            //        con.button1.BackgroundImage = Image.FromFile("Resources/1009R1_B.png");//1009R1_A.png
 | 
	
		
			
				|  |  | -                            //        con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | -                            //    }
 | 
	
		
			
				|  |  | -                            //}
 | 
	
		
			
				|  |  | +                            else if (item.D523.Status == 0) con.BackColor = Color.Yellow;
 | 
	
		
			
				|  |  | +                            else con.BackColor = Color.FromArgb(0, 144, 154);
 | 
	
		
			
				|  |  | +                            if (item.D521.Status.HasFlag(WCS.Entity.Protocol.IstationStatus.光电状态))
 | 
	
		
			
				|  |  | +                            {
 | 
	
		
			
				|  |  | +                                if (con.button1.Tag.ToString() != "pall")
 | 
	
		
			
				|  |  | +                                {
 | 
	
		
			
				|  |  | +                                    con.button1.BackgroundImage = Image.FromFile("Resources/1009R1_B.png");//1009R1_A.png
 | 
	
		
			
				|  |  | +                                    con.button1.Tag = "pall";
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                              else
 | 
	
		
			
				|  |  |                              {
 | 
	
		
			
				|  |  |                                  if (con.button1.Tag.ToString() != "empty")
 | 
	
	
		
			
				|  | @@ -653,6 +694,11 @@ namespace WCS_Client.Frm
 | 
	
		
			
				|  |  |          private void con2035_Load(object sender, EventArgs e)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        private void p_Load(object sender, EventArgs e)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public class DDJSatatus
 |