コード例 #1
0
 //constructors
 public WpfGameEditor(WpfGames gamesWindow)
 {
     InitializeComponent();
     FillCombo();
     this.gamesWindow = gamesWindow;
     //if new game, default start time is now
     txtTime.Text = DateTime.Now.ToString();
 }
コード例 #2
0
 public WpfGameEditor(WpfGames gamesWindow, Game game)
 {
     InitializeComponent();
     this.game                 = game;
     txtID.Text                = game.OtteluId.ToString();
     txtLocation.Text          = game.Paikka;
     txtTime.Text              = game.Aika;
     cmbHomeTeam.SelectedValue = game.KotiId;
     cmbAwayTeam.SelectedValue = game.VierasId;
     FillCombo();
     this.gamesWindow = gamesWindow;
 }
コード例 #3
0
 //constructors
 public WpfGamestatistics(WpfGames gamesWindow, Game game)
 {
     InitializeComponent();
     FillCombo(game.KotiId, game.VierasId);
     txtGameId.Text   = game.OtteluId.ToString();
     txtHometeam.Text = game.KotiNimi;
     txtHomeId.Text   = game.KotiId.ToString();
     txtAwayteam.Text = game.VierasNimi;
     txtAwayId.Text   = game.VierasId.ToString();
     CalculateTotalTime(null, null);
     homegoals                   = DBSalibandytournament.GetGoalsFromDB(game.OtteluId, game.KotiId);
     homepenalties               = DBSalibandytournament.GetPenaltiesFromDB(game.OtteluId, game.KotiId);
     awaygoals                   = DBSalibandytournament.GetGoalsFromDB(game.OtteluId, game.VierasId);
     awaypenalties               = DBSalibandytournament.GetPenaltiesFromDB(game.OtteluId, game.VierasId);
     dgHomeGoals.ItemsSource     = homegoals;
     dgHomePenalties.ItemsSource = homepenalties;
     dgAwayGoals.ItemsSource     = awaygoals;
     dgAwayPenalties.ItemsSource = awaypenalties;
     gameID     = game.OtteluId;
     gameStatus = game.Paatetty;
     //disable all controls if game has been ended/saved
     DisableControls();
     this.gamesWindow = gamesWindow;
 }
コード例 #4
0
        private void BtnGames_Click(object sender, RoutedEventArgs e)
        {
            WpfGames games = new WpfGames();

            games.Show();
        }