public static bool Show(Window owner, NameValueCollection parameters) { ClipboardProductLicenseWindow window = new ClipboardProductLicenseWindow(); window.LicenseType = (LicenseType)Enum.Parse(typeof(LicenseType), parameters["LicenseType"]); window.UserName = parameters["UserName"]; window.Company = parameters["Company"]; window.Email = parameters["Email"]; if (!string.IsNullOrEmpty(parameters["LicenseKey"])) { window._licenseKey = new LicenseKey(parameters["LicenseKey"]); } window._designTimeLicense = parameters["DesignTimeLicense"]; window._runtimeLicense = parameters["RuntimeLicense"]; window.Owner = owner; bool?result = window.ShowDialog(); if (result.HasValue && result.Value) { return(true); } else { return(false); } }
public static bool CheckClipboard(Window owner, bool distributable) { if (string.IsNullOrEmpty(LicenseConsoleData.Singleton.LicenseEmail)) { return(false); } StringBuilder log; NameValueCollection parameters = CheckClipboard(distributable, out log); if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) { Show(owner, log.ToString()); return(true); } if (parameters == null) { return(false); } if (distributable) { return(ClipboardDistributableLicenseWindow.Show(owner, parameters)); } else { return(ClipboardProductLicenseWindow.Show(owner, parameters)); } }