Пример #1
0
 /// <summary>
 /// The handler for when the dictionary loader changes progress. Changes the progress value of the progress bar.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DictionaryLoader_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (!Pb1.Visible)
     {
         Pb1.Show();
     }
     Pb1.Value = e.ProgressPercentage;
 }
Пример #2
0
 /// <summary>
 /// Helper method that should be called from the main thread prior to starting the background dictionary loader
 /// </summary>
 /// <param name="postSave">True to save the dictionary after loading</param>
 private void PreDictionaryLoader(bool postSave)
 {
     Pb1.Value = 0;
     Pb1.Show();
     LabelDictionaryStatus.Text = DICT_STATUS_LABEL_PROMPT + "Loading...";
     LabelDictionaryStatus.Show();
     MenuItemDictionary.Enabled = false;
     _saveWhenFinished          = postSave;
 }