private void EditDescription(object sender, EventArgs e) { var newDesc = Prompts.ShowDialog_TextBox("Enter Description"); gc.EditDesc(selected, newDesc); outputBox.Text = "Description Edit Successful"; }
public async void HandleRepo(string name, string mainFP, TextBox outputBox) { await CheckRepo(name); if (!await CheckRepo(name)) { var description = Prompts.ShowDialog_TextBox("Enter a Description"); description = description == "" ? "No Description" : description; //if "" returned, then set description to "No Description" await client.Repository.Create(CreateRepo(name, description, await GetGitIgnoreTemplates())); outputBox.Text = string.Format("Repo \"{0}\" Created", name); } var targetRepo = await GetRepo(name); if (targetRepo != -1) { Console.WriteLine("Found Repo"); var commitComment = Prompts.ShowDialog_TextBox("Enter a Commit Comment"); commitComment = commitComment == "" ? "No Commit Comment" : commitComment; //if "" returned, then set commitComment to "No Commit Comment" PushCommit(targetRepo, mainFP, commitComment); outputBox.Text = string.Format("Update to repo \"{0}\" successful", name); } }