<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json;

namespace TestME
{
    public partial class frmEdit : Form
    {

        public Question _quest;
        bool change = false;

        public frmEdit(Question quest)
        {
            
            InitializeComponent();
            _quest = quest;
        }

        private void btnMin_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Minimized;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            if (change == true)
            {
                var msgbResult = MessageBox.Show("Do you want save changes ?", "Save Question", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

                if (msgbResult == DialogResult.Yes)
                {
                    btnSaveChanges_Click(null,null);
                }
            }
                this.Close();
        }

        private void txtAddQ_TextChanged(object sender, EventArgs e)
        {
            Utilities.txtBoxReplaceNewLine(txtAddQ);
        }
<commit_msg>Fix bug edit form close button<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json;

namespace TestME
{
    public partial class frmEdit : Form
    {

        public Question _quest;
        bool change = false;

        public frmEdit(Question quest)
        {
            
            InitializeComponent();
            _quest = quest;
        }

        private void btnMin_Click(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Minimized;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            if (change == true)
            {
                var msgbResult = MessageBox.Show("You don't save the change\nAre you sure to leave ?", "Close EditForm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

                if (msgbResult == DialogResult.Yes)
                {
                    this.Close();
                }
            }
            else
            {
                this.Close();
            }
        }

        private void txtAddQ_TextChanged(object sender, EventArgs e)
        {
            Utilities.txtBoxReplaceNewLine(txtAddQ);
        }

{'fraction_non_alphanumeric': 0.07734375, 'fraction_numerical': 0.0, 'mean_word_length': 1.744908896034298, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '574041', 'n_tokens_mistral': 673, 'n_tokens_neox': 655, 'n_words': 164}