コード例 #1
0
        public GaugeImage Add(string name)
        {
            GaugeImage gaugeImage = new GaugeImage();

            gaugeImage.Name = name;
            Add(gaugeImage);
            return(gaugeImage);
        }
コード例 #2
0
        public override object Clone()
        {
            MemoryStream           stream = new MemoryStream();
            BinaryFormatSerializer binaryFormatSerializer = new BinaryFormatSerializer();

            binaryFormatSerializer.Serialize(this, stream);
            GaugeImage gaugeImage = new GaugeImage();

            binaryFormatSerializer.Deserialize(gaugeImage, stream);
            return(gaugeImage);
        }
コード例 #3
0
        protected override void OnInsertComplete(int index, object value)
        {
            base.OnInsertComplete(index, value);
            GaugeImage gaugeImage = (GaugeImage)value;

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