// public void DeInitPlugin() { _isPluginEnabled = false; _frmOverlay.Hide(); _frmOverlay = null; SaveSettings(); _isInitSetting = false; _actTabPage = null; if (_actLabelStatus != null) { _actLabelStatus.Text = Localization.GetText("l-plugin-stopped"); _actLabelStatus = null; } PacketWorker.EndMachina(); MsgLog.SetTextBox(null); }
// private void BtnReconnect_Click(object sender, EventArgs e) { PacketWorker.BeginMachina(); }
// 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; }