private async Task LoadProjectTypesLookupAsync() { ProjectTypes.Clear(); ProjectTypes.Add(new NullLookupItem { DisplayMember = " - " }); var lookup = await _projectTypeLookupDataService.GetProjectTypeLookupAsync(); foreach (var lookupItem in lookup) { ProjectTypes.Add(lookupItem); } }
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(); }
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; }
public void LoadProjectType(Type type) { ProjectTypes.Add(type); }
public void OnProjectsChanged(EventArgs e, ProjectType p) { ProjectTypes.Add(p); }