Changeset 92 for oup/current/Tools/Template.pas
- Timestamp:
- Jan 16, 2007, 12:35:04 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Tools/Template.pas
r87 r92 44 44 procedure RecreateExtList; 45 45 procedure LoadFileNames; 46 procedure SelectFileName( filename: String);47 procedure SelectFileID( id: Integer);46 procedure SelectFileName(connection: TOniData; filename: String); 47 procedure SelectFileID(connection: TOniData; id: Integer); 48 48 procedure check_filternameClick(Sender: TObject); 49 49 procedure check_zerobyteClick(Sender: TObject); … … 285 285 id := FConnection.ExtractFileID(filelist.Items.Strings[filelist.ItemIndex]); 286 286 context := MidStr(sender_name, Pos('_', sender_name) + 1, Length(sender_name) - Pos('_', sender_name)); 287 Form_Main.open_child(context, id);287 Form_Main.open_child(context, FConnection, id); 288 288 end; 289 289 … … 415 415 416 416 417 procedure TForm_ToolTemplate.SelectFileID(id: Integer); 418 var 419 i: Integer; 420 begin 417 procedure TForm_ToolTemplate.SelectFileID(connection: TOniData; id: Integer); 418 var 419 i: Integer; 420 name: String; 421 nstart, nend: Integer; 422 begin 423 for i := 0 to combo_connection.Items.Count - 1 do 424 begin 425 name := combo_connection.Items.Strings[i]; 426 nstart := Pos(' ', name) + 1; 427 nend := Pos('(', name) - 1; 428 name := MidStr(name, nstart, nend - nstart); 429 430 if ExtractFileName(connection.FileName) = name then 431 begin 432 combo_connection.ItemIndex := i; 433 combo_connectionChange(Self); 434 end; 435 end; 436 421 437 filelist.ItemIndex := -1; 422 438 if filelist.Items.Count > 0 then … … 430 446 end; 431 447 432 procedure TForm_ToolTemplate.SelectFileName(filename: String); 433 var 434 i: Integer; 435 begin 448 procedure TForm_ToolTemplate.SelectFileName(connection: TOniData; filename: String); 449 var 450 i: Integer; 451 name: String; 452 nstart, nend: Integer; 453 begin 454 for i := 0 to combo_connection.Items.Count - 1 do 455 begin 456 name := combo_connection.Items.Strings[i]; 457 nstart := Pos(' ', name) + 1; 458 nend := Pos('(', name) - 1; 459 name := MidStr(name, nstart, nend - nstart); 460 461 if ExtractFileName(connection.FileName) = name then 462 begin 463 combo_connection.ItemIndex := i; 464 combo_connectionChange(Self); 465 end; 466 end; 467 436 468 filelist.ItemIndex := -1; 437 469 if filelist.Items.Count > 0 then
Note:
See TracChangeset
for help on using the changeset viewer.