Esempio n. 1
0
        //
        private void ReadGame(Mesg.Locale locale = null)
        {
            Mesg.Locale loc = locale ?? (Mesg.Locale)cboGameLanguage.SelectedItem;

            if (_localeGame == null || !loc.Code.Equals(_localeGame.Code))
            {
                _localeGame = loc;

                string json;
                switch (loc.Code)
                {
                case "ja": json = Properties.Resources.dfas_ja; break;

                //case "de": json = Properties.Resources.dfas_de; break;
                //case "fr": json = Properties.Resources.dfas_fr; break;
                case "ko": json = Properties.Resources.dfas_ko; break;

                default: json = Properties.Resources.dfas_en; break;
                }
                GameData.Initialize(json);

                Mesg.I("i-data-version",
                       GameData.Areas.Count, GameData.Instances.Count,
                       GameData.Roulettes.Count, GameData.Fates.Count,
                       Settings.TagName);
            }
        }
Esempio n. 2
0
        //
        private void CboClientVersion_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!_isPluginEnabled)
            {
                return;
            }

            if (cboClientVersion.SelectedIndex < 0)
            {
                return;
            }

            try
            {
                var v = GameVersion.Versions[cboClientVersion.SelectedIndex];
                Mesg.I("i-client-version", string.Format("이전={0}, 변경={1}", Settings.ClientVersion, v.Index));

                if (Settings.ClientVersion != v.Index)
                {
                    Settings.ClientVersion = v.Index;
                    txtClientVersion.Text  = v.Index.ToString();

                    GamePacket.Current = GamePacket.Versions[v.Index];

                    Mesg.I("i-client-version", $"{v.Name}, {GamePacket.Current.OpFate:X4}/{GamePacket.Current.OpDuty:X4}/{GamePacket.Current.OpMatch:X4}");
                    SaveSettings();
                }
            }
            catch
            {
            }
        }
Esempio n. 3
0
        // FFXIV 플러그인: 장소 변경
        public void OnFFXIVZoneChanged(uint zoneId, string zoneName)
        {
#if DEBUG
            Mesg.I($"장소 바뀜: {zoneId}/{zoneName}");
#endif
            _frmOverlay.EventNone();
        }
Esempio n. 4
0
 //
 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);
         Mesg.I("i-selected-color", cboLogBackground.Text);
     }
 }
Esempio n. 5
0
        //
        private void ActInitialize()
        {
            if (_isInActInit)
            {
                return;
            }

            //
            _isInActInit = true;

            Mesg.SetTextBox(rtxLogger);
            ActGlobals.oFormActMain.Shown -= OFormActMain_Shown;

            ReadMesg();
            ReadGame();

            //
            _actLabelStatus.Text = "Initializing...";

            Dock = DockStyle.Fill;

            UpdateUiLanguage();

            _actLabelStatus.Text = Mesg.GetText("l-plugin-started");
            _actTabPage.Text     = Mesg.GetText("app-name");
            _actTabPage.Controls.Add(this);

            //
            _isPluginEnabled = true;

            //
            _srset = new SettingsSerializer(this);
            ReadSettings();
            UpdateFates();

            //
            string tagname = Settings.GetTagNameForUpdate();

            //if (!Settings.TagName.Equals(tagname))
            if (long.Parse(Settings.TagName) < long.Parse(tagname))
            {
                Mesg.I("i-client-updated", tagname);

                if (!txtUpdateSkip.Text.Equals(tagname))
                {
                    Task.Run(() =>
                    {
                        var res = MessageBox.Show(
                            Mesg.GetText("i-visit-updated"),
                            Mesg.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();
                        }
                    });
                }
            }

            //
            _isInActInit = false;
        }