public MV_Bourse(int periode) { this.m_Bourse = new M_Bourse(); this.nombrePointMax = 50; this.periodicite = periode; // this.graphique = graphique; this.math = new MathsFunctions(); PointsSerie = new SeriesCollection { new OhlcSeries() { DecreaseBrush = Brushes.Red, IncreaseBrush = Brushes.Green, Values = new ChartValues <OhlcPoint> { } }, new LineSeries() { Values = new ChartValues <double> { }, Fill = Brushes.Transparent, PointForeround = Brushes.Black, }, }; InitialisationPeriodique(); }
public MV_HistoriqueCours(int periode, M_Bourse m_Bourse, ListView dataGridHistorique, DispatcherTimer myTimer) { this.periodicite = periode; this.m_Bourse = m_Bourse; this.m_HistoriqueCours = new List <M_HistoriqueCours>(); this._dataGridHistorique = dataGridHistorique; this.myTimer = myTimer; this.myTimer.Tick += this.AjoutHistorique; // InitialisationPeriodique(); }
public MV_Achat(double periode, M_Bourse mbourse, ListView compteAchat, DispatcherTimer myTimer, ResultatCompte compte) { this.compteAchat = compteAchat; this.periodicite = periode; this.m_Bourse = mbourse; this.compte = compte; this.listeAchat = new List <M_Achat>(); this.myTimer = myTimer; this.myTimer.Tick += this.MiseAJourAchat; //InitialisationPeriodique(); }
private void boutonVente_Click(object sender, RoutedEventArgs e) { id++; M_Bourse bourse = mv_Bourse.GetM_Bourse(); double benef = 0; int quantite = Convert.ToInt32(Quantite.Value); double total = 0; M_Achat temp = new M_Achat(Transaction.Vente, id, DateTime.Now.ToString("hh:mm:ss"), quantite, Convert.ToDouble(bourse.LastPrice()), benef, total); mv_Achat.AjoutAchat(temp); }