public ClientApplication(Network network, string username, User.AccessRights accessRights)
        {
            InitializeComponent();
            this.network = network;
            this.username = username;
            this.accessRights = accessRights;
            Agenda();

            User.AccessRights allRights = User.AccessRights.Leidinggevende | User.AccessRights.KantoorMedewerker;
            User.AccessRights viewRights = User.AccessRights.Kitter;

            if ((accessRights & allRights) != 0)
            {
                MessageBox.Show("Logged in as leidinggevende or kantoormedewerker");
            }
            if((accessRights & User.AccessRights.Leidinggevende) != 0)
            {
                MessageBox.Show("Logged in as leidinggevende");
                //Show tab only for leidinggevende
            }
            else if((accessRights & viewRights) != 0)
            {
                MessageBox.Show("Logged in as kitter");
                projectLijstTab.Hide();
                addUserButton.Hide();
                changeUserButton.Hide();
                removeUserButton.Hide();
                werkbonComboBox.Hide();
                addButon.Hide();
            }
        }
        public ClientApplication(Network network, string username, User.AccessRights accessRights)
        {
            InitializeComponent();
            this.network      = network;
            this.username     = username;
            this.accessRights = accessRights;
            Agenda();

            User.AccessRights allRights  = User.AccessRights.Leidinggevende | User.AccessRights.KantoorMedewerker;
            User.AccessRights viewRights = User.AccessRights.Kitter;

            if ((accessRights & allRights) != 0)
            {
                MessageBox.Show("Logged in as leidinggevende or kantoormedewerker");
            }
            if ((accessRights & User.AccessRights.Leidinggevende) != 0)
            {
                MessageBox.Show("Logged in as leidinggevende");
                //Show tab only for leidinggevende
            }
            else if ((accessRights & viewRights) != 0)
            {
                MessageBox.Show("Logged in as kitter");
                projectLijstTab.Hide();
                addUserButton.Hide();
                changeUserButton.Hide();
                removeUserButton.Hide();
                werkbonComboBox.Hide();
                addButon.Hide();
            }
        }
Esempio n. 3
0
 public PacketLoginResponse(bool loginOk, User.AccessRights accessRights)
 {
     this.loginOk      = loginOk;
     this.accessRights = accessRights;
 }
Esempio n. 4
0
 public void LoginResponse(bool loginOk, User.AccessRights accessRights)
 {
     this.loginOk = loginOk;
     this.accessRights = accessRights;
 }