Ejemplo n.º 1
0
        public MainWindow()
        {
            Loaded += (s, e) => new InfoControl(this).Show();
            SplashScreenHelper.Show();
            InitializeComponent();
            SplashScreenHelper.Close();

            // Set the bounds of the time axis
            CurveDisplay.TimeDoublePlottingSystem.TimeAxis.SetBounds(
                DateTime.UtcNow.AddMinutes(-50),
                DateTime.UtcNow.AddMinutes(10));

            // Initialize the table legend and add it to the page
            var tableLegend = new TableLegend(
                CurveDisplay,
                "Term",
                "Location",
                "Aggregate",
                "Medium",
                "Measurement");
            tableLegendHolder.Content = tableLegend;

            CreateCurveWithGap();

            // Now, we add some rulers
            CurveDisplay.TimeDoublePlottingSystem.AddStaticRuler(
                DateTime.UtcNow.AddMinutes(-30));
            CurveDisplay.TimeDoublePlottingSystem.AddStaticRuler(
                DateTime.UtcNow.AddMinutes(-15));
            CurveDisplay.TimeDoublePlottingSystem.AddStaticRuler(
                DateTime.UtcNow.AddMinutes(-5));
        }
        public OnlineOfflineLegend(
			CurveDisplay curveDisplay,
			string description1Header = "Desc. 1",
			string description2Header = "Desc. 2",
			string description3Header = "Desc. 3",
			string description4Header = "Desc. 4",
			string description5Header = "Desc. 5")
        {
            _curveDisplay = curveDisplay;
            InitializeComponent();

            _tableLegend = new TableLegend(
                curveDisplay,
                description1Header,
                description2Header,
                description3Header,
                description4Header,
                description5Header);
            offlineLegendHolder.Content = _tableLegend;

            _tileLegend = new TileLegend(curveDisplay);
            onlineLegendHolder.Content = _tileLegend;

            _curveDisplay.TimeDoublePlottingSystem.IsOnlineChanged += (s, e) => UpdateOnlineState();
            UpdateOnlineState();
        }