public MessagePage(Chat chat, DecryptedRecordData <MessageRecord> message) : base("MessagePage") { Subscribe <NewSecretKeyEvent>(NewSecretKey); _chat = chat; _message = message; var transaction = message.Transaction; AddTitleRow("Title"); AddHeaderRow("Message"); var(text, detail) = ChatListView.GetMessageText(message); _text = AddTextRow(null); _text.SetMultilineText(text, detail); AddFooterRow(); AddHeaderRow("SecretKeyInfo"); _keyView = new SecretKeyView(message.EncryptedRecord?.KeyInfo, true); AddViewRow(_keyView); AddButtonRow("Import", Import); AddFooterRow(); AddHeaderRow("TransactionInfo"); AddViewRow(new DataTransactionView(transaction)); AddFooterRow(); IsBusy = true; UIApp.Run(Update); }
public NoteInfoPage(NoteData noteData) : base("NoteInfoPage") { Subscribe <NewSecretKeyEvent>(NewSecretKey); AddTitleRow("Title"); _initalState = noteData.DecryptetState; AddHeaderRow("Note"); _noteView = new NoteView(noteData); AddViewRow(_noteView); var download = noteData.EncryptedRecord == null; var import = noteData.DecryptetState != DecryptedDataRecordState.Decrypted; if (download || import) { if (download) { _download = AddButtonRow("Download", Download); } if (import) { _import = AddButtonRow("Import", Import); } } AddFooterRow(); AddHeaderRow("SecretKeyInfo"); _keyView = new SecretKeyView(noteData.EncryptedRecord?.KeyInfo, true); AddViewRow(_keyView); AddFooterRow(); AddHeaderRow("TransactionInfo"); AddViewRow(new DataTransactionView(noteData.TransactionDownload.Transaction)); AddFooterRow(); }