|
using System.ComponentModel;
using TaskList.DataModel;
using TaskList.ViewModel;
namespace Test.TaskList.ViewModel
{
internal class TaskListTestApplication : ITaskListApplication
{
private string fileName = string.Empty;
private TaskCollection tasks = new TaskCollection();
public TaskListTestApplication()
{
}
public bool WasExited { get; set; }
#region ITaskListApplication Members
public string FileName
{
get { return fileName; }
}
public TaskCollection Tasks
{
get { return tasks; }
}
public void LoadTasks(string fileName)
{
tasks = TaskCollection.Load(fileName);
this.fileName = fileName;
}
public void SaveTasks(string fileName)
{
tasks.Save(fileName);
this.fileName = fileName;
}
public void NewTasks()
{
tasks = new TaskCollection();
fileName = string.Empty;
}
public void ExitApplication()
{
WasExited = true;
}
#endregion
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(PropertyChangedEventArgs e)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
handler(this, e);
}
#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.
Windows developer with 10+ years experience working in the banking industry.