public static new Settings_Char_Common GetInstance(int intID) { if (common == null) common = new Settings_Char_Common(intID); return common; }
private void Settings_Char_Load(object sender, EventArgs e) { common = Settings_Char_Common.GetInstance(Settings_Char_CommonID); if (isFirstLoadIni == true) common.OnAddIniEvent += new AddIniEventHandler(this.OnAddIniEventHandler); //common.RefreshFile(Config_Path + "\\" + Ini_Filename); common.ReadFile_ExcludeEOF(Config_Path + "\\" + Ini_Filename); isFirstLoadIni = false; Dictionary<int, string> dic = common.GetFileInfo(); BindingSource source = new BindingSource(); foreach (KeyValuePair<int, string> record in dic) source.Add(new IniFileObject(record.Key, record.Value)); gvCharExclude.DataSource = source; }