Пример #1
0
        private async Task LoadProjectTypesLookupAsync()
        {
            ProjectTypes.Clear();
            ProjectTypes.Add(new NullLookupItem {
                DisplayMember = " - "
            });
            var lookup = await _projectTypeLookupDataService.GetProjectTypeLookupAsync();

            foreach (var lookupItem in lookup)
            {
                ProjectTypes.Add(lookupItem);
            }
        }
Пример #2
0
 private void ExecuteAddNew(object parameter)
 {
     ProjectTypes.Add(new ProjectTypeModel()
     {
         ID          = 0,
         Name        = string.Empty,
         Description = string.Empty,
         Colour      = new SolidColorBrush(Colors.AliceBlue).ToString(),
         IsEnabled   = true,
         IsChecked   = false
     });
     CheckValidation();
 }
Пример #3
0
 public NewProjectDialogViewModel()
 {
     ProjectTypeRegistry.TypesChanged += OnProjectsChanged;
     foreach (KeyValuePair <string, ProjectType> typePair in ProjectTypeRegistry.RegisteredTypes)
     {
         if (typePair.Key == typePair.Value.ID)
         {
             if (!ProjectTypes.Contains(typePair.Value))
             {
                 ProjectTypes.Add(typePair.Value);
             }
         }
     }
     ProjectLocation = Workspace.DefaultProjectDirectory;
 }
Пример #4
0
 public void LoadProjectType(Type type)
 {
     ProjectTypes.Add(type);
 }
Пример #5
0
 public void OnProjectsChanged(EventArgs e, ProjectType p)
 {
     ProjectTypes.Add(p);
 }