Changeset 7 for trunk/Forms


Ignore:
Timestamp:
Feb 4, 2011, 1:16:43 PM (13 years ago)
Author:
chronos
Message:
 
Location:
trunk/Forms
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UInstanceOptions.pas

    r6 r7  
    108108
    109109  Edit1.Text := Instance.Name;
    110   if Assigned(Instance.FPCSource) then
    111     Edit2.Text := Instance.FPCSource.GetName
     110  FPCSource := Instance.FPCSource;
     111  IDESource := Instance.IDESource;
     112  if Assigned(FPCSource) then
     113    Edit2.Text := FPCSource.GetName
    112114    else Edit2.Text := '';
    113   if Assigned(Instance.IDESource) then
    114     Edit3.Text := Instance.IDESource.GetName
     115  if Assigned(IDESource) then
     116    Edit3.Text := IDESource.GetName
    115117    else Edit3.Text := '';
    116118end;
  • trunk/Forms/UMainForm.lfm

    r6 r7  
    11object MainForm: TMainForm
    2   Left = 234
    3   Height = 380
    4   Top = 123
     2  Left = 203
     3  Height = 418
     4  Top = 88
    55  Width = 677
    66  Caption = 'Free Pascal Manager'
    7   ClientHeight = 380
     7  ClientHeight = 418
    88  ClientWidth = 677
    99  OnCreate = FormCreate
     
    1313  object ListView1: TListView
    1414    Left = 8
    15     Height = 318
     15    Height = 311
    1616    Top = 24
    17     Width = 658
     17    Width = 666
    1818    Anchors = [akTop, akLeft, akRight, akBottom]
    1919    Columns = <   
     
    5656    Left = 8
    5757    Height = 25
    58     Top = 350
     58    Top = 343
    5959    Width = 64
    6060    Action = AAdd
     
    6565    Left = 80
    6666    Height = 25
    67     Top = 350
     67    Top = 343
    6868    Width = 67
    6969    Action = ARemove
     
    7474    Left = 152
    7575    Height = 25
    76     Top = 350
     76    Top = 343
    7777    Width = 56
    7878    Action = AStart
     
    8484    Left = 296
    8585    Height = 25
    86     Top = 350
     86    Top = 343
    8787    Width = 64
    8888    Action = AUpdate
     
    9393    Left = 440
    9494    Height = 25
    95     Top = 350
     95    Top = 343
    9696    Width = 59
    9797    Action = AEdit
     
    102102    Left = 368
    103103    Height = 25
    104     Top = 350
     104    Top = 343
    105105    Width = 64
    106106    Action = ACompile
     
    111111    Left = 216
    112112    Height = 25
    113     Top = 350
     113    Top = 343
    114114    Width = 72
    115115    Action = ADownload
     
    118118  end
    119119  object Options: TButton
    120     Left = 591
    121     Height = 25
    122     Top = 350
     120    Left = 8
     121    Height = 25
     122    Top = 387
    123123    Width = 75
    124124    Action = AOptions
     125    Anchors = [akLeft, akBottom]
     126    TabOrder = 8
     127  end
     128  object Bevel1: TBevel
     129    Left = 8
     130    Height = 3
     131    Top = 375
     132    Width = 664
     133    Anchors = [akLeft, akRight, akBottom]
     134  end
     135  object Button7: TButton
     136    Left = 93
     137    Height = 25
     138    Top = 387
     139    Width = 75
     140    Action = ASourceList
    125141    Anchors = [akRight, akBottom]
    126     TabOrder = 8
     142    TabOrder = 9
    127143  end
    128144  object ActionList1: TActionList
     
    161177      OnExecute = AOptionsExecute
    162178    end
     179    object ASourceList: TAction
     180      Caption = 'Source list'
     181      OnExecute = ASourceListExecute
     182    end
    163183  end
    164184  object PopupMenu1: TPopupMenu
  • trunk/Forms/UMainForm.pas

    r6 r7  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   StdCtrls, ActnList, Menus, Contnrs, USource, UInstance, UInstanceOptions,
    10   DOM, XMLWrite, XMLRead, HTTPSend, UMainOptions;
     9  StdCtrls, ActnList, Menus, ExtCtrls, Contnrs, USource, UInstance,
     10  UInstanceOptions, DOM, XMLWrite, XMLRead, HTTPSend, UMainOptions,
     11  USourceSelection;
    1112
    1213const
     
    2324    AAdd: TAction;
    2425    ACompile: TAction;
     26    ASourceList: TAction;
    2527    AOptions: TAction;
    2628    AUpdate: TAction;
     
    3032    ADownload: TAction;
    3133    ActionList1: TActionList;
     34    Bevel1: TBevel;
    3235    Button1: TButton;
    3336    Button2: TButton;
     
    3538    Button4: TButton;
    3639    Button5: TButton;
     40    Button7: TButton;
    3741    Options: TButton;
    3842    ButtonEdit: TButton;
     
    5256    procedure AOptionsExecute(Sender: TObject);
    5357    procedure ARemoveExecute(Sender: TObject);
     58    procedure ASourceListExecute(Sender: TObject);
    5459    procedure AStartExecute(Sender: TObject);
    5560    procedure ADownloadExecute(Sender: TObject);
     
    150155end;
    151156
     157procedure TMainForm.ASourceListExecute(Sender: TObject);
     158begin
     159  SourceSelectionForm.ProjectType := '';
     160  SourceSelectionForm.ShowModal;
     161end;
     162
    152163procedure TMainForm.AStartExecute(Sender: TObject);
    153164begin
     
    270281    Instances.Clear;
    271282    Sources.Clear;
     283    NewNode := Doc.DocumentElement.FindNode('Platform');
     284    if Assigned(NewNode) then
     285      Platform := UTF8Encode(string(NewNode.TextContent));
     286    NewNode := Doc.DocumentElement.FindNode('TemplateDir');
     287    if Assigned(NewNode) then
     288      TemplateDir := UTF8Encode(string(NewNode.TextContent));
     289    NewNode := Doc.DocumentElement.FindNode('SubversionDir');
     290    if Assigned(NewNode) then
     291      SubversionDir := UTF8Encode(string(NewNode.TextContent));
     292    NewNode := Doc.DocumentElement.FindNode('SubversionDir');
     293    if Assigned(NewNode) then
     294      SubversionDir := UTF8Encode(string(NewNode.TextContent));
     295    NewNode := Doc.DocumentElement.FindNode('InstanceDir');
     296    if Assigned(NewNode) then
     297      InstanceDir := UTF8Encode(string(NewNode.TextContent));
     298    NewNode := Doc.DocumentElement.FindNode('SourceURL');
     299    if Assigned(NewNode) then
     300      SourceURL := UTF8Encode(string(NewNode.TextContent));
    272301
    273302    NewNode := Doc.DocumentElement.FindNode('Sources');
     
    361390    AppendChild(RootNode);
    362391    with RootNode do begin
     392      NewNode := OwnerDocument.CreateElement('Platform');
     393      NewNode.TextContent := UTF8Decode(Platform);
     394      AppendChild(NewNode);
     395      NewNode := OwnerDocument.CreateElement('TemplateDir');
     396      NewNode.TextContent := UTF8Decode(TemplateDir);
     397      AppendChild(NewNode);
     398      NewNode := OwnerDocument.CreateElement('SubversionDir');
     399      NewNode.TextContent := UTF8Decode(SubversionDir);
     400      AppendChild(NewNode);
     401      NewNode := OwnerDocument.CreateElement('SourceDir');
     402      NewNode.TextContent := UTF8Decode(SourceDir);
     403      AppendChild(NewNode);
     404      NewNode := OwnerDocument.CreateElement('InstanceDir');
     405      NewNode.TextContent := UTF8Decode(InstanceDir);
     406      AppendChild(NewNode);
     407      NewNode := OwnerDocument.CreateElement('SourceURL');
     408      NewNode.TextContent := UTF8Decode(SourceURL);
     409      AppendChild(NewNode);
     410
    363411      NewNode := OwnerDocument.CreateElement('Sources');
    364412      with NewNode do
  • trunk/Forms/UMainOptions.lfm

    r6 r7  
    11object MainOptionsForm: TMainOptionsForm
    2   Left = 233
     2  Left = 320
    33  Height = 350
    4   Top = 73
    5   Width = 635
     4  Top = 81
     5  Width = 489
    66  Caption = 'Options'
    77  ClientHeight = 350
    8   ClientWidth = 635
     8  ClientWidth = 489
    99  OnShow = FormShow
    1010  LCLVersion = '0.9.31'
    1111  object Button1: TButton
    12     Left = 464
     12    Left = 318
    1313    Height = 25
    1414    Top = 316
    1515    Width = 75
    16     Anchors = [akLeft, akBottom]
     16    Anchors = [akRight, akBottom]
    1717    Caption = 'Cancel'
     18    ModalResult = 2
     19    OnClick = Button1Click
    1820    TabOrder = 0
    1921  end
    2022  object Button2: TButton
    21     Left = 552
     23    Left = 406
    2224    Height = 22
    2325    Top = 319
    2426    Width = 75
    25     Anchors = [akLeft, akBottom]
     27    Anchors = [akRight, akBottom]
    2628    Caption = 'Save'
     29    ModalResult = 1
    2730    OnClick = Button2Click
    2831    TabOrder = 1
     
    4043    Height = 21
    4144    Top = 24
    42     Width = 619
     45    Width = 473
    4346    Anchors = [akTop, akLeft, akRight]
    4447    TabOrder = 2
     
    5659    Height = 21
    5760    Top = 64
    58     Width = 619
     61    Width = 473
    5962    Anchors = [akTop, akLeft, akRight]
    6063    TabOrder = 3
     
    7275    Height = 21
    7376    Top = 104
    74     Width = 621
     77    Width = 475
    7578    Anchors = [akTop, akLeft, akRight]
    7679    TabOrder = 4
     
    8891    Height = 21
    8992    Top = 144
    90     Width = 621
     93    Width = 475
    9194    Anchors = [akTop, akLeft, akRight]
    9295    TabOrder = 5
  • trunk/Forms/UMainOptions.pas

    r6 r7  
    2323    Label3: TLabel;
    2424    Label4: TLabel;
     25    procedure Button1Click(Sender: TObject);
    2526    procedure Button2Click(Sender: TObject);
    2627    procedure FormShow(Sender: TObject);
     
    5960end;
    6061
     62procedure TMainOptionsForm.Button1Click(Sender: TObject);
     63begin
     64
     65end;
     66
    6167end.
    6268
  • trunk/Forms/UOperationProgress.lfm

    r6 r7  
    11object OperationProgressForm: TOperationProgressForm
    2   Left = 285
     2  Left = 369
    33  Height = 440
    4   Top = 112
     4  Top = 134
    55  Width = 562
    66  Caption = 'Operation progress'
  • trunk/Forms/USourceSelection.lfm

    r6 r7  
    2020      item
    2121        Caption = 'Name'
    22         Width = 70
     22        Width = 110
    2323      end   
    2424      item
  • trunk/Forms/USourceSelection.pas

    r6 r7  
    4949  Sources.Clear;
    5050  for I := 0 to MainForm.Sources.Count - 1 do
    51     if TSource(MainForm.Sources[I]).ProjectType = ProjectType then
     51    if (TSource(MainForm.Sources[I]).ProjectType = ProjectType) or
     52    (ProjectType = '') then
    5253      Sources.Add(MainForm.Sources[I]);
    5354  if ListView1.Items.Count <> Sources.Count then
Note: See TracChangeset for help on using the changeset viewer.