Пример #1
0
 void notifyIcon1_BalloonTipClicked(object sender, EventArgs e)
 {
     if (updateflag == 1)
     {
         updateflag = 0; /* Reset the flag */
         System.Diagnostics.Process.Start(UpdateChecker.SHELL_URL);
     }
     else if (updateflag == 2)
     {
         updateflag = 0;
         var download = new DownloadProgress();
         var dg       = download.ShowDialog();
         if (dg == DialogResult.Abort || dg == DialogResult.Cancel)
         {
             MessageBox.Show(I18N.GetString("download fail!"), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         controller.RestartCore();
     }
     else if (updateflag == 3)
     {
         updateflag = 0;
         System.Diagnostics.Process.Start(UpdateChecker.SHELL_URL);
         var download = new DownloadProgress();
         var dg       = download.ShowDialog();
         if (dg == DialogResult.Abort || dg == DialogResult.Cancel)
         {
             MessageBox.Show(I18N.GetString("download fail!"), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         controller.RestartCore();
     }
 }
Пример #2
0
 void notifyIcon1_BalloonTipClicked(object sender, EventArgs e)
 {
     if (updateflag == 1)
     {
         updateflag = 0;
         var download = new DownloadProgress(1);
         download.ShowDialog();
         //if (dg == DialogResult.Abort || dg == DialogResult.Cancel) MessageBox.Show(I18N.GetString("download fail!"), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else if (updateflag == 2)
     {
         updateflag = 0;
         var download = new DownloadProgress(2);
         download.ShowDialog();
         controller.RestartCore();
     }
     else if (updateflag == 3)
     {
         updateflag = 0;
         var download = new DownloadProgress(3);
         download.ShowDialog();
         controller.RestartCore();
     }
 }