Changeset 13 for trunk/Forms


Ignore:
Timestamp:
May 30, 2015, 1:02:36 PM (9 years ago)
Author:
chronos
Message:
  • Added: New test form where general functionality of selected backend can be tested.
  • Added: Basic git backend implementation.
  • Added: Project group form and ability to open/save group of projects as configuration to XML file.
Location:
trunk/Forms
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormBrowse.lfm

    r11 r13  
    11object FormBrowse: TFormBrowse
    2   Left = 554
     2  Left = 952
    33  Height = 526
    4   Top = 269
     4  Top = 287
    55  Width = 722
    66  Caption = 'Browse'
  • trunk/Forms/UFormConsole.pas

    r8 r13  
    3131    Parameters: TStringList;
    3232    WorkingDir: string;
    33     Environment: string;
     33    EnvironmentVariables: TStringList;
    3434    Aborted: Boolean;
    3535    Log: TStringList;
     
    5050  Parameters := TStringList.Create;
    5151  Log := TStringList.Create;
     52  EnvironmentVariables := TStringList.Create;
    5253end;
    5354
    5455procedure TFormConsole.FormDestroy(Sender: TObject);
    5556begin
     57  EnvironmentVariables.Free;
    5658  Log.Free;
    5759  Parameters.Free;
     
    101103    if WorkingDir <> '' then
    102104      Process.CurrentDirectory := WorkingDir;
    103     //WorkingDir := '';
    104     if Environment <> '' then
    105       Process.Environment.Text := Environment;
    106     Environment := '';
     105    Process.Environment.Assign(EnvironmentVariables);
     106    Process.Parameters.Assign(Parameters);
    107107    Process.Executable := Executable;
    108     Process.Parameters.Assign(Parameters);
    109     //for I := 0 to Process.Parameters.Count - 1 do
    110     //  ShowMessage('"' + Process.Parameters[I] + '"');
    111     //Process.CommandLine := Executable + ' checkout http://svn.zdechov.net/svn/xtactics /home/chronos/Smazat/svn3';
    112     //Process.Parameters.Clear;
    113     //Process.Parameters.Add('checkout');
    114     //Process.Parameters.Add('http://svn.zdechov.net/svn/xtactics');
    115     //Process.Parameters.Add('/home/chronos/Smazat/svn3');
    116     //Process.Parameters.Add('checkout');
    117     //Process.Parameters.Add('dasd');;
    118     //Process.CommandLine := Executable + ' ' + Parameters.Text;
    119108    CommandLine := Executable + ' ' + StringReplace(Parameters.Text, LineEnding, ' ', [rfReplaceAll]);
    120109    if CommandLine[Length(CommandLine)] = LineEnding then
  • trunk/Forms/UFormMain.lfm

    r8 r13  
    11object FormMain: TFormMain
    2   Left = 340
    3   Height = 497
    4   Top = 152
    5   Width = 667
     2  Left = 416
     3  Height = 568
     4  Top = 329
     5  Width = 939
    66  Caption = 'VCSCommander'
    7   ClientHeight = 468
    8   ClientWidth = 667
     7  ClientHeight = 539
     8  ClientWidth = 939
    99  Menu = MainMenu1
    1010  OnActivate = FormActivate
     
    1717    Height = 26
    1818    Top = 0
    19     Width = 667
     19    Width = 939
    2020    Caption = 'ToolBarMain'
     21    Images = Core.ImageList1
    2122    ParentShowHint = False
    2223    ShowHint = True
    2324    TabOrder = 0
     25    object ToolButton1: TToolButton
     26      Left = 1
     27      Top = 2
     28      Action = Core.AProjectCheckout
     29    end
     30    object ToolButton2: TToolButton
     31      Left = 24
     32      Top = 2
     33      Action = Core.AProjectOpen
     34    end
     35    object ToolButton3: TToolButton
     36      Left = 47
     37      Top = 2
     38      Action = Core.AProjectClose
     39    end
    2440  end
    2541  object StatusBar1: TStatusBar
    2642    Left = 0
    2743    Height = 29
    28     Top = 439
    29     Width = 667
     44    Top = 510
     45    Width = 939
    3046    Panels = <>
    3147  end
    3248  object MainMenu1: TMainMenu
     49    Images = Core.ImageList1
    3350    left = 232
    3451    top = 88
    3552    object MenuItemFile: TMenuItem
    36       Caption = 'File'
     53      Caption = 'Working copy'
    3754      object MenuItem17: TMenuItem
    3855        Action = Core.AProjectCheckout
     
    5269      object MenuItemQuit: TMenuItem
    5370        Action = Core.AQuit
     71      end
     72    end
     73    object MenuItem19: TMenuItem
     74      Caption = 'Project group'
     75      object MenuItem20: TMenuItem
     76        Action = Core.AProjectGroupNew
     77      end
     78      object MenuItem21: TMenuItem
     79        Action = Core.AProjectGroupOpen
     80      end
     81      object MenuItemRecentProjectGroup: TMenuItem
     82        Caption = 'Open recent'
     83      end
     84      object MenuItem23: TMenuItem
     85        Action = Core.AProjectGroupSave
     86      end
     87      object MenuItem25: TMenuItem
     88        Action = Core.AProjectGroupSaveAs
     89      end
     90      object MenuItem24: TMenuItem
     91        Action = Core.AProjectGroupClose
    5492      end
    5593    end
     
    75113      end
    76114    end
     115    object MenuItem15: TMenuItem
     116      Caption = 'Tools'
     117      object MenuItem18: TMenuItem
     118        Action = Core.AViewTest
     119      end
     120    end
    77121    object MenuItem1: TMenuItem
    78122      Caption = 'General'
  • trunk/Forms/UFormMain.pas

    r9 r13  
    11unit UFormMain;
    22
    3 {$mode objfpc}{$H+}
     3{$mode delphi}{$H+}
    44
    55interface
     
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   Menus, ActnList;
     9  Menus, ActnList, ExtCtrls;
    1010
    1111type
     
    2121    MenuItem13: TMenuItem;
    2222    MenuItem14: TMenuItem;
     23    MenuItem15: TMenuItem;
    2324    MenuItem16: TMenuItem;
    2425    MenuItem17: TMenuItem;
     26    MenuItem18: TMenuItem;
     27    MenuItem19: TMenuItem;
     28    MenuItem20: TMenuItem;
     29    MenuItem21: TMenuItem;
     30    MenuItemRecentProjectGroup: TMenuItem;
     31    MenuItem23: TMenuItem;
     32    MenuItem24: TMenuItem;
     33    MenuItem25: TMenuItem;
    2534    MenuItemOpenRecent: TMenuItem;
    2635    MenuItem2: TMenuItem;
     
    3645    StatusBar1: TStatusBar;
    3746    ToolBarMain: TToolBar;
     47    ToolButton1: TToolButton;
     48    ToolButton2: TToolButton;
     49    ToolButton3: TToolButton;
    3850    procedure FormActivate(Sender: TObject);
    3951    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    4254    Initialized: Boolean;
    4355  public
     56    procedure ProjectGroupOpenRecentExecute(Sender: TObject);
    4457    procedure OpenRecentExecute(Sender: TObject);
    4558    procedure UpdateInterface;
     
    5568
    5669uses
    57   UCore, UFormBrowse;
     70  UCore, UFormBrowse, UFormProjectGroup;
    5871
    5972{ TFormMain }
     
    6679procedure TFormMain.OpenRecentExecute(Sender: TObject);
    6780begin
    68   Core.ProjectOpen(Core.LastOpenedList1.Items[TMenuItem(Sender).MenuIndex]);
     81  Core.ProjectOpen(Core.LastOpenedListProject.Items[TMenuItem(Sender).MenuIndex]);
     82end;
     83
     84procedure TFormMain.ProjectGroupOpenRecentExecute(Sender: TObject);
     85begin
     86  Core.ProjectGroupOpen(Core.LastOpenedListProjectGroup.Items[TMenuItem(Sender).MenuIndex]);
    6987end;
    7088
     
    96114
    97115procedure TFormMain.DockInit;
     116var
     117  NewSplitter: TSplitter;
    98118begin
     119  FormProjectGroup.ManualDock(Self, nil, alLeft);
     120  FormProjectGroup.Align := alLeft;
     121  FormProjectGroup.Show;
     122  NewSplitter := TSplitter.Create(nil);
     123  NewSplitter.ManualDock(Self, nil, alLeft);
     124  NewSplitter.Align := alLeft;
     125  NewSplitter.Left := FormProjectGroup.Width;
     126  NewSplitter.Show;
    99127  FormBrowse.ManualDock(Self, nil, alClient);
    100128  FormBrowse.Align := alClient;
  • trunk/Forms/UFormSettings.lfm

    r7 r13  
    77  ClientHeight = 497
    88  ClientWidth = 686
     9  OnCreate = FormCreate
    910  LCLVersion = '1.5'
    1011  object ButtonCancel: TButton
     
    2627    TabOrder = 1
    2728  end
     29  object Label1: TLabel
     30    Left = 16
     31    Height = 25
     32    Top = 16
     33    Width = 107
     34    Caption = 'User name:'
     35    ParentColor = False
     36  end
     37  object Label2: TLabel
     38    Left = 16
     39    Height = 25
     40    Top = 64
     41    Width = 57
     42    Caption = 'Email:'
     43    ParentColor = False
     44  end
     45  object EditUserName: TEdit
     46    Left = 152
     47    Height = 35
     48    Top = 8
     49    Width = 264
     50    TabOrder = 2
     51  end
     52  object EditEmail: TEdit
     53    Left = 152
     54    Height = 35
     55    Top = 56
     56    Width = 264
     57    TabOrder = 3
     58  end
    2859end
  • trunk/Forms/UFormSettings.pas

    r7 r13  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
     9  XMLConf;
    910
    1011type
     
    1516    ButtonCancel: TButton;
    1617    ButtonOk: TButton;
     18    EditUserName: TEdit;
     19    EditEmail: TEdit;
     20    Label1: TLabel;
     21    Label2: TLabel;
     22    procedure FormCreate(Sender: TObject);
    1723  private
    1824    { private declarations }
    1925  public
    20     { public declarations }
     26    procedure Load(XMLConfig: TXMLConfig);
     27    procedure Save(XMLConfig: TXMLConfig);
    2128  end;
    2229
     
    2835{$R *.lfm}
    2936
     37uses
     38  UCore;
     39
     40{ TFormSettings }
     41
     42procedure TFormSettings.FormCreate(Sender: TObject);
     43begin
     44
     45end;
     46
     47procedure TFormSettings.Load(XMLConfig: TXMLConfig);
     48begin
     49  EditUserName.Text := Core.UserName;
     50  EditEmail.Text := Core.Email;
     51end;
     52
     53procedure TFormSettings.Save(XMLConfig: TXMLConfig);
     54begin
     55  Core.UserName := EditUserName.Text;
     56  Core.Email := EditEmail.Text;
     57end;
     58
    3059end.
    3160
Note: See TracChangeset for help on using the changeset viewer.