public loginModelView() { login = new CommandPar((p) => { var passwordBox = p as PasswordBox; var password = passwordBox.Password; var user = Ico.getValue <db>().GetUnivdb().users.ToList().Where(u => u.username.Equals(username) && u.passoword.Equals(password)).ToList().FirstOrDefault(); MessageBox.Show(user + ""); if (user == null) { erour = Visibility.Visible; } else { erour = Visibility.Collapsed; Ico.setValue <user>(user); App.Current.MainWindow = new MainWindow(); App.Current.MainWindow.Show(); Ico.getValue <ContentApp>().OpenSample4Dialog(); Ico.getValue <ContentApp>().Sample4Content = new Messagebox(new List <string> { "أهلا وسهلا بك يا " + user.name }, Ico.getValue <ContentApp>().CancelSample4Dialog, true); } }); }
public MainWindow() { InitializeComponent(); // univdb db = new univdb(); // MessageBox.Show((db.processes.ToList())[0].date + ""); ContentApp contentApp = new ContentApp(this); Ico.setValue <ContentApp>(contentApp); this.DataContext = Ico.getValue <ContentApp>(); }
public loginModelView() { login = new CommandPar((p) => { var passwordBox = p as PasswordBox; var password = passwordBox.Password; var user = Ico.getValue <db>().GetUnivdb().users.ToList().Where(u => u.username.Equals(username) && u.passoword.Equals(password)).ToList().FirstOrDefault(); if (user == null) { erour = Visibility.Visible; } else { Ico.setValue <user>(user); MessageBox.Show("JL HG]O,G FK[HP "); } }); }