Esempio n. 1
0
        public MainClientForm(ClientApplicationForm parent, User user) : this()
        {
            _parent     = parent;
            _user       = user;
            label1.Text = $"Welcome, {_user.Name}!";

            try
            {
                ParkingSession active = _parent._parkingManager.GetSessionByCarPlateNumber(_user.CarPlateNumber);
                textBox1.Text = active.ToString();
            }
            catch (ArgumentException ex)
            {
                textBox1.Text = "There are no active parking sesssions!";
            }


            string sessions = _parent._parkingManager.GetCompletedSessionsByCarPlateNumber(_user.CarPlateNumber);

            if (sessions == "")
            {
                textBox2.Text = "There are no passed parking sessions!";
            }
            else
            {
                textBox2.Text = sessions;
            }
        }
Esempio n. 2
0
 public MainClientForm(ClientApplicationForm parent) : this()
 {
     _parent = parent;
 }
Esempio n. 3
0
 public RegisterUserForm(ClientApplicationForm form) : this()
 {
     _parent = form;
 }