示例#1
0
 public formGestaoEquipas(Modelo_Container dbContainer)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     eqRepo           = new EquipasRepository(dbContainer);
     refreshList();
 }
示例#2
0
        public formEquipas(Team team, Modelo_Container dbContainer)
        {
            InitializeComponent();
            teamEditar  = team;
            repoEquipas = new EquipasRepository(dbContainer);
            repoPlayers = new PlayerRepository(dbContainer);
            listPlayers = repoPlayers.GetPlayersListNotIn(team.Player.ToList());
            foreach (Player player in listPlayers)
            {
                lbSemEquipa.Items.Add(player.Name + "\t" + player.Nickname);
            }
            listPlayersInTeam = team.Player.ToList();
            foreach (Player player in team.Player)
            {
                lbJogadoresNaEquipa.Items.Add(player.Name + "\t" + player.Nickname);
            }
            tbNomeEquipa.Text = team.Name;
            if (team.Avatar != null)
            {
                pbAvatar.Load(team.Avatar);
            }

            textBox1.Text = "1";
            textBox1.Text = "";
            this.Text     = "Editar equipa";
            ativarBotaoGerir();
            novo = false;
        }
示例#3
0
 public formTorneios(Modelo_Container dbContainer)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     Init();
     menuStrip1.Visible = false;
 }
示例#4
0
 public formUserAdmin(Modelo_Container container)
 {
     InitializeComponent();
     this.dbContainer = container;
     adminRepos       = new AdminRepository(dbContainer);
     RefreshView();
 }
 public formJogadores(Modelo_Container dbContainer)
 {
     this.dbContainer = dbContainer;
     InitializeComponent();
     playerRepo = new PlayerRepository(dbContainer);
     RefreshList();
 }
 public formBaralhos(Modelo_Container dbContainer)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     deckRepo         = new DeckRepository(dbContainer);
     cardRepo         = new CardRepository(dbContainer);
     RefreshDeckList();
 }
 public formCartas(Modelo_Container dbContainer)
 {
     InitializeComponent();
     cardRepo = new CardRepository(dbContainer);
     RefreshView();
     cbFacao.SelectedIndex = 0;
     cbTipo.SelectedIndex  = 0;
 }
示例#8
0
 public formUserReferee(Modelo_Container dbContainer)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     arbitroRepos     = new ArbitroRepository(dbContainer);
     RefreshView();//refresh da lista de arbitros
     btEditar.Hide();
 }
示例#9
0
 public formTorneios(Modelo_Container dbContainer, Referee arbitro, formLogin formLogin)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     Init();
     this.arbitro       = arbitro;
     this.formlogin     = formLogin;
     flagLoginArbitro   = true;
     btNovoTorn.Enabled = false;
     menuStrip1.Visible = true;
 }
 /// <summary>
 /// Formulario para adicionar um novo baralho
 /// </summary>
 public formBaralhosManipula(Modelo_Container dbContainer)
 {
     FlagEdicao = false;
     InitializeComponent();
     this.Text     = "Novo Baralho";
     baralho       = new Deck();
     deckRepo      = new DeckRepository(dbContainer);
     cardRepo      = new CardRepository(dbContainer);
     DeckCardsList = new List <Card>();
     RefreshCartasDisponiveis();
     RefreshCartasBaralho();
     this.TopMost = true;
 }
示例#11
0
 public formEquipas(Modelo_Container dbContainer)
 {
     InitializeComponent();
     repoEquipas = new EquipasRepository(dbContainer);
     repoPlayers = new PlayerRepository(dbContainer);
     listPlayers = repoPlayers.GetPlayersList();
     foreach (Player player in listPlayers)
     {
         lbSemEquipa.Items.Add(player.Name + "\t" + player.Nickname);
     }
     textBox1.Text = "1"; textBox1.Text = "";
     novo          = true;
 }
 /// <summary>
 /// Formulario para editar um baralho
 /// </summary>
 /// <param name="baralho">Baralho a editar</param>
 public formBaralhosManipula(Deck baralho, Modelo_Container dbContainer)
 {
     FlagEdicao = true;
     InitializeComponent();
     this.Text     = "Editar Baralho";
     this.baralho  = baralho;
     tbNome.Text   = baralho.Name;
     deckRepo      = new DeckRepository(dbContainer);
     cardRepo      = new CardRepository(dbContainer);
     DeckCardsList = baralho.Cards.ToList();
     RefreshCartasDisponiveis();
     RefreshCartasBaralho();
     this.TopMost = true;
 }
示例#13
0
 public formAdicionarAdmin(formUserAdmin form, Modelo_Container dbContainer, Administrador admin)
 {
     InitializeComponent();
     edit                 = true;
     adminRepos           = new AdminRepository(dbContainer);
     this.adminParaEdicao = admin;
     if (edit)  //Mudar labels para modo de edição
     {
         this.Text        = "Editar Administrador";
         btAdicionar.Text = "Editar";
         labelTitulo.Text = "Editar Administrador";
         tbUsername.Text  = admin.Username;
         tbPassword.Text  = admin.Password;
         tbEmail.Text     = admin.email;
     }
 }
 public formAdicionarArbrito(formUserReferee form, Modelo_Container dbContainer, Referee arbitro)
 {
     InitializeComponent();
     edit                   = true;
     arbitroRepos           = new ArbitroRepository(dbContainer);
     this.arbitroParaEdicao = arbitro;
     if (edit)  //Mudar labels para modo de edição
     {
         this.Text              = "Editar Arbitro";
         btGuardar.Text         = "Editar";
         labelTitulo.Text       = "Editar Arbitro";
         tbNome.Text            = arbitro.Name;
         tbUsername.Text        = arbitro.Username;
         tbPassword.Text        = arbitro.Password;
         pbAvatar.ImageLocation = arbitro.Avatar;
         image = (Image)pbAvatar.BackgroundImage.Clone();
         if (arbitro.Avatar != "")
         {
             pbAvatar.BackgroundImage = null;
         }
     }
 }
示例#15
0
 public formPrincipal(Modelo_Container dbContainer, formLogin formlogin)
 {
     InitializeComponent();
     this.dbContainer = dbContainer;
     this.formlogin   = formlogin;
 }
 public DeckRepository(Modelo_Container dbConteirner)
 {
     this.dbConteirner = dbConteirner;
 }
示例#17
0
 public formAdicionarAdmin(formUserAdmin form, Modelo_Container dbContainer)
 {
     InitializeComponent();
     adminRepos = new AdminRepository(dbContainer);
 }
        private List <Administrador> listaAdmin;//Lista de admins

        public AdminRepository(Modelo_Container container)
        {
            this.container = container; //cria objeto do container
            listaAdmin     = new List <Administrador>();
        }
示例#19
0
 public formPickUser(Modelo_Container dbContainer)
 {
     this.dbContainer = dbContainer;
     InitializeComponent();
 }
 public PlayerRepository(Modelo_Container dbConteirner)
 {
     this.dbConteirner = dbConteirner;
 }
示例#21
0
 public TournamentRepository(Modelo_Container dbContainer)
 {
     this.dbContainer = dbContainer;
 }
示例#22
0
 public EquipasRepository(Modelo_Container dbContainer)
 {
     this.dbContainer = dbContainer;
 }
        private List <Referee> listaArbitro;//Lista de arbitros

        public ArbitroRepository(Modelo_Container container)
        {
            this.container = container; //cria objeto do container
            listaArbitro   = new List <Referee>();
        }
 public formAdicionarArbrito(formUserReferee form, Modelo_Container dbContainer)
 {
     InitializeComponent();
     arbitroRepos = new ArbitroRepository(dbContainer);
     image        = (Image)pbAvatar.BackgroundImage.Clone();
 }
 public GameRepository(Modelo_Container conteiner)
 {
     dbConteirner = conteiner;
 }