Esempio n. 1
0
        private static Task <object> DropdownHandler(int min, int max, string prompt)
        {
            DropdownDialog dialog = new DropdownDialog(min, max, prompt);

            return(DialogHost.Show(dialog, "PromptHost"));
        }
Esempio n. 2
0
        private static Task <object> DropdownHandler(string[] options, string prompt)
        {
            DropdownDialog dialog = new DropdownDialog(options, prompt);

            return(DialogHost.Show(dialog, "PromptHost"));
        }
Esempio n. 3
0
        public static int ShowDialogIntRange(int min, int max, string prompt)
        {
            Task <object> dialogTask = Application.Current.Dispatcher.Invoke <Task <object> >(new Func <Task <object> >(() => DropdownDialog.DropdownHandler(min, max, prompt)));

            dialogTask.Wait();
            return((int)dialogTask.Result);
        }
Esempio n. 4
0
        public static string ShowDialogString(string[] options, string prompt)
        {
            Task <object> dialogTask = Application.Current.Dispatcher.Invoke <Task <object> >(new Func <Task <object> >(() => DropdownDialog.DropdownHandler(options, prompt)));

            dialogTask.Wait();
            return(dialogTask.Result as string);
        }