Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        public IViewBase CreateView(EActionMethod selectedAction)
        {
            IViewBase view;
            var       factory = new ViewFactory();

            view = factory.CreateView(selectedAction);

            return(view);
        }
Пример #4
0
        public IActionBase CreateAction(EActionMethod selectedAction)
        {
            IActionBase action;
            var         factory = new ActionFactory();

            action = factory.CreateAction(selectedAction);


            return(action);
        }