private void Register_Click(object sender, RoutedEventArgs routedEventArgs)
        {
            bool registered = UnlockKey.Register(TextRegKey.Password);

            mmApp.Model.Window.SetWindowTitle();
            WindowUtilities.DoEvents();

            if (registered)
            {
                MessageBox.Show("Thank you for your registration.", mmApp.ApplicationName,
                                MessageBoxButton.OK, MessageBoxImage.Information);
                Close();

                UnlockKey.Shutdown();
            }
            else
            {
                MessageBox.Show("Sorry, that's not the right key.\r\nMake sure you entered the value exactly as it\r\n" +
                                "appears in your confirmation.\r\n\r\n", "Software Registration",
                                MessageBoxButton.OK, MessageBoxImage.Exclamation);
                LabelIsRegistered.Text       = "This copy is not registered.";
                LabelIsRegistered.Foreground = new SolidColorBrush(Colors.Red);
                UnlockKey.UnRegister();
            }
        }
Beispiel #2
0
        public void RaiseOnApplicationShutdown()
        {
            foreach (var addin in AddIns)
            {
                try
                {
                    addin?.OnApplicationShutdown();
                }
                catch (Exception ex)
                {
                    mmApp.Log(addin.Id + "::AddIn::OnApplicationShutdown Error: " + ex.GetBaseException().Message);
                }
            }

            UnlockKey.Shutdown();
        }