Exemplo 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;
            }
        }
Exemplo n.º 2
0
 public MainClientForm(ClientApplicationForm parent) : this()
 {
     _parent = parent;
 }
Exemplo n.º 3
0
 public RegisterUserForm(ClientApplicationForm form) : this()
 {
     _parent = form;
 }