public virtual IActionBase CreateAction(EActionMethod method) { IActionBase action = null; switch (method) { case EActionMethod.ADD: action = AddTask.GetInstance(); break; case EActionMethod.FIND: action = FindTasks.GetInstance(); break; case EActionMethod.FINDYESTERDAY: action = FindYesterdayTasks.GetInstance(); break; case EActionMethod.FINDTODAY: action = FindTodayTasks.GetInstance(); break; default: break; } return(action); }
public virtual IViewBase CreateView(EActionMethod method) { IViewBase view = null; switch (method) { case EActionMethod.ADD: view = AddTaskView.GetInstance(); break; case EActionMethod.FIND: view = FindTasksView.GetInstance(); break; case EActionMethod.FINDYESTERDAY: view = FindTasksView.GetInstance(); break; case EActionMethod.FINDTODAY: view = FindTasksView.GetInstance(); break; default: break; } return(view); }
public IViewBase CreateView(EActionMethod selectedAction) { IViewBase view; var factory = new ViewFactory(); view = factory.CreateView(selectedAction); return(view); }
public IActionBase CreateAction(EActionMethod selectedAction) { IActionBase action; var factory = new ActionFactory(); action = factory.CreateAction(selectedAction); return(action); }