Exemplo n.º 1
0
        public override void AddTaskToMainElement(UcTasksSettingsViewModel dataContext)
        {
            AbilitiModel ab = PersProperty.SellectedAbilityProperty;

            dataContext.AddNewTask(null);
            var need = QwestsViewModel.GetDefoultNeedTask(dataContext.SelectedTaskProperty);

            ab.NeedTasks.Add(need);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Добавляем задачу к главному элементу (квест или скилл)
        /// </summary>
        /// <param name="dataContext"></param>
        public virtual void AddTaskToMainElement(UcTasksSettingsViewModel dataContext)
        {
            Aim qwest = PersProperty.SellectedAimProperty;

            dataContext.AddNewTask(qwest.TypeOfTaskDefoultProperty);
            var need = QwestsViewModel.GetDefoultNeedTask(dataContext.SelectedTaskProperty);

            qwest.NeedsTasks.Add(need);
        }
        public void AddNewTaskCommandTest()
        {
            UcTasksSettingsViewModel tasksettings = new UcTasksSettingsViewModel();

            int tasksBeforeAdd = mvm.Pers.Tasks.Count;

            mvm.AddNewTaskCommandExecute(mvm.Pers.TasksTypes.First());
            var cc = tasksettings.SelectedTaskProperty;

            tasksettings.OkAddOrEditCommandExecute();
            Messenger.Default.Send <string>("Ок в задаче");
            int tasksAfterAdd = mvm.Pers.Tasks.Count;

            Assert.IsTrue(tasksAfterAdd > tasksBeforeAdd);
        }