Exemplo n.º 1
0
 internal void AddGraphic(AnalogGraphic graphic)
 {
     _graphics.Add(graphic);
     graphic.GroupY = this;
     if (!IsOverlayed)
     {
         IsOverlayed = true;
     }
 }
Exemplo n.º 2
0
 internal void RemoteGraphic(AnalogGraphic graphic)
 {
     if (_graphics.Count > 1)
     {
         _graphics.Remove(graphic);
         graphic.GroupY = null;
         if (IsOverlayed && _graphics.Count == 1)
         {
             IsOverlayed = false;
         }
     }
 }
Exemplo n.º 3
0
        internal void RemoveGraphic(AnalogGraphic graphic)
        {
            if (_graphics.Count > 1)
            {
                _graphics.Remove(graphic);
                graphic.GroupY = null;
                if (IsOverlayed && _graphics.Count == 1)
                {
                    IsOverlayed = false;
                }
                if (UpperGraphic.Num == graphic.Num)
                {
                    AnalogGraphic newUpGr = null;
                    foreach (var gr in Graphics)
                    {
                        if (gr.IsVisible)
                        {
                            newUpGr = gr;
                            break;
                        }
                    }

                    UpperGraphic = newUpGr ?? _graphics[0];
                    IsVisible    = (newUpGr != null);
                }

                if (MinGraphicNum == graphic.Num)
                {
                    MinGraphicNum = UpperGraphic.Num;
                    foreach (var gr in Graphics)
                    {
                        if (gr.Num < MinGraphicNum)
                        {
                            MinGraphicNum = gr.Num;
                        }
                    }
                }

                if (DecPlaces == graphic.Param.DecPlaces)
                {
                    int dP = UpperGraphic.Param.DecPlaces;
                    foreach (var gr in Graphics)
                    {
                        if ((gr.Param.DecPlaces > dP) && (dP != -1))
                        {
                            dP = gr.Param.DecPlaces;
                        }
                    }
                    DecPlacesMaskFill(dP);
                }
            }
        }
Exemplo n.º 4
0
        internal double CurAxPos  = 0; //текущее положение оси в процентах
        #endregion Prop

        #region Constructor
        internal GroupY(AnalogGraphic graphic)
        {
            Graphics = new ReadOnlyCollection <AnalogGraphic>(_graphics);
            _graphics.Add(graphic);
            graphic.GroupY = this;

            Init();

            ViewMin = _graphics[0].Param.Min;
            ViewMax = _graphics[0].Param.Max;

            InitEvent();
        }
Exemplo n.º 5
0
        internal void AddGraphic(AnalogGraphic graphic)
        {
            _graphics.Add(graphic);
            graphic.GroupY = this;

            if (!IsOverlayed)
            {
                IsOverlayed = true;
            }
            if (graphic.Num < MinGraphicNum)
            {
                MinGraphicNum = graphic.Num;
            }
            if ((graphic.Param.DecPlaces > DecPlaces) && (DecPlaces != -1))
            {
                DecPlacesMaskFill(graphic.Param.DecPlaces);
            }
        }