Exemplo n.º 1
0
        public void start(api api2)
        {
            mb.txt_message.text = text;
            if ((option?.Length ?? 0) == 0)
            {
                option = new string[] { "متوجه شدم" }
            }
            ;
            ObservableCollection <string> l = new ObservableCollection <string>(option);

            lb.ItemsSource   = l;
            lb.SelectedIndex = 0;
        }
Exemplo n.º 2
0
        public async Task <T> side <T>(page <T> page)
        {
            dialog_page = page;
            set(page);
            TaskCompletionSource <T> rt = new TaskCompletionSource <T>();

            page.reply = rt.SetResult;
            api api = new api(page, c_run);

            stack.Children.Add(api.stack);
            api.z_focus();
            main_page.z_ui.IsEnabled = false;
            var dv = await rt.Task;

            dialog_page = null;
            main_page.z_ui.IsEnabled = true;
            z_focus();
            stack.Children.Remove(api.stack);
            return(dv);
        }