예제 #1
0
 public TemplateCommandViewModel(TemplateCommand templateCommand, IEnumerable<TemplateParameterViewModel> templateParameterViewModels)
 {
     m_templateCommand = templateCommand;
       m_templateCommand.CheckCommand();
       foreach (TemplateParameterViewModel templateParameterViewModel in m_templateCommand.UsedParameters.Select(n => templateParameterViewModels.FirstOrDefault(m => m.Name == n.Name)))
       {
     templateParameterViewModel.PropertyChanged += TemplateParameterViewModelOnPropertyChanged;
       }
       m_commandString = m_templateCommand.ToString();
       foreach (string error in m_templateCommand.Errors)
     Errors.Add(error);
       UpdateStatusBrush();
 }