Exemplo n.º 1
0
		private void m_updateManager_updateFinished(object sender, applyUpdateActionFinishedEventArgs e) {
			btnCancel.Enabled = true;
			if (!m_updateManager.currentConfig.Settings.SkipOK) {
				aclApply.Text = Language.GetString("mainForm_lblCurrentStatus_updateSuccessfull");
				aclApply.State = statusLabelStates.Success;
				lblStatus.Text = Language.GetString("mainForm_lblStatus_updateSuccessfull");
				btnCancel.Text = Language.GetString("general_button_close");
				prgUpdate.ShowInTaskbar = false;
				prgUpdate.Value = prgUpdate.Maximum;
			}
			else {
				Close();
			}
		}
Exemplo n.º 2
0
		private void action_actionFinished(object sender, applyUpdateActionFinishedEventArgs e) {
			//Sender zur Liste ausgeführter Aktionen hinzufügen
			m_performedUpdateActions.Add((applyUpdateBase) sender);

			//Überprüfe ob während der Aktion ein Fehler aufgetreten ist
			if ((e.actionException != null && !m_onRollback) || (m_cancellationPending && m_waitForRollback)) {
				m_onRollback = true;
				if (e.actionException == null) {
					m_updateException = new userCancelledException();
				}
				else {
					m_updateException = e.actionException;
				}
				applyUpdateActionCount = 0;

				m_currentAction = m_performedUpdateActions[applyUpdateActionCount];
				m_currentAction.runRollback();
				m_waitForRollback = false;
				//m_performedUpdateActions[applyUpdateActionCount].runRollback();
			}
			else {
				applyUpdateActionCount++;
				if (m_onRollback) {
					if (applyUpdateActionCount >= m_updateActions.Count) {
						if (rollbackFinished != null) {
							rollbackFinished(this, new applyUpdateActionFinishedEventArgs(m_updateException));
						}
					}
					else {
						m_currentAction = m_performedUpdateActions[applyUpdateActionCount];
						m_currentAction.runRollback();
						//m_performedUpdateActions[applyUpdateActionCount].runRollback();
					}
				}
				else {
					//Überpüfe ob alle Aktionen abgearbeitet wurden
					if (applyUpdateActionCount >= m_updateActions.Count) {
						if (updateFinished != null) {
							updateFinished(this, e);
						}
					}
					else {
						m_currentAction = m_updateActions[applyUpdateActionCount];
						m_currentAction.runAction();
						//m_updateActions[applyUpdateActionCount].runAction();
					}
				}
			}
		}
Exemplo n.º 3
0
		private void m_updateManager_rollbackFinished(object sender, applyUpdateActionFinishedEventArgs e) {
			btnCancel.Enabled = true;
			aclApply.Text = Language.GetString("mainForm_lblCurrentStatus_updateFailed");
			lblStatus.Text = Language.GetString("mainForm_lblStatus_updateFailed");
			aclApply.State= statusLabelStates.Failure;
			btnCancel.Text = Language.GetString("general_button_close");
			//(new exceptionDialog(e.actionException)).ShowDialog(this);

			if (!(e.actionException is userCancelledException)) {
				MessageBox.Show(this,
				                string.Format(Language.GetString("mainForm_rollback"), "\r\n", e.actionException.Message),
				                "updateInstaller",
				                MessageBoxButtons.OK,
				                MessageBoxIcon.Error);
			}
			prgUpdate.ShowInTaskbar = false;
			prgUpdate.Value = prgUpdate.Maximum;
			_updateFailed = true;
			;
			if (m_updateManager.currentConfig.Settings.SkipOK) {
				Close();
			}
		}
Exemplo n.º 4
0
        private void action_actionFinished(object sender, applyUpdateActionFinishedEventArgs e)
        {
            //Sender zur Liste ausgeführter Aktionen hinzufügen
            m_performedUpdateActions.Add((applyUpdateBase)sender);

            //Überprüfe ob während der Aktion ein Fehler aufgetreten ist
            if ((e.actionException != null && !m_onRollback) || (m_cancellationPending && m_waitForRollback))
            {
                m_onRollback = true;
                if (e.actionException == null)
                {
                    m_updateException = new userCancelledException();
                }
                else
                {
                    m_updateException = e.actionException;
                }
                applyUpdateActionCount = 0;

                m_currentAction = m_performedUpdateActions[applyUpdateActionCount];
                m_currentAction.runRollback();
                m_waitForRollback = false;
                //m_performedUpdateActions[applyUpdateActionCount].runRollback();
            }
            else
            {
                applyUpdateActionCount++;
                if (m_onRollback)
                {
                    if (applyUpdateActionCount >= m_updateActions.Count)
                    {
                        if (rollbackFinished != null)
                        {
                            rollbackFinished(this, new applyUpdateActionFinishedEventArgs(m_updateException));
                        }
                    }
                    else
                    {
                        m_currentAction = m_performedUpdateActions[applyUpdateActionCount];
                        m_currentAction.runRollback();
                        //m_performedUpdateActions[applyUpdateActionCount].runRollback();
                    }
                }
                else
                {
                    //Überpüfe ob alle Aktionen abgearbeitet wurden
                    if (applyUpdateActionCount >= m_updateActions.Count)
                    {
                        if (updateFinished != null)
                        {
                            updateFinished(this, e);
                        }
                    }
                    else
                    {
                        m_currentAction = m_updateActions[applyUpdateActionCount];
                        m_currentAction.runAction();
                        //m_updateActions[applyUpdateActionCount].runAction();
                    }
                }
            }
        }