예제 #1
0
 public adress(string pid, profilePage pp)
 {
     InitializeComponent();
     this.pid = pid;
     aid      = aidGenerator();
     this.pp  = pp;
 }
예제 #2
0
        private void userMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (logedIn == false)
            {
                Log_In logInForm = new Log_In(this);
                logInForm.Show();
                this.Hide();
            }
            else
            {
                int index = userMenu.Items.IndexOf(e.ClickedItem);

                if (isAdmin == true)
                {
                    if (index == 0)
                    {
                        disposeFunc(getFirstChild());
                        adminPanel ap = new adminPanel(this);
                        container.Controls.Add(ap);
                    }
                    else if (index == 1)
                    {
                        disposeFunc(getFirstChild());
                        profilePage pp = new profilePage(u);
                        container.Controls.Add(pp);
                    }
                    else
                    {
                        Application.Restart();
                    }
                }
                else
                {
                    if (index == 0)
                    {
                        disposeFunc(getFirstChild());
                        profilePage pp = new profilePage(u);
                        container.Controls.Add(pp);
                    }
                    else
                    {
                        Application.Restart();
                    }
                }
            }
        }