예제 #1
0
파일: HomePage.cs 프로젝트: radtek/MFE
        private void btn_Click(object sender, EventArgs e)
        {
            DemoPage panelActiveDemo = null;

            switch ((sender as Button).Text)
            {
            //case "Panel": panelActiveDemo = new PanelDemo(); break;
            //case "Checkbox": panelActiveDemo = new CheckboxDemo(); break;
            case "Image": panelActiveDemo = new ImageDemoPage(); break;

            case "Level": panelActiveDemo = new LevelDemoPage(); break;

            //case "Slider": panelActiveDemo = new SliderDemo(); break;
            case "ProgressBar": panelActiveDemo = new ProgressBarDemoPage(); break;
            }

            if (panelActiveDemo != null)
            {
                //DemoManager.Desktop.Children.Add(panelActiveDemo);
                //DemoManager.Desktop.Invalidate();

                Children.Add(panelActiveDemo);
            }
        }
예제 #2
0
        private void btn_Click(object sender, EventArgs e)
        {
            DemoPage panelActiveDemo = null;
            switch ((sender as Button).Text)
            {
                //case "Panel": panelActiveDemo = new PanelDemo(); break;
                //case "Checkbox": panelActiveDemo = new CheckboxDemo(); break;
                case "Image": panelActiveDemo = new ImageDemoPage(); break;
                case "Level": panelActiveDemo = new LevelDemoPage(); break;
                //case "Slider": panelActiveDemo = new SliderDemo(); break;
                case "ProgressBar": panelActiveDemo = new ProgressBarDemoPage(); break;

            }

            if (panelActiveDemo != null)
            {
                //DemoManager.Desktop.Children.Add(panelActiveDemo);
                //DemoManager.Desktop.Invalidate();

                Children.Add(panelActiveDemo);
            }
        }