/// <summary>
        /// Initializes a new instance of the <see cref="DataSynchronizationHandlerEventArgs"/> class.
        /// </summary>
        /// <param name="step">The step.</param>
        public DataSynchronizationHandlerEventArgs(SynchronizationStepViewModel step, DataSynchronizationInfo data)
        {
            this.HandlingData = new DataSynchronizationInfo();
            this.HandlingData.Action = data.Action;
            this.HandlingData.HandlingInfo = data.HandlingInfo;

            this.stepViewModel = step;
        }
 private void RunWithCatch(System.Action action, SynchronizationStepViewModel step)
 {
     try
     {
         action();
     }
     catch (System.Exception)
     {
         step.Failed();
         this.StopMainProcessBar();
     }
 }
 private void ProcessError(SynchronizationStepViewModel serverStep, System.Exception exception)
 {
     serverStep.Failed();
     this.StopMainProcessBar();
 }
 private void InitializeStepViewModels()
 {
     this.connectingServerStep = new SynchronizationStepViewModel(this.GetLanguageInfoByKey("StepInfo_ConnectingServer"));
     this.datatransferingStep = new SynchronizationStepViewModel(this.GetLanguageInfoByKey("StepInfo_TransferingData"));
     this.dataCheckingStep = new SynchronizationStepViewModel(this.GetLanguageInfoByKey("StepInfo_CheckingData"));
     this.actionEndingStep = new SynchronizationStepViewModel(this.GetLanguageInfoByKey("StepInfo_EndingAction"));
     this.ConnectServerStepPanel.DataContext = this.connectingServerStep;
     this.DatatransferingStepPanel.DataContext = this.datatransferingStep;
     this.DataCheckStepPanel.DataContext = this.dataCheckingStep;
     this.ActionEndingStepPanel.DataContext = this.actionEndingStep;
 }
 private void InitializeStepViewModels()
 {
     this.connectingServerStep = new SynchronizationStepViewModel(LocalizedStrings.GetLanguageInfoByKey("StepInfo_ConnectingServer"));
     this.datatransferingStep = new SynchronizationStepViewModel(LocalizedStrings.GetLanguageInfoByKey("StepInfo_TransferingData"));
     this.dataCheckingStep = new SynchronizationStepViewModel(LocalizedStrings.GetLanguageInfoByKey("StepInfo_CheckingData"));
     this.actionEndingStep = new SynchronizationStepViewModel(LocalizedStrings.GetLanguageInfoByKey("StepInfo_EndingAction"));
 }
 private void RunWithCatch(System.Action action, SynchronizationStepViewModel step)
 {
     try
     {
         action();
     }
     catch (System.Exception exception)
     {
         this.Alert(this.GetLanguageInfoByKey("GetExceptionMessage") + "\r\n" + exception.Message, null);
         AppUpdater.AddErrorLog("ExceptionWhenSyncingData", exception.StackTrace, new string[0]);
         step.Failed();
         this.StopMainProcessBar();
     }
 }