|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace ServiceTreeSample.Models
{
public class Document : INotifyPropertyChanged
{
string text;
bool isModified;
public string Title { get; set; }
public string Text
{
get
{
return text;
}
set
{
if (text != value)
{
text = value;
PropertyChanged(this, new PropertyChangedEventArgs("Text"));
IsModified = true;
}
}
}
public bool IsModified
{
get { return isModified; }
set
{
if (isModified != value)
{
isModified = value;
PropertyChanged(this, new PropertyChangedEventArgs("IsModified"));
}
}
}
public event PropertyChangedEventHandler PropertyChanged = delegate { };
public void Save()
{
// Not implemented.
}
}
}
|
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.
David is a software developer with an obsession for analysis and proper architecture.