Exemple #1
0
        public void onDownloadCompleted()
        {
            string fileHash = utils.Utils.createMD5(System.IO.File.ReadAllBytes(_destinationFile));

            if (fileHash == _fileMd5)
            {
                actionButton.Text   = Properties.Strings.update_application_window_button_update;
                actionButton.Click += delegate
                {
                    System.Diagnostics.Process.Start(_destinationFile);
                    MainActivity.getInstance().terminate();
                };
            }
            else
            {
                AlertWindow.show(
                    Properties.Strings.update_application_window_error_title,
                    Properties.Strings.update_application_window_error_message,
                    closeWindow,
                    Properties.Strings.update_application_window_error_button_retry,
                    () =>
                {
                    System.IO.File.Delete(_destinationFile);
                    startDownloading();
                },
                    Properties.Strings.update_application_window_error_button_cancel,
                    closeWindow);
            }
        }
Exemple #2
0
 private void PrintButton_Click(object sender, EventArgs e)
 {
     AlertWindow.show(
         Properties.Strings.vocabulary_print_alert_title,
         Properties.Strings.vocabulary_print_alert_message,
         null,
         Properties.Strings.vocabulary_print_alert_print_text,
         printVocabulary,
         Properties.Strings.vocabulary_print_alert_save_text,
         saveVocabularyToFile);
 }