public override void PreOpen()
        {
            base.PreOpen();
            this.tabs.Clear();
            this.tabs.Add(new TabRecord("ColonistHistory.TabHome".Translate(), delegate() {
                MainTabWindow_ColonistHistory.curTab = MainTabWindow_ColonistHistory.TabType.Home;
            }, () => MainTabWindow_ColonistHistory.curTab == MainTabWindow_ColonistHistory.TabType.Home));
            this.tabs.Add(new TabRecord("ColonistHistory.TabTable".Translate(), delegate() {
                MainTabWindow_ColonistHistory.curTab = MainTabWindow_ColonistHistory.TabType.Table;
                RefreshDrawEntries();
            }, () => MainTabWindow_ColonistHistory.curTab == MainTabWindow_ColonistHistory.TabType.Table));
            this.tabs.Add(new TabRecord("ColonistHistory.TabGraph".Translate(), delegate() {
                MainTabWindow_ColonistHistory.curTab = MainTabWindow_ColonistHistory.TabType.Graph;
                RefreshGraph();
            }, () => MainTabWindow_ColonistHistory.curTab == MainTabWindow_ColonistHistory.TabType.Graph));

            MainTabWindow_ColonistHistory.curPawn = CompRecorder.Colonists.First();
            RecordReportUtility.Reset();
            RefreshDrawEntries();
            RefreshGraph();

            Pawn pawn      = MainTabWindow_ColonistHistory.curPawn;
            int  lastIndex = CompRecorder.GetRecords(pawn).log.Count - 1;

            MainTabWindow_ColonistHistory.curDateIndex = Mathf.Clamp(MainTabWindow_ColonistHistory.curDateIndex, 0, lastIndex);
        }
 public void RefreshDrawEntries()
 {
     if (!CurRecords.log.NullOrEmpty())
     {
         RecordReportUtility.ResolveDrawEntries(this.CurData);
     }
     else
     {
         if (this.CompRecorder.Colonists.EnumerableNullOrEmpty())
         {
             RecordReportUtility.Reset();
         }
         else
         {
             MainTabWindow_ColonistHistory.curPawn = this.CompRecorder.Colonists.First();
             RecordReportUtility.ResolveDrawEntries(this.CurData);
         }
     }
 }