// private void ReadGameData(Localization.Locale gamelang = null) { Localization.Locale lang = gamelang ?? (Localization.Locale)cboGameLanguage.SelectedItem; if (_localeGame == null || !lang.Code.Equals(_localeGame.Code)) { _localeGame = lang; string json; switch (lang.Index) { case 1: json = Properties.Resources.gamedata_ja; break; case 2: json = Properties.Resources.gamedata_de; break; case 3: json = Properties.Resources.gamedata_fr; break; case 4: json = Properties.Resources.gamedata_ko; break; default: json = Properties.Resources.gamedata_en; break; } GameData.Initialize(json); MsgLog.I("i-data-version", GameData.Version, GameData.Areas.Count, GameData.Instances.Count, GameData.Roulettes.Count, GameData.Fates.Count); } }
// private void CboLogBackground_SelectedValueChanged(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(cboLogBackground.Text) && !cboLogBackground.Text.Equals(Color.Transparent.Name)) { rtxLogger.BackColor = Color.FromName(cboLogBackground.Text); MsgLog.I("i-selected-color", cboLogBackground.Text); } }
// private void ActInitialize() { if (_isInActInit) { return; } _isInActInit = true; MsgLog.SetTextBox(rtxLogger); ActGlobals.oFormActMain.Shown -= OFormActMain_Shown; Localization.Locale defaultlocale = Localization.DefaultLocale; ReadLocale(defaultlocale); #if DEBUG && false MsgLog.D("ui-dbg", System.Environment.CurrentDirectory); MsgLog.D("ui-dbg", Settings.PluginPath); #endif ReadGameData(defaultlocale); _isPluginEnabled = true; cboUiLanguage.DataSource = Localization.Locales.Clone(); cboUiLanguage.DisplayMember = "Name"; cboUiLanguage.ValueMember = "Code"; cboGameLanguage.DataSource = Localization.Locales.Clone(); cboGameLanguage.DisplayMember = "Name"; cboGameLanguage.ValueMember = "Code"; cboClientVersion.DataSource = GameData.ClientVersions.Clone(); cboClientVersion.DisplayMember = "Name"; cboClientVersion.ValueMember = "Value"; cboClientVersion.SelectedIndex = 0; Dock = DockStyle.Fill; _actLabelStatus.Text = "Initializing..."; UpdateUiLanguage(); _actLabelStatus.Text = Localization.GetText("l-plugin-started"); _actTabPage.Text = Localization.GetText("app-name"); _actTabPage.Controls.Add(this); _srset = new SettingsSerializer(this); ReadSettings(); UpdateFates(); // string tagname = Settings.GetTagNameForUpdate(); if (!Settings.TagName.Equals(tagname)) { MsgLog.I("i-client-updated", tagname); if (!txtUpdateSkip.Text.Equals(tagname)) { Task.Run(() => { var res = MessageBox.Show( Localization.GetText("i-visit-updated"), Localization.GetText("app-name"), MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (res == DialogResult.Yes) { Process.Start("https://github.com/purutu/ACT.DFAssist/releases/latest"); } else { txtUpdateSkip.Text = tagname; SaveSettings(); } }); } } // PacketWorker.OnEventReceived += PacketWorker_OnEventReceived; PacketWorker.BeginMachina(); _isInActInit = false; }