public TrackerInterface(double datarate, double maxrange, MainInterface m) { this.m = m; int ret = InitializeTrackerWrapper(datarate, maxrange); if (ret != 0) { init_error = -1; } }
public TrackerInterface(double datarate, double maxrange, MainInterface m) { this.m = m; int ret = InitializeTrackerWrapper(datarate, maxrange); if (ret != 0) { init_error = -1; } }
private void addTrial_Click(object sender, EventArgs e) { string value = ""; if (sessionDisplay.SelectedIndex > -1) { DialogResult result = MainInterface.InputBox("Create New Trial", "Trial Name:", ref value); if (result == DialogResult.OK) { Trial t = new Trial(value, DateTime.Now.ToString("H:mm:ss"), currentStudy, currentSubject, currentSession); database.AddTrial(t); trialDisplay.DataSource = null; trialDisplay.DataSource = database.GetTrials(currentSession); trialDisplay.ClearSelected(); trialDisplay.SetSelected(database.GetTrialIndex(t), true); } } }
private void addNewStudy_Click(object sender, EventArgs e) { string value = ""; DialogResult result = MainInterface.InputBox("New Study", "New study name:", ref value); if (result == DialogResult.OK && value != "") { currentStudy = new Study(value); database.AddStudy(currentStudy); studyDisplay.DataSource = null; studyDisplay.DataSource = database.GetStudies(); studyDisplay.ClearSelected(); Console.WriteLine(database.GetStudies()); studyDisplay.SetSelected(database.GetStudyIndex(currentStudy), true); } else if (result == DialogResult.OK) { MessageBox.Show("Invalid study name."); } }
private void addNewSession_Click(object sender, EventArgs e) { string value = ""; if (subjectDisplay.SelectedIndex > -1) { DialogResult result = MainInterface.InputBox("Create New Session", "Session Name:", ref value); if (result == DialogResult.OK) { Session s = new Session(value, DateTime.Now.ToString("M/d/yyyy"), currentStudy, currentSubject); database.AddSession(s); sessionDisplay.DataSource = null; sessionDisplay.DataSource = database.GetSessions(currentSubject); ((CurrencyManager)sessionDisplay.BindingContext[sessionDisplay.DataSource]).Refresh(); sessionDisplay.ClearSelected(); sessionDisplay.SetSelected(database.GetSessionIndex(s), true); Console.WriteLine(value); } } }
private void addNewSubject_Click(object sender, EventArgs e) { List <string> values = new List <string>(); if (studyDisplay.SelectedIndex > -1) { DialogResult result = MainInterface.InputBox3("New Subject", "New Subject ID:", "New Subject Birthdate:", "New Subject Gender:", ref values); if (result == DialogResult.OK && values.Count > 0) { Subject s = new Subject(values[0], values[1], values[2], currentStudy); database.AddSubject(s); subjectDisplay.DataSource = null; subjectDisplay.DataSource = database.GetSubjects(currentStudy); subjectDisplay.ClearSelected(); subjectDisplay.SetSelected(database.GetSubjectIndex(s), true); } else if (result == DialogResult.OK) { MessageBox.Show("Invalid study name."); } } }