private bool AddMarkInner(MarkItem item) { for (int i = this.CurrentMarkList.get_Count() - 1; i > -1; i--) { if (item.MarkOfDB <= this.CurrentMarkList.get_Item(i).MarkOfDB) { return false; } if (i == 0) { this.CurrentMarkList.Insert(0, item); return true; } if (item.MarkOfDB <= this.CurrentMarkList.get_Item(i - 1).MarkOfDB) { this.CurrentMarkList.Insert(i, item); return true; } } if (this.CurrentMarkList.get_Count() > 10) { return false; } this.CurrentMarkList.Insert(this.CurrentMarkList.get_Count(), item); return true; }
private bool AddMarkInner(MarkItem item) { for (int i = this.CurrentMarkList.get_Count() - 1; i > -1; i--) { if (item.MarkOfDB <= this.CurrentMarkList.get_Item(i).MarkOfDB) { return(false); } if (i == 0) { this.CurrentMarkList.Insert(0, item); return(true); } if (item.MarkOfDB <= this.CurrentMarkList.get_Item(i - 1).MarkOfDB) { this.CurrentMarkList.Insert(i, item); return(true); } } if (this.CurrentMarkList.get_Count() > 10) { return(false); } this.CurrentMarkList.Insert(this.CurrentMarkList.get_Count(), item); return(true); }
public MarkesView(MarkItem item, int index) { this.No = string.Format("NO.{0}", index); base.Name = item.Name; base.MarkOfDB = item.MarkOfDB; base.MarkedTime = item.MarkedTime; }
public bool AddMark(MarkItem item) { lock (this.CurrentMarkList) { if (this.AddMarkInner(item)) { this.CutLgMaxMarkCount(); return true; } return false; } }
public bool AddMark(MarkItem item) { lock (this.CurrentMarkList) { if (this.AddMarkInner(item)) { this.CutLgMaxMarkCount(); return(true); } return(false); } }