Exemplo n.º 1
0
Arquivo: Main.cs Projeto: val7x/NHSE
        private void Main_KeyDown(object sender, KeyEventArgs e)
        {
            if (ModifierKeys != Keys.Control)
            {
#if DEBUG
                if (ModifierKeys == (Keys.Control | Keys.Alt) && e.KeyCode == Keys.D)
                {
                    DevUtil.UpdateAll();
                }
#endif
                return;
            }

            switch (e.KeyCode)
            {
            case Keys.O:
            {
                Menu_Open(sender, e);
                break;
            }

            case Keys.I:
            {
                ItemSprite.Initialize(GameInfo.GetStrings("en").itemlist);
                var items = new Item[40];
                for (int i = 0; i < items.Length; i++)
                {
                    items[i] = new Item(Item.NONE);
                }
                using var editor = new PlayerItemEditor(items, 10, 4, true);
                editor.ShowDialog();
                break;
            }

            case Keys.H:
            {
                using var editor = new SysBotRAMEdit(InjectionType.Generic);
                editor.ShowDialog();
                break;
            }

            case Keys.P:
            {
                using var editor = new SettingsEditor();
                editor.ShowDialog();
                break;
            }
            }
        }
Exemplo n.º 2
0
        private void SetUIDownloadState(bool val, bool success = false)
        {
            ControlBox          = val;
            B_Download.Enabled  = val;
            PBar_MultiUse.Value = 0;

            L_Status.Text = success ? "Images installed successfully." : string.Empty;

            CheckFileStatusLabel();

            if (success)
            {
                ItemSprite.Initialize(Core.GameInfo.GetStrings("en").itemlist);
            }

            if (File.Exists(ZipFilePath))
            {
                File.Delete(ZipFilePath);
            }
        }
Exemplo n.º 3
0
        private void Menu_Language_SelectedIndexChanged(object sender, EventArgs e)
        {
            Menu_Options.DropDown.Close();
            if ((uint)Menu_Language.SelectedIndex >= GameLanguage.LanguageCount)
            {
                return;
            }
            var lang = GameInfo.SetLanguage2Char(Menu_Language.SelectedIndex);

            this.TranslateInterface(lang);
            var settings = Settings.Default;

            settings.Language = lang;
            settings.Save();

            Task.Run(() =>
            {
                ItemSprite.Initialize(GameInfo.GetStrings("en").itemlist);
                TranslationUtil.SetLocalization(typeof(MessageStrings), lang);
                TranslationUtil.SetLocalization(GameInfo.Strings.InternalNameTranslation, lang);
            });
        }