Ejemplo n.º 1
0
 public BidPage()
 {
     InitializeComponent();
     bidsModel = new ViewModelChart();
     l = new LineSeries();
     l.XPath = "X";
     l.YPath = "Y";
     l.PointsSource = bidsModel;
     chart.Series.Add(l);
     loadActiveAuction();
     toastNotification();
 }
Ejemplo n.º 2
0
        private SeriesCollection load(ObservableCollection<Model> tmpCollection)
        {
            ObservableCollection<Model> Collection;
            SeriesCollection LineSeries;

            LineSeries = new SeriesCollection();
            Collection = new ObservableCollection<Model>();
            //readClimateAnomaly(Collection);
            Collection = tmpCollection;
            LineSeries Series1 = new LineSeries();
            Series1.XPath = "XData";
            Series1.YPath = "YValue";
            Series1.PointsSource = Collection;

            LineSeries.Add(Series1);
            return LineSeries;
        }
Ejemplo n.º 3
0
        override protected void DrawPath(SeriesBase series, System.Drawing.Pen pen)
        {
            if (series is LineSeries || series is HiLoSeries || series is HiLoOpenCloseSeries)
            {
                var             points          = new PointCollection();
                var             lowPoints       = new PointCollection();
                var             pointCount      = 0;
                PartsCollection partsCollection = new PartsCollection();
                if (series is LineSeries)
                {
                    LineSeries lineSeries = series as LineSeries;
                    points          = lineSeries.LinePoints;
                    pointCount      = lineSeries.LinePoints.Count;
                    partsCollection = lineSeries.Parts;
                }
                else if (series is HiLoSeries)
                {
                    HiLoSeries lineSeries = series as HiLoSeries;
                    points          = lineSeries.HighPoints;
                    lowPoints       = lineSeries.LowPoints;
                    pointCount      = lineSeries.HighPoints.Count;
                    partsCollection = lineSeries.Parts;
                }
                else if (series is HiLoOpenCloseSeries)
                {
                    HiLoOpenCloseSeries lineSeries = series as HiLoOpenCloseSeries;
                    points          = lineSeries.HighPoints;
                    lowPoints       = lineSeries.LowPoints;
                    pointCount      = lineSeries.HighPoints.Count;
                    partsCollection = lineSeries.Parts;
                }
                if (RenderingMode == RenderingMode.Default)
                {
                    for (int i = 0; i < partsCollection.Count; i++)
                    {
                        UIElement renderElement = partsCollection[i].CreatePart();
                        if (renderElement != null && !PartsCanvas.Children.Contains(renderElement))
                        {
                            PartsCanvas.Children.Add(renderElement);
                        }
                    }
                }
                else
                {
                    if (series is LineSeries)
                    {
                        for (int i = 0; i < pointCount - 1; i++)
                        {
                            switch (RenderingMode)
                            {
                            case RenderingMode.GDIRendering:
                                GDIGraphics.DrawLine(pen, points[i].AsDrawingPointF(), points[i + 1].AsDrawingPointF());

                                break;

                            case RenderingMode.Default:
                                break;

                            case RenderingMode.WritableBitmap:
                                this.WritableBitmap.Lock();
                                WritableBitmapGraphics.DrawLine(pen, points[i].AsDrawingPointF(), points[i + 1].AsDrawingPointF());
                                this.WritableBitmap.Unlock();
                                break;

                            default:
                                break;
                            }
                        }
                    }
                    else
                    {
                        for (int i = 0; i < pointCount; i++)
                        {
                            switch (RenderingMode)
                            {
                            case RenderingMode.GDIRendering:
                                GDIGraphics.DrawLine(pen, points[i].AsDrawingPointF(), lowPoints[i].AsDrawingPointF());

                                break;

                            case RenderingMode.Default:
                                break;

                            case RenderingMode.WritableBitmap:
                                this.WritableBitmap.Lock();
                                WritableBitmapGraphics.DrawLine(pen, points[i].AsDrawingPointF(), lowPoints[i].AsDrawingPointF());
                                this.WritableBitmap.Unlock();
                                break;

                            default:
                                break;
                            }
                        }
                    }
                    this.Collection.InvalidateBitmap();
                }
            }
        }
Ejemplo n.º 4
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Metex = ((wpfMetex.MainWindow)(target));
     return;
     case 2:
     this.btnSettings = ((System.Windows.Controls.Button)(target));
     
     #line 22 "..\..\MainWindow.xaml"
     this.btnSettings.Click += new System.Windows.RoutedEventHandler(this.btnSettings_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     this.gridWindow = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.gridContent = ((System.Windows.Controls.Grid)(target));
     return;
     case 5:
     this.btnStart = ((System.Windows.Controls.Button)(target));
     
     #line 29 "..\..\MainWindow.xaml"
     this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.txtbWerte = ((System.Windows.Controls.TextBox)(target));
     return;
     case 7:
     this.chart = ((Sparrow.Chart.SparrowChart)(target));
     return;
     case 8:
     this.Line = ((Sparrow.Chart.LineSeries)(target));
     return;
     case 9:
     this.gridSettings = ((System.Windows.Controls.Grid)(target));
     return;
     case 10:
     this.rbtnEmpfangen = ((System.Windows.Controls.RadioButton)(target));
     
     #line 45 "..\..\MainWindow.xaml"
     this.rbtnEmpfangen.Unchecked += new System.Windows.RoutedEventHandler(this.rbtnEmpfangen_Unchecked);
     
     #line default
     #line hidden
     
     #line 45 "..\..\MainWindow.xaml"
     this.rbtnEmpfangen.Checked += new System.Windows.RoutedEventHandler(this.rbtnEmpfangen_Checked);
     
     #line default
     #line hidden
     return;
     case 11:
     this.rbtnUebertragen = ((System.Windows.Controls.RadioButton)(target));
     
     #line 46 "..\..\MainWindow.xaml"
     this.rbtnUebertragen.Checked += new System.Windows.RoutedEventHandler(this.rbtnUebertragen_Checked);
     
     #line default
     #line hidden
     
     #line 46 "..\..\MainWindow.xaml"
     this.rbtnUebertragen.Unchecked += new System.Windows.RoutedEventHandler(this.rbtnUebertragen_Unchecked);
     
     #line default
     #line hidden
     return;
     case 12:
     this.btnStarten = ((System.Windows.Controls.Button)(target));
     
     #line 47 "..\..\MainWindow.xaml"
     this.btnStarten.Click += new System.Windows.RoutedEventHandler(this.btnStarten_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.txtbIP = ((System.Windows.Controls.TextBox)(target));
     return;
     case 14:
     this.cbxCSV = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 15:
     this.cbxPlotten = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 16:
     this.btnServerStart = ((System.Windows.Controls.Button)(target));
     
     #line 51 "..\..\MainWindow.xaml"
     this.btnServerStart.Click += new System.Windows.RoutedEventHandler(this.btnServerStart_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.btnSpeichern = ((System.Windows.Controls.Button)(target));
     return;
     case 18:
     this.txtbMessintervall = ((System.Windows.Controls.TextBox)(target));
     return;
     case 19:
     this.txtbMessdauer = ((System.Windows.Controls.TextBox)(target));
     return;
     case 20:
     this.lblMessintervall = ((System.Windows.Controls.Label)(target));
     return;
     case 21:
     this.lblMessdauer = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }