public RegistrationForm()
        {
            InitializeComponent();

            DataContext = this;

            if (UnlockKey.IsAppRegistered())
            {
                LabelIsRegistered.Text       = "This copy is already registered. Only enter key to clear or reset.";
                LabelIsRegistered.FontWeight = FontWeights.DemiBold;
                LabelIsRegistered.Foreground = new SolidColorBrush(Colors.LightGreen);
            }
            else
            {
                LabelIsRegistered.Text       = "This copy is not registered.";
                LabelIsRegistered.FontWeight = FontWeights.Normal;
            }

            Loaded += (s, e) =>
            {
                TextRegKey.Focus();
            };
        }
Пример #2
0
        public About()
        {
            InitializeComponent();

            mmApp.SetThemeWindowOverride(this);

            VersionLabel.Content     = "Version " + mmApp.GetVersionForDisplay();
            VersionDateLabel.Content = mmApp.GetVersionDate();

#if NETFULL
            OsLabel.Content = (Environment.Is64BitProcess ? "64 bit" : "32 bit") + " • " +
                              ".NET " + MarkdownMonster.Utilities.mmWindowsUtils.GetDotnetVersion();
#else
            OsLabel.Content = (Environment.Is64BitProcess ? "64 bit" : "32 bit") + " • " +
                              System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
#endif



            if (App.IsPortableMode)
            {
                PortableMode.Content = "Portable mode";
            }

            if (UnlockKey.IsAppRegistered())
            {
                PanelFreeNotice.Visibility = System.Windows.Visibility.Hidden;
                LabelRegistered.Visibility = System.Windows.Visibility.Visible;
            }


            if (mmApp.Configuration.ApplicationUpdates.AccessCount > 20)
            {
                LabelUsingFreeVersion.Text =
                    $"You've used the free version {mmApp.Configuration.ApplicationUpdates.AccessCount:n0} times.";
            }
        }