Example #1
0
 public int onClick()
 {
     if (selected)
     {
         click = !click;
         Focus();
         Invalidate();
         if (click)
         {
             MyCash    cash  = (MyCash)this.Parent;
             ArrayList array = cash.get_RowSelected();
             if (array.Count == 1)
             {
                 FrmBanHang tmp = (FrmBanHang)cash.Parent;
                 this.Invoke(new EventHandler(tmp.changeLayout), true, null);
             }
         }
         else
         {
             MyCash    cash  = (MyCash)this.Parent;
             ArrayList array = cash.get_RowSelected();
             if (array.Count == 0)
             {
                 FrmBanHang tmp = (FrmBanHang)cash.Parent;
                 this.Invoke(new EventHandler(tmp.changeLayout), false, null);
             }
         }
     }
     return(this.id);
 }
Example #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            MyCash cash = (MyCash)this.Parent;

            if (cash.MultiSelected == false)
            {
                cash.invadiate_NonMultiSelected(this);
            }
            onClick();
            base.OnMouseDown(e);
        }