Exemplo n.º 1
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.º 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;
	}