コード例 #1
0
ファイル: ModelManager.cs プロジェクト: krishkhan/DotNet
 public static ViewListModel GetInstance()
 {
     if (null == _vlm)
     {
         return (_vlm = new ViewListModel());
     }
     return _vlm;
 }
コード例 #2
0
ファイル: ViewList.xaml.cs プロジェクト: krishkhan/DotNet
 public ViewList()
 {
     InitializeComponent();
     _vlm = ModelManager.GetInstance();
     this.DataContext = _vlm;
     this.CommandBindings.Add(new CommandBinding(ViewListCommands.LaunchAddItem,ExecuteLaunchAddItem,CanExecuteItem));
     this.CommandBindings.Add(new CommandBinding(ViewListCommands.EditItem, ExecuteEditItem, CanExecuteItem));
     this.CommandBindings.Add(new CommandBinding(ViewListCommands.UpdateItem, ExecuteUpdateItem, CanExecuteItem));
 }
コード例 #3
0
ファイル: ModelManager.cs プロジェクト: krishkhan/DotNet
 private ModelManager()
 {
     _vlm = new ViewListModel();
 }