public void UpdateValue(string key, string newValue) { StatsEntry entry = Get(key); if (entry.Value != newValue) { entry.Value = newValue; Engine.Instance.OnStatsChange(entry); } }
public StatsEntry Get(string key) { StatsEntry entry = Dict[key]; if (entry == null) { throw new Exception("Unknown stats."); } return(entry); }
public void Add(string key, string caption, string icon, bool dump) { StatsEntry entry = new StatsEntry(); entry.Key = key; entry.Caption = caption; entry.Icon = icon; entry.Dump = dump; Dict[key] = entry; List.Add(entry); }
public void Add(string key, string caption, string icon, bool dump) { StatsEntry entry = new StatsEntry(); entry.Key = key; entry.Caption = caption; entry.Icon = icon; entry.Dump = dump; Dict[key] = entry; List.Add(entry); }
public virtual void OnStatsChange(StatsEntry entry) { }
public override void OnStatsChange(StatsEntry entry) { if (FormMain != null) FormMain.StatsChange(entry); }
public override void OnStatsChange (StatsEntry entry) { base.OnStatsChange (entry); if (MainWindow != null) if (MainWindow.TableStatsController != null) { new NSObject ().InvokeOnMainThread (() => { MainWindow.TableStatsController.RefreshUI (); }); } }
public void StatsChange(StatsEntry entry) { if(this.InvokeRequired) { StatsChangeDelegate inv = new StatsChangeDelegate(this.StatsChange); this.BeginInvoke(inv, new object[] { entry }); } else { if (m_statsItems.ContainsKey(entry.Key)) { ListViewItemStats item = m_statsItems[entry.Key]; if (item.SubItems.Count == 1) item.SubItems.Add(""); item.SubItems[1].Text = entry.Value; } } }