/// <summary> /// 计算时间总加 /// </summary> public void TimeSum()//计算时间总加 { ListFlow.Clear(); TimeTol = 0; foreach (CLayer nLay in ListLayer) { nLay.TimeSum(); CFlow nF = new CFlow(); nF.LayName = nLay.Name; nF.LayIndex = ListLayer.IndexOf(nLay); nF.iCyc = nLay.iCyc; nF.iIndex = nLay.iIndex; nF.TimeTol = nLay.TimeTol; for (int i = 0; i < nLay.iCyc; i++) { CFlow nCF = nF.Clone(); nCF.PresCyc = i; ListFlow.Insert(ListFlow.Count - (nF.iCyc - 1 - i) * (nF.iIndex - 1), nCF); TimeTol += nLay.TimeTol; } } for (int i = 1; i < ListFlow.Count; i++) { ListFlow[i].TimeRunTol = ListFlow[i - 1].TimeRunTol + ListFlow[i - 1].TimeTol; } }
public Double TimeRunTol = 0;//已运行总时间,就是前面所有层的时间总加 public CFlow Clone() { CFlow obj = (CFlow)this.MemberwiseClone(); return(obj); }