public bool SetCurrentControl(ChildControl control)
 {
     try
     {
         if (control == null)
         {
             return(false);
         }
         if (this.splitContainer.Panel1.Controls.Count > 0)
         {
             var adddedControl = this.splitContainer.Panel1.Controls[0] as ChildControl;
             if (adddedControl != null)
             {
                 adddedControl.SaveAppSetting();
             }
         }
         this.splitContainer.Panel1.Controls.Clear();
         this.splitContainer.Panel1.Controls.Add(control);
         control.Dock         = DockStyle.Fill;
         control.ShellControl = this;
         control.LoadAppSetting();
         this.CurrentControl = control;
         this.setButtonsVisible(control.ButtonsVisibleStyle);
         control.Initialize();
         return(true);
     }
     catch (Exception error)
     {
         return(false);
     }
 }
        public bool SetCurrentControl(ControlTypes type)
        {
            ChildControl control = null;

            switch (type)
            {
            case ControlTypes.Welcome:
                control = new WelcomeControl();
                break;

            case ControlTypes.LicenseAccept:
                control = new LicenseAcceptControl();
                break;

            case ControlTypes.InstallationOptions:
                control = new InstallationOptionsControl();
                break;

            case ControlTypes.ModulesChoose:
                control = new ModulesChooseControl();
                break;

            case ControlTypes.EditConfig:
                control = new EditConfigControl();
                break;

            case ControlTypes.InstallationProgress:
                control = new InstallationProgressControl();
                break;

            case ControlTypes.Finish:
                control = new FinishControl();
                break;

            case ControlTypes.LicenseCreateControl:
                control = new LicenseCreateControl();
                break;

            default:
                break;
            }
            return(SetCurrentControl(control));
        }