Subversion Repositories fastphp

Rev

Rev 15 | Rev 17 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15 Rev 16
Line 168... Line 168...
168
end;
168
end;
169
 
169
 
170
procedure TForm1.ActionSaveExecute(Sender: TObject);
170
procedure TForm1.ActionSaveExecute(Sender: TObject);
171
begin
171
begin
172
  SynEdit1.Lines.SaveToFile(GetScrapFile);
172
  SynEdit1.Lines.SaveToFile(GetScrapFile);
-
 
173
  SynEdit1.Modified := false;
173
end;
174
end;
174
 
175
 
175
procedure TForm1.ActionESCExecute(Sender: TObject);
176
procedure TForm1.ActionESCExecute(Sender: TObject);
176
begin
177
begin
177
  if (HlpPrevPageIndex <> -1) and (PageControl2.ActivePage = HelpTabSheet) and
178
  if (HlpPrevPageIndex <> -1) and (PageControl2.ActivePage = HelpTabSheet) and
Line 189... Line 190...
189
procedure TForm1.ActionFindExecute(Sender: TObject);
190
procedure TForm1.ActionFindExecute(Sender: TObject);
190
begin
191
begin
191
  SrcRep.FindExecute;
192
  SrcRep.FindExecute;
192
end;
193
end;
193
 
194
 
-
 
195
var
-
 
196
  firstTimeBrowserLoad: boolean = true;
194
procedure TForm1.Run(Sender: TObject);
197
procedure TForm1.Run(Sender: TObject);
-
 
198
var
-
 
199
  bakTS: TTabSheet;
195
begin
200
begin
196
  memo2.Lines.Text := '';
201
  memo2.Lines.Text := '';
-
 
202
 
-
 
203
  if firstTimeBrowserLoad then
-
 
204
  begin
-
 
205
    bakTS := PageControl1.ActivePage;
-
 
206
    try
-
 
207
      PageControl1.ActivePage := HtmlTabSheet; // Required for the first time, otherwise, WebBrowser1.Clear will hang
-
 
208
      Webbrowser1.Clear;
-
 
209
    finally
-
 
210
      PageControl1.ActivePage := bakTS;
-
 
211
    end;
-
 
212
    firstTimeBrowserLoad := false;
-
 
213
  end
-
 
214
  else
197
  Webbrowser1.Clear;
215
    Webbrowser1.Clear;
-
 
216
 
198
  Screen.Cursor := crHourGlass;
217
  Screen.Cursor := crHourGlass;
199
  Application.ProcessMessages;
218
  Application.ProcessMessages;
200
 
219
 
201
  try
220
  try
202
    SynEdit1.Lines.SaveToFile(GetScrapFile);
221
    SynEdit1.Lines.SaveToFile(GetScrapFile);
Line 512... Line 531...
512
  AllowChange := true;
531
  AllowChange := true;
513
end;
532
end;
514
 
533
 
515
procedure TForm1.Memo2DblClick(Sender: TObject);
534
procedure TForm1.Memo2DblClick(Sender: TObject);
516
var
535
var
517
  line: string;
536
  pfx, line: string;
518
  p, lineno: integer;
537
  p, lineno: integer;
519
begin
538
begin
520
  line := memo2.Lines.Strings[Memo2.CaretPos.Y];
539
  line := memo2.Lines.Strings[Memo2.CaretPos.Y];
-
 
540
 
-
 
541
  pfx := ExtractFileName(GetScrapFile)+':';
521
  p := Pos(' on line ', line);
542
  p := Pos(pfx, line);
522
  if p = 0 then exit;
543
  if p <> 0 then
-
 
544
  begin
523
  line := copy(line, p+length(' on line '), 99);
545
    line := copy(line, p+length(pfx), 99);
-
 
546
    if not TryStrToInt(line, lineno) then exit;
-
 
547
    GotoLineNo(lineno);
-
 
548
  end;
-
 
549
 
-
 
550
  pfx := ' on line ';
-
 
551
  p := Pos(pfx, line);
-
 
552
  if p <> 0 then
-
 
553
  begin
-
 
554
    line := copy(line, p+length(pfx), 99);
524
  if not TryStrToInt(line, lineno) then exit;
555
    if not TryStrToInt(line, lineno) then exit;
525
  GotoLineNo(lineno);
556
    GotoLineNo(lineno);
526
end;
557
  end;
-
 
558
end;
527
 
559
 
528
function TForm1.MarkUpLineReference(cont: string): string;
560
function TForm1.MarkUpLineReference(cont: string): string;
529
var
561
var
530
  p, a, b: integer;
562
  p, a, b: integer;
531
  num: integer;
563
  num: integer;