/// <summary> /// Constructor for MainForm /// </summary> public MainForm() { InitializeComponent(); _controler = new MFControler(); Thread.CurrentThread.CurrentCulture = Parameter.Config.Culture; sourceAdvanScene.DataSource = _controler.GetDataBase(); GridDataBase.DataSource = sourceAdvanScene; sourceCollection.DataSource = _controler.GetCollection(); GridCollection.DataSource = sourceCollection; sourceMissing.DataSource = _controler.GetCollectionMissing(); GridMissing.DataSource = sourceMissing; sourceFilter.DataSource = _controler.GetFilterLocation(); GridFilterLocation.DataSource = sourceFilter; InitDataGrid(GridCollection); InitDataGrid(GridDataBase); InitDataGrid(GridMissing); InitDataGrid(GridFilterLocation); tabFilterLocation.Hide(); cbxLanguages.DataSource = new BindingSource(_controler.GetLanguages(), null); cbxLanguages.DisplayMember = "Value"; cbxLanguages.ValueMember = "Key"; SetLblNbRom(); Text = string.Format("NdsCRC III v{0} - AdvanceSceneDat v{1} ({2})", ProductVersion, _controler.DatVersion, _controler.DatCreationDate); }
/// <summary> /// Constructor of Form1 : used for test /// </summary> public Form1() { InitializeComponent(); _controler = new MFControler(); sourceCollection.DataSource = _controler.GetCollection(); dataGridView1.DataSource = sourceCollection; sourceAdvanScene.DataSource = _controler.GetDataBase(); dataGridView2.DataSource = sourceAdvanScene; sourceMissing.DataSource = _controler.GetCollectionMissing(); dataGridView3.DataSource = sourceMissing; label1.DataBindings.Add("Text", sourceAdvanScene, "Title"); Init(dataGridView1); Init(dataGridView2); Init(dataGridView3); }
/// <summary> /// Update the number of rom to display on the tabs /// </summary> private void SetLblNbRom() { tabCollection.Text = string.Format("{0} ({1} {2})", Parameter.Lang.GetTranslate("TabCollection"), _controler.GetCollection().Count, Parameter.Lang.GetTranslate("Roms")); tabDataBase.Text = string.Format("{0} ({1} {2})", Parameter.Lang.GetTranslate("TabDataBase"), _controler.GetDataBase().Count, Parameter.Lang.GetTranslate("Roms")); tabMissing.Text = string.Format("{0} ({1} {2})", Parameter.Lang.GetTranslate("TabMissing"), _controler.GetCollectionMissing().Count, Parameter.Lang.GetTranslate("Roms")); }