Exemplo n.º 1
0
        public frmSettings(frmMainBody main)
        {
            InitializeComponent();
            this.main = main;
            int currentIndex = listBox1.SelectedIndex = 0;

            forms           = new List <Form>();
            generalSettings = new frmGeneral(this);
            //createFormInstances();
            setMainPanelForm(currentIndex);

            forms.Add(new frmGeneral(this)
            {
                TopLevel = false, TopMost = true
            });
            forms.Add(new frmFilament(this)
            {
                TopLevel = false, TopMost = true
            });
            forms.Add(new frmShortcuts()
            {
                TopLevel = false, TopMost = true
            });
            forms.Add(new frmNotes(this)
            {
                TopLevel = false, TopMost = true
            });
        }
Exemplo n.º 2
0
        public frmSettings()
        {
            InitializeComponent();
            int currentIndex = listBox1.SelectedIndex = 0;

            forms           = new List <Form>();
            generalSettings = new frmGeneral(this);
            setMainPanelForm(currentIndex);
        }
Exemplo n.º 3
0
        public void setMainPanelForm(int formID)
        {
            Form form = null;


            switch (formID)
            {
            case 0:     // General Settings Tab
                //form = new frmGeneral() { TopLevel = false, TopMost = true } ;
                form = new frmGeneral(this)
                {
                    TopLevel = false, TopMost = true
                };
                break;

            case 1:     // Filament Tab
                form = new frmFilament(this)
                {
                    TopLevel = false, TopMost = true
                };
                break;

            case 2:
                form = new frmShortcuts()
                {
                    TopLevel = false, TopMost = true
                };
                break;

            case 3:
                form = new frmNotes(this)
                {
                    TopLevel = false, TopMost = true
                };
                break;
            }
            form.FormBorderStyle = FormBorderStyle.None;
            form.Dock            = DockStyle.Fill;
            panBody.Controls.Clear(); //Clears Panel Before Placing New Form
            this.panBody.Controls.Add(form);

            form.Show();
        }