Esempio n. 1
0
        public static MsgBoxTextInputData ShowBox(Window win, string title, string msg, string defaultTxt = "")
        {
            MsgBoxEnterText box = new MsgBoxEnterText(win, title, msg, defaultTxt);

            box.ShowDialog();
            return(box.Result);
        }
 private void BT_PairInfoRequestedHandler(object sender, BT_PairingInfoDataModel info)
 {
     this.log.InfoEntry("BT_PairInfoRequestedHandler");
     this.Dispatcher.Invoke(() => {
         this.gridWait.Collapse();
         if (info.IsPinRequested)
         {
             var result            = MsgBoxEnterText.ShowBox(this, info.RequestTitle, info.RequestMsg);
             info.PIN              = result.Text;
             info.HasUserConfirmed = (result.Result == MsgBoxEnterText.MsgBoxTextInputResult.OK);
         }
         else
         {
             MsgBoxYesNo.MsgBoxResult result2 = MsgBoxYesNo.ShowBox(this, info.RequestMsg, info.RequestMsg);
             info.HasUserConfirmed            = (result2 == MsgBoxYesNo.MsgBoxResult.Yes);
         }
     });
 }