Create Tournament screen is wired up an is functioning
This commit is contained in:
@ -53,6 +53,12 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CancelCreation()
|
||||||
|
{
|
||||||
|
EventAggregationProvider.TrackerEventAggregator.PublishOnCurrentThread(new PrizeModel());
|
||||||
|
this.TryClose();
|
||||||
|
}
|
||||||
|
|
||||||
public bool CanCreatePrize(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)
|
public bool CanCreatePrize(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)
|
||||||
{
|
{
|
||||||
return ValidateForm(placeNumber, placeName, prizeAmount, prizePercentage);
|
return ValidateForm(placeNumber, placeName, prizeAmount, prizePercentage);
|
||||||
@ -69,8 +75,8 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
};
|
};
|
||||||
GlobalConfig.Connection.CreatePrize(model);
|
GlobalConfig.Connection.CreatePrize(model);
|
||||||
|
|
||||||
//TODO Close out the form and alert the calling form
|
EventAggregationProvider.TrackerEventAggregator.PublishOnCurrentThread(model);
|
||||||
|
this.TryClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ValidateForm(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)
|
private bool ValidateForm(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)
|
||||||
|
|||||||
@ -133,6 +133,12 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
SelectedTeamMembersIsVisible = false;
|
SelectedTeamMembersIsVisible = false;
|
||||||
AddPersonIsVisible = true;
|
AddPersonIsVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CancelCreation()
|
||||||
|
{
|
||||||
|
EventAggregationProvider.TrackerEventAggregator.PublishOnUIThread(new TeamModel());
|
||||||
|
this.TryClose();
|
||||||
|
}
|
||||||
public bool CanCreateTeam
|
public bool CanCreateTeam
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -163,7 +169,8 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
|
|
||||||
GlobalConfig.Connection.CreateTeam(t);
|
GlobalConfig.Connection.CreateTeam(t);
|
||||||
|
|
||||||
//TODO - Pass the team back to the parent and close the form
|
EventAggregationProvider.TrackerEventAggregator.PublishOnUIThread(t);
|
||||||
|
this.TryClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(PersonModel message)
|
public void Handle(PersonModel message)
|
||||||
|
|||||||
@ -2,39 +2,55 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using TrackerLibrary;
|
||||||
using TrackerLibrary.Models;
|
using TrackerLibrary.Models;
|
||||||
|
|
||||||
namespace TrackerWPFUI.ViewModels
|
namespace TrackerWPFUI.ViewModels
|
||||||
{
|
{
|
||||||
public class CreateTournamentViewModel : Conductor<object>.Collection.AllActive
|
public class CreateTournamentViewModel : Conductor<object>.Collection.AllActive, IHandle<TeamModel>,IHandle<PrizeModel>
|
||||||
{
|
{
|
||||||
private string _tournamentName;
|
private string _tournamentName = "";
|
||||||
private decimal _entryFee;
|
private decimal _entryFee;
|
||||||
private BindableCollection<TeamModel> _availableTeams;
|
private BindableCollection<TeamModel> _availableTeams;
|
||||||
private TeamModel _selectedTeamToAdd;
|
private TeamModel _selectedTeamToAdd;
|
||||||
private BindableCollection<TeamModel> _selectedTeams;
|
private BindableCollection<TeamModel> _selectedTeams = new BindableCollection<TeamModel>();
|
||||||
private TeamModel _selectedTeamToRemove;
|
private TeamModel _selectedTeamToRemove;
|
||||||
private Screen _activeAddTeamView;
|
private Screen _activeAddTeamView;
|
||||||
private BindableCollection<PrizeModel> _selectedPrizes;
|
private BindableCollection<PrizeModel> _selectedPrizes = new BindableCollection<PrizeModel>();
|
||||||
private PrizeModel _selectedPrizeToRemove;
|
private PrizeModel _selectedPrizeToRemove;
|
||||||
private Screen _activAddPrizeView;
|
private Screen _activAddPrizeView;
|
||||||
|
private bool _selectedTeamIsVisible =true;
|
||||||
|
private bool _addTeamIsVisible = false;
|
||||||
|
private bool _selectedPrizesIsVisible = true;
|
||||||
|
private bool _addPrizeIsVisible = false;
|
||||||
|
|
||||||
|
|
||||||
|
public CreateTournamentViewModel()
|
||||||
|
{
|
||||||
|
AvailableTeams = new BindableCollection<TeamModel>(GlobalConfig.Connection.GetTeam_All());
|
||||||
|
EventAggregationProvider.TrackerEventAggregator.Subscribe(this);
|
||||||
|
}
|
||||||
|
|
||||||
public string TournamentName
|
public string TournamentName
|
||||||
{
|
{
|
||||||
get { return _tournamentName; }
|
get { return _tournamentName; }
|
||||||
set { _tournamentName = value;
|
set
|
||||||
|
{
|
||||||
|
_tournamentName = value;
|
||||||
NotifyOfPropertyChange(() => TournamentName);
|
NotifyOfPropertyChange(() => TournamentName);
|
||||||
|
NotifyOfPropertyChange(() => CanCreateTournament);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public decimal EntryFee
|
public decimal EntryFee
|
||||||
{
|
{
|
||||||
get { return _entryFee; }
|
get { return _entryFee; }
|
||||||
set { _entryFee = value;
|
set
|
||||||
|
{
|
||||||
|
_entryFee = value;
|
||||||
NotifyOfPropertyChange(() => EntryFee);
|
NotifyOfPropertyChange(() => EntryFee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,30 +64,39 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
public TeamModel SelectedTeamToAdd
|
public TeamModel SelectedTeamToAdd
|
||||||
{
|
{
|
||||||
get { return _selectedTeamToAdd; }
|
get { return _selectedTeamToAdd; }
|
||||||
set { _selectedTeamToAdd = value;
|
set
|
||||||
|
{
|
||||||
|
_selectedTeamToAdd = value;
|
||||||
NotifyOfPropertyChange(() => SelectedTeamToAdd);
|
NotifyOfPropertyChange(() => SelectedTeamToAdd);
|
||||||
|
NotifyOfPropertyChange(() => CanAddTeam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BindableCollection<TeamModel> SelectedTeams
|
public BindableCollection<TeamModel> SelectedTeams
|
||||||
{
|
{
|
||||||
get { return _selectedTeams; }
|
get { return _selectedTeams; }
|
||||||
set { _selectedTeams = value;}
|
set { _selectedTeams = value;
|
||||||
|
NotifyOfPropertyChange(() => SelectedTeams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TeamModel SelectedTeamToRemove
|
public TeamModel SelectedTeamToRemove
|
||||||
{
|
{
|
||||||
get { return _selectedTeamToRemove; }
|
get { return _selectedTeamToRemove; }
|
||||||
set { _selectedTeamToRemove = value;
|
set
|
||||||
|
{
|
||||||
|
_selectedTeamToRemove = value;
|
||||||
NotifyOfPropertyChange(() => SelectedTeamToRemove);
|
NotifyOfPropertyChange(() => SelectedTeamToRemove);
|
||||||
|
NotifyOfPropertyChange(() => CanRemoveTeam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Screen ActiveAddTeamView
|
public Screen ActiveAddTeamView
|
||||||
{
|
{
|
||||||
get { return _activeAddTeamView; }
|
get { return _activeAddTeamView; }
|
||||||
set { _activeAddTeamView = value;
|
set
|
||||||
|
{
|
||||||
|
_activeAddTeamView = value;
|
||||||
NotifyOfPropertyChange(() => ActiveAddTeamView);
|
NotifyOfPropertyChange(() => ActiveAddTeamView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,66 +110,189 @@ namespace TrackerWPFUI.ViewModels
|
|||||||
public PrizeModel SelectedPrizeToRemove
|
public PrizeModel SelectedPrizeToRemove
|
||||||
{
|
{
|
||||||
get { return _selectedPrizeToRemove; }
|
get { return _selectedPrizeToRemove; }
|
||||||
set { _selectedPrizeToRemove = value;
|
set
|
||||||
|
{
|
||||||
|
_selectedPrizeToRemove = value;
|
||||||
NotifyOfPropertyChange(() => SelectedPrizeToRemove);
|
NotifyOfPropertyChange(() => SelectedPrizeToRemove);
|
||||||
|
NotifyOfPropertyChange(() => CanRemovePrize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Screen ActiveAddPrizeView
|
public Screen ActiveAddPrizeView
|
||||||
{
|
{
|
||||||
get { return _activAddPrizeView; }
|
get { return _activAddPrizeView; }
|
||||||
set { _activAddPrizeView = value;
|
set
|
||||||
|
{
|
||||||
|
_activAddPrizeView = value;
|
||||||
NotifyOfPropertyChange(() => ActiveAddPrizeView);
|
NotifyOfPropertyChange(() => ActiveAddPrizeView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanAddTeam()
|
|
||||||
|
public bool SelectedTeamIsVisible
|
||||||
|
{
|
||||||
|
get { return _selectedTeamIsVisible; }
|
||||||
|
set { _selectedTeamIsVisible = value;
|
||||||
|
NotifyOfPropertyChange(() => SelectedTeamIsVisible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AddTeamIsVisible
|
||||||
|
{
|
||||||
|
get { return _addTeamIsVisible; }
|
||||||
|
set { _addTeamIsVisible = value;
|
||||||
|
NotifyOfPropertyChange(() => AddTeamIsVisible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool SelectedPrizesIsVisible
|
||||||
|
{
|
||||||
|
get { return _selectedPrizesIsVisible; }
|
||||||
|
set { _selectedPrizesIsVisible = value;
|
||||||
|
NotifyOfPropertyChange(() => SelectedPrizesIsVisible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AddPrizeIsVisible
|
||||||
|
{
|
||||||
|
get { return _addPrizeIsVisible; }
|
||||||
|
set { _addPrizeIsVisible = value;
|
||||||
|
NotifyOfPropertyChange(() => AddPrizeIsVisible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool CanAddTeam
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
return SelectedTeamToAdd != null;
|
return SelectedTeamToAdd != null;
|
||||||
}
|
}
|
||||||
public void AddTeams()
|
}
|
||||||
|
public void AddTeam()
|
||||||
{
|
{
|
||||||
|
SelectedTeams.Add(SelectedTeamToAdd);
|
||||||
|
AvailableTeams.Remove(SelectedTeamToAdd);
|
||||||
|
NotifyOfPropertyChange(() => CanCreateTournament);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateTeam()
|
public void CreateTeam()
|
||||||
{
|
{
|
||||||
|
ActiveAddTeamView = new CreateTeamViewModel();
|
||||||
|
Items.Add(ActiveAddTeamView);
|
||||||
|
|
||||||
|
SelectedTeamIsVisible = false;
|
||||||
|
AddTeamIsVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanRemoveTeam()
|
public bool CanRemoveTeam
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
return SelectedTeamToRemove != null;
|
return SelectedTeamToRemove != null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public void RemoveTeam()
|
public void RemoveTeam()
|
||||||
{
|
{
|
||||||
|
AvailableTeams.Add(SelectedTeamToRemove);
|
||||||
|
SelectedTeams.Remove(SelectedTeamToRemove);
|
||||||
|
NotifyOfPropertyChange(() => CanCreateTournament);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreatePrize()
|
public void CreatePrize()
|
||||||
{
|
{
|
||||||
|
ActiveAddPrizeView = new CreatePrizeViewModel();
|
||||||
|
Items.Add(ActiveAddPrizeView);
|
||||||
|
|
||||||
|
SelectedPrizesIsVisible = false;
|
||||||
|
AddPrizeIsVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanRemovePrize()
|
public bool CanRemovePrize
|
||||||
|
{
|
||||||
|
get
|
||||||
{
|
{
|
||||||
return SelectedPrizeToRemove != null;
|
return SelectedPrizeToRemove != null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RemovePrize()
|
public void RemovePrize()
|
||||||
{
|
{
|
||||||
|
SelectedPrizes.Remove(SelectedPrizeToRemove);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanCreateTournament()
|
public bool CanCreateTournament
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(SelectedTeams != null)
|
||||||
|
{
|
||||||
|
if (TournamentName.Length > 0 && SelectedTeams.Count > 1)
|
||||||
{
|
{
|
||||||
//ToDo - Add logic for createing the tournament
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateTournament()
|
public void CreateTournament()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Create our tournament model
|
||||||
|
TournamentModel tm = new TournamentModel();
|
||||||
|
|
||||||
|
tm.TournamentName = TournamentName;
|
||||||
|
tm.EntryFee = EntryFee;
|
||||||
|
tm.Prizes = SelectedPrizes.ToList();
|
||||||
|
tm.EnteredTeams = SelectedTeams.ToList();
|
||||||
|
|
||||||
|
// TODO Wireup our matchups
|
||||||
|
|
||||||
|
TournamentLogic.CreateRounds(tm);
|
||||||
|
|
||||||
|
// Finally create the tournament entry
|
||||||
|
// Create all of the prizes entries
|
||||||
|
// Create all of team entries
|
||||||
|
GlobalConfig.Connection.CreateTournament(tm);
|
||||||
|
|
||||||
|
tm.AlertUsersToNewRound();
|
||||||
|
|
||||||
|
EventAggregationProvider.TrackerEventAggregator.PublishOnUIThread(tm);
|
||||||
|
this.TryClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(TeamModel message)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(message.TeamName))
|
||||||
|
{
|
||||||
|
SelectedTeams.Add(message);
|
||||||
|
NotifyOfPropertyChange(() => CanCreateTournament);
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectedTeamIsVisible = true;
|
||||||
|
AddTeamIsVisible = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(PrizeModel message)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(message.PlaceName))
|
||||||
|
{
|
||||||
|
SelectedPrizes.Add(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectedPrizesIsVisible = true;
|
||||||
|
AddPrizeIsVisible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,22 +9,30 @@ using TrackerLibrary.Models;
|
|||||||
|
|
||||||
namespace TrackerWPFUI.ViewModels
|
namespace TrackerWPFUI.ViewModels
|
||||||
{
|
{
|
||||||
public class ShellViewModel : Conductor<object> //ActiveItem in Itemcontrol tells whats going on
|
public class ShellViewModel : Conductor<object>,IHandle<TournamentModel> //ActiveItem in Itemcontrol tells whats going on
|
||||||
{
|
{
|
||||||
|
|
||||||
public ShellViewModel()
|
public ShellViewModel()
|
||||||
{
|
{
|
||||||
// Initialize the database connections
|
// Initialize the database connections
|
||||||
GlobalConfig.InitializeConnections(DatabaseType.Sql);
|
GlobalConfig.InitializeConnections(DatabaseType.Sql);
|
||||||
|
|
||||||
|
EventAggregationProvider.TrackerEventAggregator.Subscribe(this);
|
||||||
|
|
||||||
_existingTournaments = new BindableCollection<TournamentModel>(GlobalConfig.Connection.GetTournament_All());
|
_existingTournaments = new BindableCollection<TournamentModel>(GlobalConfig.Connection.GetTournament_All());
|
||||||
//ActivateItem(new CreatePrizeViewModel());
|
//ActivateItem(new CreatePrizeViewModel());
|
||||||
//ActivateItem(new CreateTeamViewModel());
|
//ActivateItem(new CreateTeamViewModel());
|
||||||
//ActivateItem(new CreatePersonViewModel());
|
//ActivateItem(new CreatePersonViewModel());
|
||||||
ActivateItem(new CreateTournamentViewModel());
|
|
||||||
}
|
}
|
||||||
public void CreateTournament()
|
public void CreateTournament()
|
||||||
{
|
{
|
||||||
|
ActivateItem(new CreateTournamentViewModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(TournamentModel message)
|
||||||
|
{
|
||||||
|
// Open the tournamentViewer to the given tournament
|
||||||
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
private BindableCollection<TournamentModel> _existingTournaments;
|
private BindableCollection<TournamentModel> _existingTournaments;
|
||||||
|
|||||||
@ -41,10 +41,20 @@
|
|||||||
<!--row 4-->
|
<!--row 4-->
|
||||||
<TextBlock Margin="5 0 10 10" Grid.Column="0" Grid.Row="4">Prize Percentage</TextBlock>
|
<TextBlock Margin="5 0 10 10" Grid.Column="0" Grid.Row="4">Prize Percentage</TextBlock>
|
||||||
<TextBox x:Name="PrizePercentage" Margin="0 0 5 10" Grid.Column="2" Grid.Row="4"></TextBox>
|
<TextBox x:Name="PrizePercentage" Margin="0 0 5 10" Grid.Column="2" Grid.Row="4"></TextBox>
|
||||||
<!--row 4-->
|
<!--row 5-->
|
||||||
<Button x:Name="CreatePrize" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Padding="10" Margin="5 0 ">
|
<StackPanel Orientation="Horizontal" Grid.Column="0"
|
||||||
|
Grid.Row="5" Grid.ColumnSpan="2" Margin="5 0"
|
||||||
|
HorizontalAlignment="Center">
|
||||||
|
<Button x:Name="CreatePrize" Padding="10" Margin="0 0 5 0 ">
|
||||||
Create Prize
|
Create Prize
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button x:Name="CancelCreation" Padding="10" Margin="5 0 " Background="Red" Foreground="White">
|
||||||
|
Cancel Prize
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<!--<Button x:Name="CreatePrize" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Padding="10" Margin="5 0 ">
|
||||||
|
Create Prize
|
||||||
|
</Button>-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -29,7 +29,15 @@
|
|||||||
<StackPanel x:Name="AddPersonIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
<StackPanel x:Name="AddPersonIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
||||||
<ContentControl x:Name="ActiveItem"/>
|
<ContentControl x:Name="ActiveItem"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button x:Name="CreateTeam" Margin="5 10 5 5" Padding="5" >Create Team</Button>
|
<StackPanel Orientation="Horizontal" Margin="5 10 5 5" HorizontalAlignment="Center">
|
||||||
|
<Button x:Name="CreateTeam" Padding="5" Margin="0 0 5 0" >
|
||||||
|
Create Team
|
||||||
|
</Button>
|
||||||
|
<Button x:Name="CancelCreation" Background="Red" Foreground="White"
|
||||||
|
Margin="5 0 0 0" Padding="5" >
|
||||||
|
Cancel Team
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -29,8 +29,9 @@
|
|||||||
<TextBox x:Name="EntryFee" Margin="5 0 5 10 "></TextBox>
|
<TextBox x:Name="EntryFee" Margin="5 0 5 10 "></TextBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0 10">
|
<StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0 10">
|
||||||
|
<StackPanel x:Name="SelectedTeamsIsVisible" Orientation="Vertical">
|
||||||
<TextBlock FontSize="22" >Teams Section</TextBlock>
|
<TextBlock FontSize="22" >Teams Section</TextBlock>
|
||||||
<TextBox x:Name="TeamName" Margin="5 0 5 10 "></TextBox>
|
<!--<TextBox x:Name="TeamName" Margin="5 0 5 10 "></TextBox>-->
|
||||||
<TextBlock Margin="5 0 5 5">Select Team</TextBlock>
|
<TextBlock Margin="5 0 5 5">Select Team</TextBlock>
|
||||||
<ComboBox x:Name="AvailableTeams" Margin="5 0 5 10"
|
<ComboBox x:Name="AvailableTeams" Margin="5 0 5 10"
|
||||||
SelectedItem="{Binding Path=SelectedTeamToAdd, Mode=OneWayToSource}"
|
SelectedItem="{Binding Path=SelectedTeamToAdd, Mode=OneWayToSource}"
|
||||||
@ -40,29 +41,32 @@
|
|||||||
<Button x:Name="CreateTeam" Padding="5" >Create Team</Button>
|
<Button x:Name="CreateTeam" Padding="5" >Create Team</Button>
|
||||||
<Button x:Name="RemoveTeam" Padding="5" Margin="5 0 0 0">Remove Team</Button>
|
<Button x:Name="RemoveTeam" Padding="5" Margin="5 0 0 0">Remove Team</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel x:Name="SelectedTeamsIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
<StackPanel Orientation="Vertical" Margin="5 10 5 0">
|
||||||
<TextBlock Margin="0 0 0 10" >Selected Teams</TextBlock>
|
<TextBlock Margin="0 0 0 10" >Selected Teams</TextBlock>
|
||||||
<ListBox x:Name="SelectedTeams" DisplayMemberPath="TeamName"
|
<ListBox x:Name="SelectedTeams" DisplayMemberPath="TeamName"
|
||||||
MinHeight="20"
|
MinHeight="20"
|
||||||
SelectedItem="{Binding Path=SelectedTeamToRemove, Mode=TwoWay}" />
|
SelectedItem="{Binding Path=SelectedTeamToRemove, Mode=TwoWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
<StackPanel x:Name="AddTeamIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
<StackPanel x:Name="AddTeamIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
||||||
<ContentControl x:Name="ActiveAddTeamView"/>
|
<ContentControl x:Name="ActiveAddTeamView"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="1" Margin="10 10 0 10">
|
<StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="1" Margin="10 10 0 10">
|
||||||
|
<StackPanel x:Name="SelectedPrizesIsVisible" Orientation="Vertical">
|
||||||
<TextBlock FontSize="22" >Prizes Section</TextBlock>
|
<TextBlock FontSize="22" >Prizes Section</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
<Button x:Name="CreatePrize" Padding="5" Margin="0 0 5 0">Create Prize</Button>
|
<Button x:Name="CreatePrize" Padding="5" Margin="0 0 5 0">Create Prize</Button>
|
||||||
<Button x:Name="RemovePrize" Padding="5" Margin="5 0 0 0">Remove Prize</Button>
|
<Button x:Name="RemovePrize" Padding="5" Margin="5 0 0 0">Remove Prize</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel x:Name="SelectedPrizesIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
<StackPanel Orientation="Vertical" Margin="5 10 5 0">
|
||||||
<TextBlock Margin="0 0 0 10" >Selected Teams</TextBlock>
|
<TextBlock Margin="0 0 0 10" >Selected Prizes</TextBlock>
|
||||||
<ListBox x:Name="SelectedPrizes" DisplayMemberPath="PrizeName"
|
<ListBox x:Name="SelectedPrizes" DisplayMemberPath="PlaceName"
|
||||||
MinHeight="20"
|
MinHeight="20"
|
||||||
SelectedItem="{Binding Path=SelectedPrizeToRemove, Mode=TwoWay}" />
|
SelectedItem="{Binding Path=SelectedPrizeToRemove, Mode=TwoWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel x:Name="AddPrizeIsVisible" Orientation="Vertical" Margin="5 10 5 0">
|
</StackPanel>
|
||||||
|
<StackPanel x:Name="AddPrizeIsVisible" Orientation="Vertical" Margin="5 0 5 0">
|
||||||
<ContentControl x:Name="ActiveAddPrizeView"/>
|
<ContentControl x:Name="ActiveAddPrizeView"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:TrackerWPFUI.Views" FontSize="18"
|
xmlns:local="clr-namespace:TrackerWPFUI.Views" FontSize="18"
|
||||||
mc:Ignorable="d" WindowStartupLocation="CenterScreen" Icon="..\TournamentTracker.ico"
|
mc:Ignorable="d" WindowStartupLocation="CenterScreen" Icon="..\TournamentTracker.ico"
|
||||||
Title="ShellView" Height="500" Width="600">
|
Title="ShellView" Height="700" Width="1200">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="20"/>
|
<ColumnDefinition Width="20"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user