• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

Révision6f4460a121c2b842783661bf53b3194694b6575e (tree)
l'heure2007-02-09 00:06:19
Auteurh677 <h677>
Commiterh677

Message de Log

追加時に、デフォルトの文字列がでるようにした。
チェックが反映されるようにした。

Change Summary

Modification

--- a/NGWordEdit.dfm
+++ b/NGWordEdit.dfm
@@ -1,6 +1,6 @@
11 object NGWordEditForm: TNGWordEditForm
2- Left = 278
3- Top = 178
2+ Left = 304
3+ Top = 176
44 Width = 490
55 Height = 401
66 Caption = 'NGWordEditForm'
@@ -52,13 +52,14 @@ object NGWordEditForm: TNGWordEditForm
5252 TabOrder = 1
5353 OnClick = DeleteButtonClick
5454 end
55- object Button3: TButton
55+ object ApplyButton: TButton
5656 Left = 24
5757 Top = 80
5858 Width = 75
5959 Height = 25
60- Caption = 'Button3'
60+ Caption = #36969#29992
6161 TabOrder = 2
62+ OnClick = ApplyButtonClick
6263 end
6364 object Button4: TButton
6465 Left = 24
--- a/NGWordEdit.pas
+++ b/NGWordEdit.pas
@@ -14,7 +14,7 @@ type
1414 Panel3: TPanel;
1515 AddButton: TButton;
1616 DeleteButton: TButton;
17- Button3: TButton;
17+ ApplyButton: TButton;
1818 Button4: TButton;
1919 Panel4: TPanel;
2020 Panel5: TPanel;
@@ -41,6 +41,7 @@ type
4141 procedure DeleteNGButtonClick(Sender: TObject);
4242 procedure AddButtonClick(Sender: TObject);
4343 procedure DeleteButtonClick(Sender: TObject);
44+ procedure ApplyButtonClick(Sender: TObject);
4445 private
4546 { Private éŒ¾ }
4647 FNGWordList : TNGWordList;
@@ -83,6 +84,7 @@ begin
8384 Result.Caption := '';
8485 Result.SubItems.Clear;
8586 Result.SubItems.Add(ngWord.ToString);
87+ Result.Checked := ngWord.Invisible;
8688 Result.Data := ngWord;
8789 end;
8890
@@ -141,10 +143,19 @@ var
141143 begin
142144 if (Item <> nil) and (Item.Data <> nil) then begin
143145 ngWord := TNGWords(item.Data);
146+ GikoListView2.Items.BeginUpdate;
144147 GikoListView2.items.Clear;
145- for i := 0 to ngWord.Count - 1 do begin
146- AddWord( TNGWord(ngWord.Items[i]) );
148+ if ngWord.Count = 0 then begin
149+ // ‰½‚à‚È‚¢‚ÆŒ©‚¦‚È‚¢‚̂ŃfƒtƒHƒ‹ƒg‚̃ƒbƒZ[ƒW
150+ AddWord(nil);
151+ end else begin
152+ // ‘S•”‚Ì—v‘f‚ð’ljÁ‚·‚é
153+ for i := 0 to ngWord.Count - 1 do begin
154+ AddWord( TNGWord(ngWord.Items[i]) );
155+ end;
156+
147157 end;
158+ GikoListView2.Items.EndUpdate;
148159 end;
149160 end;
150161 // ‰º•”ƒŠƒXƒg’ljÁƒƒ\ƒbƒh
@@ -154,16 +165,20 @@ var
154165 begin
155166 litem := GikoListView2.Items.Add;
156167 litem.ImageIndex := -1;
157- case Integer(word.NGType) of
158- Integer(gntAll): litem.Caption := '‘S•”';
159- Integer(gntName): litem.Caption := '–¼‘O—“';
160- Integer(gntMail): litem.Caption := 'ƒ[ƒ‹—“';
161- Integer(gntDateId):litem.Caption := '“ú•tID—“';
162- Integer(gntBody): litem.Caption := '–{•¶';
163- end;
164168 litem.SubItems.Clear;
165- litem.SubItems.Add(word.Word);
166169 litem.Data := word;
170+ if (word = nil) then begin
171+ litem.Caption := '<–¢“ü—Í>'
172+ end else begin
173+ case Integer(word.NGType) of
174+ Integer(gntAll): litem.Caption := '‘S•”';
175+ Integer(gntName): litem.Caption := '–¼‘O—“';
176+ Integer(gntMail): litem.Caption := 'ƒ[ƒ‹—“';
177+ Integer(gntDateId):litem.Caption := '“ú•tID—“';
178+ Integer(gntBody): litem.Caption := '–{•¶';
179+ end;
180+ litem.SubItems.Add(word.Word);
181+ end;
167182 end;
168183 //! NGƒ[ƒh’ljÁƒ{ƒ^ƒ“
169184 procedure TNGWordEditForm.AddNGButtonClick(Sender: TObject);
@@ -175,6 +190,10 @@ begin
175190 litem := GikoListView1.Selected;
176191 if (litem <> nil) then begin
177192 if NGWordEdit.Text <> '' then begin
193+ // <–¢“ü—Í>‚ðíœ‚·‚é
194+ if (TNGWords(litem.Data).Count = 0) then begin
195+ GikoListView2.Items.Delete(0);
196+ end;
178197 word := TNGWord.Create;
179198 word.NGType := TGikoNGType(ComboBox1.ItemIndex);
180199 word.Word := NGWordEdit.Text;
@@ -228,5 +247,15 @@ begin
228247 end;
229248 end;
230249
250+//! “K‰žƒ{ƒ^ƒ“ “§–¾ƒ`ƒFƒbƒN‚ðÝ’肵‚È‚¨‚·
251+procedure TNGWordEditForm.ApplyButtonClick(Sender: TObject);
252+var
253+ i: Integer;
254+begin
255+ for i := 0 to GikoListView1.Items.Count - 1 do begin
256+ TNGWords(GikoListView1.Items[i].Data).Invisible :=
257+ GikoListView1.Items[i].Checked;
258+ end;
259+end;
231260
232261 end.
--- a/NGWordUnit.pas
+++ b/NGWordUnit.pas
@@ -3,7 +3,7 @@ unit NGWordUnit;
33 interface
44 uses
55 Windows,Messages, ShellAPI, SysUtils, Classes,StdCtrls,StrUtils,
6- GikoXMLDoc;
6+ GikoXMLDoc, GikoSystem;
77
88 type
99 //ƒŠƒXƒg‚Ì•\Ž¦ƒAƒCƒeƒ€‘I‘ð
@@ -53,6 +53,7 @@ type
5353 procedure LoadFromFile(fileName: String);
5454 procedure SaveToFrile(fileName: String);
5555 procedure Delte(NGWords: TNGWords); overload;
56+ function IsNG(PRes : PResRec): Boolean;
5657 end;
5758
5859 function CompareRank(Item1, Item2: Pointer): Integer;
@@ -253,5 +254,14 @@ begin
253254 end;
254255 end;
255256 end;
257+//! NG”»’è
258+function TNGWordList.IsNG(PRes : PResRec): Boolean;
259+var
260+ i: Integer;
261+begin
262+ for i := 0 to Count - 1 do begin
263+ //
264+ end;
265+end;
256266
257267 end.