public override void OnDisable() { MainModule main = this.console.GetModule("Main") as MainModule; main.StreamAdded -= this.OnMainStreamAdded; main.StreamDeleted -= this.OnMainStreamDeleted; for (int i = 0; i < main.Streams.Count; i++) { main.Streams[i].RowAdded -= this.OnRowAdded; } RowsDrawer.GlobalBeforeFoldout -= this.RowsDrawer_GlobalBeforeFoldout; RowsDrawer.GlobalLogContextMenu -= this.AppendColorsMenuItem; this.console.BeforeGUIHeaderRightMenu -= this.HeaderButton; }
public override void OnEnable(NGConsoleWindow console, int id) { base.OnEnable(console, id); this.coloredRows = new List <ColoredRow>(); MainModule main = this.console.GetModule("Main") as MainModule; main.StreamAdded += this.OnMainStreamAdded; main.StreamDeleted += this.OnMainStreamDeleted; for (int i = 0; i < main.Streams.Count; i++) { main.Streams[i].RowAdded += this.OnRowAdded; } RowsDrawer.GlobalBeforeFoldout += this.RowsDrawer_GlobalBeforeFoldout; RowsDrawer.GlobalLogContextMenu += this.AppendColorsMenuItem; this.console.BeforeGUIHeaderRightMenu += this.HeaderButton; }
private void DelayedRefreshStreams() { NGConsoleWindow[] consoles = Resources.FindObjectsOfTypeAll <NGConsoleWindow>(); if (consoles.Length == 0) { return; } MainModule main = consoles[0].GetModule("Main") as MainModule; if (main != null) { for (int i = 0; i < main.Streams.Count; i++) { main.Streams[i].RefreshFilteredRows(); } HQ.InvalidateSettings(); Utility.RepaintEditorWindow(typeof(NGConsoleWindow)); } }