<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.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Seed.BarCodeCore.Models;
using Seed.BarCodeCore.Resposity;

namespace Seed.BarCodeLine
{
    public partial class Main : Form
    {
        private Scan _scan;
        private readonly string _soundType = System.Configuration.ConfigurationManager.AppSettings["MusicType"];
        private readonly string _bigCodeLen = System.Configuration.ConfigurationManager.AppSettings["BigCodeLen"];
        private readonly string _smlCodeLen = System.Configuration.ConfigurationManager.AppSettings["SmlCodeLen"];
        private readonly string _codeType = System.Configuration.ConfigurationManager.AppSettings["SmlCodeType"];
        private readonly string _productLine = System.Configuration.ConfigurationManager.AppSettings["ProductLine"];
        private readonly string _storeType = System.Configuration.ConfigurationManager.AppSettings["StoreType"];
        public  Product _product = new Product();
        public SystemConfig _config=new SystemConfig();
        private int _count=0;
        public Main()
        {
            InitializeComponent();
        }

        private void Main_Load(object sender, EventArgs e)
        {
                if (_storeType == "1")
                {
                    SqliteResposity resposity = new SqliteResposity();
                    _count = resposity.TodayBigCodeCount(_productLine);
                    Product p = resposity.LastProduct<Product>();
                    if (p != null)
                    {
                        TNubs.Text = p.Specification;
                        TProductName.Text = p.ProductName;
                        TBatch.Text = p.Batch;
                    }
                }
                else
                {
                    SqlResposity resposity = new SqlResposity();
                    _count = resposity.TodayBigCodeCount(_productLine);
                    Products p = resposity.LastProduct<Products>();
                    if (p != null)
                    {
                        TNubs.Text = p.Specification;
                        TProductName.Text = p.ProductName;
                        TBatch.Text = p.Batch;
                    }
                }
                _product.ProductLine = _productLine;
                _config.BigCodeLen = Convert.ToInt32(_bigCodeLen);
                _config.SmlCodeLen = Convert.ToInt32(_smlCodeLen);<commit_msg>add code<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.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Seed.BarCodeCore.Models;
using Seed.BarCodeCore.Resposity;

namespace Seed.BarCodeLine
{
    public partial class Main : Form
    {
        private Scan _scan;
        private readonly string _soundType = System.Configuration.ConfigurationManager.AppSettings["MusicType"];
        private readonly string _bigCodeLen = System.Configuration.ConfigurationManager.AppSettings["BigCodeLen"];
        private readonly string _smlCodeLen = System.Configuration.ConfigurationManager.AppSettings["SmlCodeLen"];
        private readonly string _codeType = System.Configuration.ConfigurationManager.AppSettings["SmlCodeType"];
        private readonly string _productLine = System.Configuration.ConfigurationManager.AppSettings["ProductLine"];
        private readonly string _storeType = System.Configuration.ConfigurationManager.AppSettings["StoreType"];
        public  Product _product = new Product();
        public SystemConfig _config=new SystemConfig();
        private int _count=0;
        public Main()
        {
            InitializeComponent();
        }

        private void Main_Load(object sender, EventArgs e)
        {
                if (_storeType == "1")
                {
                    SqliteResposity resposity = new SqliteResposity();
                    _count = resposity.TodayBigCodeCount(_productLine);
                    Product p = resposity.LastProduct<Product>();
                    if (p != null)
                    {
                        TNubs.Text = p.Specification;
                        TProductName.Text = p.ProductName;
                        TBatch.Text = p.Batch;
                    }
                }
                else
                {
                    SqlResposity resposity = new SqlResposity();
                    _count = resposity.TodayBigCodeCount(_productLine);
                    Products p = resposity.LastProduct<Products>();
                    if (p != null)
                    {
                        TNubs.Text = p.Specification;
                        TProductName.Text = p.ProductName;
                        TBatch.Text = p.Batch;
                    }
                }
                _config.ProductLine = _productLine;
                _config.BigCodeLen = Convert.ToInt32(_bigCodeLen);
                _config.SmlCodeLen = Convert.ToInt32(_smlCodeLen);
{'fraction_non_alphanumeric': 0.07857416634725949, 'fraction_numerical': 0.0022997316979685703, 'mean_word_length': 1.9091415830546266, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7626556', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1213, 'n_words': 262}