public static void ReloadLangs() { ChatPanel.ReopenChatWindows(false); ReloadEvent(null, null); Program.MainF.contactList.Items.Clear(); Program.MainF.LoadPartnerList(); }
private void okbtn_Click(object sender, EventArgs e) { ApplyingSettings = true; CurrentUser.Name = nameText.Text; CurrentUser.Message = messageText.Text; bool reopen = false; if (chatwindow.Checked && Storage.Settings["chatwindow"] == "0") { reopen = true; Storage.Settings["chatwindow"] = "1"; } else if (!chatwindow.Checked && Storage.Settings["chatwindow"] == "1") { reopen = true; Storage.Settings["chatwindow"] = "0"; } //Storage.Settings["isserver"] = isserver.Checked ? "1" : "0"; //2014.11.15. string lang = "en"; if (listView1.SelectedItems.Count != 0) //2014.10.28. - Eddig valószínűleg hiba történt a SelectedItems[0]-nál { foreach (var lng in Language.UsedLangs) { if (lng.Value.Strings.ContainsKey("currentlang") && listView1.SelectedItems[0].Text == lng.Value.Strings["currentlang"]) { lang = lng.Key; break; } } if (Storage.Settings["lang"] != lang) { Storage.Settings["lang"] = lang; //MessageBox.Show(Language.Translate("restart_needed")); //Program.Restart(true); Language.ReloadLangs(); } } if (reopen) { ChatPanel.ReopenChatWindows(true); } ApplyingSettings = false; this.Close(); }
private void okbtn_Click(object sender, EventArgs e) { ApplyingSettings = true; bool reopen = false; foreach (SettingsPanel panel in ShownPanels) //2015.05.23. { if (panel.SaveSettings()) //2015.05.23. { reopen = true; //2015.05.23. } } if (reopen) { ChatPanel.ReopenChatWindows(true); Program.MainF.ChangeChatWindowLayout(true); //2015.06.14. } ApplyingSettings = false; this.Close(); }