private void LoadResources() { GitIgnores.Add(string.Empty, Strings.Common_ChooseAGitIgnore); SelectedGitIgnore = string.Empty; foreach (var line in _git.GetGitIgnores()) { GitIgnores.Add(line, $"{line} - .gitignore"); } Licenses.Add(string.Empty, Strings.Common_ChooseALicense); SelectedLicense = string.Empty; foreach (var line in _git.GetLicenses()) { Licenses.Add(line, line); } string defaultnamespace = _storage.GetUser().Username; foreach (var path in _web.GetNamespacesPathList()) { Namespaces.Add(path.id.ToString(), $"{path.name} - {path.full_path}"); if (path.full_path == defaultnamespace) { SelectedNamespaces = path.id.ToString(); } } }
private void LoadResources() { GitIgnores.Add(string.Empty, Strings.Common_ChooseAGitIgnore); SelectedGitIgnore = string.Empty; foreach (var line in _git.GetGitIgnores()) { GitIgnores.Add(line, $"{line} - .gitignore"); } Licenses.Add(string.Empty, Strings.Common_ChooseALicense); SelectedLicense = string.Empty; foreach (var line in _git.GetLicenses()) { Licenses.Add(line, line); } }
private void LoadResources() { Owners.Clear(); var user = _storage.GetUser(); Owners.Add(new Ownership(user.Username, user.FullName, OwnershipTypes.User)); SelectedOwner = Owners[0]; Task.Run(async() => { var owners = await _web.GetUserOrginizationsAsync(); await ThreadingHelper.SwitchToMainThreadAsync(); foreach (var owner in owners) { Owners.Add(owner); } }); GitIgnores.Add(string.Empty, Strings.Common_ChooseAGitIgnore); SelectedGitIgnore = string.Empty; foreach (var line in _git.GetGitIgnores()) { GitIgnores.Add(line, $"{line} - .gitignore"); } Licenses.Add(string.Empty, Strings.Common_ChooseALicense); SelectedLicense = string.Empty; foreach (var line in _git.GetLicenses()) { Licenses.Add(line, line); } string defaultnamespace = _storage.GetUser().Username; foreach (var path in _web.GetNamespacesPathList()) { Namespaces.Add(path.id.ToString(), $"{path.name} - {path.full_path}"); if (path.full_path == defaultnamespace) { SelectedNamespaces = path.id.ToString(); } } }
private void LoadResources() { GitIgnores.Add(string.Empty, Strings.Common_ChooseAGitIgnore); SelectedGitIgnore = string.Empty; foreach (var line in _git.GetGitIgnores()) { GitIgnores.Add(line, $"{line} - .gitignore"); } Licenses.Add(string.Empty, Strings.Common_ChooseALicense); SelectedLicense = string.Empty; foreach (var line in _git.GetLicenses()) { Licenses.Add(line, line); } string defaultnamespace = _storage.GetUser().Username; foreach (var path in _web.GetNamespacesPathList()) { Namespaces.Add(path.id.ToString(), $"{path.name} - {path.full_path}"); if (path.full_path == defaultnamespace) { SelectedNamespaces = path.id.ToString(); } } if (Namespaces.Count == 0) { Namespaces.Add("0", defaultnamespace); SelectedNamespaces = "0"; } VisibilityLevels.Add("Private", "Private"); VisibilityLevels.Add("Internal", "Internal"); VisibilityLevels.Add("Public", "Public"); SelectedVisibilityLevels = "Public"; }