示例#1
0
        public void ShowStage(IWizardStage stage, WizardDirection direction)
        {
            System.Diagnostics.Trace.WriteLine(String.Format("Showing stage {0}...", stage.StageName));

            lblStatus.Text = stage.StageName;

            stage.Host = this;
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(stage as Control);

            // Setup buttons
            btnNextFinish.Text = stage.IsTerminal ? "Finish" : "Next";
            btnExitPrevious.Text = stage.CanExit ? "Cancel" : "Back";

            if (CurrentStage != null)
                CurrentStage.Hiding();

            stage.Shown(CurrentStage, direction); 

            CurrentStage = stage;
        }
示例#2
0
        public void ShowStage(IWizardStage stage, WizardDirection dir)
        {
            System.Diagnostics.Trace.WriteLine(String.Format("Showing stage {0}...", stage.StageName));

            if (CurrentStage != null)
            {
                try
                {
                    CurrentStage.Hiding();
                }
                catch (Exception e)
                {
                    if (dir == WizardDirection.Forward)
                    {
                        MessageBox.Show(e.Message);
                        return;
                    }
                }
            }

            lblStatus.Text = stage.StageName;

            stage.Host = this;
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(stage as Control);

            // Setup buttons
            btnNextFinish.Text   = stage.IsTerminal ? "Finish" : "Next";
            btnExitPrevious.Text = stage.CanExit ? "Cancel" : "Back";

            var prevStage = CurrentStage;

            CurrentStage = stage;
            UpdateNextPrev();

            CurrentStage.Shown(prevStage, dir);

            // Select the stage
            SelectCurrentStage(trvStages.Nodes);
        }
示例#3
0
        public void ShowStage(IWizardStage stage, WizardDirection direction)
        {
            System.Diagnostics.Trace.WriteLine(String.Format("Showing stage {0}...", stage.StageName));

            lblStatus.Text = stage.StageName;

            stage.Host = this;
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(stage as Control);

            // Setup buttons
            btnNextFinish.Text   = stage.IsTerminal ? "Finish" : "Next";
            btnExitPrevious.Text = stage.CanExit ? "Cancel" : "Back";

            if (CurrentStage != null)
            {
                CurrentStage.Hiding();
            }

            stage.Shown(CurrentStage, direction);

            CurrentStage = stage;
        }
示例#4
0
        public void ShowStage(IWizardStage stage, WizardDirection dir)
        {
            System.Diagnostics.Trace.WriteLine(String.Format("Showing stage {0}...", stage.StageName));

            if (CurrentStage != null)
            {
                try
                {
                    CurrentStage.Hiding();
                }
                catch(Exception e)
                {
                    if (dir == WizardDirection.Forward)
                    {
                        MessageBox.Show(e.Message);
                        return;
                    }
                }
            }

            lblStatus.Text = stage.StageName;

            stage.Host = this;
            pnlContent.Controls.Clear();
            pnlContent.Controls.Add(stage as Control);

            // Setup buttons
            btnNextFinish.Text = stage.IsTerminal ? "Finish" : "Next";
            btnExitPrevious.Text = stage.CanExit ? "Cancel" : "Back";

            var prevStage = CurrentStage;
            CurrentStage = stage;
            UpdateNextPrev();

            CurrentStage.Shown(prevStage, dir); 

            // Select the stage
            SelectCurrentStage(trvStages.Nodes);
        }