public TakeMoneyPresenter(TakeMoney take)
 {
     viewtm              = take;
     tmodel              = new TakeMoneyModel();
     viewtm.OnTakeMoney += new EventHandler <EventArgs>(OnWrite);
     OnRead();
     viewtm.OnAddRecord();
 }
Example #2
0
        private void buttonTakeMoney_Click(object sender, EventArgs e)
        {
            TakeMoney takemoneyform;

            if (Gameisrun && Score > 0)
            {
                takemoneyform = new TakeMoney();
                if (File.Exists(@"sound\winner.wav"))
                {
                    new System.Media.SoundPlayer(@"sound\winner.wav").Play();
                }
                OnStopGame();
            }
            else
            {
                takemoneyform = new TakeMoney(false);
            }
            takemoneyform.Money = Score;
            TakeMoneyPresenter moneyPresenter = new TakeMoneyPresenter(takemoneyform);

            takemoneyform.ShowDialog(this);
        }