Unsubscribe IStreamable events from Disposed instead of FormClosed.
This commit is contained in:
parent
3183f99153
commit
f60964f4c7
@ -48,7 +48,7 @@ namespace LibationWinForms.BookLiberation.BaseForms
|
|||||||
streamable.StreamingCompleted += OnStreamingCompleted;
|
streamable.StreamingCompleted += OnStreamingCompleted;
|
||||||
streamable.StreamingCompleted += OnStreamingCompletedClose;
|
streamable.StreamingCompleted += OnStreamingCompletedClose;
|
||||||
|
|
||||||
FormClosed += UnsubscribeStreamable;
|
Disposed += UnsubscribeStreamable;
|
||||||
}
|
}
|
||||||
private void Subscribe(IProcessable processable)
|
private void Subscribe(IProcessable processable)
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@ namespace LibationWinForms.BookLiberation.BaseForms
|
|||||||
}
|
}
|
||||||
private void UnsubscribeStreamable(object sender, EventArgs e)
|
private void UnsubscribeStreamable(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FormClosed -= UnsubscribeStreamable;
|
Disposed -= UnsubscribeStreamable;
|
||||||
|
|
||||||
Streamable.StreamingBegin -= OnStreamingBeginShow;
|
Streamable.StreamingBegin -= OnStreamingBeginShow;
|
||||||
Streamable.StreamingBegin -= OnStreamingBegin;
|
Streamable.StreamingBegin -= OnStreamingBegin;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user