ChessDemo.MainWindow.saveButton_Click C# (CSharp) Method

saveButton_Click() private method

private saveButton_Click ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
        private void saveButton_Click(object sender, RoutedEventArgs e)
        {
            string path = Directory.GetCurrentDirectory() +
                System.IO.Path.DirectorySeparatorChar + "chess.game";

            System.IO.File.WriteAllLines(path,
                this.gameProvider.History.GetMovesArray());

            MessageBox.Show("Game saved");
        }