예제 #1
0
        private static void Show(Window ownerWindow, NameValueCollection parameters)
        {
            EmailLicenseRequestWindow window = new EmailLicenseRequestWindow();

            window.Mailto      = LicenseConsoleData.Singleton.LicenseEmail;
            window.MessageBody = Program.ConstructQueryString(parameters);
            window.Owner       = ownerWindow;
            ownerWindow.Hide();
            window.ShowDialog();
        }
 private void ButtonOK_Click(object sender, RoutedEventArgs e)
 {
     if (LicenseMethod == LicenseMethod.WebService)
     {
         if (ChangeProductLicense())
         {
             Close();
         }
         else
         {
             MessageBox.Show(Data.LastErrorMessage);
         }
     }
     else
     {
         EmailLicenseRequestWindow.Show(this, LicenseType, LicenseKey, UserName, Company);
     }
 }
예제 #3
0
        private void Get_Click(object sender, RoutedEventArgs e)
        {
            string assemblyData;

            try
            {
                assemblyData = AssemblyLicense.GetAssemblyData(AssemblyPath);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            if (assemblyData == LicenseConsoleData.Singleton.AssemblyData)
            {
                MessageBox.Show(Strings.FormatDistributableLicenseForSelfComponent(assemblyData));
                return;
            }

            if (LicenseMethod == LicenseMethod.WebService)
            {
                License license = GetDistributableLicense(assemblyData);
                if (license == null)
                {
                    MessageBox.Show(Data.LastErrorMessage);
                }
                else
                {
                    License = license.SignedString;
                }
            }
            else
            {
                EmailLicenseRequestWindow.Show(this, AssemblyPath, assemblyData);
            }
        }