private void LoadButton_Click(object sender, RoutedEventArgs e)
        {
            loadGame = true;
            clearRegisterName();
            int mode = UI_GameManagerComunicate.load();

            this.Rows = this.Cols = mode;
            if (mode == 0)
            {
                return;
            }
            if (mode == 3)
            {
                modeName = "3x3";
                modeCombx.SelectedIndex = 0;
            }
            else if (mode == 4)
            {
                modeName = "4x4";
                modeCombx.SelectedIndex = 1;
            }
            else if (mode == 5)
            {
                modeName = "5x5";
                modeCombx.SelectedIndex = 2;
            }
            if (gameScreen == null)
            {
                return;
            }
            gameScreen.Children.Clear();
            DrawingLine();
            isGameRun = true;
            loadGame  = false;
            UI_GameManagerComunicate.start(this, Rows, Cols, true);
        }
 private void SaveButton_Click(object sender, RoutedEventArgs e)
 {
     UI_GameManagerComunicate.save(modeName);
 }
 private void startGameBtn_Click(object sender, RoutedEventArgs e)
 {
     isGameRun = true;
     UI_GameManagerComunicate.start(this, Rows, Cols, false);
 }