private void therapeuticButton_Click(object sender, EventArgs e) { var myForm = new Therapeutic(); myForm.Show(); myForm.data = new ProfileData("New Profile"); myForm.SetupForm(); this.DialogResult = DialogResult.OK; this.Hide(); }
private void loadButton_Click(object sender, EventArgs e) { string mode = GetModeFromCSV(); if (mode == "Therapeutic") { var myForm = new Therapeutic(); myForm.Show(); ProfileData profileData = new ProfileData(profileName, FileUtil.GetTherapeuticProfileData(profileName)); myForm.data = profileData; myForm.SetupForm(); this.Hide(); } else if (mode == "FES") { var myForm = new FES(); string[] freeRunParams = FileUtil.GetFESProfileData(profileName); if (freeRunParams != null) { ProfileData profileData = new ProfileData(profileName, freeRunParams[0], freeRunParams[1]); myForm.data = profileData; myForm.SetupForm(); myForm.Show(); this.Hide(); } } else if (mode == "FreeRun") { var myForm = new FreeRun(); ProfileData profileData = new ProfileData(profileName, FileUtil.GetFreeRunProfileData(profileName)); myForm.data = profileData; myForm.SetupForm(); myForm.Show(); this.Hide(); } this.DialogResult = DialogResult.OK; }