public static MsgBoxResult ShowBox(string title, string msg, bool suppressContinue = false) { MsgBoxYesNo box = new MsgBoxYesNo(title, msg, suppressContinue); box.ShowDialog(); return(box.Result); }
public static MsgBoxResult ShowBoxDelete(Window win, string msg) { MsgBoxYesNo box = new MsgBoxYesNo(win, DI.Wrapper.GetText(MsgCode.Delete), msg, false); box.ShowDialog(); return(box.Result); }
private void btnResetAll_Click(object sender, RoutedEventArgs e) { if (MsgBoxYesNo.ShowBox( this, DI.Wrapper.GetText(MsgCode.Warning), DI.Wrapper.GetText(MsgCode.Continue), true) == MsgBoxYesNo.MsgBoxResult.Yes) { DI.Wrapper.RebuildAllData(); } }
private void btnDelete_Click(object sender, RoutedEventArgs e) { var item = this.lbxCmds.SelectedItem as IIndexItem <DefaultFileExtraInfo>; if (item != null) { if (MsgBoxYesNo.ShowBoxDelete(this, item.Display) == MsgBoxYesNo.MsgBoxResult.Yes) { this.wrapper.DeleteScriptData(item, this.ReloadList, App.ShowMsg); } } }
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); } }); }