示例#1
0
        private void ClickOT(object sender, MouseEventArgs e)
        {
            TextBox tb = sender as TextBox ?? TB_OTName;

            // Special Character Form
            if (ModifierKeys != Keys.Control)
            {
                return;
            }

            var d = new TrashEditor(tb, null, SAV);

            d.ShowDialog();
            tb.Text = d.FinalString;
        }
示例#2
0
        private void ChangeNickname(object sender, MouseEventArgs e)
        {
            TextBox tb = sender is TextBox box ? box : TB_Nickname;

            // Special Character Form
            if (ModifierKeys != Keys.Control)
            {
                return;
            }

            int offset    = LB_DataEntry.SelectedIndex * 0x1B4;
            var nicktrash = data.Slice(offset + 0x18, 24);

            SAV.SetString(TB_Nickname.Text, 12).CopyTo(nicktrash, 0);
            var d = new TrashEditor(tb, nicktrash, SAV);

            d.ShowDialog();
            tb.Text = d.FinalString;
            d.FinalBytes.CopyTo(data, offset + 0x18);

            TB_Nickname.Text = StringConverter.GetString6(data, offset + 0x18, 24);
        }
示例#3
0
        private void ChangeNickname(object sender, MouseEventArgs e)
        {
            TextBox tb = !(sender is TextBox) ? TB_Nickname : (TextBox)sender;

            // Special Character Form
            if (ModifierKeys != Keys.Control)
            {
                return;
            }

            int offset    = LB_DataEntry.SelectedIndex * 0x1B4;
            var nicktrash = data.Skip(offset + 0x18).Take(24).ToArray();

            SAV.SetString(TB_Nickname.Text, 12).CopyTo(nicktrash, 0);
            var d = new TrashEditor(tb, nicktrash, SAV);

            d.ShowDialog();
            tb.Text = d.FinalString;
            d.FinalBytes.CopyTo(data, offset + 0x18);

            string nickname = Util.TrimFromZero(Encoding.Unicode.GetString(data, offset + 0x18, 24));

            TB_Nickname.Text = nickname;
        }