Update LiberationBaseForm.cs

This commit is contained in:
Mbucari 2021-08-16 10:08:21 -06:00 committed by GitHub
parent 560880b53d
commit 88253cdb55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,13 +17,12 @@ namespace LibationWinForms.BookLiberation.BaseForms
{ {
//SynchronizationContext.Current will be null until the process contains a Form. //SynchronizationContext.Current will be null until the process contains a Form.
//If this is the first form created, it will not exist until after execution //If this is the first form created, it will not exist until after execution
//reaches inside the constructor. So need to reset the context here. //reaches inside the constructor (after base class has been initialized).
Invoker = new SynchronizeInvoker(); Invoker = new SynchronizeInvoker();
} }
public void RegisterFileLiberator(IStreamable streamable, LogMe logMe = null) public void RegisterFileLiberator(IStreamable streamable, LogMe logMe = null)
{ {
//IFileLiberator must at least be IStreamable, otherwise the Form won't ever Show()
if (streamable is null) return; if (streamable is null) return;
Streamable = streamable; Streamable = streamable;