Преглед изворни кода

minor UI Adjustment and fix for missing for missing file.

Ugochukwu Mmaduekwe пре 7 година
родитељ
комит
afde9960d0

+ 1 - 1
src/gui/UCTRLWallet.lfm

@@ -10,7 +10,7 @@ object CTRLWallet: TCTRLWallet
   ClientWidth = 1151
   OnCreate = FormCreate
   OnResize = FormResize
-  LCLVersion = '1.8.2.0'
+  LCLVersion = '1.8.1.0'
   Visible = False
   object PairSplitter1: TPairSplitter
     Left = 0

+ 20 - 2
src/gui/UCTRLWallet.pas

@@ -9,7 +9,7 @@ interface
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus,
   ExtCtrls, PairSplitter, Buttons, UVisualGrid, UCommon.UI, Generics.Collections,
-  UAccounts, UDataSources, UNode, UWIZSendPASC;
+  UAccounts, UDataSources, UNode, UWIZSendPASC{, UWIZTransferAccount};
 
 type
 
@@ -592,8 +592,26 @@ begin
 end;
 
 procedure TCTRLWallet.miTransferAccountsClick(Sender: TObject);
+//var
+//  Scoped: TDisposables;
+//  wiz: TWIZTransferAccountWizard;
+//  model: TWIZTransferAccountModel;
+//  auxC: cardinal;
 begin
-  raise ENotImplemented.Create('Not Implemented');
+  //wiz := Scoped.AddObject(TWIZTransferAccountWizard.Create(nil)) as
+  //  TWIZTransferAccountWizard;
+  //model := Scoped.AddObject(TWIZTransferAccountModel.Create(nil)) as
+  //  TWIZTransferAccountModel;
+  //
+  //if not TAccountComp.AccountTxtNumberToAccountNumber(
+  //  FAccountsGrid.SelectedRows[0].Account, auxC) then
+  //begin
+  //  raise Exception.Create(
+  //    'Internal Error: Unable to parse account number from input');
+  //end;
+  //
+  //model.SelectedAccount := TNode.Node.Operations.SafeBoxTransaction.Account(auxC);
+  //wiz.Start(model);
 end;
 
 procedure TCTRLWallet.OnPrepareOperationsPopupMenu(Sender: TObject; constref ASelection: TVisualGridSelection; out APopupMenu: TPopupMenu);

+ 1 - 1
src/gui/wizards/UWIZSendPASC_Confirmation.lfm

@@ -6,7 +6,7 @@ object WIZSendPASC_Confirmation: TWIZSendPASC_Confirmation
   Caption = 'WIZSendPASC_Confirmation'
   ClientHeight = 253
   ClientWidth = 429
-  LCLVersion = '1.8.2.0'
+  LCLVersion = '1.8.1.0'
   Visible = False
   object GroupBox1: TGroupBox
     Left = 10

+ 6 - 3
src/gui/wizards/UWIZSendPASC_Confirmation.pas

@@ -13,7 +13,7 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
-  ExtCtrls, UVisualGrid, UCommon.Data, UWizard, UWIZSendPASC;
+  ExtCtrls, UVisualGrid, UCellRenderers, UCommon.Data, UWizard, UWIZSendPASC;
 
 type
 
@@ -71,10 +71,13 @@ begin
     Binding := 'SenderAccount';
     Filters := SORTABLE_NUMERIC_FILTER;
     Width := 100;
+    HeaderFontStyles := [fsBold];
+    DataFontStyles := [fsBold];
   end;
   with FSendersGrid.AddColumn('Balance') do begin
     Filters := SORTABLE_NUMERIC_FILTER;
     Width := 100;
+    Renderer := TCellRenderers.PASC;
   end;
   with FSendersGrid.AddColumn('Amount To Send') do begin
     Binding := 'AmountToSend';
@@ -111,9 +114,9 @@ var
   index : Integer;
 begin
    if ABindingName = 'SenderAccount' then
-     Result := AItem.account
+     Result := TAccountComp.AccountNumberToAccountTxtNumber(AItem.account)
    else if ABindingName = 'Balance' then
-     Result := TAccountComp.FormatMoneyDecimal(AItem.Balance)
+     Result := TAccountComp.FormatMoney(AItem.Balance)
    else if ABindingName = 'AmountToSend' then
      Result := Model.AmountToSend
      else if ABindingName = 'Fee' then

+ 1 - 1
src/gui/wizards/UWIZSendPASC_Transaction.lfm

@@ -7,7 +7,7 @@ object WIZSendPASC_Transaction: TWIZSendPASC_Transaction
   Caption = 'WIZSendPASC_Transaction'
   ClientHeight = 253
   ClientWidth = 429
-  LCLVersion = '1.8.2.0'
+  LCLVersion = '1.8.1.0'
   Visible = False
   object gbTransaction: TGroupBox
     Left = 22

+ 2 - 1
src/gui/wizards/UWIZSendPASC_Transaction.pas

@@ -14,7 +14,7 @@ interface
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
   ExtCtrls, Buttons, UCommon, UCommon.Collections, UWallet,
-  UFRMAccountSelect, UNode, UWizard, UWIZSendPASC, UWIZSendPASC_Confirmation;
+  UFRMAccountSelect, UNode, UWizard, UWIZSendPASC, UWIZSendPASC_Confirmation, UWIZSendPASC_TransactionPayload;
 
 type
 
@@ -175,6 +175,7 @@ begin
     cbSignerAccount.Items.Objects[cbSignerAccount.ItemIndex])];
   Model.DestinationAccount := GetAccounts(GetAccNoWithoutChecksum(edtDestAcc.Text));
   Model.AmountToSend := edtAmt.Text;
+  UpdatePath(ptReplaceAllNext, [TWIZSendPASC_TransactionPayload, TWIZSendPASC_Confirmation]);
 end;
 
 function TWIZSendPASC_Transaction.Validate(out message: ansistring): boolean;

+ 11 - 11
src/pascalcoin_wallet.lpi

@@ -401,39 +401,39 @@
         <IsPartOfProject Value="True"/>
       </Unit69>
       <Unit70>
-        <Filename Value="gui\wizards\UWIZSendPASC_Completion.pas"/>
+        <Filename Value="libraries\generics.collections\inc\generics.dictionaries.inc"/>
         <IsPartOfProject Value="True"/>
-        <ComponentName Value="WIZSendPASC_Completion"/>
-        <HasResources Value="True"/>
-        <ResourceBaseClass Value="Form"/>
       </Unit70>
       <Unit71>
-        <Filename Value="libraries\generics.collections\inc\generics.dictionaries.inc"/>
+        <Filename Value="libraries\pascalcoin\UAppParams.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit71>
       <Unit72>
-        <Filename Value="libraries\pascalcoin\UAppParams.pas"/>
+        <Filename Value="libraries\pascalcoin\UFolderHelper.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit72>
       <Unit73>
-        <Filename Value="libraries\pascalcoin\UFolderHelper.pas"/>
+        <Filename Value="libraries\pascalcoin\UGridUtils.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit73>
       <Unit74>
-        <Filename Value="libraries\pascalcoin\UGridUtils.pas"/>
+        <Filename Value="libraries\pascalcoin\UJSONFunctions.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit74>
       <Unit75>
-        <Filename Value="libraries\pascalcoin\UJSONFunctions.pas"/>
+        <Filename Value="core.utils\UCoreUtils.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit75>
       <Unit76>
-        <Filename Value="core.utils\UCoreUtils.pas"/>
+        <Filename Value="core.utils\UDataSources.pas"/>
         <IsPartOfProject Value="True"/>
       </Unit76>
       <Unit77>
-        <Filename Value="core.utils\UDataSources.pas"/>
+        <Filename Value="gui\wizards\UWIZSendPASC_TransactionPayload.pas"/>
         <IsPartOfProject Value="True"/>
+        <ComponentName Value="WIZSendPASC_TransactionPayload"/>
+        <HasResources Value="True"/>
+        <ResourceBaseClass Value="Form"/>
       </Unit77>
     </Units>
   </ProjectOptions>