Ejemplo n.º 1
0
 void RefreshDataViewControls()
 {
     try
     {
         if (this.InvokeRequired)
         {
             voidF vf = RefreshDataViewControls;
             this.Invoke(vf);
         }
         else
         {
             int vc = (int)nudCOMRespViewCount.Value;
             if (vc > dataHistory.Count)
             {
                 vc = dataHistory.Count;
             }
             string d = "";
             if (chkCOMRespViewDivide.Checked)
             {
                 d = "\n";
             }
             txtCOMRespHex.Text  = "";
             txtCOMRespText.Text = "";
             for (int i = 0; i < vc; i++)
             {
                 txtCOMRespHex.AppendText(ConvertBytesToBString(dataHistory[dataHistory.Count - 1 - i]));
                 txtCOMRespHex.AppendText(d);
                 txtCOMRespText.AppendText(Encoding.ASCII.GetString(dataHistory[dataHistory.Count - 1 - i]));
                 txtCOMRespText.AppendText(d);
             }
         }
     }
     catch (Exception ex)
     {
         //УУпсс
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Zdarzenie przechwytywane w monecie naciśnięcia przycisku tworzenia nowej sieci.
        /// </summary>
        private void networkButton_Click(object sender, RoutedEventArgs e)
        {
            // Inicjuje delegaty
            getStalaDel += getStala;
            getLiczbaDel += getLiczba;
            printFDel += println;
            setLPDel += setLiczbaPerceptronowText;

            // Tworzy i wywołuje wątek liczenia sieci
            networkThread = new Thread(createNetwork);
            networkThread.Start();
        }