Пример #1
0
        private void NewConnection_OnDialogContentRequest(object sender, DialogContentRequestEventArgs e)
        {
            if (e.RequestType == DialogContentRequestType.Ok)
            {
                if (MessageBox.Show(string.Format(@"Would you like to connect to this server?{0}{1}{2}", Environment.NewLine, Environment.NewLine, communicator.ActiveServer.DisplayName), "Connection Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) return;

                communicator.WriteResources();

                DoDialogRequest(DialogContentRequestType.Close);
            }
        }
Пример #2
0
 private void dc_OnDialogContentRequest(object sender, DialogContentRequestEventArgs e)
 {
     switch (e.RequestType)
     {
         case DialogContentRequestType.Close:
             Close();
             break;
         case DialogContentRequestType.Cancel:
             if (Cancelled != null) Cancelled(this, new EventArgs());
             break;
     }
 }