Esempio n. 1
0
        /// <summary>
        /// Настройка сервера закачек
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Setting(object sender, EventArgs e)
        {
            FormSetting form = new FormSetting(false);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
            }
            RowStateChanged();
        }
Esempio n. 2
0
        /// <summary>
        /// Событие при загрузки формы
        /// </summary>
        private void MainForm_Load(object sender, EventArgs e)
        {
            FormSetting form = new FormSetting(true);
              if (form.ShowDialog(this) == DialogResult.OK)
              {
                  block();
                  DateTime dt=DateTime.Now;
                  while (true)
                  {
                      if (!flagConnect)
                      {
                          cool();
                          break;
                      }

                      var sp = DateTime.Now- dt;
                      if (sp.Minutes == Properties.Settings.Default.timeWait)
                      {
                      MessageBox.Show(this, "Сервер не доступен, приложение будет закрыто", "Уведомление", MessageBoxButtons.OK, MessageBoxIcon.Question);

                          Close();
                          break;
                      }
                  }
              }
              else
              {
                  Close();
              }
        }