コード例 #1
0
        /// <summary>Whether a translation should be closed, after choosing the respective confirmation dialog.</summary>
        private bool ToCloseTranslationAfterWarning()
        {
            if (ExistTranslationUnsavedChanges())
            {
                SaveConfirmationDialog dialog = new SaveTranslationOnCloseConfirmationDialog();
                return(dialog.WaitForResponse());
            }

            return(true);
        }
コード例 #2
0
        /// <summary>Whether the program should be closed, after choosing the respective confirmation dialog.</summary>
        private bool ToCloseAfterWarning()
        {
            bool toCreate = true;

            if (ExistTextUnsavedChanges())
            {
                SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnCloseFileConfirmationDialog();
                toCreate = subtitleDialog.WaitForResponse();
            }
            if (toCreate && ExistTranslationUnsavedChanges())
            {
                SaveConfirmationDialog translationDialog = new SaveTranslationOnCloseConfirmationDialog();
                toCreate = translationDialog.WaitForResponse();
            }
            return(toCreate);
        }
コード例 #3
0
ファイル: MainUi.cs プロジェクト: GNOME/gnome-subtitles
	/// <summary>Whether a translation should be closed, after choosing the respective confirmation dialog.</summary>
    private bool ToCloseTranslationAfterWarning () {
   		if (ExistTranslationUnsavedChanges()) {
    		SaveConfirmationDialog dialog = new SaveTranslationOnCloseConfirmationDialog();
   			return dialog.WaitForResponse();
   		}
   		else
    		return true;
	}
コード例 #4
0
ファイル: MainUi.cs プロジェクト: GNOME/gnome-subtitles
	/// <summary>Whether the program should be closed, after choosing the respective confirmation dialog.</summary>
    private bool ToCloseAfterWarning () {
    	bool toCreate = true;
    	if (ExistTextUnsavedChanges()) {
	    	SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnCloseFileConfirmationDialog();
    		toCreate = subtitleDialog.WaitForResponse();
    	}
    	if (toCreate && ExistTranslationUnsavedChanges()) {
   			SaveConfirmationDialog translationDialog = new SaveTranslationOnCloseConfirmationDialog();
   			toCreate = translationDialog.WaitForResponse();
   		}
    	return toCreate;
	}