コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: PromptDialog.cs プロジェクト: domsteil/BotBuilder
        /// <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);
        }