示例#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);
 }