Exemplo n.º 1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     UserDialog u = new UserDialog("Do you want to continue with next round?", new string[] { "Ok", "Cancel" }, null);
     u.Owner = this;
     u.Show();
     u.Completed += new VoidObjectStringStringDelegate(u_Completed);
 }
Exemplo n.º 2
0
 public void ShowQuestion(string message, IEnumerable<string> answers, IUserInquiryAccepter accepter)
 {
     View.UserDialog d = new View.UserDialog(message, answers, accepter);
     d.Completed += new VoidObjectStringStringDelegate(d_Completed);
     d.Owner = window;
     d.Show();
 }
Exemplo n.º 3
0
 public void ShowMessage(string message)
 {
     View.UserDialog d = new View.UserDialog(message, new string[] {"Ok"}, null);
     d.Completed += new VoidObjectStringStringDelegate(showMessage_Completed);
     d.Owner = window;
     lastDialog = d;
     d.Show();
 }
Exemplo n.º 4
0
        public string PutQuestion(string message, IEnumerable<string> answers)
        {
            View.UserDialog d = new View.UserDialog(message, answers, null);
            d.Owner = window;
            d.Completed += new VoidObjectStringStringDelegate(putQuestion_Completed);
            d.ShowDialog();

            // here is callback putQuestion_Completed called

            return putQuestionAnswer;
        }
Exemplo n.º 5
0
        private void showMessage_Completed(object sender, string message, string answer)
        {
            lastDialog = null;

            window.Activate();

            if (sender != null && sender is IUserInquiryAccepter)
            {
                IUserInquiryAccepter acceptor = sender as IUserInquiryAccepter;
                acceptor.UserInquiryResult(message, answer);
            }
        }