Changeset 69 for branches/Transpascal/Forms/UMessagesForm.pas
- Timestamp:
- Oct 19, 2010, 7:19:53 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Forms/UMessagesForm.pas
r67 r69 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 UCoolDocking, UProject, UCompiler;9 ComCtrls, UCoolDocking, UProject, UCompiler; 10 10 11 11 type … … 15 15 TMessagesForm = class(TForm) 16 16 CoolDockClient1: TCoolDockClient; 17 List BoxMessages: TListBox;17 ListView1: TListView; 18 18 procedure ListBoxMessagesSelectionChange(Sender: TObject; User: boolean); 19 procedure ListView1Click(Sender: TObject); 20 procedure ListView1Data(Sender: TObject; Item: TListItem); 21 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 22 Selected: Boolean); 19 23 private 20 24 { private declarations } 21 25 public 22 { public declarations }26 procedure Reload; 23 27 end; 24 28 … … 37 41 procedure TMessagesForm.ListBoxMessagesSelectionChange(Sender: TObject; 38 42 User: boolean); 43 begin 44 45 end; 46 47 procedure TMessagesForm.ListView1Click(Sender: TObject); 48 begin 49 ListView1SelectItem(Self, ListView1.Selected, ListView1.Selected.Selected); 50 end; 51 52 procedure TMessagesForm.ListView1Data(Sender: TObject; Item: TListItem); 53 begin 54 with MainForm, CodeForm do 55 with TErrorMessage(Compiler.ErrorMessages[Item.Index]) do begin 56 Item.Caption := FileName; 57 Item.Data := Compiler.ErrorMessages[Item.Index]; 58 Item.SubItems.Add(IntToStr(Position.X) + ',' + IntToStr(Position.Y)); 59 Item.SubItems.Add(Text); 60 end; 61 end; 62 63 procedure TMessagesForm.ListView1SelectItem(Sender: TObject; Item: TListItem; 64 Selected: Boolean); 39 65 var 40 66 ProjectFile: TProjectFile; 41 67 begin 42 68 with MainForm, CodeForm do 43 if ListBoxMessages.ItemIndex <> -1then44 with TErrorMessage( Compiler.ErrorMessages[ListBoxMessages.ItemIndex]) do begin69 if Assigned(ListView1.Selected) then 70 with TErrorMessage(ListView1.Selected.Data) do begin 45 71 ProjectFile := Project.SearchFile(FileName); 46 72 if Assigned(ProjectFile) then … … 52 78 end; 53 79 80 procedure TMessagesForm.Reload; 81 begin 82 ListView1.Items.Count := MainForm.Compiler.ErrorMessages.Count; 83 ListView1.Refresh; 84 end; 85 54 86 end. 55 87
Note:
See TracChangeset
for help on using the changeset viewer.