Ejemplo n.º 1
0
        void wizard_NextButtonClick(object sender, WizardNavigationEventArgs e)
        {
            var currentStepIndex = e.CurrentStepIndex;

            switch (currentStepIndex)
            {
            case 0:
                var list          = WorkspaceListControl;
                var selectedValue = list.SelectedValue;
                if (WizardState == null)
                {
                    var workspaceSettings = new WorkspaceWizardSetting
                    {
                        SelectedWorkspacePath = selectedValue
                    };
                    WizardState = workspaceSettings;
                }
                else
                {
                    WizardState.SelectedWorkspacePath = selectedValue;
                }
                break;

            case 1:
                ChangeWizardState();
                break;

            case 2:
                break;
            }
        }
Ejemplo n.º 2
0
        private void SetWizardState(WorkspaceWizardSetting value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }
            var formatter = new LosFormatter();
            var writer    = new StringWriter();

            formatter.Serialize(writer, value);
            var input = CurrentUserControl.FindControl("_settings") as HtmlInputHidden;

            if (input == null)
            {
                return;
            }
            input.Value = writer.ToString();
        }