public void RefreshData(ParkingBase parkingBase) { InitDataInfo(); lblCarNo.Text = parkingBase.Car_No; lblTreatmentNo.Text = parkingBase.TREATMENT_NO; lblWorkType.Text = parkingBase.IsLoaded == 0?"出库":parkingBase.IsLoaded == 1?"入库":"未知"; lblScanCount.Text = parkingBase.LASER_COUNT.ToString(); lblParkingStatus.Text = parkingBase.PackingStatusDesc(); }
private void FrmParkingDetail_Load(object sender, EventArgs e) { lblCarNo.Text = packingInfo.Car_No; lblCarStatus.Text = packingInfo.PackingStatusDesc(); lblPacking.Text = packingInfo.ParkingName; lblCarType.Text = ParkingInfo.getStowageCarType(packingInfo.STOWAGE_ID); ParkingInfo.dgvStowageMessage(packingInfo.STOWAGE_ID, dgvStowageMessage); ParkingInfo.dgvStowageOrder(packingInfo.ParkingName, dgvCraneOder); ShiftStowageMessage(); this.Deactivate += new EventHandler(frmSaddleDetail_Deactivate); }
public void refreshControl(ParkingBase theParkingBase, long baySpaceX, long baySpaceY, int panelWidth, int panelHeight, bool xAxisRight, bool yAxisDown) { try { parkingInfo = theParkingBase; //取这块小区的大小 //double X_Width = theArea.X_End - theArea.X_Start; //double Y_Height = theArea.Y_End - theArea.Y_Start; //计算X方向上的比例关系 double xScale = Convert.ToDouble(panelWidth) / Convert.ToDouble(baySpaceX); //计算控件行车中心X,区分为X坐标轴向左或者向右 double location_X = 0; if (xAxisRight == true) { //location_X = Convert.ToDouble((theSaddle.X_Center - theSaddle.CarWidth / 2) - theArea.X_Start) * xScale; location_X = Convert.ToDouble(theParkingBase.X_START) * xScale; } else { location_X = Convert.ToDouble(baySpaceX - theParkingBase.X_END) * xScale; } //计算Y方向的比例关系 double yScale = Convert.ToDouble(panelHeight) / Convert.ToDouble(baySpaceY); //计算行车中心Y 区分Y坐标轴向上或者向下 double location_Y = 0; if (yAxisDown == true) { //location_Y = ((theSaddle.Y_Center - theSaddle.CarLength / 2) - theArea.Y_Start) * yScale; location_Y = Convert.ToDouble(theParkingBase.Y_START) * yScale; } else { location_Y = Convert.ToDouble(baySpaceY - theParkingBase.Y_END) * yScale; } //修改鞍座控件的宽度和高度 this.Width = Convert.ToInt32(theParkingBase.CarWidth * xScale); this.Height = Convert.ToInt32(theParkingBase.CarLength * yScale); //定位库位鞍座的坐标 this.Location = new Point(Convert.ToInt32(location_X), Convert.ToInt32(location_Y)); ///5: 无车 ///10:有车到达 ///110:激光扫描开始 ///120:入库激光扫描完成 ///130:入库手持扫描完成 ///210:出库激光扫描开始 ///220:出库激光扫描完成 ///东:E 西:W if (theParkingBase.PackingStatus == 5) { this.Visible = true; //this.BackColor = Color.Red; if (this.Height > this.Width) { this.BackgroundImage = global::UACSControls.Resource1.SCarEmpty; } else { this.BackgroundImage = global::UACSControls.Resource1._1; } } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "E" && theParkingBase.IsLoaded == 0) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1._1; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "W" && theParkingBase.IsLoaded == 0) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1._3; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "E" && theParkingBase.IsLoaded == 1) { this.Visible = true; // this.BackgroundImage = global::UACSControls.Resource1._2; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "W" && theParkingBase.IsLoaded == 1) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1._4; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "S" && theParkingBase.IsLoaded == 0) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1.SCarEmpty; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "S" && theParkingBase.IsLoaded == 1) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1.SCarWeight; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "N" && theParkingBase.IsLoaded == 0) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1.NCarEmpty; } else if (theParkingBase.PackingStatus != 5 && theParkingBase.HeadPostion == "N" && theParkingBase.IsLoaded == 1) { this.Visible = true; this.BackgroundImage = global::UACSControls.Resource1.NCarWeight; } else { this.Visible = false; } toolTip1.IsBalloon = true; toolTip1.ReshowDelay = 0; toolTip1.SetToolTip(this, "停车位:" + theParkingBase.ParkingName + "\n" + "状态:" + theParkingBase.PackingStatusDesc() + "\n" + "车号:" + theParkingBase.Car_No ); } catch (Exception er) { throw; } }