internal void OnPaintBackground(System.Windows.Forms.PaintEventArgs e, ChartLegend parent, Rectangle iconRectangle, Rectangle textRectangle) { Pen itemPen = new Pen (System.Drawing.Color.Black); Brush itemBrush = new SolidBrush (this.Color.Color); Brush itemTextBrush = new SolidBrush (System.Drawing.Color.Black); e.Graphics.FillRectangle (itemBrush, iconRectangle); e.Graphics.DrawRectangle (itemPen, iconRectangle); StringFormat legendDrawFormat = new StringFormat(); legendDrawFormat.Alignment = StringAlignment.Near; legendDrawFormat.LineAlignment = StringAlignment.Center; e.Graphics.DrawString (this.Text.String, parent.ChartLegendDescription.ItemFont, itemTextBrush, textRectangle, legendDrawFormat); }
internal void OnPaintBackground(System.Windows.Forms.PaintEventArgs e, ChartLegend parent, Rectangle iconRectangle, Rectangle textRectangle) { Pen itemPen = new Pen(System.Drawing.Color.Black); Brush itemBrush = new SolidBrush(this.Color.Color); Brush itemTextBrush = new SolidBrush(System.Drawing.Color.Black); e.Graphics.FillRectangle(itemBrush, iconRectangle); e.Graphics.DrawRectangle(itemPen, iconRectangle); StringFormat legendDrawFormat = new StringFormat(); legendDrawFormat.Alignment = StringAlignment.Near; legendDrawFormat.LineAlignment = StringAlignment.Center; e.Graphics.DrawString(this.Text.String, parent.ChartLegendDescription.ItemFont, itemTextBrush, textRectangle, legendDrawFormat); }
private void InitializeComponent2() { this.components = new System.ComponentModel.Container(); this.m_panelChartLegend = new Nolme.WinForms.ChartLegend(this.components); this.m_chartSample1 = new Nolme.WinForms.Chart(this.components); this.m_chartSample2 = new Nolme.WinForms.Chart(this.components); this.m_chartSample3 = new Nolme.WinForms.Chart(this.components); this.SuspendLayout(); // // m_panelChartLegend // this.m_panelChartLegend.BackColor = System.Drawing.SystemColors.Info; this.m_panelChartLegend.ChartLegendDescription.BottomMargin = 20; this.m_panelChartLegend.Curvature = 15; this.m_panelChartLegend.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_panelChartLegend.ChartLegendDescription.ItemBottomMargin = 30; this.m_panelChartLegend.ChartLegendDescription.ItemFont = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Italic); this.m_panelChartLegend.ChartLegendDescription.ItemLeftMargin = 5; this.m_panelChartLegend.ChartLegendDescription.ItemRightMargin = 10; this.m_panelChartLegend.ChartLegendDescription.ItemSize = 10; this.m_panelChartLegend.ChartLegendDescription.ItemTopMargin = 20; this.m_panelChartLegend.ChartLegendDescription.LeftMargin = 20; this.m_panelChartLegend.Location = new System.Drawing.Point(476, 8); this.m_panelChartLegend.ChartLegendDescription.MainTitle = "Main title"; this.m_panelChartLegend.ChartLegendDescription.MainTitleFont = new System.Drawing.Font("Arial", 16F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); this.m_panelChartLegend.Name = "m_panelChartLegend"; this.m_panelChartLegend.ChartLegendDescription.RightMargin = 20; this.m_panelChartLegend.Size = new System.Drawing.Size(176, 304); this.m_panelChartLegend.TabIndex = 5; this.m_panelChartLegend.ChartLegendDescription.TopMargin = 20; // // m_chartSample1 // this.m_chartSample1.BackColor = System.Drawing.Color.Silver; this.m_chartSample1.ChartDescription.BottomMargin = 20; this.m_chartSample1.ChartDescription.ColumnFont = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Italic); this.m_chartSample1.ChartDescription.ColumnTitleFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Underline); this.m_chartSample1.Curvature = 15; this.m_chartSample1.ChartDescription.DeltaDepth = 10; this.m_chartSample1.ChartDescription.DisplayHiddenSides = true; this.m_chartSample1.ChartDescription.DisplayTextOnColumns = true; this.m_chartSample1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_chartSample1.ChartDescription.LeftMargin = 50; this.m_chartSample1.ChartDescription.LegendFont = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold); this.m_chartSample1.Location = new System.Drawing.Point(8, 8); this.m_chartSample1.ChartDescription.MainTitle = "Main title"; this.m_chartSample1.ChartDescription.MainTitleFont = new System.Drawing.Font("Arial", 16F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); this.m_chartSample1.ChartDescription.MarginBetweenColumn = 20; this.m_chartSample1.Name = "m_chartSample1"; this.m_chartSample1.ChartDescription.RenderingMode = Nolme.WinForms.ChartRenderingMode.Linear3d; this.m_chartSample1.ChartDescription.RightMargin = 20; this.m_chartSample1.Size = new System.Drawing.Size(456, 304); this.m_chartSample1.TabIndex = 4; this.m_chartSample1.ChartDescription.TopMargin = 20; this.m_chartSample1.ChartDescription.VerticalAxisMaxValue = 10000; this.m_chartSample1.ChartDescription.VerticalAxisMinValue = 0; this.m_chartSample1.ChartDescription.VerticalAxisStep = 1000; // // m_chartSample2 // this.m_chartSample2.BackColor = System.Drawing.Color.Silver; this.m_chartSample2.ChartDescription.BottomMargin = 20; this.m_chartSample2.ChartDescription.ColumnFont = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Italic); this.m_chartSample2.ChartDescription.ColumnTitleFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Underline); this.m_chartSample2.Curvature = 15; this.m_chartSample2.ChartDescription.DeltaDepth = 10; this.m_chartSample2.ChartDescription.DisplayHiddenSides = true; this.m_chartSample2.ChartDescription.DisplayTextOnColumns = true; this.m_chartSample2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_chartSample2.ChartDescription.LeftMargin = 50; this.m_chartSample2.ChartDescription.LegendFont = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold); this.m_chartSample2.Location = new System.Drawing.Point(8, 320); this.m_chartSample2.ChartDescription.MainTitle = "Main title"; this.m_chartSample2.ChartDescription.MainTitleFont = new System.Drawing.Font("Arial", 16F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); this.m_chartSample2.ChartDescription.MarginBetweenColumn = 20; this.m_chartSample2.Name = "m_chartSample2"; this.m_chartSample2.ChartDescription.RenderingMode = Nolme.WinForms.ChartRenderingMode.Linear3d; this.m_chartSample2.ChartDescription.RightMargin = 20; this.m_chartSample2.Size = new System.Drawing.Size(456, 232); this.m_chartSample2.TabIndex = 10; this.m_chartSample2.ChartDescription.TopMargin = 20; this.m_chartSample2.ChartDescription.VerticalAxisMaxValue = 10000; this.m_chartSample2.ChartDescription.VerticalAxisMinValue = 0; this.m_chartSample2.ChartDescription.VerticalAxisStep = 1000; // // m_chartSample3 // this.m_chartSample3.BackColor = System.Drawing.Color.Silver; this.m_chartSample3.ChartDescription.BottomMargin = 40; this.m_chartSample3.ChartDescription.ColumnFont = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Italic); this.m_chartSample3.ChartDescription.ColumnTitleFont = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Underline); this.m_chartSample3.Curvature = 15; this.m_chartSample3.ChartDescription.DeltaDepth = 10; this.m_chartSample3.ChartDescription.DisplayHiddenSides = true; this.m_chartSample3.ChartDescription.DisplayTextOnColumns = true; this.m_chartSample3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_chartSample3.ChartDescription.LeftMargin = 50; this.m_chartSample3.ChartDescription.LegendFont = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold); this.m_chartSample3.Location = new System.Drawing.Point(470, 320); this.m_chartSample3.ChartDescription.MainTitle = "Real time"; this.m_chartSample3.ChartDescription.MainTitleFont = new System.Drawing.Font("Arial", 16F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); this.m_chartSample3.ChartDescription.MarginBetweenColumn = 10; this.m_chartSample3.Name = "m_chartSample3"; this.m_chartSample3.ChartDescription.RenderingMode = Nolme.WinForms.ChartRenderingMode.Linear3d; this.m_chartSample3.ChartDescription.RightMargin = 20; this.m_chartSample3.Size = new System.Drawing.Size(300, 232); this.m_chartSample3.TabIndex = 10; this.m_chartSample3.ChartDescription.TopMargin = 20; this.m_chartSample3.ChartDescription.VerticalAxisMaxValue = 100; this.m_chartSample3.ChartDescription.VerticalAxisMinValue = 0; this.m_chartSample3.ChartDescription.VerticalAxisStep = 10; this.Controls.Add(this.m_panelChartLegend); this.Controls.Add(this.m_chartSample1); this.Controls.Add(this.m_chartSample2); this.Controls.Add(this.m_chartSample3); this.ResumeLayout(false); }
private void InitializeComponent2() { this.components = new System.ComponentModel.Container(); this.m_panelChartLegend = new Nolme.WinForms.ChartLegend(this.components); this.m_chartSample1 = new Nolme.WinForms.Chart(this.components); this.m_chartSample2 = new Nolme.WinForms.Chart(this.components); this.m_chartSample3 = new Nolme.WinForms.Chart(this.components); this.SuspendLayout(); // // m_panelChartLegend // this.m_panelChartLegend.BackColor = System.Drawing.SystemColors.Info; this.m_panelChartLegend.ChartLegendDescription.BottomMargin = 20; this.m_panelChartLegend.Curvature = 15; this.m_panelChartLegend.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_panelChartLegend.ChartLegendDescription.ItemBottomMargin = 30; this.m_panelChartLegend.ChartLegendDescription.ItemFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_panelChartLegend.ChartLegendDescription.ItemLeftMargin = 5; this.m_panelChartLegend.ChartLegendDescription.ItemRightMargin = 10; this.m_panelChartLegend.ChartLegendDescription.ItemSize = 10; this.m_panelChartLegend.ChartLegendDescription.ItemTopMargin = 20; this.m_panelChartLegend.ChartLegendDescription.LeftMargin = 20; this.m_panelChartLegend.Location = new System.Drawing.Point(8, 8); this.m_panelChartLegend.ChartLegendDescription.MainTitle = "ÃÒ¡ÒáÅéͧ·Õèʹã¨"; this.m_panelChartLegend.ChartLegendDescription.MainTitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_panelChartLegend.Name = "m_panelChartLegend"; this.m_panelChartLegend.ChartLegendDescription.RightMargin = 20; this.m_panelChartLegend.Size = new System.Drawing.Size(176, 304); this.m_panelChartLegend.TabIndex = 5; this.m_panelChartLegend.ChartLegendDescription.TopMargin = 20; // // m_chartSample1 // this.m_chartSample1.BackColor = System.Drawing.Color.Silver; this.m_chartSample1.ChartDescription.BottomMargin = 80; this.m_chartSample1.ChartDescription.ColumnFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_chartSample1.ChartDescription.ColumnTitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_chartSample1.Curvature = 15; this.m_chartSample1.ChartDescription.DeltaDepth = 10; this.m_chartSample1.ChartDescription.DisplayHiddenSides = true; this.m_chartSample1.ChartDescription.DisplayTextOnColumns = true; this.m_chartSample1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; this.m_chartSample1.ChartDescription.LeftMargin = 50; this.m_chartSample1.ChartDescription.LegendFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_chartSample1.Location = new System.Drawing.Point(8, 8); this.m_chartSample1.ChartDescription.MainTitle = "áÊ´§¡ÃÒ¿à˵ءÒóì"; this.m_chartSample1.ChartDescription.MainTitleFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular | FontStyle.Bold); this.m_chartSample1.ChartDescription.MarginBetweenColumn = 20; this.m_chartSample1.Name = "m_chartSample1"; this.m_chartSample1.ChartDescription.RenderingMode = Nolme.WinForms.ChartRenderingMode.Linear3d; this.m_chartSample1.ChartDescription.RightMargin = 20; this.m_chartSample1.Size = new System.Drawing.Size(456, 304); this.m_chartSample1.TabIndex = 4; this.m_chartSample1.ChartDescription.TopMargin = 20; this.m_chartSample1.ChartDescription.VerticalAxisMaxValue = 10000; this.m_chartSample1.ChartDescription.VerticalAxisMinValue = 0; this.m_chartSample1.ChartDescription.VerticalAxisStep = 1000; this.m_chartSample1.Dock = System.Windows.Forms.DockStyle.Fill; this.m_panelChartLegend.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Controls.Add(this.m_chartSample1); this.panel3.Controls.Add(this.m_panelChartLegend); this.ResumeLayout(false); }