public AthleteEdit(Athlete athlete, AthleteManager athleteManager, AthleteRepository athleteRepository)
 {
     _athlete           = athlete;
     _athleteManager    = athleteManager;
     _athleteRepository = athleteRepository;
     InitializeComponent();
     grdEdit.DataContext = _athlete;
 }
Example #2
0
        public MainWindow()
        {
            AthleteManager = new AthleteManager();
            ReportManager  = new ReportManager();
            RfidManager    = new RfidManager(AthleteManager);

            InitializeComponent();
        }
Example #3
0
		public AzureService()
		{
			var url = new Uri(Keys.AzureDomain);
			var store = new MobileServiceSQLiteStore($"{url.Host}.db");
			store.DefineTable<Athlete>();
			store.DefineTable<League>();
			store.DefineTable<Membership>();
			store.DefineTable<Challenge>();
			store.DefineTable<GameResult>();
			Client.SyncContext.InitializeAsync(store);

			LeagueManager = new LeagueManager();
			MembershipManager = new MembershipManager();
			AthleteManager = new AthleteManager();
			ChallengeManager = new ChallengeManager();
			GameResultManager = new GameResultManager();
		}
Example #4
0
        public AthletesView()
        {
            InitializeComponent();
            var mainWindow = (MainWindow)Application.Current.MainWindow;

            _rfidManager            = mainWindow.RfidManager;
            _athleteManager         = mainWindow.AthleteManager;
            btnStopAssign.IsEnabled = false;

            this.DataContext = _athleteManager;

            btnAssign.DataContext = _rfidManager;

            _athleteRepository = new AthleteRepository();


            _athleteRepository.Save();


            dgAthletes.ItemsSource = _athleteManager.Athletes;

            _athleteManager.NextBib = _athleteRepository.GetMaxBib() + 1;
            //    _athleteManager.
        }