Ignore:
Timestamp:
Nov 10, 2010, 9:42:27 AM (14 years ago)
Author:
george
Message:
  • Added: Parsing type parameters.
  • Fixed: Saving edited files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UMainForm.pas

    r22 r24  
    77uses
    88  SysUtils, Variants, Classes, Graphics, Controls, Forms,
    9   Dialogs, StdCtrls, UCompiler, Registry,
     9  Dialogs, StdCtrls, UCompiler, Registry, Contnrs,
    1010  ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,
    1111  UProject, FileUtil, Menus, ActnList, UCoolDocking,
     
    5252    ToolBar1: TToolBar;
    5353    procedure AProjectCloseExecute(Sender: TObject);
     54    procedure AProjectNewExecute(Sender: TObject);
    5455    procedure AProjectOpenExecute(Sender: TObject);
    5556    procedure AProjectSaveAsExecute(Sender: TObject);
     
    9192procedure TMainForm.ABuildExecute(Sender: TObject);
    9293begin
     94  CodeForm.Save;
     95
    9396  // Compile project file
    9497  if (ComboBoxAnalyzer.Items.Count > 0) and (ComboBoxAnalyzer.ItemIndex <> -1) and
     
    208211begin
    209212  Project.LoadFromFile(FileName);
    210   LastOpenedFiles.Add(FileName);
     213  LastOpenedFiles.AddItem(FileName);
    211214  LastOpenedFiles.ReloadMenu;
    212215  ProjectManager.UpdateProjectTree;
     
    235238  for I := 0 to Compiler.Producers.Count - 1 do
    236239    ComboBoxProducer.AddItem(Compiler.Producers[I].Name, nil);
     240
    237241  ComboBoxAnalyzer.Clear;
    238242  for I := 0 to Compiler.Analyzers.Count - 1 do
     
    289293end;
    290294
     295procedure TMainForm.AProjectNewExecute(Sender: TObject);
     296begin
     297  Project.Clear;
     298  Project.Name := 'New project';
     299  ProjectManager.UpdateProjectTree;
     300  Caption := ApplicationInfo.Name + ' - ' + Project.Name;
     301end;
     302
    291303procedure TMainForm.AProjectSaveAsExecute(Sender: TObject);
    292304begin
    293305  if SaveDialog1.Execute then begin
    294306    Project.SaveToFile(SaveDialog1.FileName);
     307    CodeForm.Save;
    295308    Project.Save;
    296309  end;
     
    299312procedure TMainForm.AProjectSaveExecute(Sender: TObject);
    300313begin
     314  CodeForm.Save;
    301315  Project.SaveToFile(Project.GetDir(True) + Project.Name + '.tppr');
    302316end;
Note: See TracChangeset for help on using the changeset viewer.