Beispiel #1
0
        public GaugeLabel Add(string name)
        {
            GaugeLabel gaugeLabel = new GaugeLabel();

            gaugeLabel.Name = name;
            Add(gaugeLabel);
            return(gaugeLabel);
        }
Beispiel #2
0
        public override object Clone()
        {
            MemoryStream           stream = new MemoryStream();
            BinaryFormatSerializer binaryFormatSerializer = new BinaryFormatSerializer();

            binaryFormatSerializer.Serialize(this, stream);
            GaugeLabel gaugeLabel = new GaugeLabel();

            binaryFormatSerializer.Deserialize(gaugeLabel, stream);
            return(gaugeLabel);
        }
Beispiel #3
0
        protected override void OnInsertComplete(int index, object value)
        {
            base.OnInsertComplete(index, value);
            GaugeLabel gaugeLabel = (GaugeLabel)value;

            if (gaugeLabel.Position.DefaultValues && index != 0)
            {
                GaugeLabel gaugeLabel2 = this[index - 1];
                gaugeLabel.Location.X = gaugeLabel2.Location.X + 3f;
                gaugeLabel.Location.Y = gaugeLabel2.Location.Y + 3f;
            }
            if (gaugeLabel.DefaultParent && gaugeLabel.Parent.Length == 0 && base.Common != null)
            {
                if (base.Common.GaugeContainer.CircularGauges.Count > 0)
                {
                    gaugeLabel.Parent = "CircularGauges." + base.Common.GaugeContainer.CircularGauges[0].Name;
                }
                else if (base.Common.GaugeContainer.LinearGauges.Count > 0)
                {
                    gaugeLabel.Parent = "LinearGauges." + base.Common.GaugeContainer.LinearGauges[0].Name;
                }
            }
        }
Beispiel #4
0
 public int IndexOf(GaugeLabel value)
 {
     return(base.List.IndexOf(value));
 }
Beispiel #5
0
 public void Insert(int index, GaugeLabel value)
 {
     base.List.Insert(index, value);
 }
Beispiel #6
0
 public bool Contains(GaugeLabel value)
 {
     return(base.List.Contains(value));
 }
Beispiel #7
0
 public void Remove(GaugeLabel value)
 {
     base.List.Remove(value);
 }
Beispiel #8
0
 public int Add(GaugeLabel value)
 {
     return(base.List.Add(value));
 }