Exemple #1
0
        public void SetupWorkbook(Workbook wb)
        {
            Wb   = wb;
            LApp = new AsyncLightningApp(this);

            CreateSheet(SheetNames.Connect);
            ConnectSheet = new ConnectSheet(Wb.Sheets[SheetNames.Connect], LApp);
            ConnectSheet.PopulateConfig();

            CreateSheet(SheetNames.Peers);
            PeersSheet = new PeersSheet(Wb.Sheets[SheetNames.Peers], LApp);

            CreateSheet(SheetNames.Balances);
            BalancesSheet = new BalancesSheet(Wb.Sheets[SheetNames.Balances], LApp);

            CreateSheet(SheetNames.Transactions);
            TransactionsSheet = new TransactionsSheet(Wb.Sheets[SheetNames.Transactions], LApp);

            CreateSheet(SheetNames.Channels);
            ChannelsSheet = new ChannelsSheet(Wb.Sheets[SheetNames.Channels], LApp);

            CreateSheet(SheetNames.Payments);
            PaymentsSheet = new TableSheet <Payment>(Wb.Sheets[SheetNames.Payments], LApp, Payment.Descriptor, "payment_hash");
            PaymentsSheet.SetupTable("Payments");

            CreateSheet(SheetNames.SendPayment);
            SendPaymentSheet = new SendPaymentSheet(Wb.Sheets[SheetNames.SendPayment], LApp);
            SendPaymentSheet.InitializePaymentRequest();

            CreateSheet(SheetNames.NodeLog);
            NodesSheet = new NodeSheet(Wb.Sheets[SheetNames.NodeLog]);

            MarkLndExcelWorkbook();
            ConnectSheet.Ws.Activate();

            Application.SheetActivate += Workbook_SheetActivate;
        }
Exemple #2
0
 // ReSharper disable once UnusedParameter.Local
 private void BwConnectCompleted(object sender, RunWorkerCompletedEventArgs e, ConnectSheet connectSheet)
 {
     try
     {
         var response = (GetInfoResponse)e.Result;
         connectSheet.GetInfoSheet.Update(response);
         connectSheet.FormatDimensions();
     }
     catch (System.Reflection.TargetInvocationException exception)
     {
         var rpcException = (RpcException)exception.InnerException;
         _excelAddIn.ConnectSheet.DisplayError("Connect error", rpcException?.Status.Detail);
         _excelAddIn.ConnectSheet.Ws.Activate();
     }
     Utilities.RemoveLoadingMark(connectSheet.Ws);
 }