Giter Site home page Giter Site logo

championsleague's Introduction

Soccer / Football League Table App

This is the .Net Framework(C#) Windows Forms App which you can create teams, team colors, players and played/unplayed matches. Also it creates database and tables with Entity Framework Code First. You should just change connection strings for your database.

Main Screen

You can see played matches and matches which will play.

main_screen

Colors Screen

You can create colors in this screen.

colors_screen

Teams Screen

You can add teams and edit in this screen. Also see 5 of colors of selected team. If you want to arrange players of team, you should open Team Players screen with button.

teams_screen


teams_players_screen

Players Screen

You can add players and edit in this screen.

players_screen

Match Screen

You can create or edit matches in this screen. Creating :

match_create_screen


Editing:

match_editing_screen


Code Sample
            if (btnAddTeam.Text == "Add Team")
            {
                if (!string.IsNullOrEmpty(txtTeamName.Text) && chklstColors.CheckedItems.Count > 0)
                {
                    Team newTeam = new Team { TeamName = txtTeamName.Text };
                    _db.Teams.Add(newTeam);

                    foreach (var item in chklstColors.CheckedItems)
                    {
                        newTeam.Colors.Add((Models.Color)item);
                    }

                    _db.SaveChanges();
                    lstTeamsUpdate();
                    FormClean();
                }
                else
                {
                    MessageBox.Show("You should enter Team Name and check one color at least.");
                }
            }
            if (btnAddTeam.Text == "Save Team")
            {
                if (!string.IsNullOrEmpty(txtTeamName.Text) && chklstColors.CheckedItems.Count > 0)
                {
                    Team selectedTeam = (Team)lstTeams.SelectedItem;
                    selectedTeam.TeamName = txtTeamName.Text;
                    selectedTeam.Colors.Clear();

                    foreach (var item in chklstColors.CheckedItems)
                    {
                        selectedTeam.Colors.Add((Models.Color)item);
                    }

                    _db.SaveChanges();
                    lstTeamsUpdate();
                    FormClean();
                    lstTeams.Enabled = true;
                    groupBox1.Text = "Add Team";
                    groupBox1.BackColor = System.Drawing.Color.Transparent;
                    btnAddTeam.Text = "Add Team";
                    btnDelete.Enabled = true;
                    btnPlayers.Enabled = true;
                }
                else
                {
                    MessageBox.Show("You should enter Team Name and check one color at least.");
                }
            }

championsleague's People

Contributors

bekomu avatar

Stargazers

Mustafa YILMAZ avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.