private void btnEditProcess_Click(object sender, EventArgs e) { ProcessesAndUrls itemProc = (ProcessesAndUrls)ChkLBoxProcesses.SelectedItem; List <string> comment = PromptDouble.ShowEditDialog("URL", "Edit", itemProc); if (comment == null) { return; } itemProc.Alias = comment[0]; itemProc.Address = comment[1]; itemProc.Save(); UpdateLists(); }
private void btnAddUrl_Click(object sender, EventArgs e) { List <string> comment = PromptDouble.ShowDialog("URL", "Add new "); if (comment == null) { return; } ProcessesAndUrls urls = new ProcessesAndUrls(); urls.Alias = comment[0]; urls.Address = comment[1]; urls.IsUrl = true; urls.Save(); UpdateLists(); }
private void btnAddProcess_Click(object sender, EventArgs e) { List <string> comment = PromptDouble.ShowDialog("process", "Add new "); if (comment == null) { return; } ProcessesAndUrls proc = new ProcessesAndUrls(); proc.Alias = comment[0]; proc.Address = comment[1]; proc.IsUrl = false; proc.Save(); UpdateLists(); }
/// <summary> Prompt for a double. </summary> /// <param name="context"> The context. </param> /// <param name="resume"> Resume handler. </param> /// <param name="prompt"> The prompt to show to the user. </param> /// <param name="retry"> What to show on retry. </param> /// <param name="attempts"> The number of times to retry. </param> public static void Number(IDialogContext context, ResumeAfter <double> resume, string prompt, string retry = null, int attempts = 3) { var child = new PromptDouble(prompt, retry, attempts); context.Call <double>(child, resume); }