Ejemplo n.º 1
0
        private Panel CreateAccountPanel()
        {
            AccountFormElement sfe = new AccountFormElement();

            return(sfe.CreateAccountPanel(new Point(0, 0),
                                          DynamicPagePanel.Width,
                                          DynamicPagePanel.Height,
                                          this));
        }
Ejemplo n.º 2
0
        public void LoadAccountPage(string subpage)
        {
            for (int i = 0; i < LeftButtonPanels.Length; i++)
            {
                LeftButtonPanels[i].IsHighlighted = false;
                LeftButtonPanels[i].IsSelected    = false;
            }

            LeftButtonPanels[3].IsHighlighted = true;
            LeftButtonPanels[3].IsSelected    = true;

            CurrentSelectedPage = 3;

            DynamicPagePanel.Controls.Clear();

            AccountFormElement sfe = new AccountFormElement();

            int id = -1;

            // Failsafe. if id stays -1, it loads the main page anyway
            if (subpage.Equals("Registration"))
            {
                id = 0;
            }

            if (subpage.Equals("Login"))
            {
                id = 1;
            }

            CurrentActivePagePanel = sfe.CreateAccountPanel(new Point(0, 0),
                                                            DynamicPagePanel.Width,
                                                            DynamicPagePanel.Height,
                                                            this, id);

            DynamicPagePanel.Controls.Add(CurrentActivePagePanel);
        }