async void OnTapped(Parm tt2)
        {
            QID = tt2.Q_id;
            ImageButton ck  = tt2.Ctk;
            StackLayout man = tt2.Stk_main;
            await ck.FadeTo(0.7, 100);

            await ck.FadeTo(1, 200);

            DataRow[] fr = AddExam.dt_selectQ.Select("q_id=" + QID);
            if (fr.Length == 0)
            {
                AddExam.dt_selectQ.Rows.Add(QID);
                ck.Source           = "choseok.png";
                man.BackgroundColor = Color.FromHex("#EBFFF3");
                AddExam.mark_qus    = AddExam.mark_qus + tt2.Q_mark;
            }
            if (fr.Length == 1)
            {
                DataRow[] fr2 = AddExam.dt_selectQ.Select();
                for (int i = 0; i < fr2.Length; i++)
                {
                    if (Convert.ToInt32(fr[i]["q_id"].ToString()) == QID)
                    {
                        AddExam.dt_selectQ.Rows.RemoveAt(i);
                        break;
                    }
                }
                ck.Source           = "choseno.png";
                man.BackgroundColor = Color.White;
                AddExam.mark_qus    = AddExam.mark_qus - tt2.Q_mark;
            }
        }
Exemplo n.º 2
0
        protected virtual async Task EnableStartButton(int fadeTimeMillis = 80)
        {
            AnimateOnMain(async() =>
            {
                startAerateButton.IsVisible = true;
                await stopAerateButton.FadeTo(0, (uint)fadeTimeMillis);
                await startAerateButton.FadeTo(1.0d, (uint)fadeTimeMillis);
            });
            await Task.Delay(fadeTimeMillis);

            AnimateOnMain(() =>
            {
                stopAerateButton.IsEnabled  = false;
                stopAerateButton.IsVisible  = false;
                startAerateButton.IsEnabled = true;
            });
        }
Exemplo n.º 3
0
        private async void ImageButton_PressedAsync(object sender, EventArgs e)
        {
            await ImageButton.FadeTo(0.5, 300).ConfigureAwait(false);

            await ImageButton.FadeTo(1, 300).ConfigureAwait(false);
        }