void loadData(m_Detection d) { d.name = textBox1.Text; d.loop = checkLoop.IsChecked.Value; d.priority = checkPrior.IsChecked.Value; d.expand = true; }
public void editDetection(m_Detection d_origin) { addNew = false; this.Title = "Edit Detection"; butAdd.Content = "Edit"; this.d_origin = d_origin; textBox1.Text = d_origin.name; checkLoop.IsChecked = d_origin.loop; checkPrior.IsChecked = d_origin.priority; }
void finish() { try { String name = textBox1.Text; if (name != "") { if (addNew) { m_Detection d = new m_Detection(); loadData(d); form_editor.addDetection(d, addIndex); } else { int[] loc = form_editor.getTVI_Location(self); loadData(d_origin); form_editor.reloadTree_map_map(loc); } this.Close(); } } catch { } }