mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-01 06:24:39 -05:00
jp/en/zh -- only english has been translated (duh) keep in mind this translates the text in the program, not the internal flag names. not sure if other languages need to be supported; from PKHeX's experience, only spanish is updated (besides jp/zh), as most users speak english or are fine using the program in english. pls localize villager names and item names for non-english :P -- preferrably automated from raw game dumps
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
using NHSE.Core;
|
|
using NHSE.Injection;
|
|
|
|
namespace NHSE.WinForms
|
|
{
|
|
public partial class SysBotRAMEdit : Form
|
|
{
|
|
private readonly SysBotController Bot;
|
|
|
|
public SysBotRAMEdit(InjectionType type)
|
|
{
|
|
InitializeComponent();
|
|
this.TranslateInterface(GameInfo.CurrentLanguage);
|
|
Bot = new SysBotController(type);
|
|
RamOffset.Text = Bot.GetDefaultOffset().ToString("X8");
|
|
|
|
TB_IP.Text = Bot.IP;
|
|
TB_Port.Text = Bot.Port;
|
|
Bot.PopPrompt();
|
|
}
|
|
|
|
private void B_Connect_Click(object sender, EventArgs e)
|
|
{
|
|
if (!Bot.Connect(TB_IP.Text, TB_Port.Text))
|
|
return;
|
|
GB_Inject.Enabled = true;
|
|
}
|
|
|
|
private void B_Edit_Click(object sender, EventArgs e)
|
|
{
|
|
var offset = StringUtil.GetHexValue(RamOffset.Text);
|
|
if (offset == 0)
|
|
{
|
|
WinFormsUtil.Error(MessageStrings.MsgInvalidHexValue);
|
|
return;
|
|
}
|
|
|
|
var length = (int)NUD_Offset.Value;
|
|
Bot.HexEdit(offset, length);
|
|
}
|
|
}
|
|
}
|