Beispiel #1
0
        private void XTextEdit_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                if (XTextEdit.Text != "")
                {
                    XList.Items[m + 1] += f + XTextEdit.Text;

                    xFeatures[n, m] = Convert.ToDouble(XTextEdit.Text);
                    m++;
                    if (total == m && noOfFeatures == n + 1)
                    {
                        XTextEdit.IsEnabled = false;
                        YTextEdit.Focus();
                    }
                    if (m == total)
                    {
                        m = 0;
                        n++;

                        if (n != noOfFeatures)
                        {
                            XList.Items[0] += string.Format("\tx({0})", n + 1);
                        }

                        if (n == 1)
                        {
                            f += "\t";
                        }
                    }
                }
                XTextEdit.Text = "";
            }
        }
 private void YTextEdit_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (YTextEdit.Text != "")
         {
             YList.Items.Add(YTextEdit.Text);
         }
         if (y == total)
         {
             YTextEdit.IsEnabled = false;
             YTextEdit.Focus();
         }
         YTextEdit.Text = "";
         y++;
     }
 }