void CloseInsightWindow(object sender, EventArgs e) { if (insightWindow != null) { insightWindow.Closed -= new EventHandler(CloseInsightWindow); insightWindow.Dispose(); insightWindow = null; } }
public void ShowInsightWindow(IInsightDataProvider insightDataProvider) { if (AutoListVisible) { if (AutoList != null) { AutoList.Visible = false; } } if (insightWindow == null || insightWindow.IsDisposed) { insightWindow = new InsightWindow.InsightWindow(this._AutoList.Owner,this._CodeEditor) ; NativeUser32Api.SetWindowLong(this.insightWindow.Handle, NativeUser32Api.GWL_STYLE, (int)NativeUser32Api.WS_CHILD); insightWindow.Closed += new EventHandler(CloseInsightWindow); } insightWindow.AddInsightDataProvider(insightDataProvider, this.FileName); insightWindow.ShowInsightWindow(); insightWindow.SetLocation(); }