コード例 #1
0
 public void invadiate_NonMultiSelected(MyItem item)
 {
     if (item.Add)
     {
         for (int k = 1; k <= hash.Count; k++)
         {
             MyItem tmp = (MyItem)hash[k];
             if (tmp.Add)
             {
                 if (tmp.Id == item.Id)
                 {
                     tmp.Set_selected(true);
                 }
                 else
                 {
                     tmp.Set_selected(false);
                     tmp.Click = false;
                 }
                 tmp.Invalidate();
             }
         }
     }
 }
コード例 #2
0
ファイル: MyCash.cs プロジェクト: hpbaotho/thanhtuan
 public void addRow(string mota, string sl, string gia)
 {
     position ++;
     if(position> pos_scroll_end)
     {
         if(position>i)
         {
             i++;
             MyItem item = new MyItem(myItem1.Width,myItem1.Height);
             item.Text = "myitems" + i;
             item.Name = item.Text;
             item.addRow(i, mota, sl, gia);
             item.Set_selected();
             hash.Add(position, item);
         }
         else
         {
             MyItem tmp = findRow(position);
             tmp.addRow(tmp.Id, mota, sl, gia);
             tmp.Set_selected();
             hash.Remove(position);
             hash.Add(position, tmp);
         }
     }
     else
     {
         MyItem tmp = findRow(position);
         tmp.addRow(position, mota, sl, gia);
         tmp.Set_selected();
         hash.Remove(position);
         hash.Add(position, tmp);
     }        
 }