|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace JGClassGenerator
{
internal partial class FormEdit : FormBaseDialog
{
internal bool DataIsDirty;
private string m_OriginalText = "";
internal FormEdit(string caption)
{
InitializeComponent();
ShowButtons = true;
ButtonClear.Visible = true;
this.Text = caption;
}
private void FormEdit_Activated(object sender, EventArgs e)
{
rtbText.Focus();
}
internal override void ButtonClear_Click(object sender, EventArgs e)
{
rtbText.Clear();
}
internal override void ButtonOK_Click(object sender, EventArgs e)
{
this.DataIsDirty = (rtbText.Text != this.m_OriginalText);
base.ButtonOK_Click(sender, e);
}
private void SetResultText(string value)
{
rtbText.Text = value;
this.m_OriginalText = value;
}
#region Internal Properties
internal string Instructions
{
get { return lblInstructions.Text; }
set { lblInstructions.Text = value; }
}
internal string ResultText
{
get { return rtbText.Text; }
set { SetResultText(value); }
}
#endregion
}
}
|
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.
I have been a keen hobbyist programmer since getting my first computer - a Vic 20 (you had to be able to write programs then since few programs were available and all were expensive).
Retired and now living in Pewsey, Wiltshire, where I spend (far too much of) my time writing computer programs to keep my mind active.