|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace LocalizationSync
{
public class Info : INotifyPropertyChanged
{
private string content;
private InfoType kind = InfoType.Undefined;
public event PropertyChangedEventHandler PropertyChanged;
public Info(string message, InfoType messageKind)
{
Content = message;
Kind = messageKind;
switch (messageKind)
{
case InfoType.Error:
Log.Error(message);
break;
case InfoType.Info:
case InfoType.Warning:
Log.Info(message);
break;
}
}
public string Content
{
get { return content; }
set
{
if (value != this.content)
{
this.content = value;
NotifyPropertyChanged("Content");
}
}
}
public InfoType Kind
{
get { return kind; }
set
{
if (value != this.kind)
{
this.kind = value;
NotifyPropertyChanged("Kind");
}
}
}
private void NotifyPropertyChanged(String info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}
}
}
|
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 software developer for a while and still find this an interesting job.