Changeset 2 for trunk/ULoaderForm.pas


Ignore:
Timestamp:
Jul 31, 2009, 3:04:35 PM (15 years ago)
Author:
george
Message:
  • Added: Test telnet connection with custom class TRouterOS.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22OpenWinBox.dsk
        33*.dcu
         4*.~dsk
  • trunk/ULoaderForm.pas

    r1 r2  
    55uses
    66  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    7   Dialogs, ComCtrls, StdCtrls, Menus, UHostAddressList;
     7  Dialogs, ComCtrls, StdCtrls, Menus, UHostAddressList, IdTelnet,
     8  tlntsend, ssl_openssl, ssl_openssl_lib, ssl_cryptlib;
    89
    910type
     
    4445    procedure ImportAddresses1Click(Sender: TObject);
    4546    procedure RemoveAllAddresses1Click(Sender: TObject);
     47    procedure ButtonConnectClick(Sender: TObject);
    4648  private
    4749    HostAddressList: THostAddressList;
     
    6264
    6365uses
    64   UApplicationInfo, URegistry, Registry;
     66  UApplicationInfo, URegistry, Registry, IdTCPClient, IdTCPConnection,
     67  UMainForm;
    6568
    6669{$R *.dfm}
     
    112115  PopupPoint := ClientToScreen(PopupPoint);
    113116  PopupMenu1.Popup(PopupPoint.X, PopupPoint.Y);
     117end;
     118
     119procedure TLoaderForm.ButtonConnectClick(Sender: TObject);
     120begin
     121  MainForm.Show;
     122  MainForm.RouterOS.Connect(Edit1.Text, Edit2.Text, Edit3.Text);
     123  Hide;
    114124end;
    115125
     
    201211
    202212procedure TLoaderForm.LoadFromRegistry;
    203 var
    204   I: Integer;
    205   NewHostAddress: THostAddress;
    206213begin
    207214  with TRegistryEx.Create do try
     
    209216    OpenKey(RegistryKey, True);
    210217    CheckBox3.Checked := ReadBoolWithDefault('LoadPreviousSession', True);
     218    CheckBox2.Checked := ReadBoolWithDefault('SecureMode', True);
    211219    CheckBox1.Checked := ReadBoolWithDefault('KeepPassword', False);
    212     CheckBox2.Checked := ReadBoolWithDefault('SecureMode', True);
    213220    if CheckBox3.Checked then begin
    214221      Edit1.Text := ReadStringWithDefault('Address', '');
     
    270277    if CheckBox1.Checked then WriteString('Password', Edit3.Text)
    271278      else WriteString('Password', '');
    272     WriteBool('SecureMethod', CheckBox2.Checked);
     279    WriteBool('SecureMode', CheckBox2.Checked);
    273280    WriteBool('LoadPreviouisSession', CheckBox3.Checked);
    274281  finally
Note: See TracChangeset for help on using the changeset viewer.