private void key_btn_Click(object sender, RoutedEventArgs e) // Key btn to change the key { // Create a enter key window EnterKey enterkey = new EnterKey(); enterkey.Show(); // Show the enter key window }
// Buttons private void login_btn_Click(object sender, RoutedEventArgs e) // Login btn { if (Properties.Settings.Default.serial_key == "") // Check if a serial key is avialable { // Create a enter key window EnterKey enterkey = new EnterKey(); enterkey.Show(); // Show the enter key window } else { this.Visibility = Visibility.Collapsed; // Disappear login window ... if (premium_lbl.Content.ToString() == "Invalid") { // Shwo info MessageBox.Show("You are using the demo version which works 20 minutes.", "Info", MessageBoxButton.OK, MessageBoxImage.Information); premium = "Invalid"; // Start the timer timer.Start(); } mainwindow.Show(); // Show the main window } }