コード例 #1
0
        public EditLicenseForm()
        {
            InitializeComponent();
            this.normalLicenseConfigPanel      = new NormalLicenseConfigPanel();
            this.normalLicenseConfigPanel.Dock = DockStyle.Fill;
            this.containerConfig.Controls.Add(this.normalLicenseConfigPanel);

            this.Init();
        }
コード例 #2
0
        private void SwitchConfigPanel(string configType)
        {
            Control configPanel;

            switch (configType)
            {
            case "Normal":
                configPanel = this.normalLicenseConfigPanel;
                if (configPanel == null || configPanel.IsDisposed)
                {
                    configPanel = new NormalLicenseConfigPanel();
                    this.containerConfig.Controls.Add(configPanel);
                }
                break;

            case "Trial":
                configPanel = this.trialLicenseConfigPanel;
                if (configPanel == null || configPanel.IsDisposed)
                {
                    configPanel = new TrialLicenseConfigPanel();
                    this.containerConfig.Controls.Add(configPanel);
                }
                break;

            case "Develop":
                configPanel = this.developLicenseConfigPanel;
                if (configPanel == null || configPanel.IsDisposed)
                {
                    configPanel = new DevelopLicenseConfigPanel();
                    this.containerConfig.Controls.Add(configPanel);
                }
                break;

            default:
                throw new Exception("unsurport configType");
            }
            configPanel.Dock = DockStyle.Fill;
            foreach (Control control in this.containerConfig.Controls)
            {
                control.Hide();
            }
            this.containerConfig.Controls[configPanel.Name].Show();
        }