Exemple #1
0
 private void LogLoginEntered()
 {
     if (LogLoginText.TextLength > 0)
     {
         CurrentUser = Empty;
         string login = LogLoginText.Text;
         string pass  = LogPasswordText.Text;
         foreach (var user in AllUsers)
         {
             if (login == user.Login() && user.ComparePassword(pass))
             {
                 CurrentUser = user;
             }
         }
         if (CurrentUser.Equals(Empty))
         {
             LogPasswordText.Text = "";
             MessageBox.Show("Wrong username or password! Check it and try again!");
         }
         else
         {
             LogForm f = this;
             CurrentUser.ReadOpeners();
             new MainForm(f, CurrentUser, AllUsers).Show();
             this.Hide();
         }
     }
 }
 public ChangeInfoForm(LogForm f,User CurrUser,List<User> AllUsers)
 {
     InitializeComponent();
     CurrentUser = CurrUser;
     this.f = f;
     this.AllUsers = AllUsers;
 }
 public ChangeInfoForm(LogForm f, User CurrUser, List <User> AllUsers)
 {
     InitializeComponent();
     CurrentUser   = CurrUser;
     this.f        = f;
     this.AllUsers = AllUsers;
 }
Exemple #4
0
 public MainForm(LogForm f, User CurrUser,List<User>AllUsers)
 {
     InitializeComponent();
     this.f = f;
     this.CurrentUser = CurrUser;
     this.AllUsers = AllUsers;
     WellLab.Text = "Wellcome, " + CurrentUser.Login() + "!";
 }
Exemple #5
0
 public MainForm(LogForm f, User CurrUser, List <User> AllUsers)
 {
     InitializeComponent();
     this.f           = f;
     this.CurrentUser = CurrUser;
     this.AllUsers    = AllUsers;
     WellLab.Text     = "Wellcome, " + CurrentUser.Login() + "!";
 }
 public MusicMainForm(User CurrentUser, LogForm f)
 {
     InitializeComponent();
     ArtistsList.DrawMode = DrawMode.OwnerDrawVariable;
     LoadMusic();
     this.CurrentUser   = CurrentUser;
     AlbumsList.Visible = false;
     foreach (var mf in MusicFiles)
     {
         if (Artists.FirstOrDefault(temp => mf.Tag().Artist() == temp) == null && mf.Tag().Artist() != null)
         {
             Artists.Add(mf.Tag().Artist());
             ArtistsList.Items.Add(mf.Tag().Artist());
         }
     }
     ArtistsList.Items.Add(" No Artist");
     AlbumsList.Items.Add(" No Album");
     this.f             = f;
     AlbumsList.Sorted  = true;
     ArtistsList.Sorted = true;
 }
 public MusicMainForm(User CurrentUser,LogForm f)
 {
     InitializeComponent();
     ArtistsList.DrawMode = DrawMode.OwnerDrawVariable;
     LoadMusic();
     this.CurrentUser = CurrentUser;
     AlbumsList.Visible = false;
     foreach (var mf in MusicFiles)
     {
         if (Artists.FirstOrDefault(temp => mf.Tag().Artist() == temp) == null && mf.Tag().Artist()!=null)
         {
             Artists.Add(mf.Tag().Artist());
             ArtistsList.Items.Add(mf.Tag().Artist());
         }
     }
     ArtistsList.Items.Add(" No Artist");
     AlbumsList.Items.Add(" No Album");
     this.f = f;
     AlbumsList.Sorted = true;
     ArtistsList.Sorted = true;
 }
 public CreateUserForm(LogForm f,List<User> AllUsers)
 {
     this.f = f;
     this.AllUsers = AllUsers;
     InitializeComponent();
 }
 public CreateUserForm(LogForm f, List <User> AllUsers)
 {
     this.f        = f;
     this.AllUsers = AllUsers;
     InitializeComponent();
 }