예제 #1
0
        private void panel4_Click(object sender, EventArgs e)
        {
            Form temp_form = new ScmAdd();

            temp_form.Show();
            this.Hide();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //Get event sender as button via cast
            Button temp_button = (Button)sender;
            Form   temp_form;

            //Behaviour is determined by button name
            switch (temp_button.Name)
            {
            case "AddButton":
                //Switch to Add Stock GUI by creating a new GUI and hiding this one
                temp_form = new ScmAdd();
                temp_form.Show();
                this.Hide();
                break;

            case "ViewButton":
                temp_form = new ScmView();
                temp_form.Show();
                this.Hide();
                break;

            case "ReportButton":
                temp_form = new ScmReport();
                temp_form.Show();
                this.Hide();
                break;
            }
        }