Esempio n. 1
0
        public void changetoProfilePage()
        {
            pnlContent.Controls.Clear();

            TableLayoutPanel profile = new TableLayoutPanel();

            removeBreadcrumbs(null, "");
            addBreadrumbs(profile, "Profile");
            lblLocation.Text = "Profile";


            //styling
            profile.Dock        = DockStyle.Fill;
            profile.RowCount    = 1;
            profile.ColumnCount = 2;
            profile.BackColor   = Color.CornflowerBlue;
            //profile.ColumnStyles[0] = new ColumnStyle(SizeType.Absolute, (float)500.0);

            //left panel
            FlowLayoutPanel userInfo = new FlowLayoutPanel();

            userInfo.Width         = 425;
            userInfo.Dock          = DockStyle.Fill;
            userInfo.BackColor     = Color.SteelBlue;
            userInfo.FlowDirection = FlowDirection.TopDown;

            Label infoTitle = new Label();

            infoTitle.Text      = "User Infromation:";
            infoTitle.Font      = new Font("Arial", (float)14.0, FontStyle.Bold);
            infoTitle.ForeColor = Color.White;
            userInfo.Controls.Add(infoTitle);

            Label name = new Label();

            name.ForeColor = Color.White;
            name.AutoSize  = true;
            name.Font      = new Font("Arial", (float)12.0, FontStyle.Bold);
            name.Text      = "Username: "******"Watch List:";
            watchTitle.Font      = new Font("Arial", (float)14.0, FontStyle.Bold);
            watchTitle.AutoSize  = true;
            watchTitle.ForeColor = Color.White;
            watchTitle.Dock      = DockStyle.Top;


            //ThumbNail

            thumbNailHolder           = new FlowLayoutPanel();
            thumbNailHolder.BackColor = Color.CornflowerBlue;
            thumbNailHolder.Dock      = DockStyle.Top;
            thumbNailHolder.Height    = 1000;


            this.Resize -= new EventHandler(searchSizeChange);
            this.Resize -= new EventHandler(recSizeChange);
            this.Resize -= new EventHandler(watchSizeChange);

            this.Resize += new EventHandler(watchSizeChange);

            watchlist.Controls.Add(thumbNailHolder);
            watchlist.Controls.Add(watchTitle);



            //Add all this to the content panel
            pnlContent.Controls.Add(profile);



            //Populate Wish List

            DBConnect    helper = new DBConnect();
            List <Movie> found  = helper.selectMoviesFromWatchList(UID);

            for (int i = 0; i < found.Count; i++)
            {
                thumbNailHolder.Controls.Add(found[i].bildThumbnailWatchPanel());
            }
            numberOfthumbNails = found.Count;

            //MessageBox.Show(found.Count.ToString());
            watchSizeChange();
        }
Esempio n. 2
0
        public void changetoProfilePage()
        {
            pnlContent.Controls.Clear();

            TableLayoutPanel profile = new TableLayoutPanel();
            removeBreadcrumbs(null, "");
            addBreadrumbs(profile, "Profile");
            lblLocation.Text = "Profile";

            //styling
            profile.Dock = DockStyle.Fill;
            profile.RowCount = 1;
            profile.ColumnCount = 2;
            profile.BackColor = Color.CornflowerBlue;
            //profile.ColumnStyles[0] = new ColumnStyle(SizeType.Absolute, (float)500.0);

            //left panel
            FlowLayoutPanel userInfo = new FlowLayoutPanel();
            userInfo.Width = 425;
            userInfo.Dock = DockStyle.Fill;
            userInfo.BackColor = Color.SteelBlue;
            userInfo.FlowDirection = FlowDirection.TopDown;

            Label infoTitle = new Label();
            infoTitle.Text = "User Infromation:";
            infoTitle.Font = new Font("Arial", (float)14.0, FontStyle.Bold);
            infoTitle.ForeColor = Color.White;
            userInfo.Controls.Add(infoTitle);

            Label name = new Label();
            name.ForeColor = Color.White;
            name.AutoSize = true;
            name.Font = new Font("Arial", (float)12.0, FontStyle.Bold);
            name.Text = "Username: "******"Watch List:";
                watchTitle.Font = new Font("Arial", (float)14.0, FontStyle.Bold);
                watchTitle.AutoSize = true;
                watchTitle.ForeColor = Color.White;
                watchTitle.Dock = DockStyle.Top;

                //ThumbNail

                thumbNailHolder = new FlowLayoutPanel();
                thumbNailHolder.BackColor = Color.CornflowerBlue;
                thumbNailHolder.Dock = DockStyle.Top;
                thumbNailHolder.Height = 1000;

                this.Resize -= new EventHandler(searchSizeChange);
                this.Resize -= new EventHandler(recSizeChange);
                this.Resize -= new EventHandler(watchSizeChange);

                this.Resize += new EventHandler(watchSizeChange);

            watchlist.Controls.Add(thumbNailHolder);
            watchlist.Controls.Add(watchTitle);

            //Add all this to the content panel
            pnlContent.Controls.Add(profile);

            //Populate Wish List

            DBConnect helper = new DBConnect();
            List<Movie> found = helper.selectMoviesFromWatchList(UID);

            for (int i = 0; i < found.Count; i++)
            {
                thumbNailHolder.Controls.Add(found[i].bildThumbnailWatchPanel());
            }
            numberOfthumbNails = found.Count;

            //MessageBox.Show(found.Count.ToString());
            watchSizeChange();
        }