private void addTableListTodgrid(List <TableData> tdList)
        {
            for (int t = 0; t < tdList.Count; t++)
            {
                MassModProperties mmp = new MassModProperties();
                mmp.td = tdList[t];
                //string ser = upatcher.SerializeObject<MassModProperties>(mmp);
                string    ser = "";
                TableData td  = tdList[t];
                foreach (var prop in td.GetType().GetProperties())
                {
                    if (prop.Name != "id" && prop.Name != "Address" && prop.Name != "CompatibleOS" && prop.Name != "OS")
                    {
                        ser += prop.GetValue(td, null);
                    }

                    Type         type    = mmp.GetType();
                    PropertyInfo mmpProp = type.GetProperty(prop.Name);
                    mmpProp.SetValue(mmp, prop.GetValue(td, null), null);
                }

                int ind = tableRows.IndexOf(ser);
                if (ind < 0)
                {
                    tableRows.Add(ser);
                    mmp.UsedInOS = tdList[t].OS;
                    //mmp.UsingTunerFiles.Add(tunerFiles.Count - 1);
                    TableDataPointer tdp = new TableDataPointer();
                    tdp.tableData = t;
                    tdp.tunerFile = tunerFiles.Count - 1;
                    mmp.UsingTableDatas.Add(tdp);
                    displayDatas.Add(mmp);
                }
                else
                {
                    displayDatas[ind].UsedInOS += "," + tdList[t].OS;
                    //displayDatas[ind].UsingTunerFiles.Add(tunerFiles.Count - 1);
                    TableDataPointer tdp = new TableDataPointer();
                    tdp.tableData = t;
                    tdp.tunerFile = tunerFiles.Count - 1;
                    displayDatas[ind].UsingTableDatas.Add(tdp);
                }
            }
        }
        public void loadData(List <string> fileList)
        {
            dataGridView2.Columns.Add("TableName", "TableName");
            dataGridView2.Columns.Add("Property", "Property");
            dataGridView2.Columns.Add("OldValue", "OldValue");
            dataGridView2.Columns.Add("NewValue", "NewValue");
            dataGridView2.Columns.Add("OS", "OS");

            MassModProperties tmpMmp = new MassModProperties();

            foreach (var prop in tmpMmp.GetType().GetProperties())
            {
                //Add to filter by-combo
                comboFilterBy.Items.Add(prop.Name);
            }
            comboFilterBy.Text = "TableName";

            foreach (string fName in fileList)
            {
                long conFileSize = new FileInfo(fName).Length;
                if (conFileSize < 255 || Path.GetFileName(fName).ToLower() == "units.xml")
                {
                    continue;
                }
                TunerFile tf = new TunerFile();
                tf.tableDatas = loadTableDataFile(fName);
                tf.FileName   = fName;
                tunerFiles.Add(tf);
                addTableListTodgrid(tf.tableDatas);
            }
            for (int f = 0; f < tunerFiles.Count; f++)
            {
                tunerFiles[f].id = f;
            }
            for (int i = 0; i < displayDatas.Count; i++)
            {
                displayDatas[i].id = (uint)i;
            }
            dataGridView1.DataSource = bindingSource;
            filterData();

            dataGridView1.ColumnHeaderMouseClick += DataGridView1_ColumnHeaderMouseClick;
            dataGridView1.CellValueChanged       += DataGridView1_CellValueChanged;
            dataGridView1.CellBeginEdit          += DataGridView1_CellBeginEdit;
            Application.DoEvents();

            dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
            if (dataGridView1.Columns[0].Width > 500)
            {
                dataGridView1.Columns[0].Width = 500;
            }

            dataGridFiles.AutoSizeColumnsMode  = DataGridViewAutoSizeColumnsMode.None;
            dataGridFiles.DataSource           = tunerFiles;
            dataGridFiles.DataBindingComplete += DataGridFiles_DataBindingComplete;
            dataGridFiles.CellMouseClick      += DataGridFiles_CellMouseClick;

            comboFiles.DataSource            = tunerFiles;
            comboFiles.DisplayMember         = "FileName";
            comboFiles.ValueMember           = "id";
            comboFiles.SelectedIndexChanged += ComboFiles_SelectedIndexChanged;
            refreshTdList();
            Logger("Files loaded");
        }