public virtual void InitializeTodoEditor(TodoEditorViewModel viewModel)
 {
     // This is called when a TodoEditorViewModel is created
     viewModel.Modify.Action = this.ModifyHandler;
     viewModel.Cancle.Action = this.CancleHandler;
     viewModel.Add.Action    = this.AddHandler;
     TodoEditorViewModelManager.Add(viewModel);
 }
        public override void Cancle(TodoEditorViewModel viewModel)
        {
            base.Cancle(viewModel);

            viewModel.TodoContent = string.Empty;
            viewModel.State       = TodoEditorState.Creation;

            this.Publish(new CancleCommand());
        }
        public override void Modify(TodoEditorViewModel viewModel)
        {
            base.Modify(viewModel);

            viewModel.TodoItem.Content = viewModel.TodoContent;

            viewModel.TodoContent = string.Empty;
            viewModel.State       = TodoEditorState.Creation;

            this.Publish(new ModifyCommand());
        }
        public override void InitializeTodoEditor(TodoEditorViewModel viewModel)
        {
            base.InitializeTodoEditor(viewModel);
            // This is called when a TodoEditorViewModel is created

            this.OnEvent <ItemClickedChangeComand>().Subscribe(command =>
            {
                viewModel.TodoItem      = command.TodoItem;
                viewModel.OriginContent = command.TodoItem.Content;
                viewModel.TodoContent   = viewModel.OriginContent;
            }).DisposeWith(viewModel);
        }
 public virtual void Add(TodoEditorViewModel viewModel)
 {
 }
 public virtual void Cancle(TodoEditorViewModel viewModel)
 {
 }
 public virtual void Modify(TodoEditorViewModel viewModel)
 {
 }
 public override void Add(TodoEditorViewModel viewModel)
 {
     base.Add(viewModel);
 }