Esempio n. 1
0
        private void menuItem8_Click(object sender, EventArgs e)
        {
            Form RoomQuery = new RoomQuery();

            for (int x = 0; x < MdiChildren.Length; x++)
            {
                Form tempChild = (Form)this.MdiChildren[x];
                tempChild.Close();
            }
            RoomQuery.MdiParent   = this;
            RoomQuery.WindowState = FormWindowState.Maximized;
            RoomQuery.Show();
        }
Esempio n. 2
0
        private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            switch (toolStrip1.Items.IndexOf(e.ClickedItem))
            {
            case 0:
                Form Renter = new Renter();
                for (int x = 0; x < this.MdiChildren.Length; x++)
                {
                    Form tempChild = (Form)this.MdiChildren[x];
                    tempChild.Close();
                }
                Renter.MdiParent   = this;
                Renter.WindowState = FormWindowState.Maximized;
                Renter.Show();
                break;

            case 1:
                Form Room = new Room();
                for (int x = 0; x < this.MdiChildren.Length; x++)
                {
                    Form tempChild = (Form)this.MdiChildren[x];
                    tempChild.Close();
                }
                Room.MdiParent   = this;
                Room.WindowState = FormWindowState.Maximized;
                Room.Show();
                break;

            case 2:
                Form RoomQuery = new RoomQuery();
                for (int x = 0; x < this.MdiChildren.Length; x++)
                {
                    Form tempChild = (Form)this.MdiChildren[x];
                    tempChild.Close();
                }
                RoomQuery.MdiParent   = this;
                RoomQuery.WindowState = FormWindowState.Maximized;
                RoomQuery.Show();
                break;

            case 3:
                Form CustomerQuery = new CustomerQuery();
                for (int x = 0; x < this.MdiChildren.Length; x++)
                {
                    Form tempChild = (Form)this.MdiChildren[x];
                    tempChild.Close();
                }
                CustomerQuery.MdiParent   = this;
                CustomerQuery.WindowState = FormWindowState.Maximized;
                CustomerQuery.Show();
                break;

            case 4:
                Form Profit = new Profit();
                for (int x = 0; x < MdiChildren.Length; x++)
                {
                    Form tempChild = (Form)MdiChildren[x];
                    tempChild.Close();
                }
                Profit.MdiParent   = this;
                Profit.WindowState = FormWindowState.Maximized;
                Profit.Show();
                break;

            case 5:
                Application.Exit();
                break;
            }
        }