Exemplo n.º 1
0
 internal ViewContainerStatus(string status, float locationX, float locationY)
 {
     // меняется для индикаторов статуса
     SetColorView(status);
     Position = new DevExpress.Utils.PointFloat(locationX, locationY);
     // стандартные для всех индикаторов статуса
     Shape    = DevExpress.Diagram.Core.BasicShapes.Ellipse;
     Size     = new System.Drawing.SizeF(15F, 15F);
     StrokeId = DevExpress.Diagram.Core.DiagramThemeColorId.Black;
 }
Exemplo n.º 2
0
 internal ViewContainerText(string text, float locationX, float locationY)
 {
     // меняется для текста контейнера
     Content  = text;
     Position = new DevExpress.Utils.PointFloat(locationX, locationY);
     // Постоянные текста в контейнере
     Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
     ForegroundId = DevExpress.Diagram.Core.DiagramThemeColorId.Black;
     Size         = new System.Drawing.SizeF(elementSizeWidth, elementSizeHeight);
     StrokeId     = DevExpress.Diagram.Core.DiagramThemeColorId.Accent1;
 }
Exemplo n.º 3
0
 protected BasicNonContainerView(string textOnDisplay, string stateOfShape, float locationX, float locationY)
 {
     // зависимые от входных данных
     SetColorView(stateOfShape);
     Position = new DevExpress.Utils.PointFloat(locationX, locationY);
     Content  = textOnDisplay;
     //постоянные для всех потомков
     ForegroundId = DevExpress.Diagram.Core.DiagramThemeColorId.Black;
     Size         = new System.Drawing.SizeF(80F, 40F);
     StrokeId     = DevExpress.Diagram.Core.DiagramThemeColorId.Black;
 }
        internal ViewContainerHeatingPanel(float locationX, float locationY, string isEntryAutomated,
                                           string isInNetwork, string isPowerOn, string isOnUps, string name, string temperature, string alarm)
        {
            var namePanel = new ViewContainerText(name, 25F, 8F);

            namePanel.Appearance.Font = new System.Drawing.Font("Tahoma", 18F);
            ElementSize = namePanel.elementSizeHeight;
            var automatedStatus = new ViewContainerTextWithSatus("Вв. автомат", isEntryAutomated,
                                                                 StartLocationElementX, GetNextLocationY());
            var networkStatus = new ViewContainerTextWithSatus("Связь", isInNetwork,
                                                               StartLocationElementX, GetNextLocationY());
            var powerStatus = new ViewContainerTextWithSatus("Питание", isPowerOn,
                                                             StartLocationElementX, GetNextLocationY());
            var upsStatus = new ViewContainerTextWithSatus("На ИБП", isOnUps,
                                                           StartLocationElementX, GetNextLocationY());
            var temperatureStatus = new ViewContainerText($"Темп. {temperature} °C", StartLocationElementX, GetNextLocationY());

            if (alarm == "true")
            {
                var alarmStatus = new ViewAlarmOnContainer(25F, GetNextLocationY() + 10);
                Items.Add(alarmStatus);
            }

            Items.AddRange(new DevExpress.XtraDiagram.DiagramItem[]
            {
                namePanel,
                automatedStatus,
                networkStatus,
                powerStatus,
                upsStatus,
                automatedStatus.statusTextView,
                networkStatus.statusTextView,
                powerStatus.statusTextView,
                upsStatus.statusTextView,
                temperatureStatus,
            });
            Position = new DevExpress.Utils.PointFloat(locationX, locationY);

            // постоянные для всех контейнеров этого типа
            BackgroundId = DevExpress.Diagram.Core.DiagramThemeColorId.Accent1;
            Shape        = DevExpress.Diagram.Core.StandardContainers.Alternating;
            Size         = new System.Drawing.SizeF(ContainerWidth, ContainerHeight);
            StrokeId     = DevExpress.Diagram.Core.DiagramThemeColorId.Black;
        }