Add project files.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace SafeBagDE70.Admin
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for AdminLoginUC.xaml
|
||||
/// </summary>
|
||||
public partial class AdminLoginUC : UserControl
|
||||
{
|
||||
public AdminLoginUC()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LoginButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string username = UsernameTextBox.Text;
|
||||
string password = PasswordBox.Password;
|
||||
|
||||
// Simple authentication logic
|
||||
if (username == "admin" && password == "password") // Replace with actual logic
|
||||
{
|
||||
// Load Settings UserControl
|
||||
var mainWindow = (MainWindow)Window.GetWindow(this);
|
||||
//mainWindow.LoadUserControl(new SettingsUserControl());
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Invalid username or password.", "Login Failed", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user