Пример #1
0
		public void Add (Counter c)
		{
			ChartSerieInfo info = new ChartSerieInfo ();
			info.Init (c);
			Series.Add (info);
			Modified = true;
		}
Пример #2
0
		public void CopyFrom (ChartSerieInfo other)
		{
			Name = other.Name;
			Visible = other.Visible;
			serie = other.serie;
			counter = other.counter;
		}
Пример #3
0
		public bool Contains (Counter c)
		{
			foreach (ChartSerieInfo si in Series) {
				if (si.Name == c.Name)
					return true;
			}
			return false;
		}
Пример #4
0
		public TimeLineViewWindow (Counter c, CounterValue value) : base(Gtk.WindowType.Toplevel)
		{
			this.Build ();
			this.mainCounter = c;
			this.mainValue = value;
			timeView.Scale = 300;
			
			Update ();
		}
		public Counter GetCounter (string name)
		{
			Counter c;
			if (Counters.TryGetValue (name, out c))
				return c;
			c = new Counter (name, null);
			Counters [name] = c;
			return c;
		}
		public static Counter GetCounter (string name)
		{
			lock (counters) {
				Counter c;
				if (counters.TryGetValue (name, out c))
					return c;
				c = new Counter (name, null);
				counters [name] = c;
				return c;
			}
		}
Пример #7
0
		public void SetMainCounter (Counter c, CounterValue value)
		{
			mainCounter = c;
			mainValue = value;
			data = null;
			Scale = scale;
			QueueDraw ();
		}
Пример #8
0
		public void Clear ()
		{
			mainCounter = null;
			extraCounters.Clear ();
			data = null;
		}
		public virtual void ConsumeValue (Counter counter, CounterValue value)
		{
		}
		public abstract bool SupportsCounter (Counter counter);
Пример #11
0
		internal void AddCounter (Counter c)
		{
			counters.Add (c);
		}
Пример #12
0
/*		bool IsColorUsed (string color)
		{
			foreach (ChartSerieInfo info in Series)
				if (info.Color == color)
					return true;
			return false;
		}*/
		
		public void Remove (Counter c)
		{
			for (int n=0; n<Series.Count; n++) {
				if (Series [n].Name == c.Name) {
					Series.RemoveAt (n);
					return;
				}
			}
			Modified = true;
		}
Пример #13
0
		public MemoryProbe (Counter c)
		{
			this.c = c;
			c++;
		}
Пример #14
0
		public bool UpdateCounter ()
		{
			if (!Counter.Disposed)
				return false;
			serie = null;
			counter = null;
			lastUpdateTime = DateTime.MinValue;
			return true;
		}
Пример #15
0
		public void Init (Counter counter)
		{
			this.counter = counter;
			Name = counter.Name;
		}