ギコナビ
Révision | 6f4460a121c2b842783661bf53b3194694b6575e (tree) |
---|---|
l'heure | 2007-02-09 00:06:19 |
Auteur | h677 <h677> |
Commiter | h677 |
追加時に、デフォルトの文字列がでるようにした。
チェックが反映されるようにした。
@@ -1,6 +1,6 @@ | ||
1 | 1 | object NGWordEditForm: TNGWordEditForm |
2 | - Left = 278 | |
3 | - Top = 178 | |
2 | + Left = 304 | |
3 | + Top = 176 | |
4 | 4 | Width = 490 |
5 | 5 | Height = 401 |
6 | 6 | Caption = 'NGWordEditForm' |
@@ -52,13 +52,14 @@ object NGWordEditForm: TNGWordEditForm | ||
52 | 52 | TabOrder = 1 |
53 | 53 | OnClick = DeleteButtonClick |
54 | 54 | end |
55 | - object Button3: TButton | |
55 | + object ApplyButton: TButton | |
56 | 56 | Left = 24 |
57 | 57 | Top = 80 |
58 | 58 | Width = 75 |
59 | 59 | Height = 25 |
60 | - Caption = 'Button3' | |
60 | + Caption = #36969#29992 | |
61 | 61 | TabOrder = 2 |
62 | + OnClick = ApplyButtonClick | |
62 | 63 | end |
63 | 64 | object Button4: TButton |
64 | 65 | Left = 24 |
@@ -14,7 +14,7 @@ type | ||
14 | 14 | Panel3: TPanel; |
15 | 15 | AddButton: TButton; |
16 | 16 | DeleteButton: TButton; |
17 | - Button3: TButton; | |
17 | + ApplyButton: TButton; | |
18 | 18 | Button4: TButton; |
19 | 19 | Panel4: TPanel; |
20 | 20 | Panel5: TPanel; |
@@ -41,6 +41,7 @@ type | ||
41 | 41 | procedure DeleteNGButtonClick(Sender: TObject); |
42 | 42 | procedure AddButtonClick(Sender: TObject); |
43 | 43 | procedure DeleteButtonClick(Sender: TObject); |
44 | + procedure ApplyButtonClick(Sender: TObject); | |
44 | 45 | private |
45 | 46 | { Private é¾ } |
46 | 47 | FNGWordList : TNGWordList; |
@@ -83,6 +84,7 @@ begin | ||
83 | 84 | Result.Caption := ''; |
84 | 85 | Result.SubItems.Clear; |
85 | 86 | Result.SubItems.Add(ngWord.ToString); |
87 | + Result.Checked := ngWord.Invisible; | |
86 | 88 | Result.Data := ngWord; |
87 | 89 | end; |
88 | 90 |
@@ -141,10 +143,19 @@ var | ||
141 | 143 | begin |
142 | 144 | if (Item <> nil) and (Item.Data <> nil) then begin |
143 | 145 | ngWord := TNGWords(item.Data); |
146 | + GikoListView2.Items.BeginUpdate; | |
144 | 147 | 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 | + // ½àȢƩ¦È¢ÌÅftHgÌbZ[W | |
150 | + AddWord(nil); | |
151 | + end else begin | |
152 | + // SÌvfðÇÁ·é | |
153 | + for i := 0 to ngWord.Count - 1 do begin | |
154 | + AddWord( TNGWord(ngWord.Items[i]) ); | |
155 | + end; | |
156 | + | |
147 | 157 | end; |
158 | + GikoListView2.Items.EndUpdate; | |
148 | 159 | end; |
149 | 160 | end; |
150 | 161 | // ºXgÇÁ\bh |
@@ -154,16 +165,20 @@ var | ||
154 | 165 | begin |
155 | 166 | litem := GikoListView2.Items.Add; |
156 | 167 | 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; | |
164 | 168 | litem.SubItems.Clear; |
165 | - litem.SubItems.Add(word.Word); | |
166 | 169 | 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; | |
167 | 182 | end; |
168 | 183 | //! NG[hÇÁ{^ |
169 | 184 | procedure TNGWordEditForm.AddNGButtonClick(Sender: TObject); |
@@ -175,6 +190,10 @@ begin | ||
175 | 190 | litem := GikoListView1.Selected; |
176 | 191 | if (litem <> nil) then begin |
177 | 192 | if NGWordEdit.Text <> '' then begin |
193 | + // <¢üÍ>ðí·é | |
194 | + if (TNGWords(litem.Data).Count = 0) then begin | |
195 | + GikoListView2.Items.Delete(0); | |
196 | + end; | |
178 | 197 | word := TNGWord.Create; |
179 | 198 | word.NGType := TGikoNGType(ComboBox1.ItemIndex); |
180 | 199 | word.Word := NGWordEdit.Text; |
@@ -228,5 +247,15 @@ begin | ||
228 | 247 | end; |
229 | 248 | end; |
230 | 249 | |
250 | +//! K{^ §¾`FbNðÝèµÈ¨· | |
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; | |
231 | 260 | |
232 | 261 | end. |
@@ -3,7 +3,7 @@ unit NGWordUnit; | ||
3 | 3 | interface |
4 | 4 | uses |
5 | 5 | Windows,Messages, ShellAPI, SysUtils, Classes,StdCtrls,StrUtils, |
6 | - GikoXMLDoc; | |
6 | + GikoXMLDoc, GikoSystem; | |
7 | 7 | |
8 | 8 | type |
9 | 9 | //XgÌ\¦ACeIð |
@@ -53,6 +53,7 @@ type | ||
53 | 53 | procedure LoadFromFile(fileName: String); |
54 | 54 | procedure SaveToFrile(fileName: String); |
55 | 55 | procedure Delte(NGWords: TNGWords); overload; |
56 | + function IsNG(PRes : PResRec): Boolean; | |
56 | 57 | end; |
57 | 58 | |
58 | 59 | function CompareRank(Item1, Item2: Pointer): Integer; |
@@ -253,5 +254,14 @@ begin | ||
253 | 254 | end; |
254 | 255 | end; |
255 | 256 | 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; | |
256 | 266 | |
257 | 267 | end. |