Esempio n. 1
0
        private void BtnInloggen_Click(object sender, EventArgs e)
        {
            string email    = TbEmail.Text;
            string password = TbPassword.Text;

            if (String.IsNullOrWhiteSpace(email) || String.IsNullOrWhiteSpace(password))
            {
                MessageBox.Show("Vul alle velden in a.u.b.");
            }
            else
            {
                EventClasses.Login val = _lg.ValidateUser(email, password);
                if (val != null)
                {
                    PostOverview form = new PostOverview(val);
                    Hide();
                    form.Closed += (sender1, args) =>
                    {
                        Close();
                    };
                    form.Show();
                }
                else
                {
                    MessageBox.Show("Verkeerde gebruikersnaam/wachtwoord ingevoerd!");
                    TbPassword.Clear();
                }
            }
        }
Esempio n. 2
0
        public PostOverview(EventClasses.Login val)
        {
            InitializeComponent();
            _val = val;
            List <Message> list = _sc.GetPosts();

            LbOverview.DataSource    = list;
            LbOverview.DisplayMember = "Title";
        }
Esempio n. 3
0
        public Form1(EventClasses.Login val, int postid)
        {
            InitializeComponent();
            _val = val;
            List <Message> list = _sc.GetContents(postid);

            _parent       = (Media)list[0];
            LblNaam.Text  = _parent.UserMessage.Name;
            LblDatum.Text = "Vandaag";
            List <string> cont = (from msg in list where msg.ParentMessage != null select msg.UserMessage.Name + ": " + msg.Content).ToList();

            listBox1.DataSource = cont;
            LblPost.Text        = _parent.Content;
            int reacties = cont.Count;

            LblReacties.Text      = reacties.ToString();
            PbMedia.SizeMode      = PictureBoxSizeMode.StretchImage;
            PbMedia.ImageLocation = _parent.Location;
        }
Esempio n. 4
0
        private void BtnInloggen_Click(object sender, EventArgs e)
        {
            string email    = TbEmail.Text;
            string password = TbPassword.Text;

            if (String.IsNullOrWhiteSpace(email) || String.IsNullOrWhiteSpace(password))
            {
                MessageBox.Show("Vul alle velden in a.u.b.");
            }
            else
            {
                EventClasses.Login val = _lg.ValidateUser(email, password);
                if (val != null)
                {
                    if (val.AccessLevel >= 1)
                    {
                        Toegangscontrole form1 = new Toegangscontrole();
                        form1.Show();
                        Hide();
                        form1.Closed += (sender1, args) =>
                        {
                            Close();
                        };
                        Hide();
                    }
                    else
                    {
                        MessageBox.Show("Niet genoeg rechten om in te loggen!");
                        TbPassword.Clear();
                    }
                }
                else
                {
                    MessageBox.Show("Verkeerd wachtwoord/email in gevoerd!");
                    TbPassword.Clear();
                }
            }
        }
Esempio n. 5
0
 public NewPost(EventClasses.Login val)
 {
     _val = val;
     InitializeComponent();
 }