private void boutonAchat_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.Achat, id, DateTime.Now.ToString("hh:mm:ss"), quantite, Convert.ToDouble(bourse.LastPrice()), benef, total); mv_Achat.AjoutAchat(temp); }
public MainWindow() { id = 0; //periodeAchat = 0.5; periode = 1; // seconde InitializeComponent(); #region Initialisation MV mv_Bourse = new MV_Bourse(periode); mv_HistoriqueCours = new MV_HistoriqueCours(periode, mv_Bourse.GetM_Bourse(), ItemHistorique, mv_Bourse.MyTimer); mv_Achat = new MV_Achat(periode, mv_Bourse.GetM_Bourse(), CompteAchat, mv_Bourse.MyTimer, ResultatCompte); #endregion #region Graphe Paramaters graphe.DisableAnimations = true; graphe.ScrollBarFill = Brushes.AntiqueWhite; this.graphe.Series = mv_Bourse.PointsSerie; #endregion }