Example #1
0
 public static void ShowBox(Window win, string title, string msg)
 {
     win.Dispatcher.Invoke(() => {
         MsgBoxSimple box = new MsgBoxSimple(win, title, msg);
         box.ShowDialog();
     });
 }
 private void BT_ConnectionCompletedHandler(object sender, bool isOk)
 {
     this.log.InfoEntry("BT_ConnectionCompletedHandler");
     this.Dispatcher.Invoke(() => {
         this.gridWait.Collapse();
         if (isOk)
         {
             this.btnBTDisconnect.Show();
         }
         else
         {
             this.btnBTConnect.Show();
             MsgBoxSimple.ShowBox("Failed connection", "Reason unknown");
         }
     });
 }
 private void Wrapper_BLE_DeviceInfoGatheredForConfig(object sender, BluetoothLEDeviceInfo info)
 {
     this.Dispatcher.Invoke(() => {
         WrapErr.ToErrReport(9999, "Failure on BLE Device info gathered Complete", () => {
             this.gridWait.Collapse();
             this.wrapper.BLE_DeviceInfoGathered -= this.Wrapper_BLE_DeviceInfoGatheredForConfig;
             if (info != null)
             {
                 DeviceInfo_BLESerial bleInfo = new DeviceInfo_BLESerial(this, info);
                 bleInfo.ShowDialog();
             }
             else
             {
                 MsgBoxSimple.ShowBox(DI.Wrapper.GetText(MsgCode.Error), DI.Wrapper.GetText(MsgCode.LoadFailed));
             }
         });
     });
 }
Example #4
0
        public static void ShowBox(string title, string msg)
        {
            MsgBoxSimple box = new MsgBoxSimple(title, msg);

            box.ShowDialog();
        }