Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        public static bool Show(Window owner, NameValueCollection parameters)
        {
            ClipboardDistributableLicenseWindow window = new ClipboardDistributableLicenseWindow();

            window.AssemblyPath = parameters["AssemblyPath"];
            window._license     = parameters["License"];
            window.Owner        = owner;
            bool?result = window.ShowDialog();

            if (result.HasValue && result.Value)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }