private void StatsTextBox_TextChanged(object sender, EventArgs e) { TextBox statTextBox = (TextBox)sender; if (!ushort.TryParse(statTextBox.Text, out ushort newValue)) { return; } int StIdx = (int)statTextBox.Tag; _currentCharInfo.Stats[StIdx] = newValue; Savedata.SetCharacterInfo(_currentCharIndex, _currentCharInfo); }
private void GeneralInfoTextBox_TextChanged(object sender, EventArgs e) { TextBox giTextBox = (TextBox)sender; if (!int.TryParse(giTextBox.Text, out int newValue)) { return; } int GeIdx = (int)giTextBox.Tag; _currentCharInfo.GeneralInfo[GeIdx] = newValue; Savedata.SetCharacterInfo(_currentCharIndex, _currentCharInfo); }