//Recognizes the stroke
        private void recogClick(object sender, EventArgs e)
        {
            if (inkCanvas.Strokes.Count > 0)
            {
                StrokeCollection strokeList = inkCanvas.Strokes;
                //save the strokes
                MemoryStream ms = new MemoryStream();

                inkCanvas.Strokes.Save(ms);

                InkCollector collector = new InkCollector();
                Ink          ink       = new Ink();
                ink.Load(ms.ToArray());

                try
                {
                    context = new RecognizerContext();
                    RecognitionStatus status;
                    RecognitionResult result;
                    context.Strokes = ink.Strokes;
                    result          = context.Recognize(out status);
                    if (result.TopString == levelStr)
                    {
                        resultStr    = "WON";
                        resultSplash = new ResultSplashScreen();
                        resultSplash.Show();
                        Thread.Sleep(1000);
                        resultSplash.Close();

                        MessageBoxResult diagRes = MessageBox.Show("Do you want to proceed?\nYes to Proceed\nNo to Try Again", "important", MessageBoxButton.YesNo, MessageBoxImage.Question);

                        //Change theme, if colorblind and progress to new level
                        if (diagRes == MessageBoxResult.Yes)
                        {
                            write.Hide();
                            //Create a method that says "solved" after each level on the button
                            //xxxxxxxx

                            if (isColorBlind == true)
                            {
                                write.updateLevelProgress();
                                write.newLevel(isColorBlind);
                                write.saveLevelProgress(levelStr);
                            }
                            else
                            {
                                write.updateLevelProgress();
                                write.newLevel(isColorBlind);
                                write.saveLevelProgress(levelStr);
                            }
                        }
                        //Otherwise, repeat the level
                        else if (diagRes == MessageBoxResult.No)
                        {
                            if (isColorBlind == true)
                            {
                                write.repeatLevel(isColorBlind);
                            }
                            else
                            {
                                write.repeatLevel(isColorBlind);
                            }
                        }
                    }
                    else
                    {
                        resultStr    = "LOSE";
                        resultSplash = new ResultSplashScreen();
                        resultSplash.Show();
                        Thread.Sleep(1000);
                        resultSplash.Close();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
                //Clear strokes after every try
                inkCanvas.Strokes.Clear();
            }
            else
            {
                MessageBox.Show("Nothing");
            }
        }
        //Recognizes the stroke
        private void recogClick(object sender, EventArgs e)
        {
            if (inkCanvas.Strokes.Count > 0)
            {
                StrokeCollection strokeList = inkCanvas.Strokes;
                //save the strokes
                MemoryStream ms = new MemoryStream();

                inkCanvas.Strokes.Save(ms);

                InkCollector collector = new InkCollector();
                Ink ink = new Ink();
                ink.Load(ms.ToArray());

                try
                {
                    context = new RecognizerContext();
                    RecognitionStatus status;
                    RecognitionResult result;
                    context.Strokes = ink.Strokes;
                    result = context.Recognize(out status);
                    if (result.TopString == levelStr)
                    {
                        resultStr = "WON";
                        resultSplash = new ResultSplashScreen();
                        resultSplash.Show();
                        Thread.Sleep(1000);
                        resultSplash.Close();

                        MessageBoxResult diagRes = MessageBox.Show("Do you want to proceed?\nYes to Proceed\nNo to Try Again", "important", MessageBoxButton.YesNo, MessageBoxImage.Question);

                        //Change theme, if colorblind and progress to new level
                        if (diagRes == MessageBoxResult.Yes)
                        {
                            write.Hide();
                            //Create a method that says "solved" after each level on the button
                            //xxxxxxxx

                            if (isColorBlind == true)
                            {
                                write.updateLevelProgress();
                                write.newLevel(isColorBlind);
                                write.saveLevelProgress(levelStr);
                            }
                            else
                            {
                                write.updateLevelProgress();
                                write.newLevel(isColorBlind);
                                write.saveLevelProgress(levelStr);
                            }
                        }
                        //Otherwise, repeat the level
                        else if (diagRes == MessageBoxResult.No)
                        {
                            if (isColorBlind == true)
                            {
                                write.repeatLevel(isColorBlind);
                            }
                            else
                            {
                                write.repeatLevel(isColorBlind);
                            }
                        }
                    }
                    else
                    {
                        resultStr = "LOSE";
                        resultSplash = new ResultSplashScreen();
                        resultSplash.Show();
                        Thread.Sleep(1000);
                        resultSplash.Close();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
                //Clear strokes after every try
                inkCanvas.Strokes.Clear();
            }
            else
            {
                MessageBox.Show("Nothing");
            }
        }