示例#1
0
        private void btnSub_Click(object sender, EventArgs e)
        {
            try
            {
                List <string> toAdd = new List <string>();
                toAdd.Add(txtInput.Text);
                foreach (string item in Classifier.InputToList(txtInput.Text))
                {
                    toAdd.Add(item);
                }
                if (txtClass.Text == "")
                {
                    toAdd.Add(cb_Class.Text);
                }
                else
                {
                    toAdd.Add(txtClass.Text);
                }
                CSVHelper.AppendToCSV(toAdd);
                MessageBox.Show("Success! Input " + txtInput.Text + " added to dataset");

                txtInput.Text = "";
                txtClass.Text = "";
                cb_Class.Text = "";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error:" + ex.ToString());
            }
        }
示例#2
0
 public static void AppendToDataset(string[] inInput)
 {
     if (!InputHelper.CheckIfExists(inInput[0], CompleteDS))
     {
         CSVHelper.AppendToCSV(Generic.ArrayToList(inInput));
     }
 }