Exemplo n.º 1
0
        /// <summary>Whether a translation should be opened, after choosing the respective confirmation dialog.</summary>
        private bool ToOpenTranslationAfterWarning()
        {
            if (ExistTranslationUnsavedChanges())
            {
                SaveConfirmationDialog dialog = new SaveTranslationOnOpenConfirmationDialog();
                return(dialog.WaitForResponse());
            }

            return(true);
        }
Exemplo n.º 2
0
        /// <summary>Whether a document should be opened, after choosing the respective confirmation dialog.</summary>
        private bool ToOpenAfterWarning()
        {
            bool toCreate = true;

            if (ExistTextUnsavedChanges())
            {
                SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnOpenFileConfirmationDialog();
                toCreate = subtitleDialog.WaitForResponse();
            }
            if (toCreate && ExistTranslationUnsavedChanges())
            {
                SaveConfirmationDialog translationDialog = new SaveTranslationOnOpenConfirmationDialog();
                toCreate = translationDialog.WaitForResponse();
            }
            return(toCreate);
        }
Exemplo n.º 3
0
	/// <summary>Whether a translation should be opened, after choosing the respective confirmation dialog.</summary>
	private bool ToOpenTranslationAfterWarning () {
   		if (ExistTranslationUnsavedChanges()) {
    		SaveConfirmationDialog dialog = new SaveTranslationOnOpenConfirmationDialog();
   			return dialog.WaitForResponse();
   		}
   		else
    		return true;
	}
Exemplo n.º 4
0
	/// <summary>Whether a document should be opened, after choosing the respective confirmation dialog.</summary>
	private bool ToOpenAfterWarning () {
   		bool toCreate = true;
   		if (ExistTextUnsavedChanges()) {
    		SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnOpenFileConfirmationDialog();
   			toCreate = subtitleDialog.WaitForResponse();
   		}
   		if (toCreate && ExistTranslationUnsavedChanges()) {
   			SaveConfirmationDialog translationDialog = new SaveTranslationOnOpenConfirmationDialog();
   			toCreate = translationDialog.WaitForResponse();
   		}
   		return toCreate;
	}