C# Class GnomeSubtitles.Ui.MainUi

Afficher le fichier Open project: GNOME/gnome-subtitles Class Usage Examples

Méthodes publiques

Méthode Description
Close ( ) : void

Closes the open file.

Kill ( ) : void

Kills the window in the most quick and unfriendly way.

MainUi ( EventHandlers handlers, Glade &glade ) : GnomeSubtitles.Core
New ( ) : void

Creates a new subtitles document for the specified path.

If there's a document open with unsaved changes, a warning dialog is shown.

Open ( ) : void

Shows the open dialog and possibly opens a subtitle.

If there's a document currently open with unsaved changes, a warning dialog is shown before opening the new file.

Open ( string filename ) : void

Opens a subtitle.

If there's a document currently open with unsaved changes, a warning dialog is shown before opening the new file.

OpenVideo ( ) : void
Quit ( ) : void

Quits the application.

Save ( ) : bool

Executes a Save operation.

If the document hasn't been saved before, a SaveAs is executed.

SaveAs ( ) : bool

Executes a SaveAs operation.

After saving, the timing mode is set to the timing mode of the subtitle format using when saving.

Start ( ) : void

Starts the GUI

TranslationClose ( ) : void

Closes a translation.

If there's a translation open with unsaved changes, a warning dialog is shown.

TranslationNew ( ) : void

Starts a new translation.

If there's a translation open with unsaved changes, a warning dialog is shown.

TranslationOpen ( ) : void

Shows the open translation dialog and possibly opens a file.

If there's a translation currently open with unsaved changes, a warning dialog is shown before opening the new file.

TranslationReload ( ) : void

Reloads the current translation file.

If there's a translation currently open with unsaved changes, a warning dialog is shown before opening the new file.

TranslationSave ( ) : bool

Executes a Save operation regarding the translation.

If the translation hasn't been saved before, a TranslationSaveAs is executed.

TranslationSaveAs ( ) : bool

Executes a translation SaveAs operation.

Private Methods

Méthode Description
CodePageToEncoding ( int codePage ) : Encoding

Creates an Encoding from a code page.

ExistTextUnsavedChanges ( ) : bool

Whether there are unsaved normal changes.

ExistTranslationUnsavedChanges ( ) : bool

Whether there are unsaved translation changes.

GetFileOpenCodePageFromConfig ( ) : int
GetSubtitleFileArg ( string args ) : string
OnBaseDocumentLoaded ( Document document ) : void
OnBaseDocumentModificationStatusChanged ( bool modified ) : void
OnBaseDocumentUnloaded ( Document document ) : void
OnBaseInitFinished ( ) : void
Open ( string path, int codePage, Uri videoUri ) : void

Opens a subtitle file, given its filename, code page and video filename.

An error dialog is presented if an exception is caught during open.

OpenTranslation ( string path, int codePage ) : void

Opens a translation file, given its filename and code page.

An error dialog is presented if an exception is caught during open.

Save ( FileProperties fileProperties ) : void
SaveTranslation ( FileProperties fileProperties ) : void
ShowSaveAsDialog ( SubtitleFileSaveAsDialog dialog ) : FileProperties

Displays a SaveAs dialog and gets the chosen options as .

ToCloseAfterWarning ( ) : bool

Whether the program should be closed, after choosing the respective confirmation dialog.

ToCloseTranslationAfterWarning ( ) : bool

Whether a translation should be closed, after choosing the respective confirmation dialog.

ToCreateNewAfterWarning ( ) : bool

Whether a new document should be created, after choosing the respective confirmation dialog.

ToCreateNewTranslationAfterWarning ( ) : bool

Whether a new translation should be created, after choosing the respective confirmation dialog.

ToOpenAfterWarning ( ) : bool

Whether a document should be opened, after choosing the respective confirmation dialog.

ToOpenTranslationAfterWarning ( ) : bool

Whether a translation should be opened, after choosing the respective confirmation dialog.

UpdateTitleModificationStatus ( bool showFilename, bool modified ) : void

Method Details

Close() public méthode

Closes the open file.
public Close ( ) : void
Résultat void

Kill() public méthode

Kills the window in the most quick and unfriendly way.
public Kill ( ) : void
Résultat void

MainUi() public méthode

public MainUi ( EventHandlers handlers, Glade &glade ) : GnomeSubtitles.Core
handlers EventHandlers
glade Glade
Résultat GnomeSubtitles.Core

New() public méthode

Creates a new subtitles document for the specified path.
If there's a document open with unsaved changes, a warning dialog is shown.
public New ( ) : void
Résultat void

Open() public méthode

Shows the open dialog and possibly opens a subtitle.
If there's a document currently open with unsaved changes, a warning dialog is shown before opening the new file.
public Open ( ) : void
Résultat void

Open() public méthode

Opens a subtitle.
If there's a document currently open with unsaved changes, a warning dialog is shown before opening the new file.
public Open ( string filename ) : void
filename string The path of the subtitles file to open.
Résultat void

OpenVideo() public méthode

public OpenVideo ( ) : void
Résultat void

Quit() public méthode

Quits the application.
public Quit ( ) : void
Résultat void

Save() public méthode

Executes a Save operation.
If the document hasn't been saved before, a SaveAs is executed.
public Save ( ) : bool
Résultat bool

SaveAs() public méthode

Executes a SaveAs operation.
After saving, the timing mode is set to the timing mode of the subtitle format using when saving.
public SaveAs ( ) : bool
Résultat bool

Start() public méthode

Starts the GUI
public Start ( ) : void
Résultat void

TranslationClose() public méthode

Closes a translation.
If there's a translation open with unsaved changes, a warning dialog is shown.
public TranslationClose ( ) : void
Résultat void

TranslationNew() public méthode

Starts a new translation.
If there's a translation open with unsaved changes, a warning dialog is shown.
public TranslationNew ( ) : void
Résultat void

TranslationOpen() public méthode

Shows the open translation dialog and possibly opens a file.
If there's a translation currently open with unsaved changes, a warning dialog is shown before opening the new file.
public TranslationOpen ( ) : void
Résultat void

TranslationReload() public méthode

Reloads the current translation file.
If there's a translation currently open with unsaved changes, a warning dialog is shown before opening the new file.
public TranslationReload ( ) : void
Résultat void

TranslationSave() public méthode

Executes a Save operation regarding the translation.
If the translation hasn't been saved before, a TranslationSaveAs is executed.
public TranslationSave ( ) : bool
Résultat bool

TranslationSaveAs() public méthode

Executes a translation SaveAs operation.
public TranslationSaveAs ( ) : bool
Résultat bool