mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-05-10 14:11:04 -05:00
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace DSPRE
|
|
{
|
|
public partial class InsertValueDialog : Form
|
|
{
|
|
public bool okSelected = new bool();
|
|
|
|
public InsertValueDialog(string valueLabel, string format) {
|
|
InitializeComponent();
|
|
inputValUpDown.Focus();
|
|
label1.Text = valueLabel;
|
|
inputValUpDown.Hexadecimal = (format == "hex");
|
|
}
|
|
|
|
private void okButton_Click(object sender, EventArgs e) {
|
|
okSelected = true;
|
|
this.Close();
|
|
}
|
|
|
|
private void backButton_Click(object sender, EventArgs e) {
|
|
okSelected = false;
|
|
this.Close();
|
|
}
|
|
|
|
private void numericUpDown1_KeyDown(object sender, KeyEventArgs e) {
|
|
if (e.KeyCode == Keys.Escape) {
|
|
okSelected = false;
|
|
this.Close();
|
|
}
|
|
if (e.KeyCode == Keys.Enter) {
|
|
okSelected = true;
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
}
|