Example #1
0
        public void GoToWizard(WizardPanel wizard)
        {
            HideWizards();
            AlignWizards();

            WizardPanel oldWizard = _wizard;

            switch (_wizard = wizard)
            {
            case WizardPanel.StartButtons:
                pnlWizard_1.Show();
                break;

            case WizardPanel.PreInstall:
                pnlPreInstalar.Show();
                break;

            case WizardPanel.PreUninstall:
                pnlPreDesinstalar.Show();
                break;

            case WizardPanel.Progress:
                pnlProgresso.Show();
                break;

            default:
                _wizard = oldWizard;
                throw new Exception(string.Format("Identificação WIZARD inválida: {0}", wizard));
            }
        }
        public override bool OnNext()
        {
            if (this._saveCheckBox.Checked)
            {
                ICollection      connections = this._dataEnvironment.Connections;
                StringDictionary dictionary  = new StringDictionary();
                foreach (DesignerDataConnection connection in connections)
                {
                    if (connection.IsConfigured)
                    {
                        dictionary.Add(connection.Name, null);
                    }
                }
                if (dictionary.ContainsKey(this._nameTextBox.Text))
                {
                    UIServiceHelper.ShowError(base.ServiceProvider, System.Design.SR.GetString("SqlDataSourceSaveConfiguredConnectionPanel_DuplicateName", new object[] { this._nameTextBox.Text }));
                    this._nameTextBox.Focus();
                    return(false);
                }
            }
            WizardPanel panel = SqlDataSourceConnectionPanel.CreateCommandPanel((SqlDataSourceWizardForm)base.ParentWizard, this._dataConnection, base.NextPanel);

            if (panel == null)
            {
                return(false);
            }
            base.NextPanel = panel;
            return(true);
        }
Example #3
0
        /// <summary>
        /// Sets the active panel.
        /// </summary>
        /// <param name="panel">
        /// The panel.
        /// </param>
        /// <param name="controlToShow">
        /// The control to show.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void SetActivePanel(WizardPanel panel, Control controlToShow)
        {
            var currentPanel = this.FindControl(this.CurrentWizardPanel.ToString()) as Panel;

            if (currentPanel != null)
            {
                currentPanel.Visible = false;
            }

            switch (panel)
            {
            case WizardPanel.PreInstall:
                this.Previous.Enabled = false;
                this.License.Visible  = false;
                break;

            case WizardPanel.Done:
                this.Next.Enabled     = false;
                this.Previous.Enabled = false;
                break;

            case WizardPanel.Errors:
                this.Previous.Enabled = false;
                this.Next.Enabled     = false;
                break;

            default:
                this.Previous.Enabled = true;
                this.Next.Enabled     = true;
                break;
            }

            controlToShow.Visible   = true;
            this.CurrentWizardPanel = panel;
        }
Example #4
0
        void SetActivePanel(WizardPanel panel, Control controlToShow)
        {
            var currentPanel = FindControl(CurrentWizardPanel.ToString()) as PlaceHolder;

            if (currentPanel != null)
            {
                currentPanel.Visible = false;
            }

            switch (panel)
            {
            case WizardPanel.AdvertisementBase:
                Previous.CssClass = "btn disabled";
                break;

            case WizardPanel.Done:
                AddWaitAndRedirectScript(PageAdvertisement.GetRedirectUrl(PublishmentSystemId));
                Next.CssClass     = "btn btn-primary disabled";
                Previous.CssClass = "btn disabled";
                break;

            case WizardPanel.OperatingError:
                Next.CssClass     = "btn btn-primary disabled";
                Previous.CssClass = "btn disabled";
                break;

            default:
                Next.CssClass     = "btn btn-primary";
                Previous.CssClass = "btn";
                break;
            }

            controlToShow.Visible = true;
            CurrentWizardPanel    = panel;
        }
Example #5
0
 public void TS_GoToWizard(WizardPanel wizard)
 {
     Invoke(new GoToWizardDelegate(GoToWizard), new object[]
     {
         wizard
     });
 }
Example #6
0
		public void AddPanel(WizardPanel control)
		{
			control.SetContext(context);
			control.OnChange += new EventHandler(PanelChanged);

			control.SuspendLayout();
			control.SetBounds(152,46,464,336);

			panels.Add(control);

			Controls.Add(control);

			control.ResumeLayout(true);
		}
        public override bool OnNext()
        {
            if (!this.CheckValidProvider())
            {
                return(false);
            }
            WizardPanel panel = CreateCommandPanel((SqlDataSourceWizardForm)base.ParentWizard, this.DataConnection, base.NextPanel);

            if (panel == null)
            {
                return(false);
            }
            base.NextPanel = panel;
            return(true);
        }
Example #8
0
        private void SetActivePlaceHolder(WizardPanel panel, Control controlToShow)
        {
            var currentPanel = FindControl("ph" + CurrentWizardPanel);

            if (currentPanel != null)
            {
                currentPanel.Visible = false;
            }

            if (panel == WizardPanel.Welcome)
            {
                BtnPrevious.CssClass = "btn disabled";
                BtnPrevious.Enabled  = false;
                BtnNext.CssClass     = "btn btn-primary";
                BtnNext.Enabled      = true;
            }
            else if (panel == WizardPanel.Done)
            {
                BtnPrevious.CssClass = "btn disabled";
                BtnPrevious.Enabled  = false;
                BtnNext.CssClass     = "btn btn-primary disabled";
                BtnNext.Enabled      = false;
            }
            else if (panel == WizardPanel.OperatingError)
            {
                BtnPrevious.CssClass = "btn disabled";
                BtnPrevious.Enabled  = false;
                BtnNext.CssClass     = "btn btn-primary disabled";
                BtnNext.Enabled      = false;
            }
            else
            {
                BtnPrevious.CssClass = "btn";
                BtnPrevious.Enabled  = true;
                BtnNext.CssClass     = "btn btn-primary";
                BtnNext.Enabled      = true;
            }

            controlToShow.Visible = true;
            CurrentWizardPanel    = panel;
        }
Example #9
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");
            }
        }
Example #10
0
        /// <summary>
        /// Steps the class.
        /// </summary>
        /// <param name="panelName">
        /// Name of the panel.
        /// </param>
        /// <returns>
        /// The step class.
        /// </returns>
        /// <remarks>
        /// </remarks>
        public string StepClass(WizardPanel panelName)
        {
            var returnValue = this.CurrentWizardPanel != panelName ? "stepnotselected" : "stepselected";

            return returnValue;
        }
Example #11
0
 private void SetPanelVisibility(WizardPanel panel)
 {
     switch (panel) {
         case WizardPanel.PerformSetup:
             panelVisibility(true, false, false, false,false);
             break;
         case WizardPanel.SelectMasterpage:
             panelVisibility(false, true, false, false,false);
             break;
         case WizardPanel.SelectFolderForTemplates:
             panelVisibility(false, false, true, false,false);
             break;
         case WizardPanel.SelectPlaceHolder:
             panelVisibility(false, false, false, true,false);
             break;
         case WizardPanel.SuccessMessage:
             panelVisibility(false, false, false, false, true);
             break;
     }
 }
        internal static WizardPanel CreateCommandPanel(SqlDataSourceWizardForm wizard, DesignerDataConnection dataConnection, WizardPanel nextPanel)
        {
            IDataEnvironment service = null;
            IServiceProvider site    = wizard.SqlDataSourceDesigner.Component.Site;

            if (site != null)
            {
                service = (IDataEnvironment)site.GetService(typeof(IDataEnvironment));
            }
            bool flag = false;

            if (service != null)
            {
                try
                {
                    IDesignerDataSchema connectionSchema = service.GetConnectionSchema(dataConnection);
                    if (connectionSchema != null)
                    {
                        flag = connectionSchema.SupportsSchemaClass(DesignerDataSchemaClass.Tables);
                        if (flag)
                        {
                            connectionSchema.GetSchemaItems(DesignerDataSchemaClass.Tables);
                        }
                        else
                        {
                            flag = connectionSchema.SupportsSchemaClass(DesignerDataSchemaClass.Views);
                            connectionSchema.GetSchemaItems(DesignerDataSchemaClass.Views);
                        }
                    }
                }
                catch (Exception exception)
                {
                    UIServiceHelper.ShowError(site, exception, System.Design.SR.GetString("SqlDataSourceConnectionPanel_CouldNotGetConnectionSchema"));
                    return(null);
                }
            }
            if (nextPanel == null)
            {
                if (flag)
                {
                    return(wizard.GetConfigureSelectPanel());
                }
                return(CreateCustomCommandPanel(wizard, dataConnection));
            }
            if (flag)
            {
                if (nextPanel is SqlDataSourceConfigureSelectPanel)
                {
                    return(nextPanel);
                }
                return(wizard.GetConfigureSelectPanel());
            }
            if (nextPanel is SqlDataSourceCustomCommandPanel)
            {
                return(nextPanel);
            }
            return(CreateCustomCommandPanel(wizard, dataConnection));
        }
Example #13
0
 public void EnterExportMode(ExporPanelTab tab)
 {
     ExportOptionbox.Checked = true;
     activePanel = WizardPanel.Select;
     exportTab = tab;
 }
Example #14
0
 protected override bool CanChangePanel(WizardPanel panel)
 {
     return(textBox1.Text == "Yes");
 }
Example #15
0
        /// <summary>
        /// Sets the active panel.
        /// </summary>
        /// <param name="panel">
        /// The panel.
        /// </param>
        /// <param name="controlToShow">
        /// The control to show.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void SetActivePanel(WizardPanel panel, Control controlToShow)
        {
            var currentPanel = this.FindControl(this.CurrentWizardPanel.ToString()) as Panel;
            if (currentPanel != null)
            {
                currentPanel.Visible = false;
            }

            switch (panel)
            {
                case WizardPanel.PreInstall:
                    this.Previous.Enabled = false;
                    this.License.Visible = false;
                    break;
                case WizardPanel.Done:
                    this.Next.Enabled = false;
                    this.Previous.Enabled = false;
                    break;
                case WizardPanel.Errors:
                    this.Previous.Enabled = false;
                    this.Next.Enabled = false;
                    break;
                default:
                    this.Previous.Enabled = true;
                    this.Next.Enabled = true;
                    break;
            }

            controlToShow.Visible = true;
            this.CurrentWizardPanel = panel;
        }
Example #16
0
        private void SetCurrentPanel(WizardPanel panel, Control controlToShow)
        {
            Panel currentPanel = wizCtnt.FindControl(CurrentWizardPanel.ToString()) as Panel;
            if (currentPanel != null)
                currentPanel.Visible = false;

            switch (panel)
            {
                case WizardPanel.Welcome:
                    btnPrevious.Enabled = false;
                    License.Visible = false;
                    break;
                case WizardPanel.Finished:
                    btnNext.Enabled = false;
                    btnPrevious.Enabled = false;
                    break;
                default:
                    btnPrevious.Enabled = true;
                    btnNext.Enabled = true;
                    break;
            }

            controlToShow.Visible = true;
            CurrentWizardPanel = panel;
        }
Example #17
0
 public void EnterImportMode()
 {
     ImportOptionbox.Checked = true;
     activePanel = WizardPanel.Import;
 }
Example #18
0
        /// <summary>
        /// Steps the class.
        /// </summary>
        /// <param name="panelName">
        /// Name of the panel.
        /// </param>
        /// <returns>
        /// The step class.
        /// </returns>
        /// <remarks>
        /// </remarks>
        public string StepClass(WizardPanel panelName)
        {
            var returnValue = this.CurrentWizardPanel != panelName ? "stepnotselected" : "stepselected";

            return(returnValue);
        }
Example #19
0
        private void ChangePanel(WizardPanel panel)
        {
            HidePanels();

            switch(panel) {
                case WizardPanel.Welcome: {
                    WelcomePanel.Visible = true;
                    BackButton.Enabled = false;
                    break;
                }
                case WizardPanel.Select: {
                    SelectPanel.Visible = true;
                    BackButton.Enabled = true;
                    break;
                }
                case WizardPanel.Export: {
                    ExportPanel.Visible = true;
                    BackButton.Enabled = true;
                    break;
                }
                case WizardPanel.Import: {
                    ImportPanel.Visible = true;
                    BackButton.Enabled = true;
                    break;
                }
                case WizardPanel.Action: {
                    ActionPanel.Visible = true;
                    BackButton.Enabled = false;
                    NextButton.Enabled = false;
                    break;
                }
            }

            activePanel = panel;
        }