Beispiel #1
0
        /// <summary>
        /// Gets called when the import file button is clicked.
        /// This opens a file dialog to import a file.
        /// If the import is succesful the program advances to the typing state.
        /// </summary>
        private void ButtonImportFile_Click(object sender, RoutedEventArgs e)
        {
            if (FileImporter.OnClickImportFile())
            {
                typer = new Typer();
                keyboardHandler.ConnectToTyper(typer);
                typer.LoadText(FileImporter.GetText());
                typer.InitializeTypingState();

                ChangeProgramState(ProgramState.typing);
            }
        }