Example #1
0
        /// <summary>
        /// Opens the athlete registration dialog
        /// </summary>
        public void OpenAthleteSeasonRegDialog()
        {
            if (m_athleteSeasonRegDialog == null)
            {
                m_athleteSeasonRegDialog = new AthleteRegisterToSeasonDialog();
            }

            m_athleteSeasonRegDialog.Unloaded -= new RoutedEventHandler(CloseAthleteSeasonRegDialog);
            m_athleteSeasonRegDialog.Unloaded += new RoutedEventHandler(CloseAthleteSeasonRegDialog);

            m_athleteSeasonRegViewModel          = new AthleteRegisterToSeasonViewModel(this.model);
            m_athleteSeasonRegDialog.DataContext = m_athleteSeasonRegViewModel;

            try
            {
                m_athleteSeasonRegDialog.Show();
                m_athleteSeasonRegDialog.Activate();
            }
            catch (Exception ex)
            {
                this.logger.WriteLog(ex.ToString());
            }
        }
Example #2
0
 /// <summary>
 /// Closes the athlete registration dialog
 /// </summary>
 public void CloseAthleteSeasonRegDialog(object sender, RoutedEventArgs e)
 {
     m_athleteSeasonRegDialog = null;
 }