Example #1
0
        /// <summary>
        ///     Gets and displays the licenses for the specified Programid.
        /// </summary>
        /// <param name="programid">The Programid to fetch the licenses for.</param>
        private void GetLicenses(object programid)
        {
            // Alerts the user that the licenses are being downloaded.
            Variables.Containers.Main.SetStatus("Loading licenses...", 3);

            Licenses.GetLicenses((string)programid);
        }
Example #2
0
        private void ProcessResponse()
        {
            string webResponse = Variables.WebResponse;

            if (webResponse.Split('[', ']')[1] == "SUCCESS")
            {
                string licenseCode = webResponse.Replace("[SUCCESS] ", String.Empty);

                Invoke((MethodInvoker) delegate
                {
                    TextBoxLicenseCode.Text = licenseCode;

                    if (CheckBoxCopyToClipboard.Checked)
                    {
                        Clipboard.SetText(licenseCode);
                    }
                });

                SetControls(true);
                ResetControls(true);

                Variables.Containers.Active.SetStatus("License successfully created.", 4);

                Licenses.GetLicenses(Variables.MyProgramsSelected.Programid);
            }
            else
            {
                Variables.Containers.Active.SetStatus(webResponse.Replace("[ERROR] ", String.Empty), 1);
                ResetControls(false);
            }
        }
Example #3
0
 private void GetLicenses(object programid)
 {
     Licenses.GetLicenses((string)programid);
 }