private void button1_Click(object sender, EventArgs e) { int index = 0; if (Int32.TryParse(textBox1.Text, out index)) { richTextBox1.Text = blockchain.GetBlockAsString(index); } }
// Print Block N (based on user input) private void PrintBlock_Click(object sender, EventArgs e) { if (Int32.TryParse(blockNo.Text, out int index)) { UpdateText(blockchain.GetBlockAsString(index)); } else { UpdateText("Invalid Block No."); } }
private void printBtn_Click(object sender, EventArgs e) { if (Int32.TryParse(indexTBox.Text, out int index)) { outputToRichTextBox1(blockchain.GetBlockAsString(index)); } else { outputToRichTextBox1("Invalid Block No."); } }