private void UIContext_FormClosed(object sender, FormClosedEventArgs e) { UIContext.FormClosed -= UIContext_FormClosed; UIContext = null; Contractor.Dispose(this); }
void IExtension.Initialize() { if (UIContext != null) { UIContext.BringToFront(); return; } else if (UIContextType != null && UIContextType.BaseType == typeof(SKoreForm)) { UIContext = (SKoreForm)Activator.CreateInstance(UIContextType, this); if (UIContext.Extension == null) { UIContext.Extension = this; } UIContext.FormClosed += UIContext_FormClosed; UIContext.Show(); } if (!IsRunning) { IsRunning = true; OnInitialized(); } }
public void Dispose() { IsRunning = false; if (UIContext != null) { UIContext.FormClosed -= UIContext_FormClosed; UIContext.Close(); UIContext = null; } Triggers.Dispose(); OnDisposed(); }