Пример #1
0
 public PlayersForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     ListPlayers();
     ListTeam();
 }
Пример #2
0
 public Player(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     KisileriListele();
     FormuResetle();
 }
Пример #3
0
 public PlayerForm(WeAreTheChampionsContext db, int teamId)
 {
     this.teamId = teamId;
     this.db     = db;
     InitializeComponent();
     ListPlayersTeam();
     ListTeams();
 }
Пример #4
0
 public PlayersForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     dgvPlayers.AutoGenerateColumns = false;
     LoadPlayers();
     LoadTeams();
 }
Пример #5
0
 public TeamsForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     ListTeams();
     ListColors();
     cboFirstColor.SelectedIndex = cboSecondColor.SelectedIndex = -1;
 }
Пример #6
0
 public MatchDetailsForm(WeAreTheChampionsContext db, int selectedIdMainForm)
 {
     this.selectedIdMainForm = selectedIdMainForm;
     this.db = db;
     InitializeComponent();
     isEditIdShow = true;
     ListTeamsNewMatch();
     ListTeamsEditMatch();
 }
Пример #7
0
 public TeamsForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     dgvTeams.AutoGenerateColumns = false;
     LoadTeams();
     LoadColors();
     cboColor1.SelectedIndex = cboColor2.SelectedIndex = -1;
 }
Пример #8
0
 public PlayersForm(WeAreTheChampionsContext db, string value)
 {
     this.db = db;
     InitializeComponent();
     LoadTeams();
     LoadPlayers();
     txtTeamName.Text = value;
     cboTeams.Text    = value;
     TeamsFormControls();
 }
 public PlayersForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     lstPlayers.DataSource    = db.Players.ToList();
     lstPlayers.SelectedIndex = -1;
     cboTeams.DataSource      = db.Teams.ToList();
     cboTeams.SelectedIndex   = -1;
     txtPlayerName.Text       = "";
 }
Пример #10
0
 public frmTeamsPlayers(WeAreTheChampionsContext db, Team team)
 {
     this.db   = db;
     this.team = team;
     InitializeComponent();
     lstTeamsPlayers.DataSource    = team.Players.ToList();
     lstTeamsPlayers.SelectedIndex = -1;
     lstIdlePlayers.DataSource     = db.Players.Where(x => x.Team == null).ToList();
     lstTeamsPlayers.SelectedIndex = -1;
 }
Пример #11
0
 public ColorsForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     panelColor.BackColor             = System.Drawing.Color.Black;
     lstAvailableColors.DataSource    = db.Colors.ToList();
     lstAvailableColors.SelectedIndex = -1;
     tbRed.Value   = 0;
     tbGreen.Value = 0;
     tbBlue.Value  = 0;
 }
Пример #12
0
 public Color(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     RenkleriListele();
     FormuResetle();
     this.dgvRenkler.Columns[0].Visible = false;
     this.dgvRenkler.Columns[2].Visible = false;
     this.dgvRenkler.Columns[3].Visible = false;
     this.dgvRenkler.Columns[4].Visible = false;
 }
 public NewMatchAddForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     dtMatchTime.Format        = DateTimePickerFormat.Custom;
     dtMatchTime.CustomFormat  = "MM/dd/yyyy hh:mm:ss";
     cboHomeTeam.DataSource    = db.Teams.ToList();
     cboGuestTeam.DataSource   = db.Teams.ToList();
     nudScoreGuestTeam.Enabled = false;
     nudScoreHomeTeam.Enabled  = false;
     cbDraw.Enabled            = false;
     cbTeam1Won.Enabled        = false;
     cbTeam2Won.Enabled        = false;
 }
Пример #14
0
        public EditMatch(WeAreTheChampionsContext db, int id)
        {
            this.db = db;
            this.id = id;
            InitializeComponent();
            dtMatchTime.Format        = DateTimePickerFormat.Custom;
            dtMatchTime.CustomFormat  = "MM/dd/yyyy hh:mm:ss";
            nudScoreGuestTeam.Enabled = false;
            nudScoreHomeTeam.Enabled  = false;
            cbDraw.Enabled            = false;
            cbTeam1Won.Enabled        = false;
            cbTeam2Won.Enabled        = false;

            cboHomeTeam.DataSource  = db.Teams.ToList();
            cboGuestTeam.DataSource = db.Teams.ToList();
            Match match = db.Matches.FirstOrDefault(x => x.Id == id);

            cboHomeTeam.SelectedItem  = match.HomeTeam;
            cboGuestTeam.SelectedItem = match.GuestTeam;
            if (match.HomePoints == null || match.GuestPoints == null)
            {
                nudScoreGuestTeam.Value = 0;
                nudScoreHomeTeam.Value  = 0;
            }
            else
            {
                nudScoreGuestTeam.Value = (decimal)match.GuestPoints;
                nudScoreHomeTeam.Value  = (decimal)match.HomePoints;
            }
            if (match.MatchTime != null)
            {
                dtMatchTime.Value = match.MatchTime.Value;
            }
            if (match.Result != null)
            {
                if (match.Result == MatchResult.Draw)
                {
                    cbDraw.Checked = true;
                }
                else if (match.Result == MatchResult.HomeTeamWon)
                {
                    cbTeam1Won.Checked = true;
                }
                else
                {
                    cbTeam2Won.Checked = true;
                }
            }
        }
Пример #15
0
        public TeamsForm(WeAreTheChampionsContext db)
        {
            this.db = db;
            InitializeComponent();

            cboColors.DataSource      = db.Colors.ToList();
            cboColors.SelectedIndex   = -1;
            btnAddColorToTeam.Visible = false;
            lstTeams.DataSource       = db.Teams.ToList();
            lstTeams.SelectedIndex    = -1;
            label4.Visible            = false;
            cboTeamColors.Visible     = false;
            btnRemoveFromTeam.Visible = false;
            panel1.Visible            = false;
            txtTeamName.Text          = string.Empty;
        }
Пример #16
0
 public ColorsForm(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     ListColors();
 }
Пример #17
0
 public Karşılaştırma(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     cboIcSaha.SelectedIndex = -1;
 }
Пример #18
0
 public Takımlar(WeAreTheChampionsContext db)
 {
     this.db = db;
     InitializeComponent();
     TakimleriListele();
 }