/// <summary> /// 设置状态栏值 /// </summary> /// <param name="obj"></param> private void SetStatusStripValue() { int nSum = 0; int nOccupy = 0; int nSpace = 0; int nMaxSpace = 0; string strSumDescp = "("; string strOccupyDescp = "("; string strSpaceDescp = "("; string strMaxSpaceDescp = "("; int i = 1; QueryServiceClient proxy = new QueryServiceClient(); foreach (object obj in CStaticClass.ConfigLstWareHouse()) { if (typeof(int) != obj.GetType()) { continue; } Rectangle rect = new Rectangle(); proxy.GetCarPOSNFreeOccupyCount((int)obj, ref rect); nSum += rect.X; nOccupy += rect.Y; nSpace += rect.Width; nMaxSpace += rect.Height; string strFlag = ";"; if (i++ == m_ltpWareHouse.Count) { strFlag = ")"; } string strWareHouse = CStaticClass.ConvertWareHouse((int)obj); strSumDescp += strWareHouse + ":" + rect.X + strFlag; strOccupyDescp += strWareHouse + ":" + rect.Y + strFlag; strSpaceDescp += strWareHouse + ":" + rect.Width + strFlag; strMaxSpaceDescp += strWareHouse + ":" + rect.Height + strFlag; } if (2 > m_ltpWareHouse.Count) {// 只有一个库时 strSumDescp = string.Empty; strOccupyDescp = string.Empty; strSpaceDescp = string.Empty; strMaxSpaceDescp = string.Empty; } this.TsslSumTxt.Text = nSum.ToString() + strSumDescp; this.TsslOccupyTxt.Text = nOccupy.ToString() + strOccupyDescp; this.TsslSpaceTxt.Text = nSpace.ToString() + strSpaceDescp; this.TsslSpaceMaxTxt.Text = nMaxSpace.ToString() + strMaxSpaceDescp; }