public ChartUI() { InitializeComponent(); m_chart = Controls.Add2(new ChartControl { Dock = DockStyle.Fill, Title = "My Chart" }); m_chart.Options.Orthographic = true; m_chart.XAxis.Label = "X Axis"; m_chart.YAxis.Label = "Y Axis"; m_obj0 = new View3d.Object( "test_object", 0xFFFFFFFF, 5, 18, 1, new View3d.Vertex[] { new View3d.Vertex(new v4(+0, +1, +0, 1), new v4(+0.00f, +1.00f, +0.00f, 0), 0xffff0000, new v2(0.50f, 1)), new View3d.Vertex(new v4(-1, -1, -1, 1), new v4(-0.57f, -0.57f, -0.57f, 0), 0xff00ff00, new v2(0.00f, 0)), new View3d.Vertex(new v4(+1, -1, -1, 1), new v4(+0.57f, -0.57f, -0.57f, 0), 0xff0000ff, new v2(0.25f, 0)), new View3d.Vertex(new v4(+1, -1, +1, 1), new v4(+0.57f, -0.57f, +0.57f, 0), 0xffff00ff, new v2(0.50f, 0)), new View3d.Vertex(new v4(-1, -1, +1, 1), new v4(-0.57f, -0.57f, +0.57f, 0), 0xff00ffff, new v2(0.75f, 0)), }, new ushort[] { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 1, 4, 3, 2, 2, 1, 4, }, new View3d.Nugget[] { new View3d.Nugget(View3d.ETopo.TriList, View3d.EGeom.Vert | View3d.EGeom.Norm | View3d.EGeom.Colr), }, null); m_chart.ChartRendering += (s, a) => { a.AddToScene(m_obj0); }; m_series = new ChartDataSeries("waves", ChartDataSeries.EFormat.XRealYReal); using (var lk = m_series.Lock()) { for (int i = 0; i != 100000; ++i) { lk.Add(new ChartDataSeries.Pt(0.01 * i, Math.Sin(0.01 * i * Math_.Tau))); } } m_series.Options.Colour = Colour32.Blue; m_series.Options.PlotType = ChartDataSeries.EPlotType.Bar; m_series.Options.PointStyle = ChartDataSeries.EPointStyle.Triangle; m_series.Options.PointSize = 50f; m_series.Options.LineWidth = 3f; m_series.Chart = m_chart; m_legend = new ChartDataLegend(); m_chart.Elements.Add(m_legend); }
public Dockable(string text) { BorderStyle = BorderStyle.None; Text = text; BackgroundImage = SystemIcons.Error.ToBitmap(); BackgroundImageLayout = ImageLayout.Stretch; DockControl = new DockControl(this, text) { TabIcon = SystemIcons.Exclamation.ToBitmap() }; Controls.Add2(new TextBox { Location = new Point(0, 0) }); Controls.Add2(new TextBox { Location = new Point(0, 24) }); Controls.Add2(new TextBox { Location = new Point(0, 48) }); }
public MeasurementUI(View3dControl owner) : base(owner, EPin.TopLeft, new Point(10, 10), new Size(264, 330), false) { FormBorderStyle = FormBorderStyle.SizableToolWindow; ShowInTaskbar = false; HideOnClose = false; Text = "Measure"; Controls.Add2(new View3dMeasurementUI { Dock = DockStyle.Fill, CtxId = Guid.NewGuid(), Window = owner.Window, }); FormClosed += (s, a) => { if (a.CloseReason == CloseReason.UserClosing) { owner.ShowMeasurementUI = false; } }; }