|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace Jacobi_RedBlack.CustomControls
{
public partial class GridCell : UserControl
{
public GridCell()
{
InitializeComponent();
}
private void GridCell_Load(object sender, EventArgs e)
{
}
private void CellValue_TextChanged(object sender, EventArgs e)
{
try
{
if (Convert.ToUInt16(CellValue.Text) > 255)
{
CellValue.Text = "255";
CellValue.SelectAll();
}
if (Convert.ToUInt16(CellValue.Text) < 0)
{
CellValue.Text = "0";
CellValue.SelectAll();
}
}
catch(Exception exc)
{
CellValue.Text = "0";
CellValue.SelectAll();
}
}
public int GetValue()
{
return Convert.ToUInt16(CellValue.Text) ;
}
}
}
|
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.
coding in C# C++ C
==============================================
Code in English, not Gibberish