Ejemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Activation activation = new Activation();

            this.ActivationCode.Text = activation.GetActivationCode();

            ActivationManager am = ActivationManager.GetInstance();

            this.Key.Text = am.GetKey();

            if (am.ActivationStatus())
            {
                this.lbl_left.Visibility             = Visibility.Collapsed;
                this.Key.IsEnabled                   = false;
                this.RegisterButtonsPanel.Visibility = Visibility.Collapsed;
            }
            else
            {
                int daysleft = 30 - am.CountDays();


                if (daysleft > 0)
                {
                    this.lbl_left.Content = "Unregistered version you have " + daysleft.ToString() + " days left";
                }
                else
                {
                    this.lbl_left.Content = "Please register you have used your 30 days trial period";
                }
            }
        }
Ejemplo n.º 2
0
        private void Window_Closed(object sender, RoutedEventArgs e)
        {
            ActivationManager am = ActivationManager.GetInstance();

            if (am.IsExipred() && !am.ActivationStatus())
            {
                MessageBox.Show("Please register you have used your 30 days trial period\nThe application will now close");
                Application.Current.Shutdown();
            }
        }