Ignore:
Timestamp:
Nov 9, 2011, 4:11:56 PM (13 years ago)
Author:
george
Message:
  • Added: Partial client-server protocol layer implementation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/ULoginForm.pas

    r25 r27  
    1919    ComboBoxConnection: TComboBox;
    2020    EditUserName: TEdit;
     21    EditPassword: TEdit;
    2122    Image1: TImage;
    2223    Label1: TLabel;
    2324    Label2: TLabel;
    2425    Label3: TLabel;
    25     MaskEditPassword: TMaskEdit;
    2626    procedure ButtonCancelClick(Sender: TObject);
    2727    procedure ButtonChangeClick(Sender: TObject);
     
    4949  Core.LastUserName := EditUserName.Text;
    5050  Core.LastProfile := ComboBoxConnection.ItemIndex;
    51   Core.LastPassword := MaskEditPassword.Text;
     51  Core.LastPassword := EditPassword.Text;
    5252end;
    5353
     
    6060begin
    6161  MainForm.PersistentForm.Load(Self);
     62  EditUserName.Text := Core.LastUserName;
     63  EditPassword.Text := '';
     64  Core.Profiles.FillStrings(ComboBoxConnection.Items);
    6265  ComboBoxConnection.ItemIndex := Core.LastProfile;
    63   EditUserName.Text := Core.LastUserName;
    64   MaskEditPassword.Text := '';
    65   Core.Profiles.FillStrings(ComboBoxConnection.Items);
     66  if (ComboBoxConnection.Items.Count > 0) and
     67    (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0;
    6668end;
    6769
     
    7577  if LoginProfileForm.ShowModal = mrOk then begin
    7678    Core.Profiles.FillStrings(ComboBoxConnection.Items);
     79    Core.LastProfile := ComboBoxConnection.ItemIndex;
     80    ComboBoxConnection.ItemIndex := Core.LastProfile;
     81    if (ComboBoxConnection.Items.Count > 0) and
     82      (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0;
    7783  end;
    7884end;
Note: See TracChangeset for help on using the changeset viewer.