// This is the main entry point of the application. static void Main (string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. UIApplication.Main (args, null, "AppDelegate"); ChartRenderer chart = new ChartRenderer(); }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { var renderer = new ChartRenderer(); // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; // Standard XAML initialization InitializeComponent(); // Phone-specific initialization InitializePhoneApplication(); RootFrame.UriMapper = new LabsUrlMapper(); // Language display initialization InitializeLanguage(); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = false; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } SetIoC(); }
public TreeChartBox(ChartRenderer renderer) : this() { SetRenderer(renderer); }
public override void SetRenderer(ChartRenderer renderer) { base.SetRenderer(renderer); fModel.SetRenderer(renderer); }
public void SetRenderer(ChartRenderer renderer) { fRenderer = renderer; fModel.SetRenderer(renderer); }
/// <summary> /// Draws all charts inside the ChartFrame. /// </summary> public void Draw(XGraphics gfx) { // Draw frame of ChartFrame. First shadow frame. const int dx = 5; const int dy = 5; gfx.DrawRoundedRectangle(XBrushes.Gainsboro, _location.X + dx, _location.Y + dy, _size.Width, _size.Height, 20, 20); XRect chartRect = new XRect(_location.X, _location.Y, _size.Width, _size.Height); XLinearGradientBrush brush = new XLinearGradientBrush(chartRect, XColor.FromArgb(0xFFD0DEEF), XColors.White, XLinearGradientMode.Vertical); XPen penBorder = new XPen(XColors.SteelBlue, 2.5); gfx.DrawRoundedRectangle(penBorder, brush, _location.X, _location.Y, _size.Width, _size.Height, 15, 15); XGraphicsState state = gfx.Save(); gfx.TranslateTransform(_location.X, _location.Y); // Calculate rectangle for all charts. Y-Position will be moved for each chart. int charts = _chartList.Count; const uint dxChart = 20; const uint dyChart = 20; const uint dyBetweenCharts = 30; XRect rect = new XRect(dxChart, dyChart, _size.Width - 2 * dxChart, (_size.Height - (charts - 1) * dyBetweenCharts - 2 * dyChart) / charts); // draw each chart in list foreach (Chart chart in _chartList) { RendererParameters parms = new RendererParameters(gfx, rect); parms.DrawingItem = chart; ChartRenderer renderer = GetChartRenderer(chart, parms); renderer.Init(); renderer.Format(); renderer.Draw(); rect.Y += rect.Height + dyBetweenCharts; } gfx.Restore(state); // // Calculate rectangle for all charts. Y-Position will be moved for each chart. // int charts = chartList.Count; // uint dxChart = 0; // uint dyChart = 0; // uint dyBetweenCharts = 0; // XRect rect = new XRect(dxChart, dyChart, // size.Width - 2 * dxChart, // (size.Height - (charts - 1) * dyBetweenCharts - 2 * dyChart) / charts); // // // draw each chart in list // foreach (Chart chart in chartList) // { // RendererParameters parms = new RendererParameters(gfx, rect); // parms.DrawingItem = chart; // // ChartRenderer renderer = GetChartRenderer(chart, parms); // renderer.Init(); // renderer.Format(); // renderer.Draw(); // // rect.Y += rect.Height + dyBetweenCharts; // } }