コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int index = 0;

            if (Int32.TryParse(textBox1.Text, out index))
            {
                richTextBox1.Text = blockchain.GetBlockAsString(index);
            }
        }
コード例 #2
0
 // 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.");
     }
 }
コード例 #3
0
 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.");
     }
 }