private void ShowAddTeamDialog(object sender, EventArgs e)
        {
            var ft            = ClearPreviousFragments("AddTeam");
            var addTournament = new EditTextDialogFragment(this, "Add Team", "Enter Tournament name");

            addTournament.Show(ft, "AddTeam");
        }
Example #2
0
        private void AddPlayer(object sender, EventArgs e)
        {
            var ft             = ClearPreviousFragments("AddPlayer");
            var editPlayerName = new EditTextDialogFragment(this, "Add Player", "Enter player name");

            editPlayerName.Show(ft, "AddPlayer");
        }
Example #3
0
        private void EditTournamentDetail(object sender, EventArgs e)
        {
            var ft = ClearPreviousFragments("EditTournamentDetail");

            SelectedTextView = (TextView)sender;
            if (SelectedTextView.Id == Resource.Id.StartDateValue)
            {
                DatePickerDialogFragment startdate = new DatePickerDialogFragment(this);
                startdate.Show(ft, "EditTournamentDetail");
            }
            else
            {
                EditTextDialogFragment tournamentDetailEdit = null;
                switch (SelectedTextView.Id)
                {
                case Resource.Id.NameValue:
                    tournamentDetailEdit = new EditTextDialogFragment(this, "Edit Name", "Enter name");
                    break;

                case Resource.Id.SponsorValue:
                    tournamentDetailEdit = new EditTextDialogFragment(this, "Edit Sponsor", "Enter sponsor");
                    break;

                case Resource.Id.StatusValue:
                    tournamentDetailEdit = new EditTextDialogFragment(this, "Edit Status", "Enter status");
                    break;

                case Resource.Id.EntryFeeValue:
                    tournamentDetailEdit = new EditTextDialogFragment(this, "Edit Entry Fee", "Enter entry fee");
                    break;
                }
                tournamentDetailEdit.Show(ft, "EditTournamentDetail");
            }
        }
Example #4
0
        private void EditTeamName(object sender, EventArgs e)
        {
            var ft = ClearPreviousFragments("EditTeamName");

            SelectedTextView = (TextView)sender;
            var editTeamName = new EditTextDialogFragment(this, "Edit Team Name", "Enter team name");

            editTeamName.Show(ft, "EditTeamName");
        }
Example #5
0
        private void OnItemViewClick(object sender, string playername)
        {
            var ft = ClearPreviousFragments("EditPlayerName");

            SelectedPlayerNameIndex = ViewModel.Team.Players.IndexOf(playername);
            var editPlayerName = new EditTextDialogFragment(this, "Edit Player Name", playername);

            editPlayerName.Show(ft, "EditPlayerName");
        }
        private void SetOvers(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            if (e.Position != 5)
            {
                return;
            }
            var ft          = ClearPreviousFragments("customovers");
            var title       = "Custom Over";
            var customOvers = new EditTextDialogFragment(this, title, "Enter number of over(s)");

            customOvers.Show(ft, "customovers");
        }
        private void SetLocation(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            if (e.Position != 1)
            {
                return;
            }
            var ft = ClearPreviousFragments("AddLocation");

            var title       = "Add Location";
            var addLocation = new EditTextDialogFragment(this, title, "Enter location");

            addLocation.Show(ft, "AddLocation");
        }
        private void SetUmpires(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            if (e.Position != 1)
            {
                return;
            }
            var ft = ClearPreviousFragments("AddUmpire");

            var title = "Add PrimaryUmpire";

            if (Resource.Id.umpire2 == e.Parent.Id)
            {
                title = "Add SecondaryUmpire";
            }
            var addTeam = new EditTextDialogFragment(this, title, "Enter umpire name");

            addTeam.Show(ft, "AddUmpire");
        }
        private void SetTeam(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            if (e.Position != 1)
            {
                return;
            }
            var ft = ClearPreviousFragments("AddTeam");

            var title = "Add HomeTeam";

            if (Resource.Id.awayTeam == e.Parent.Id)
            {
                title = "Add AwayTeam";
            }
            var addTeam = new EditTextDialogFragment(this, title, "Enter team name");

            addTeam.Show(ft, "AddTeam");
        }
Example #10
0
        private void EditTournamentDetail_AddItem(object sender, EventArgs e)
        {
            var ft = ClearPreviousFragments("EditTournamentDetail");

            AddItemButton = (Button)sender;
            EditTextDialogFragment tournamentDetailEdit_list = null;

            switch (AddItemButton.Id)
            {
            case Resource.Id.addprizeitem:
                tournamentDetailEdit_list = new EditTextDialogFragment(this, "Add Prize", "Enter prize");
                break;

            case Resource.Id.addfacilityitem:
                tournamentDetailEdit_list = new EditTextDialogFragment(this, "Add Facility", "Enter facility");
                break;

            case Resource.Id.addvenueitem:
                tournamentDetailEdit_list = new EditTextDialogFragment(this, "Add Venue", "Enter venue");
                break;
            }
            tournamentDetailEdit_list.Show(ft, "EditTournamentDetail");
        }