Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 public bool AddMark(MarkItem item)
 {
     lock (this.CurrentMarkList)
     {
         if (this.AddMarkInner(item))
         {
             this.CutLgMaxMarkCount();
             return true;
         }
         return false;
     }
 }
Esempio n. 5
0
 public bool AddMark(MarkItem item)
 {
     lock (this.CurrentMarkList)
     {
         if (this.AddMarkInner(item))
         {
             this.CutLgMaxMarkCount();
             return(true);
         }
         return(false);
     }
 }