private void showP(int i) { Pname.Text = "Player" + (i + 1); Binding BindC = new Binding("Pcash[" + i + "]"); BindC.Source = view; PcashT.SetBinding(TextBlock.TextProperty, BindC); Binding BindW = new Binding("Pwealth[" + i + "]"); BindW.Source = view; PwealthT.SetBinding(TextBlock.TextProperty, BindW); Binding BindP = new Binding("Pprop[" + i + "]"); BindP.Source = view; PpropT.SetBinding(TextBlock.TextProperty, BindP); //PcashT.Text = view.Pcash[i].ToString(); //PwealthT.Text = view.Pwealth[i].ToString(); //PpropT.Text = view.Pprop[i]; P1.IsEnabled = false; P2.IsEnabled = false; P3.IsEnabled = false; P4.IsEnabled = false; Pstat.Visibility = Visibility.Visible; }
private void showP(int i) { Binding BindC = new Binding("Pcash[" + i + "]"); BindC.Source = view; PcashT.SetBinding(TextBlock.TextProperty, BindC); Binding BindW = new Binding("Pwealth[" + i + "]"); BindW.Source = view; PwealthT.SetBinding(TextBlock.TextProperty, BindW); Binding BindP = new Binding("Pprop[" + i + "]"); BindP.Source = view; PpropT.SetBinding(TextBlock.TextProperty, BindP); //PcashT.Text = view.Pcash[i].ToString(); //PwealthT.Text = view.Pwealth[i].ToString(); //PpropT.Text = view.Pprop[i]; }