diff options
| author | Jason Lepp <jlepp@arcresources.com> | 2010-10-15 13:42:21 -0600 |
|---|---|---|
| committer | Jason Lepp <jlepp@arcresources.com> | 2010-10-15 13:42:21 -0600 |
| commit | f833eee20142c06c4c96a37879e356f45cef8ccb (patch) | |
| tree | 8fd6e2ac531bb06611ff083bd28eb6b025ce9114 | |
| parent | 2856b73e4cf4ddea7469c096c384ed4f8c8f966d (diff) | |
Add ability to disable the save button.
| -rwxr-xr-x | src/MVPtoMVVM.mvp/TodoItemView.xaml.cs | 19 | ||||
| -rwxr-xr-x | src/MVPtoMVVM/presenters/TodoItemPresenter.cs | 1 | ||||
| -rwxr-xr-x | src/MVPtoMVVM/views/ITodoItemView.cs | 1 |
3 files changed, 8 insertions, 13 deletions
diff --git a/src/MVPtoMVVM.mvp/TodoItemView.xaml.cs b/src/MVPtoMVVM.mvp/TodoItemView.xaml.cs index 89ef811..258f26c 100755 --- a/src/MVPtoMVVM.mvp/TodoItemView.xaml.cs +++ b/src/MVPtoMVVM.mvp/TodoItemView.xaml.cs @@ -1,17 +1,4 @@ using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using MVPtoMVVM.domain;
using MVPtoMVVM.presenters;
using MVPtoMVVM.views;
@@ -39,5 +26,11 @@ namespace MVPtoMVVM.mvp get { return dueDate.SelectedDate.Value; }
set { dueDate.SelectedDate = value; }
}
+
+ public bool SaveButtonEnabled
+ {
+ get { return saveButton.IsEnabled; }
+ set { saveButton.IsEnabled = value; }
+ }
}
}
diff --git a/src/MVPtoMVVM/presenters/TodoItemPresenter.cs b/src/MVPtoMVVM/presenters/TodoItemPresenter.cs index fe50830..b08c0d1 100755 --- a/src/MVPtoMVVM/presenters/TodoItemPresenter.cs +++ b/src/MVPtoMVVM/presenters/TodoItemPresenter.cs @@ -24,6 +24,7 @@ namespace MVPtoMVVM.presenters {
view.Description = item.Description;
view.DueDate = item.DueDate;
+ view.SaveButtonEnabled = false;
}
}
diff --git a/src/MVPtoMVVM/views/ITodoItemView.cs b/src/MVPtoMVVM/views/ITodoItemView.cs index 7c2c48f..79d2174 100755 --- a/src/MVPtoMVVM/views/ITodoItemView.cs +++ b/src/MVPtoMVVM/views/ITodoItemView.cs @@ -6,5 +6,6 @@ namespace MVPtoMVVM.views {
string Description { get; set; }
DateTime DueDate { get; set; }
+ bool SaveButtonEnabled { get; set; }
}
}
\ No newline at end of file |
