Example #1
0
        int Screens_optimization(tiles_data _data, bool _check)
        {
            int deleted_screens_cnt = 0;

            int bank_id = Convert.ToInt32(_data.name);

            int size = _data.screen_data_cnt();

            for (int scr_n = 0; scr_n < size; scr_n++)
            {
                if (check_layouts_screen(scr_n, _data) == false)
                {
                    ++deleted_screens_cnt;

                    if (_check == true)
                    {
                        continue;
                    }

                    _data.delete_screen(scr_n);

                    m_data_sets.remove_screen_from_layouts(bank_id, scr_n);

                    --scr_n;
                    --size;
                }
            }

            return(deleted_screens_cnt);
        }