Esempio n. 1
0
        private async void initTimer(string timeLeft)
        {
            string[] timeLeftArray = timeLeft.Split(':');
            leftSeconds = short.Parse(timeLeftArray[0]) * 3600 + short.Parse(timeLeftArray[1]) * 60
                          + short.Parse(timeLeftArray[2]);

            var progress = new Progress <string>(s => label2.Text = s);
            await Task.Factory.StartNew(() => timer(progress),
                                        TaskCreationOptions.LongRunning);

            if (leftSeconds.Equals(0))
            {
                MessageBox.Show("Время, отведённое на прохождения опроса закончилось. Опрос будет закрыт.",
                                "Внимание", MessageBoxButtons.OK);
                passingUC.closeUC();
            }
        }
Esempio n. 2
0
 private void pictureBox3_Click(object sender, EventArgs e)
 {
     passingUC.closeUC();
 }
Esempio n. 3
0
 private void button2_Click(object sender, EventArgs e)  // close
 {
     passingUC.closeUC();
 }