コード例 #1
0
        /// <summary>
        /// Handles the KeyUp event of the MetroWindow control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Input.KeyEventArgs"/> instance containing the event data.</param>
        private void MetroWindow_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
        {
            // Taste gedrückt - globale Abfrage egal welche Seite gerade angezeigt wird
            switch (e.Key)
            {
            case System.Windows.Input.Key.F1:
                // F1: Ruderer anzeigen
                var RowersPage = new Pages.RowersPage.RowersPage();
                mainContent.Content = RowersPage;
                break;

            case System.Windows.Input.Key.F2:
                // F2: Rennen anzeigen
                var racesPage = new Pages.RacesPage.RacesPage();
                mainContent.Content = racesPage;
                break;

            case System.Windows.Input.Key.F3:
                // F3: Log anzeigen
                var logPage = new Pages.LogPage.LogPage();
                mainContent.Content = logPage;
                break;
            }
        }
コード例 #2
0
        /// <summary>
        /// Handles the Click event of the cmdLogfile control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        private void cmdLogfile_Click(object sender, RoutedEventArgs e)
        {
            var logPage = new Pages.LogPage.LogPage();

            mainContent.Content = logPage;
        }