Exemplo n.º 1
0
        private void tm_Main_Tick(object sender, EventArgs e)
        {
            ObjectisInLiquid = IsInLiquid();
            if (ObjectisInLiquid)
            {
                khoicau.DeltaY(true);
            }
            else
            {
                khoicau.DeltaY(false);
            }
            height = pnl_Board.Size.Height - (pbx_Object.Location.Y + pbx_Object.Size.Height);
            frmChart.SetData(khoicau.vt, khoicau.a, height, khoicau.time);
            SetObjectHeight();
            pbx_Object.Location = new Point(pbx_Object.Location.X, pnl_Board.Size.Height - (int)(khoicau.h * 1000) - pbx_Object.Size.Height);

            MovingArrow(ObjectisInLiquid);

            if (pbx_Object.Location.Y + pbx_Object.Size.Height > pnl_Board.Size.Height || (khoiluongriengchatlong == khoiluongriengvat && khoicau.vt == 0))
            {
                TimerStopAcction();
                AddHistory();
            }
        }