الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

فكرة لوحدة للتعامل مع Inifiles

بدأه fkugd2003 في 6 نوفمبر 2009 · 4 رد · 806 مشاهدة · في لغة Delphi
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكــم ورحمـة الله وبركاتــه ،،

كيف حالكم اليوم...

جئتكم هذه المرة بفكرة للتعامل مع ملفات ini عن طريق انجاز unit سميتها myIniFileUnit تحتوي على صنفين

الاول TSections يخزن sections الموجودة في الملف

الثاني TSection يخزن الاسطر

بالاضافة الى عدة دوال للتعامل مع الملف

  1. {*******************************************************}
  2. { }
  3. { Simple IniFile Unit }
  4. { }
  5.  
  6. { }
  7. {*******************************************************}
  8. unit MyIniFileUnit;
  9.  
  10. interface
  11.  
  12. uses
  13. IniFiles,Classes, SysUtils,contnrs;
  14. var
  15. IniFileReader: TIniFile;
  16. type
  17. TSection = class
  18. public
  19. Rows: TStringList; // this will contain TRow
  20. SectionName: String;
  21. constructor Create(const t_SectionName:String);
  22. Destructor Destroy;override;
  23.  
  24. procedure InsertRow(const t_keyname:string; const t_value:string);overload;
  25. procedure RemoveRow(t_Index: Integer);overload;
  26. procedure RemoveRow(const t_KeyName: String);overload;
  27. procedure EditValue(t_Index:Integer;const t_NewValue:string);overload;
  28. procedure EditValue(const t_keyname, t_NewValue: string);overload;
  29. procedure RenameKey(t_Index:Integer;const t_NewName:string);
  30. end;
  31. TSections = class
  32. public
  33. Items: TObjectList; // this will contain TSection
  34.  
  35. constructor Create;
  36. destructor Destroy;override;
  37. procedure CreateSection(const t_SectionName:string);
  38. procedure InsertSection(t_Section:TSection);
  39. procedure RemoveSection(t_Index: Integer);overload;
  40. procedure RemoveSection(const t_SectionName: String);overload;
  41. procedure RenameSection(t_Index:Integer; const t_newName: string);overload;
  42. procedure RenameSection(const t_oldName, t_NewName: string); overload;
  43. procedure LoadFromFile(const FilePath: string);
  44. procedure SaveToFile(const FilePath: string);
  45.  
  46. procedure InsertRow(const t_SectionName, Keyname, Value:String);
  47. procedure RemoveRow(const t_SectionName:string; t_Index:Integer);overload;
  48. procedure RemoveRow(const t_SectionName, t_KeyName: string);overload;
  49. procedure EditValue(const t_SectionName, t_keyname, t_NewValue:string);
  50. procedure RenameKey(const t_SectionName, t_oldName, t_NewName:string);
  51. procedure GetSectionNames(t:TStrings);
  52. procedure GetRows(const t_SectionName: String; t:TStrings);
  53.  
  54. function GetSectionsCount:Integer;
  55. function GetRowsCount(t_Index:Integer):Integer;
  56. end;
  57. implementation
  58.  
  59. { TSection }
  60.  
  61. constructor TSection.Create(const t_SectionName: String);
  62. begin
  63. SectionName := t_SectionName;
  64. Rows := TStringList.Create;
  65. end;
  66.  
  67. destructor TSection.Destroy;
  68. begin
  69. FreeAndNil(Rows);
  70. inherited;
  71. end;
  72.  
  73. procedure TSections.GetSectionNames(t:TStrings);
  74. begin
  75. IniFileReader.ReadSections(t);
  76. end;
  77.  
  78. procedure TSection.EditValue(t_Index: Integer; const t_NewValue: string);
  79. begin
  80. if (t_Index >=0) and (t_index <= Rows.Count) then
  81. Rows[t_Index] := Copy(Rows[t_Index],1,Pos('=',Rows[t_Index]))+t_NewValue;
  82. end;
  83.  
  84. procedure TSection.EditValue(const t_keyname, t_NewValue: string);
  85. var i,epos: Integer;
  86. begin
  87. for i:=0 to Rows.Count-1 do
  88. begin
  89. epos := Pos('=',Rows[i]);
  90. if Copy(Rows[i],1,epos-1) = t_Keyname then
  91. begin
  92. Rows[i] := Copy(Rows[i],1,epos)+t_NewValue;
  93. end;
  94. end;
  95. end;
  96.  
  97. procedure TSection.InsertRow(const t_keyname, t_value: string);
  98. begin
  99. Rows.Add(t_KeyName+'='+t_value);
  100. end;
  101.  
  102. procedure TSection.RemoveRow(t_Index: Integer);
  103. begin
  104. if (t_Index >= 0) and (t_Index <= Rows.Count) then
  105. begin
  106. Rows.Delete(t_Index);
  107. end;
  108. end;
  109.  
  110. procedure TSection.RemoveRow(const t_KeyName: String);
  111. var i, epos:integer;
  112. begin
  113. for i:=0 to Rows.Count -1 do
  114. begin
  115. epos := Pos('=',Rows[i]);
  116. if Copy(Rows[i],1,epos-1) = t_KeyName then
  117. begin
  118. Rows.Delete(i);
  119. Break;
  120. end;
  121. end;
  122. end;
  123.  
  124. procedure TSection.RenameKey(t_Index: Integer; const t_NewName: string);
  125. begin
  126. if (t_Index >=0) and (t_index <= Rows.Count) then
  127. Rows[t_Index] := t_NewName+Copy(Rows[t_Index],Pos('=',Rows[t_Index]), Length(Rows[t_Index]
    ));
  128. end;
  129.  
  130. { TSections }
  131.  
  132. constructor TSections.Create;
  133. begin
  134. Items := TObjectList.Create;
  135. end;
  136.  
  137. procedure TSections.CreateSection(const t_SectionName: string);
  138. begin
  139. Items.Add(TSection.Create(t_SectionName));
  140. end;
  141.  
  142. destructor TSections.Destroy;
  143. begin
  144. FreeAndNil(Items);
  145. inherited;
  146. end;
  147.  
  148. procedure TSections.SaveToFile(const FilePath: string);
  149. var i, j, ePos: Integer;
  150. t_Section: TSection;
  151. IniFileWriter: TIniFile;
  152. begin
  153. if not FileExists(FilePath) then
  154. FileCreate(FilePath);
  155. IniFileWriter := TIniFile.Create(FilePath);
  156. for i:= 0 to Items.Count -1 do
  157. begin
  158. t_Section := TSection(Items[i]);
  159. with t_Section do
  160. begin
  161. for j := 0 to Rows.Count -1 do
  162. begin
  163. epos := Pos('=',Rows[j]);
  164. IniFileWriter.WriteString(
  165. SectionName,
  166. Copy(Rows[j],1,epos-1),
  167. Copy(Rows[j],epos+1,Length(Rows[j])));
  168. end;
  169. end;
  170.  
  171.  
  172. end;
  173. end;
  174.  
  175. procedure TSections.InsertSection(t_Section:TSection);
  176. begin
  177. Items.Add(t_Section);
  178. end;
  179.  
  180. procedure TSections.LoadFromFile(const FilePath: string);
  181. var
  182. i: Integer;
  183. t_Section : TSection;
  184. t_Sections:TStrings;
  185. t_Rows : TStrings;
  186. begin
  187. //the main procedure t load every thing
  188. t_Sections := TStringList.Create;
  189. t_Rows := TStringList.Create;
  190. if FileExists(FilePath) then
  191. begin
  192. IniFileReader := TIniFile.Create(FilePath);
  193. IniFileReader.ReadSections(t_Sections);
  194.  
  195. for i := 0 to t_Sections.Count -1 do
  196. begin
  197. IniFileReader.ReadSectionValues(t_Sections[i],t_Rows);
  198. t_Section := TSection.Create(t_Sections.Strings[i]);
  199. t_Section.Rows.AddStrings(t_Rows);
  200. InsertSection(t_Section);
  201. end;
  202. end;
  203. end;
  204.  
  205. procedure TSections.RemoveSection(t_Index: Integer);
  206. begin
  207. if (t_Index >=0) and (t_Index <= Items.Count) then
  208. Items.Delete(t_Index);
  209. end;
  210.  
  211. procedure TSections.RenameSection(t_Index: Integer;
  212. const t_newName: string);
  213. begin
  214. if (t_Index >= 0) and (t_Index <= Items.Count) then
  215. TSection(Items.Items[t_Index]).SectionName := t_NewName;
  216.  
  217. end;
  218.  
  219. procedure TSections.GetRows(const t_SectionName: String; t: TStrings);
  220. begin
  221. IniFileReader.ReadSectionValues(t_SectionName, t);
  222. end;
  223.  
  224. function TSections.GetSectionsCount: Integer;
  225. begin
  226. Result := Items.Count;
  227. end;
  228.  
  229. function TSections.GetRowsCount(t_Index: Integer): Integer;
  230. begin
  231. if (t_Index >= 0) and (t_Index <= Items.Count) then
  232. Result:= TSection(Items.Items[t_Index]).Rows.Count
  233. else Result := -1;
  234. end;
  235.  
  236. procedure TSections.RemoveSection(const t_SectionName: String);
  237. var i:Integer;
  238. begin
  239. for i:=0 to Items.Count-1 do
  240. begin
  241. if TSection(Items.Items[i]).SectionName = t_SectionName then
  242. begin
  243. Items.Delete(i);
  244. Break;
  245. end;
  246. end;
  247. end;
  248.  
  249. procedure TSections.RenameSection(const t_oldName, t_NewName: string);
  250. var i:integer;
  251. begin
  252. for i := 0 to Items.Count-1 do
  253. begin
  254. if TSection(Items.Items[i]).SectionName = t_oldName then
  255. begin
  256. TSection(Items.Items[i]).SectionName := t_NewName;
  257. Break;
  258. end;
  259. end;
  260.  
  261. end;
  262.  
  263. procedure TSections.EditValue(const t_SectionName, t_keyname,t_NewValue: string);
  264. var i:integer;
  265. begin
  266. for i:= 0 to Items.Count -1 do
  267. begin
  268. if TSection(Items.Items[i]).SectionName = t_SectionName then
  269. begin
  270. TSection(Items.Items[i]).EditValue(t_keyname,t_NewValue);
  271. Break;
  272. end;
  273. end;
  274. end;
  275.  
  276. procedure TSections.InsertRow(const t_SectionName, Keyname, Value: String);
  277. var i:integer;
  278. begin
  279. for i:= 0 to Items.Count -1 do
  280. begin
  281. if TSection(Items.Items[i]).SectionName = t_SectionName then
  282. begin
  283. TSection(Items.Items[i]).InsertRow(keyname,value);
  284. Break;
  285. end;
  286. end;
  287. end;
  288.  
  289. procedure TSections.RemoveRow(const t_SectionName: String; t_Index: Integer);
  290. var i:integer;
  291. begin
  292. for i:= 0 to Items.Count -1 do
  293. begin
  294. if TSection(Items.Items[i]).SectionName = t_SectionName then
  295. begin
  296. TSection(Items.Items[i]).RemoveRow(t_Index);
  297. Break;
  298. end;
  299. end;
  300. end;
  301.  
  302. procedure TSections.RenameKey(const t_SectionName, t_oldName,
  303. t_NewName: string);
  304. begin
  305.  
  306. end;
  307.  
  308. procedure TSections.RemoveRow(const t_SectionName, t_KeyName: string);
  309. var i,j:integer;
  310. t_Section:TSection;
  311. begin
  312. for i:= 0 to Items.Count -1 do
  313. begin
  314. t_Section := TSection(Items.Items[i]);
  315. if t_Section.SectionName = t_SectionName then
  316. begin
  317. for j:=0 to t_Section.Rows.Count -1 do
  318. begin
  319. TSection(Items.Items[i]).RemoveRow(j);
  320. Break;
  321. end;
  322.  
  323. end;
  324. end;
  325. end;
  326.  
  327. end.
  328.  

الكود مازال يحتوي على نقائص و يحتاج الى مساهماتكم... ان كانت الفكرة تستحق ان تطور :D

اما ان كانت لا تستحق فسنرميها في سلة المهملات -_-

المهم لا اطيل عليكم.. مرفق كود الوحدة و مشروع للتجربة

ارجو الفائدة للجميع :wub:

ملاجظة المشروع ليس مكتمل ساكمله لاحقا بعد ان استفيق من النوم

IniFileEditor_D7.rar

تم تعديل هذه المشاركة بواسطة زكيري عبد العالي في 6 نوفمبر 2009 في 15:29

العمل كثير و الوقت قليل أعاننا الله

seo zen SEO Enlightment amazon danbo

#2

اهلا اخي مروان اولا شكرا على هذه الوحدة

اما في عملي في الحقيقة انا لست محتاج لكل هذه الدوال مع اني انشاة وحدة مشابهة لكن تقل على التي وضعتها .

لكن هي فكرة جيدة واري ام الكود جيد وليس فيه اصلاحات شكرا .

بالتوفيق

نريد اعادة احياء المنتدي بمشروع هل تشاركنا .

#3

شكرا أخي عبد العالي...

نعم لا يوجد مشكلة سواء كان على دلفي 32 بت ام برايسم

العمل كثير و الوقت قليل أعاننا الله

seo zen SEO Enlightment amazon danbo

#4

:thumb_up: :evil:

تم تعديل هذه المشاركة بواسطة طلال بلال في 7 نوفمبر 2009 في 00:09

#5

السلام عليكــم ورحمـة الله وبركاتــه ،،

اشار اخي محمد الى وجود خطأ في الوحدة MyIniFile الشكر له..

قمت بتعديل الخطأ و اضافة بعض الدوال و التحسينات ارجو ان تكون الوحدة كاملة الان

اي افكار جديدة مرحب بها.. :wub:

{*******************************************************}
{													   }
{	   Simple IniFile Unit							 }
{													   }
{	   Copyright (C) 2009 Amine / fkugd2003			}
{													   }
{*******************************************************}
{ Error Correction From Mohfa in TSections.LoadFromFIle }
{*******************************************************}
unit MyIniFileUnit;

interface

uses
  IniFiles,Classes, SysUtils,contnrs;
var
  IniFileReader: TIniFile;
type
	{*******************************************************}
	{	   The Section Class is equivalent to			  }
	{	   [Section] in the IniFile						}
	{	   Rows are in the form KeyName=Value			  }
	{	   Sorry But no Support For EmptyStr Value		 }
	{*******************************************************}
	TSection  = class
	  public
		Rows: TStringList; // this will contain TRow
		SectionName: String;
		constructor Create(const t_SectionName:String);
		Destructor Destroy;override;

		procedure InsertRow(const t_keyname:string; const t_value:string);overload;
		procedure RemoveRow(t_Index: Integer);overload;
		procedure RemoveRow(const t_KeyName: String);overload;
		procedure EditValue(t_Index:Integer;const t_NewValue:string);overload;
		procedure EditValue(const t_keyname, t_NewValue: string);overload;
		procedure RenameKey(t_Index:Integer; const t_NewName:string);overload;
		procedure RenameKey(const t_oldName, t_NewName: string);overload;

		function RetreiveKey(t_Index:Integer):string;
		function RetreiveValue(t_Index: Integer):string;overload;
		function RetreiveValue(const t_KeyName: string):string;overload;
	end;
	{*******************************************************}
	{	   The Sections Class will save the structure	  }
	{	   of your file in it							  }
	{*******************************************************}
	TSections = class
	  public
		Items: TObjectList; // this will contain TSection

		constructor Create;
		destructor Destroy;override;
		procedure CreateSection(const t_SectionName:string);
		procedure InsertSection(t_Section:TSection);
		procedure RemoveSection(t_Index: Integer);overload;
		procedure RemoveSection(const t_SectionName: String);overload;
		procedure RenameSection(t_Index:Integer; const t_newName: string);overload;
		procedure RenameSection(const t_oldName, t_NewName: string); overload;
		procedure LoadFromFile(const FilePath: string);
		procedure SaveToFile(const FilePath: string);

		procedure InsertRow(const t_SectionName, Keyname, Value:String);
		procedure RemoveRow(const t_SectionName:string; t_Index:Integer);overload;
		procedure RemoveRow(const t_SectionName, t_KeyName: string);overload;
		procedure EditValue(const t_SectionName, t_keyname, t_NewValue:string);
		procedure RenameKey(const t_SectionName, t_oldName,t_NewName:string);
		procedure GetSectionNames(t:TStrings);
		procedure GetRows(const t_SectionName: String; t:TStrings);

		function GetSectionsCount:Integer;
		function GetRowsCount(t_Index:Integer):Integer;
	end;
implementation

{ TSection Class}

constructor TSection.Create(const t_SectionName: String);
begin
  SectionName := t_SectionName;
  Rows := TStringList.Create;
end;

destructor TSection.Destroy;
begin
  FreeAndNil(Rows);
  inherited;
end;

procedure TSection.EditValue(t_Index: Integer; const t_NewValue: string);
begin
  if (t_Index >=0) and (t_index <= Rows.Count) then
	Rows[t_Index] := Copy(Rows[t_Index],1,Pos('=',Rows[t_Index]))+t_NewValue;
end;

procedure TSection.EditValue(const t_keyname, t_NewValue: string);
var i:Integer;
begin
  for i:=0 to Rows.Count-1 do
  begin
	if RetreiveKey(i) = t_keyname then
	begin
		Rows := RetreiveKey(i)+'='+t_NewValue;
	end;
  end;
end;

procedure TSection.InsertRow(const t_keyname, t_value: string);
begin
  Rows.Add(t_KeyName+'='+t_value);
end;

procedure TSection.RemoveRow(t_Index: Integer);
begin
  if (t_Index >= 0) and (t_Index <= Rows.Count) then
  begin
	Rows.Delete(t_Index);
  end;
end;

procedure TSection.RemoveRow(const t_KeyName: String);
var i:integer;
begin
  for i:=0 to Rows.Count -1 do
  begin
	if RetreiveKey(i) = t_KeyName then
	begin
	  Rows.Delete(i);
	  Break;
	end;
  end;
end;

procedure TSection.RenameKey(t_Index: Integer; const t_NewName: string);
begin
  if (t_Index >=0) and (t_index <= Rows.Count) then
	Rows[t_Index] := t_NewName + RetreiveValue(t_Index);
end;

procedure TSection.RenameKey(const t_oldName, t_NewName: string);
var i:Integer;
begin
  for i:=0 to Rows.Count -1 do
  begin
	if SectionName = t_oldName then
	begin
	  SectionName := t_NewName;
	  Break;
	end;

  end;
end;

function TSection.RetreiveKey(t_Index: Integer): string;
begin
  if (t_Index >=0) and (t_index <= Rows.Count) then
  begin
	Result := Copy(Rows[t_Index], 1, Pos('=', Rows[t_Index])-1);
  end
  else Result := EmptyStr;
end;

function TSection.RetreiveValue(t_Index: Integer): string;
begin
  if (t_Index >=0) and (t_index <= Rows.Count) then
  begin
	Result := Copy(Rows[t_Index], Pos('=', Rows[t_Index])+1, Length(Rows[t_Index]));
  end
  else Result := EmptyStr;
end;

function TSection.RetreiveValue(const t_KeyName: string): string;
var i:Integer;
begin
  for i:=0 to Rows.Count -1 do
  begin
	if RetreiveKey(i) = t_KeyName then
	begin
	  Result := Copy(Rows, Pos('=', Rows)+1, Length(Rows));
	  Break;
	end
	else Result := EmptyStr;
  end;
end;
{ TSections }

constructor TSections.Create;
begin
  Items := TObjectList.Create;
end;

procedure TSections.CreateSection(const t_SectionName: string);
begin
  Items.Add(TSection.Create(t_SectionName));
end;

destructor TSections.Destroy;
begin
  FreeAndNil(Items);
  inherited;
end;

procedure TSections.SaveToFile(const FilePath: string);
var i, j, epos: Integer;
	t_Section: TSection;
	IniFileWriter: TIniFile;
begin
  if not FileExists(FilePath) then FileCreate(FilePath);
  IniFileWriter := TIniFile.Create(FilePath);
  for i:= 0 to Items.Count -1 do
  begin
	t_Section := TSection(Items);
	with t_Section do
	begin
	  for j := 0 to Rows.Count -1  do
	  begin
		IniFileWriter.WriteString(
		  SectionName,
		  RetreiveKey(j),
		  RetreiveValue(j)
		);
	  end;
	end;
  end;
  FreeAndNil(IniFileWriter);
end;

procedure TSections.InsertSection(t_Section:TSection);
begin
  Items.Add(t_Section);
end;

procedure TSections.LoadFromFile(const FilePath: string);
var
  i: Integer;
  t_Section : TSection;
  t_Sections:TStrings;
  t_Rows : TStrings;
begin
  t_Sections := TStringList.Create;
  t_Rows := TStringList.Create;

  if FileExists(FilePath) then
  begin
	IniFileReader := TIniFile.Create(FilePath);
	IniFileReader.ReadSections(t_Sections);

	for i := 0 to t_Sections.Count -1 do
	begin
	  IniFileReader.ReadSectionValues(t_Sections,t_Rows);
	  t_Section := TSection.Create(t_Sections.Strings);
	  t_Section.Rows.AddStrings(t_Rows);
	  InsertSection(t_Section);
	end;
  end;
  t_Sections.Free;
  t_Rows.Free;
end;

procedure TSections.RemoveSection(t_Index: Integer);
begin
  if (t_Index >=0) and (t_Index <= Items.Count) then
	Items.Delete(t_Index);
end;

procedure TSections.RenameSection(t_Index: Integer;
  const t_newName: string);
begin
  if (t_Index >= 0) and (t_Index <= Items.Count) then
	TSection(Items.Items[t_Index]).SectionName := t_NewName;

end;

procedure TSections.GetRows(const t_SectionName: String; t: TStrings);
begin
  IniFileReader.ReadSectionValues(t_SectionName, t);
end;

function TSections.GetSectionsCount: Integer;
begin
  Result := Items.Count;
end;

function TSections.GetRowsCount(t_Index: Integer): Integer;
begin
  if (t_Index >= 0) and (t_Index <= Items.Count) then
	Result:= TSection(Items.Items[t_Index]).Rows.Count
  else Result := -1;
end;

procedure TSections.RemoveSection(const t_SectionName: String);
var i:Integer;
begin
  for i:=0 to Items.Count-1 do
  begin
	if TSection(Items.Items).SectionName = t_SectionName then
	begin
	  Items.Delete(i);
	  Break;
	end;
  end;
end;

procedure TSections.RenameSection(const t_oldName, t_NewName: string);
var i:integer;
begin
  for i := 0 to Items.Count-1  do
  begin
	if TSection(Items.Items).SectionName = t_oldName then
	begin
	  TSection(Items.Items).SectionName := t_NewName;
	  Break;
	end;
  end;

end;

procedure TSections.EditValue(const t_SectionName, t_keyname,t_NewValue: string);
var i:integer;
begin
  for i:= 0 to Items.Count -1 do
  begin
	if TSection(Items.Items).SectionName = t_SectionName then
	begin
	  TSection(Items.Items).EditValue(t_keyname,t_NewValue);
	  Break;
	end;
  end;
end;

procedure TSections.InsertRow(const t_SectionName, Keyname, Value: String);
var i:integer;
begin
  for i:= 0 to Items.Count -1 do
  begin
	if TSection(Items.Items).SectionName = t_SectionName then
	begin
	  TSection(Items.Items).InsertRow(keyname,value);
	  Break;
	end;
  end;
end;

procedure TSections.RemoveRow(const t_SectionName: String; t_Index: Integer);
var i:integer;
begin
  for i:= 0 to Items.Count -1 do
  begin
	if TSection(Items.Items).SectionName = t_SectionName then
	begin
	  TSection(Items.Items).RemoveRow(t_Index);
	  Break;
	end;
  end;
end;

procedure TSections.RenameKey(const t_SectionName, t_oldName,t_NewName: string);
var i,j:Integer;
	t_Section :TSection;
begin
  for i:=0 to Items.Count -1 do
  begin
	t_Section := TSection(Items.Items);
	if t_Section.SectionName = t_SectionName then
	begin
	  for j:=0 to t_Section.Rows.Count-1 do
	  begin
		if t_Section.RetreiveKey(j) = t_oldName then
		begin
		  TSection(Items.Items).RenameKey(j, t_NewName);
		  Break;
		end;
	  end;
	end;
  end;
end;

procedure TSections.RemoveRow(const t_SectionName, t_KeyName: string);
var i,j:integer;
	t_Section:TSection;
begin
  for i:= 0 to Items.Count -1 do
  begin
	t_Section := TSection(Items.Items);
	if t_Section.SectionName = t_SectionName then
	begin
	  for j:=0 to t_Section.Rows.Count -1 do
	  begin
		TSection(Items.Items).RemoveRow(j);
		Break;
	  end;

	end;
  end;
  FreeAndNil(t_Section);
end;

{*******************************************************}
{ Returns Section Names in a file, result in t:TStrings }
{*******************************************************}
procedure TSections.GetSectionNames(t:TStrings);
begin
  IniFileReader.ReadSections(t);
end;

end.

تم تعديل هذه المشاركة بواسطة fkugd2003 في 9 نوفمبر 2009 في 01:52

العمل كثير و الوقت قليل أعاننا الله

seo zen SEO Enlightment amazon danbo

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…