コード例 #1
0
        public Task <int[]> GetCheckboxResultAsync(string title, string message, Dictionary <int, string> options)
        {
            var tcs         = new TaskCompletionSource <int[]>();
            var _dialogView = new MyCensus.Controls.DialogKit.Views.CheckBoxView(title, message, options);

            _dialogView.Completed += (s, e) => { tcs.SetResult(e?.ToArray()); PopupNavigation.Instance.PopAsync(); };
            PopupNavigation.Instance.PushAsync(new PopupPage {
                Content = _dialogView
            });

            return(tcs.Task);
        }
コード例 #2
0
        public Task <string[]> GetCheckboxResultAsync(string title, string message, params string[] options)
        {
            var tcs         = new TaskCompletionSource <string[]>();
            var _dialogView = new MyCensus.Controls.DialogKit.Views.CheckBoxView(title, message, options);

            _dialogView.Completed += (s, e) => { tcs.SetResult(e == null ? null : _dialogView.SelectedValues.ToArray()); PopupNavigation.Instance.PopAsync(); };
            PopupNavigation.Instance.PushAsync(new PopupPage {
                Content = _dialogView
            });

            return(tcs.Task);
        }