コード例 #1
0
        /// <summary>Whether a new document should be created, after choosing the respective confirmation dialog.</summary>
        private bool ToCreateNewAfterWarning()
        {
            bool toCreate = true;

            if (ExistTextUnsavedChanges())
            {
                SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnNewFileConfirmationDialog();
                toCreate = subtitleDialog.WaitForResponse();
            }
            if (toCreate && ExistTranslationUnsavedChanges())
            {
                SaveConfirmationDialog translationDialog = new SaveTranslationOnNewFileConfirmationDialog();
                toCreate = translationDialog.WaitForResponse();
            }
            return(toCreate);
        }
コード例 #2
0
ファイル: MainUi.cs プロジェクト: GNOME/gnome-subtitles
    /// <summary>Whether a new document should be created, after choosing the respective confirmation dialog.</summary>
    private bool ToCreateNewAfterWarning () {
    	bool toCreate = true;
   		if (ExistTextUnsavedChanges()) {
    		SaveConfirmationDialog subtitleDialog = new SaveSubtitlesOnNewFileConfirmationDialog();
   			toCreate = subtitleDialog.WaitForResponse();
   		}
   		if (toCreate && ExistTranslationUnsavedChanges()) {
   			SaveConfirmationDialog translationDialog = new SaveTranslationOnNewFileConfirmationDialog();
   			toCreate = translationDialog.WaitForResponse();
   		}
   		return toCreate;
	}