|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace ARBOControls {
public delegate void AdressInfoSelected( AdressInfo AI );
[Serializable]
public partial class AdressInfo : UserControl, ICloneable {
public event AdressInfoSelected OnAdressInfoSelected;
private string kdName;
private string tel;
private string str;
private string plzOrt;
private bool selected = false;
private Color selectedColor = Color.FromKnownColor( KnownColor.ActiveCaption );
private Color unselectedColor;
public Color SelectedColor {
get { return selectedColor; }
set { selectedColor = value; }
}
public bool Selected {
get { return selected; }
set {
selected = value;
if( selected )
if( OnAdressInfoSelected != null )
OnAdressInfoSelected( this );
}
}
public AdressInfo() {
InitializeComponent();
unselectedColor = BackColor;
}
public string KdName {
get { return kdName; }
set {
kdName = value;
lbName.Text = value;
}
}
public string Telefon {
get { return tel; }
set {
tel = value;
lbTel.Text = value;
}
}
public string Strasse {
get { return str; }
set {
str = value;
lbStr.Text = value;
}
}
public string PLZ_Ort {
get { return plzOrt; }
set {
plzOrt = value;
lbPlzIOrt.Text = value;
}
}
private void TextClick( object sender, EventArgs e ) {
selected = true;
if( OnAdressInfoSelected != null )
OnAdressInfoSelected( this );
}
#region ICloneable Members
public object Clone() {
AdressInfo AI = new AdressInfo();
AI.Telefon = this.tel;
AI.KdName = this.kdName;
AI.Strasse = this.str;
AI.PLZ_Ort = this.plzOrt;
AI.Tag = this.Tag;
return AI;
}
#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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.