|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Kruskal
{
public partial class frmCost : Form
{
public int _cost;
public frmCost()
{
InitializeComponent();
}
private void btnOk_Click(object sender, EventArgs e)
{
if (txtCost.Text == string.Empty)
{
errorProvider1.SetError(txtCost, "please enter value");
}
else
{
_cost = int.Parse(txtCost.Text);
this.Close();
}
}
private void txtCost_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = !Char.IsDigit(e.KeyChar);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Enthusiastic programmer/researcher, passionate to learn new technologies, interested in problem solving, data structures, algorithms, AI, machine learning and nlp.
Amateur guitarist/ keyboardist, squash player.