|
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace DiagnosticExplorer.Silverlight
{
public class DiagProp : INotifyPropertyChanged
{
public DiagProp()
{
}
public DiagProp(string name)
{
Name = name;
}
public DiagProp(string name, string value)
{
Name = name;
_value = value;
}
public string Name { get; set; }
private string _value;
public string Value
{
get { return _value; }
set
{
if (_value != value)
{
_value = value;
OnPropertyChanged("Value");
}
}
}
private string _description;
public string Description
{
get { return _description; }
set
{
if (_description != value)
{
_description = value;
OnPropertyChanged("Description");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
public void Merge(DiagProp prop)
{
Value = prop.Value;
Description = prop.Description;
}
}
}
|
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 am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.