Пример #1
0
        public void UpdateValue(string key, string newValue)
        {
            StatsEntry entry = Get(key);

            if (entry.Value != newValue)
            {
                entry.Value = newValue;
                Engine.Instance.OnStatsChange(entry);
            }
        }
Пример #2
0
        public StatsEntry Get(string key)
        {
            StatsEntry entry = Dict[key];

            if (entry == null)
            {
                throw new Exception("Unknown stats.");
            }
            return(entry);
        }
Пример #3
0
		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);
		}
Пример #4
0
        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);
        }
Пример #5
0
		public virtual void OnStatsChange(StatsEntry entry)
		{
		}
Пример #6
0
		public override void OnStatsChange(StatsEntry entry)
		{
			if (FormMain != null)
				FormMain.StatsChange(entry);
		}
Пример #7
0
		public override void OnStatsChange (StatsEntry entry)
		{
			base.OnStatsChange (entry);

			if (MainWindow != null)
			if (MainWindow.TableStatsController != null) {
				new NSObject ().InvokeOnMainThread (() => {
					MainWindow.TableStatsController.RefreshUI ();
				});
			}
		}
Пример #8
0
		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;
				}
			}
		}