public static bool MyShowDialog(List <Inline> message, string title, string showkey, Window owner = null, bool startUpCenterOwner = true, string okButtonText = null) { var isok = true; DispatcherEx.xInvoke(() => { if (LocalParams.GetWndNotTipAgainNeedShow(showkey)) { var wnd = new WndNotTipAgain(message, title, showkey, okButtonText); wnd.xSetOwner(owner); wnd.xSetStartUpLocation(startUpCenterOwner); var dlgRlt = wnd.ShowDialog(); isok = dlgRlt.HasValue && dlgRlt.Value; } }); return(isok); }
public static bool MyShowDialog(string message, string title = null, string showkey = null, Window owner = null, bool startUpCenterOwner = true) { var isok = true; DispatcherEx.xInvoke(() => { if (!string.IsNullOrEmpty(showkey)) { if (LocalParams.GetWndNotTipAgainNeedShow(showkey)) { var wnd = new WndNotTipAgain(message, title, showkey); wnd.xSetOwner(owner); wnd.xSetStartUpLocation(startUpCenterOwner); var dlgRlt = wnd.ShowDialog(); isok = dlgRlt.HasValue && dlgRlt.Value; } } }); return(isok); }
public static void MyShow(string message, string title = null, string showkey = null, bool showCancelButton = true, Action <bool, bool> callback = null, Window owner = null, bool startUpCenterOwner = true, string okButtonText = null) { DispatcherEx.xInvoke(() => { if (LocalParams.GetWndNotTipAgainNeedShow(showkey)) { var wnd = new WndNotTipAgain(message, title, showkey, showCancelButton); wnd.xSetOwner(owner); wnd.xSetStartUpLocation(startUpCenterOwner); wnd.xShowFirstTime(); wnd.IsShowed = true; wnd.Closed += (sender, e) => { callback(false, wnd.IsOkClicked); }; } else { callback(false, true); } }); }