private void ctxMiscellaneous_Load(object sender, EventArgs e) { STR_FONTSIZE.Text = Translations.TranslationGet("STR_FONTSIZE", "DE", "Font Size"); STR_HEADING.Text = Translations.TranslationGet("STR_HEADING", "DE", "HTML Heading :"); STR_DETAIL.Text = Translations.TranslationGet("STR_DETAIL", "DE", "HTML Detail :"); STR_IMAGES.Text = Translations.TranslationGet("STR_IMAGES", "DE", "Images"); CHKBOX_SHOWICONS.Text = Translations.TranslationGet("CHKBOX_SHOWICONS", "DE", "Show Thumbs Up/Down Icons"); STR_FORMATS.Text = Translations.TranslationGet("STR_FORMATS", "DE", "Date/Time Format"); STR_DATE.Text = Translations.TranslationGet("STR_DATE", "DE", "Date :"); CHKBOX_TIMESTAMP.Text = Translations.TranslationGet("CHKBOX_TIMESTAMP", "DE", "Display Time Stamp (where applicable)"); STR_TIME.Text = Translations.TranslationGet("STR_TIME", "DE", "Time :"); STR_LBLLANG.Text = Translations.TranslationGet("STR_LBLLANG", "DE", "Language :"); STR_CAPTRANS.Text = Translations.TranslationGet("STR_CAPTRANS", "DE", "Translations"); STR_CAPTOPLIST.Text = Translations.TranslationGet("STR_CAPTOPLIST", "DE", "Top 5 Lists"); STR_LBLTOPLIST.Text = Translations.TranslationGet("STR_LBLTOPLIST", "DE", "Minimum No of Battles : "); //STR_RATINGSYSTEM.Text = Translations.TranslationGet("STR_RATINGSYSTEM", "DE", "System : "); //STR_GROUPRATINGSYSTEM.Text = Translations.TranslationGet("STR_GROUPRATINGSYSTEM", "DE", "Rating System"); Form pForm = ParentForm; PropertyFields field; ((frmSetup)pForm)._propertyFields.TryGetValue("HTMLHeaderFont", out field); txtHTMLHeading.Text = field.NewValue.ToString(); ((frmSetup)pForm)._propertyFields.TryGetValue("HTMLCellFont", out field); txtHTMLDetail.Text = field.NewValue.ToString(); ((frmSetup)pForm)._propertyFields.TryGetValue("TopMinPlayed", out field); textMinNoGames.Text = field.NewValue.ToString(); ((frmSetup)pForm)._propertyFields.TryGetValue("HTMLShowMovementPics", out field); CHKBOX_SHOWICONS.Checked = Convert.ToBoolean(field.NewValue); ((frmSetup)pForm)._propertyFields.TryGetValue("DateFormat", out field); comboDateFormat.Text = Convert.ToString(field.NewValue); ((frmSetup)pForm)._propertyFields.TryGetValue("TimeStamp", out field); CHKBOX_TIMESTAMP.Checked = Convert.ToBoolean(field.NewValue); ((frmSetup)pForm)._propertyFields.TryGetValue("TimeFormat", out field); comboTimeFormat.Text = Convert.ToString(field.NewValue); comboTimeFormat.Enabled = CHKBOX_TIMESTAMP.Checked; //((frmSetup)pForm)._propertyFields.TryGetValue("RatingSystem", out field); //comboRatingSystem.SelectedItem = Convert.ToString(field.NewValue); WOTHelper.AddToLog("Adding Languages "); foreach (KeyValuePair <string, Languages> lang in Translations.LanguageListGet().OrderBy(x => x.Value.English)) { WOTHelper.AddToLog("Adding Language: " + lang.Value.English); comboLangID.Properties.Items.Add(lang.Value.English); } ((frmSetup)pForm)._propertyFields.TryGetValue("LangID", out field); string setLangID = Convert.ToString(field.NewValue); comboLangID.SelectedItem = Translations.LanguageGet(setLangID, Language.English); }
public void LoadPage(string sURL) { WOTHelper.AddToLog("Loading Release Notes: " + sURL); oWeb.Navigate(sURL); WOTHelper.AddToLog("Loaded"); oWeb.NewWindow += new System.ComponentModel.CancelEventHandler(this.oWeb_NewWindow); oWeb.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.oWeb_Navigating); }
private void oWeb_NewWindow(object sender, CancelEventArgs e) { try { System.Diagnostics.Process.Start(oWeb.StatusText.ToString()); } catch (Exception ex) { WOTHelper.AddToLog("Cannot open Webpage: " + oWeb.StatusText.ToString() + " " + ex.Message); } e.Cancel = true; }
public void bgw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { _done = true; Thread.Sleep(1000); //########### //this.Close(); //Close(); //Application.Exit(); //########### this.Hide(); this.Close(); if (UserSettings.MinimiseonStartup == true) { WOTTrayApp sysTray = new WOTTrayApp(); sysTray.Show(); } else { if (WOTStatistics.Core.UserSettings.AppVersion != WOTStatistics.Core.UserSettings.LastReleaseNotes) { try { WOTStatistics.Core.UserSettings.LastReleaseNotes = WOTStatistics.Core.UserSettings.AppVersion; string sVersion = "ReleaseNote_" + WOTStatistics.Core.UserSettings.AppVersion.Replace(".", string.Empty) + ".htm"; ReleaseNotes oRN = new ReleaseNotes(); oRN.LoadPage(Path.Combine(WOTStatistics.Core.WOTHelper.GetApplicationData(), sVersion)); oRN.ShowDialog(); oRN.BringToFront(); } catch (Exception exrn) { WOTHelper.AddToLog("Release Notes: " + exrn.Message); } } frmMain frm = new frmMain(); WOTHelper.AddToLog("Starting Main Form..."); frm.Show(); WOTHelper.AddToLog("Starting Main Form DONE"); } _workerThread.Dispose(); this.Dispose(); }