Archive Browser
Download LangtonsAntSimulator.zip version 2.0.0.0, last updated 08/03/2011 (366.76 KB)
Download- md5: 347f7d65e83267424d0afa1dffdaae45
using System;
using System.Windows.Forms;
namespace LangontsAntSimulator
{
public partial class PauseOnMoveDialog : BaseForm
{
#region Public Constructors
public PauseOnMoveDialog()
{
InitializeComponent();
}
#endregion Public Constructors
#region Event Handlers
private void cancelButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void okButton_Click(object sender, EventArgs e)
{
if (moveNumericUpDown.Value < 1 || moveNumericUpDown.Value > moveNumericUpDown.Maximum)
{
MessageBox.Show("Please enter a valid number.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
moveNumericUpDown.Focus();
this.DialogResult = DialogResult.None;
}
else
{
this.DialogResult = DialogResult.OK;
}
}
private void PauseOnMoveDialog_Load(object sender, EventArgs e)
{
moveNumericUpDown.Maximum = int.MaxValue;
}
#endregion Event Handlers
#region Public Properties
public int MoveNumber
{
get { return (int)moveNumericUpDown.Value; }
set
{
if (value >= moveNumericUpDown.Minimum && value <= moveNumericUpDown.Maximum)
moveNumericUpDown.Value = value;
}
}
#endregion Public Properties
}
}
Donate
This software may be used free of charge, but as with all free software there are costs involved to develop and maintain.
If this site or its services have saved you time, please consider a donation to help with running costs and timely updates.
Donate