Beispiel #1
0
 private void tabControl1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (tabControl1.SelectedTab == tabPage4)
     {
         if (backpropNetwork == null)
         {
             MessageBox.Show("Please go to STEP 2 and create the network.");
             return;
         }
         label14.Text = e.KeyChar.ToString();
         var aInput = CharToBitArray(e.KeyChar, label5.Font, aMatrixDim, trackBar4.Value);
         for (var i = 0; i < backpropNetwork.InputNodesCount; i++)
         {
             backpropNetwork.InputNode(i).Value = aInput[i];
         }
         backpropNetwork.Run();
         label15.Text = Convert.ToChar(aFirstChar + backpropNetwork.BestNodeIndex).ToString();
     }
 }
Beispiel #2
0
 private void button6_Click(object sender, EventArgs e)
 {
     if (backpropNetwork == null)
     {
         MessageBox.Show("Please go to STEP 2 and create the network.");
         return;
     }
     label14.Text = textBox3.Text;
     if (textBox3.Text.Length > 0)
     {
         var aInput = CharToDoubleArray(textBox3.Text[0], label5.Font, aMatrixDim, trackBar4.Value);
         for (var i = 0; i < backpropNetwork.InputNodesCount; i++)
         {
             backpropNetwork.InputNode(i).Value = aInput[i];
         }
         backpropNetwork.Run();
         label15.Text = Convert.ToChar(aFirstChar + backpropNetwork.BestNodeIndex).ToString();
     }
 }