Exemple #1
0
        public GraphMonitorPanelCompact(GraphBase graph, DataCollectorAdapter dataCollectorAdapter, HealthLevel healthLevel, PipPanel pipPanel, PipPanel pipPanelRight)
        {
            graph.PipPanel            = pipPanel;
            graph.PipPanelRight       = pipPanelRight;
            this.dataCollectorAdapter = dataCollectorAdapter;
            this.healthLevel          = healthLevel;
            InitializeComponent();

            var mainLayoutTable = new TableLayoutPanel();

            mainLayoutTable.ColumnCount = 1;
            mainLayoutTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            mainLayoutTable.Dock = DockStyle.Fill;

            textPanel = new TextPanel(StringAlignment.Center);

            if (String.IsNullOrEmpty(dataCollectorAdapter.Name))
            {
                mainLayoutTable.RowCount = 1;
                mainLayoutTable.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            }
            else
            {
                mainLayoutTable.RowCount = 2;
                mainLayoutTable.RowStyles.Add(new RowStyle(SizeType.Percent, 80F));
                mainLayoutTable.RowStyles.Add(new RowStyle(SizeType.Percent, 20F));

                textPanel.BackColor = ColorCoderUnknown.Instance.BackColor;
                textPanel.Dock      = DockStyle.Fill;
                textPanel.ForeColor = Color.White;
                textPanel.Margin    = new Padding(0, 2, 0, 0);
                textPanel.Text      = dataCollectorAdapter.Name;
                mainLayoutTable.Controls.Add(textPanel, 0, 1);
            }

            this.graph            = graph;
            this.graph.Dock       = DockStyle.Fill;
            this.graph.BackColor  = ColorCoderUnknown.Instance.BackColor;
            this.graph.ForeColor  = ColorCoderUnknown.Instance.ForeColor1;
            this.graph.ForeColor2 = ColorCoderUnknown.Instance.ForeColor2;

            mainLayoutTable.Controls.Add(graph, 0, 0);
            Controls.Add(mainLayoutTable);
            worker = new Thread(RunWorker);
        }
Exemple #2
0
 public GraphMonitorPanelCompact(GraphBase graph, DataCollectorAdapter dataCollectorAdapter, HealthLevel healthLevel, PipPanel pipPanel)
     : this(graph, dataCollectorAdapter, healthLevel, pipPanel, null)
 {
 }