예제 #1
0
        /// <summary>
        /// Base navigate method
        /// </summary>
        /// <param name="step">The step.</param>
        private void BaseNavigate( WizardStep step, string additionalText )
        {
            string[] asmType = step.Content.Split ( new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
            string asm = this.GetType ( ).Assembly.GetName ( ).FullName;
            string type = asm.Length > 0 ? asmType[0] : string.Empty;
            if ( asmType.Length == 2 ) {
                asm = asmType[1];
            }
            Type createdType = Type.GetType ( type, false, true );
            WizardPanel panel = Activator.CreateInstance ( createdType, this ) as WizardPanel;

            this.LogDebug ( "Navigating to step {0}", createdType.FullName );

            if ( panel != null ) {
                contentPanel.ClearControls ( );
                panel.SetDock ( DockStyle.Fill );
                contentPanel.SetBackColor ( step.ContentBackColor );
                next.SetEnabled ( step.NextEnabled );
                next.SetText ( step.NextText );
                back.SetEnabled ( step.BackEnabled );
                cancel.SetEnabled ( step.CancelEnabled );
                leftPanel.SetVisible ( step.DialogVisible );
                topPanel.SetVisible ( step.BannerVisible );
                title.SetText ( step.Title );
                subtitle.SetText ( step.Subtitle );
                contentPanel.AddControl ( panel );
                panel.SetAdditionalText ( additionalText );
                panel.InitializeWizardPanel ( );

            } else {
                throw new ArgumentException ( "Invalid content object defined in the configuration" );
            }
        }
예제 #2
0
 private void BaseNavigate( WizardStep step )
 {
     BaseNavigate ( step, string.Empty );
 }