Exemplo n.º 1
0
        private void Update(StateMachineContext.Events expectedEvents, StateMachineContext.ProcessState state)
        {
            Setup(expectedEvents);
            switch (state)
            {
            case StateMachineContext.ProcessState.SetupDataDialog:
                SetupSetupDialog();
                SetupDataDialogPanel.Focus();
                break;

            case StateMachineContext.ProcessState.Validation:
                SetupDataDialogPanel.DataContext = m_MainWindowStateMachine.InstallationDescription.Wrapper;
                break;

            case StateMachineContext.ProcessState.Installation:
                break;

            case StateMachineContext.ProcessState.Finisched:
                break;

            case StateMachineContext.ProcessState.Uninstall:
                break;
            }
            this.UpdateLayout();
        }
Exemplo n.º 2
0
        private void Setup(StateMachineContext.Events expectedEvents, StateMachineContext.ProcessState state)
        {
            Setup(expectedEvents);
            m_ContentTabControl.Items.Clear();
            switch (state)
            {
            case StateMachineContext.ProcessState.SetupDataDialog:
                m_ContentTabControl.Items.Add(SetupDataDialogPanel);
                SetupSetupDialog();
                UpdateProgressBar(1);
                SetupDataDialogPanel.Focus();
                break;

            case StateMachineContext.ProcessState.Validation:
                m_ContentTabControl.Items.Add(ValidationPanel);
                UpdateProgressBar(2);
                ValidationPanel.Focus();
                SetupValidationDialog();

                //m_ValidationListBox.Items.Clear();
                //m_ValidationPropertyGrid.SelectedObject = m_ApplicationState.Wrapper;
                //m_ValidationPropertyGrid.Text = Properties.Resources.InstallationProperties;
                break;

            case StateMachineContext.ProcessState.Installation:
                m_ContentTabControl.Items.Add(InstallationPanel);
                UpdateProgressBar(3);
                InstallationPanel.Focus();
                InstallationProgressBar.Minimum = 0;
                InstallationProgressBar.Maximum = 10;
                InstallationListBox.AddMessage("Starting installation - it could take several minutes.");
                break;

            case StateMachineContext.ProcessState.Finisched:
                m_ContentTabControl.Items.Add(FinischedPanel);
                UpdateProgressBar(4);
                FinischedPanel.Focus();
                break;

            case StateMachineContext.ProcessState.Uninstall:
                m_ContentTabControl.Items.Add(UninstallPanel);
                UpdateProgressBar(4);
                UninstallPanel.Focus();
                break;
            }
            this.UpdateLayout();
        }