private void MissingReportDataCallback(MessageboxResult result)
 {
     _missingReportDataCallbackResult = result;
 }
 private void ReportSuccessfullCallback(MessageboxResult result)
 {
     _reportSuccessfullCallbackResult = result;
 }
 private void ServerSendedCallback(MessageboxResult result)
 {
     _serverSendedCallbackkResult = result;
 }
 private void UploadErrorCallback(MessageboxResult result)
 {
     _uploadErrorCallbackResult = result;
 }
 private void CancelImportCallback(MessageboxResult result)
 {
   // TODO: Taken from previous version, needs to be redone.
   _cancelImportCallbackResult = result;
   if (_cancelImportCallbackResult == MessageboxResult.Cancel)
   {
     ServiceLocator.ProgramImportService.CancelImport();
   }
 }
        private void DeleteSpriteMessageBoxResult(MessageboxResult result)
        {
            if (result == MessageboxResult.Ok)
            {
                var spritesToDelete = SelectedSprites.ToList();

                foreach (var sprite in spritesToDelete)
                {
                    ReferenceCleaner.CleanUpSpriteReferences(sprite, CurrentProgram);

                    CurrentProgram.Sprites.Remove(sprite);
                    sprite.Delete(CurrentProgram);
                }

                SelectedSprites.Clear();
                CommandBarMode = MultiModeEditorCommandBarMode.Normal;
            }
        }
 private void MissingPasswordDataCallback(MessageboxResult result)
 {
     _missingPasswordDataCallbackResult = result;
 }
 private void MissingLoginDataCallback(MessageboxResult result)
 {
     _missingLoginDataCallbackResult = result;
 }
 private void CancelImportCallback(MessageboxResult result)
 {
     _cancelImportCallbackResult = result;
     //if (_cancelImportCallbackResult == MessageboxResult.Cancel)
     //{
     //    ServiceLocator.ProgramImportService.CancelImport();
     //}
 }
        private void RegistrationSuccessfulCallback(MessageboxResult result)
        {
            _registrationSuccessfulCallbackResult = result;

            if (result == MessageboxResult.Ok)
            {
                if (NavigationCallback != null)
                {
                    NavigationCallback();
                }
                else
                {
                    //TODO: Throw error because of navigation callback shouldn't be null
                    throw new Exception("This error shouldn't be thrown. The navigation callback must not be null.");
                }
            }
        }
        private async void CopyProgramMessageCallback(MessageboxResult result)
        {
            DateTime copyStartTime;

            lock (_copyLock)
            {
                if (_isCopying)
                    return;

                _isCopying = true;
                copyStartTime = DateTime.UtcNow;
            }

            _dialogResult = result;

            if (_dialogResult == MessageboxResult.Ok)
            {
                ServiceLocator.TraceService.Add(TraceType.Info, "About to copy local program",
                    "Program name: " + _copyProgramName);

                if (CurrentProgram != null && _copyProgramName == CurrentProgram.Name)
                    await CurrentProgram.Save();

                var sourceProgramName = _copyProgramName;
                var destinationProgramName = await ServiceLocator.ContextService.
                    CopyProgramPart1(_copyProgramName);

                await UpdateLocalPrograms();
                _copyProgramName = null;

                await ServiceLocator.ContextService.CopyProgramPart2(
                    sourceProgramName, destinationProgramName);

                var minDeleteTime = new TimeSpan(0, 0, 2);
                var remainingCopyTime = minDeleteTime.Subtract(
                    DateTime.UtcNow.Subtract(copyStartTime));

                if (remainingCopyTime > new TimeSpan(0))
                    await Task.Delay(remainingCopyTime);

                await UpdateLocalPrograms();

                //var program = await ServiceLocator.ContextService.CopyProgramPart2(
                //    _copyProgramName, updatedProgramName);

                //await UpdateLocalPrograms();

            }

            lock (_copyLock)
            {
                _isCopying = false;
            }
        }
 private async void DeleteProgramMessageCallback(MessageboxResult result)
 {
     _dialogResult = result;
     if (_dialogResult == MessageboxResult.Ok)
     {
         await DeleteProgram(_deleteProgramName);
     }
 }
 private async void MissingFilesCallback(MessageboxResult result)
 {
     _missingFilesCallbackResult = result;
     await CleanUpImport();
 }
        private async void DeleteLookMessageBoxResult(MessageboxResult result)
        {
            if (result == MessageboxResult.Ok)
            {
                var looksToRemove = new List<Look>(SelectedLooks);

                foreach (var look in looksToRemove)
                {
                    ReferenceCleaner.CleanUpLookReferences(look, SelectedSprite);

                    await look.Delete(CurrentProgram);
                    Looks.Remove(look);
                }
                SelectedLooks.Clear();
                LooksCommandBarMode = MultiModeEditorCommandBarMode.Normal;
            }
        }
 private void PasswordInvalidCallback(MessageboxResult result)
 {
     _passwordInvalidCallbackResult = result;
 }
        private async void DeleteSoundMessageBoxResult(MessageboxResult result)
        {
            if (result == MessageboxResult.Ok)
            {
                var soundsToRemove = new List<Sound>(SelectedSounds);

                foreach (var sound in soundsToRemove)
                {
                    ReferenceCleaner.CleanUpSoundReferences(sound, SelectedSprite);

                    await sound.Delete(CurrentProgram);
                    Sounds.Remove(sound);
                }

                SelectedSounds.Clear();
                SoundsCommandBarMode = MultiModeEditorCommandBarMode.Normal;
            }
        }
 private void RecoveryHashNotFoundCallback(MessageboxResult result)
 {
     _recoveryHashNotFoundCallbackResult = result;
     GoBackAction();
 }
 private void WrongLoginDataCallback(MessageboxResult result)
 {
     _wrongLoginDataCallbackResult = result;
 }
 private void CancelExportCallback(MessageboxResult result)
 {
     _cancelExportCallbackResult = result;
 }