public void InitializePaymentRequest() { Ws.Activate(); _payReqLabelCell = Ws.Cells[StartRow, StartColumn]; _payReqLabelCell.Value2 = "Payment request:"; _payReqLabelCell.Font.Bold = true; _payReqLabelCell.Columns.AutoFit(); _payReqInputCell = Ws.Cells[StartRow, StartColumn + 1]; _payReqInputCell.Interior.Color = Color.AliceBlue; Formatting.WideTableColumn(_payReqInputCell); _payReqRange = Ws.Range[_payReqLabelCell, _payReqInputCell]; Formatting.UnderlineBorder(_payReqRange); Ws.Change += WsOnChangeParsePayReq; PaymentRequestTable = new VerticalTableSheet <PayReq>(Ws, LApp, PayReq.Descriptor); PaymentRequestTable.SetupVerticalTable("Decoded Payment Request", StartRow + 2); PotentialRoutesTable = new TableSheet <Route>(Ws, LApp, Route.Descriptor, "hops"); PotentialRoutesTable.SetupTable("Potential Routes", MaxRoutes, StartRow = PaymentRequestTable.EndRow + 2); var sendPaymentButtonRow = PotentialRoutesTable.EndRow + 4; Button sendPaymentButton = Utilities.CreateButton("sendPayment", Ws, Ws.Cells[sendPaymentButtonRow, StartColumn], "Send Payment"); sendPaymentButton.Click += SendPaymentButtonOnClick; _errorData = Ws.Cells[sendPaymentButtonRow + 3, StartColumn + 1]; _sendStatusRange = Ws.Cells[sendPaymentButtonRow + 3, StartColumn]; _sendStatusRange.Font.Italic = true; Button clearPaymentInfoButton = Utilities.CreateButton("clearPaymentInfo", Ws, Ws.Cells[sendPaymentButtonRow + 3, StartColumn], "Clear"); clearPaymentInfoButton.Click += ClearPaymentInfoButtonOnClick; var paymentResponseDataStartRow = sendPaymentButtonRow + 5; _paymentPreimageLabel = Ws.Cells[paymentResponseDataStartRow, StartColumn]; _paymentPreimageLabel.Value2 = "Proof of Payment"; _paymentPreimageLabel.Font.Italic = true; Formatting.WideTableColumn(_paymentPreimageLabel); _paymentPreimageCell = Ws.Cells[paymentResponseDataStartRow, StartColumn + 1]; _paymentPreimageCell.Interior.Color = Color.PaleGreen; _paymentPreimageCell.RowHeight = 14.3; _paymentPreimageCell.WrapText = true; RouteTakenTable = new VerticalTableSheet <Route>(Ws, LApp, Route.Descriptor, new List <string> { "hops" }); RouteTakenTable.SetupVerticalTable("Payment Summary", paymentResponseDataStartRow + 3); HopTable = new TableSheet <Hop>(Ws, LApp, Hop.Descriptor, "chan_id"); HopTable.SetupTable("Route", 4, RouteTakenTable.EndRow + 2); _payReqInputCell.Columns.ColumnWidth = PayReqColumnWidth; Utilities.RemoveLoadingMark(Ws); }
public ConnectSheet(Worksheet ws, AsyncLightningApp lApp) { Ws = ws; LApp = lApp; _cellCache = new Dictionary <string, string>(); Ws.Change += WsOnChange; GetInfoSheet = new VerticalTableSheet <GetInfoResponse>(Ws, LApp, GetInfoResponse.Descriptor); GetInfoSheet.SetupVerticalTable("LND Node Info", 18); _errorData = Ws.Cells[12, 3]; }
public BalancesSheet(Worksheet ws, AsyncLightningApp lApp) { Ws = ws; LApp = lApp; WalletBalanceSheet = new VerticalTableSheet <WalletBalanceResponse>(Ws, LApp, WalletBalanceResponse.Descriptor); WalletBalanceSheet.SetupVerticalTable("Wallet Balance"); ChannelBalanceSheet = new VerticalTableSheet <ChannelBalanceResponse>(Ws, LApp, ChannelBalanceResponse.Descriptor); ChannelBalanceSheet.SetupVerticalTable("Channel Balance", startColumn: 5); Ws.Columns.AutoFit(); //Ws.Names.Add(field.Name, dataCell); }