瀏覽代碼

core TList fixing and deleting unusued files

PascalCoin 6 年之前
父節點
當前提交
890d4ce758

+ 6 - 6
src/core/UAccounts.pas

@@ -126,7 +126,7 @@ Type
     Class Function IsAccountForSale(const accountInfo: TAccountInfo) : Boolean;
     Class Function IsAccountForSaleAcceptingTransactions(const accountInfo: TAccountInfo) : Boolean;
     Class Function GetECInfoTxt(Const EC_OpenSSL_NID: Word) : String;
-    Class Procedure ValidsEC_OpenSSL_NID(list : TList);
+    Class Procedure ValidsEC_OpenSSL_NID(list : TList<Word>);
     Class Function AccountKey2RawString(const account: TAccountKey): TRawBytes; overload;
     Class procedure AccountKey2RawString(const account: TAccountKey; var dest: TRawBytes); overload;
     Class Function RawString2Accountkey(const rawaccstr: TRawBytes): TAccountKey; overload;
@@ -1479,13 +1479,13 @@ begin
   end;
 end;
 
-class procedure TAccountComp.ValidsEC_OpenSSL_NID(list: TList);
+class procedure TAccountComp.ValidsEC_OpenSSL_NID(list: TList<Word>);
 begin
   list.Clear;
-  list.Add(TObject(CT_NID_secp256k1)); // = 714
-  list.Add(TObject(CT_NID_secp384r1)); // = 715
-  list.Add(TObject(CT_NID_sect283k1)); // = 729
-  list.Add(TObject(CT_NID_secp521r1)); // = 716
+  list.Add((CT_NID_secp256k1)); // = 714
+  list.Add((CT_NID_secp384r1)); // = 715
+  list.Add((CT_NID_sect283k1)); // = 729
+  list.Add((CT_NID_secp521r1)); // = 716
 end;
 
 { TProgressNotifyManyHelper }

+ 0 - 101
src/gui-classic/UFRMAccountInfo.dfm

@@ -1,101 +0,0 @@
-object FRMAccountInfo: TFRMAccountInfo
-  Left = 0
-  Top = 0
-  BorderIcons = [biSystemMenu]
-  Caption = 'Account Information'
-  ClientHeight = 300
-  ClientWidth = 635
-  Color = clBtnFace
-  Font.Charset = DEFAULT_CHARSET
-  Font.Color = clWindowText
-  Font.Height = -11
-  Font.Name = 'Tahoma'
-  Font.Style = []
-  OldCreateOrder = False
-  Position = poOwnerFormCenter
-  PixelsPerInch = 96
-  TextHeight = 13
-  object Label1: TLabel
-    Left = 25
-    Top = 26
-    Width = 39
-    Height = 13
-    Caption = 'Account'
-  end
-  object lblAccount: TLabel
-    Left = 77
-    Top = 21
-    Width = 97
-    Height = 19
-    Caption = '0000000-00'
-    Font.Charset = DEFAULT_CHARSET
-    Font.Color = clBlack
-    Font.Height = -16
-    Font.Name = 'Tahoma'
-    Font.Style = [fsBold]
-    ParentFont = False
-  end
-  object Label6: TLabel
-    Left = 24
-    Top = 56
-    Width = 47
-    Height = 13
-    Caption = 'Public key'
-  end
-  object lblBalance: TLabel
-    Left = 252
-    Top = 21
-    Width = 97
-    Height = 19
-    Caption = '0000000-00'
-    Font.Charset = DEFAULT_CHARSET
-    Font.Color = clBlack
-    Font.Height = -16
-    Font.Name = 'Tahoma'
-    Font.Style = [fsBold]
-    ParentFont = False
-  end
-  object Label3: TLabel
-    Left = 200
-    Top = 26
-    Width = 37
-    Height = 13
-    Caption = 'Balance'
-  end
-  object Label2: TLabel
-    Left = 25
-    Top = 91
-    Width = 26
-    Height = 13
-    Caption = 'State'
-  end
-  object Label4: TLabel
-    Left = 77
-    Top = 86
-    Width = 200
-    Height = 19
-    Caption = 'Normal/For sale/Private'
-    Font.Charset = DEFAULT_CHARSET
-    Font.Color = clBlack
-    Font.Height = -16
-    Font.Name = 'Tahoma'
-    Font.Style = [fsBold]
-    ParentFont = False
-  end
-  object ebPublicKey: TEdit
-    Left = 77
-    Top = 51
-    Width = 533
-    Height = 25
-    Ctl3D = False
-    Font.Charset = DEFAULT_CHARSET
-    Font.Color = clBlack
-    Font.Height = -16
-    Font.Name = 'Tahoma'
-    Font.Style = [fsBold]
-    ParentCtl3D = False
-    ParentFont = False
-    TabOrder = 0
-    Text = 'ebPublicKey'
-  end
-end

+ 0 - 29
src/gui-classic/UFRMAccountInfo.pas

@@ -1,29 +0,0 @@
-unit UFRMAccountInfo;
-
-interface
-
-uses
-  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, StdCtrls;
-
-type
-  TFRMAccountInfo = class(TForm)
-    Label1: TLabel;
-    lblAccount: TLabel;
-    Label6: TLabel;
-    lblBalance: TLabel;
-    Label3: TLabel;
-    ebPublicKey: TEdit;
-    Label2: TLabel;
-    Label4: TLabel;
-  private
-    { Private declarations }
-  public
-    { Public declarations }
-  end;
-
-implementation
-
-{$R *.dfm}
-
-end.

+ 5 - 4
src/gui-classic/UFRMNewPrivateKeyType.pas

@@ -29,7 +29,8 @@ uses
   LCLIntf, LCLType, LMessages,
 {$ENDIF}
   Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, StdCtrls, Buttons, ExtCtrls, UWallet,UCrypto;
+  Dialogs, StdCtrls, Buttons, ExtCtrls, UWallet, UCrypto,
+  {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF};
 
 type
   TFRMNewPrivateKeyType = class(TForm)
@@ -78,18 +79,18 @@ begin
 end;
 
 procedure TFRMNewPrivateKeyType.FormCreate(Sender: TObject);
-Var l : TList;
+Var l : TList<Word>;
   i : Integer;
 begin
   FGeneratedPrivateKey := Nil;
   FWalletKeys := Nil;
   ebName.Text := DateTimeToStr(now);
   rgKeyType.Items.Clear;
-  l := TList.Create;
+  l := TList<Word>.Create;
   Try
     TAccountComp.ValidsEC_OpenSSL_NID(l);
     for i := 0 to l.Count - 1 do begin
-      rgKeyType.Items.AddObject(TAccountComp.GetECInfoTxt(PtrInt(l[i])),l[i]);
+      rgKeyType.Items.AddObject(TAccountComp.GetECInfoTxt(l[i]),TObject(l[i]));
     end;
   Finally
     l.free;

+ 0 - 1
src/pascalcoin_wallet_classic.dpr

@@ -41,7 +41,6 @@ uses
   UTxMultiOperation in 'core\UTxMultiOperation.pas',
   UWallet in 'core\UWallet.pas',
   UFRMAbout in 'gui-classic\UFRMAbout.pas' {FRMAbout},
-  UFRMAccountInfo in 'gui-classic\UFRMAccountInfo.pas' {FRMAccountInfo},
   UFRMAccountSelect in 'gui-classic\UFRMAccountSelect.pas' {FRMAccountSelect},
   UFRMMemoText in 'gui-classic\UFRMMemoText.pas' {FRMMemoText},
   UFRMNewPrivateKeyType in 'gui-classic\UFRMNewPrivateKeyType.pas' {FRMNewPrivateKeyType},