public frmBuyHouse(frmMain afrmMain, PlotInfo aPlotInfo) {
     InitializeComponent();
     this.afrmMain = afrmMain;
     this.aPlotInfo = aPlotInfo;
     lblName.Text = aPlotInfo.Name;
     lblColor.BackColor = System.Drawing.ColorTranslator.FromHtml(aPlotInfo.Color);
     lblMoneyLand.Text = aPlotInfo.PricePlot.ToString();
     lblMoneyHouse.Text = "0";
     lblTotalMoney.Text = (int.Parse(lblMoneyLand.Text) + int.Parse(lblMoneyHouse.Text)).ToString();
     cbbHouse.SelectedIndex = 0;
     Random rand = new Random();
     int funtip = rand.Next(1, 5);
     tssFunTip.Text = this.FunTip(funtip);
 }
Exemplo n.º 2
0
 public void MoneyTaxPlot(int IDPlayer, int pos) {
     PlotInfo aPlotInfo = new PlotInfo();
     aPlotInfo = aListPlotInfo.Find(b => b.ID == pos);
     if(aPlotInfo.PricePlot > 0 && pos != 0) {
         aListPlayer.Find(b => b.ID == IDPlayer).Money -= aPlotInfo.PricePlot;
         lblStatusMoneyPlayer.Text = lblStatusMoneyPlayer.Text + aListPlayer.Find(b => b.ID == IDPlayer).Name + " vừa trả " + aPlotInfo.Name + ": " + aPlotInfo.PricePlot.ToString();
         lblStatusMoneyPlayer.BringToFront();
         lblStatusMoneyPlayer.Show();
         this.DisplayChangeMoneyPlayer(IDPlayer, aPlotInfo.PricePlot, false);
         this.Refresh();
     }
 }