private void SelectReading_FormClosed(object sender, FormClosedEventArgs e) { //this.Hide(); var readingPage = new ReadingPage(selectedProject, selectedReading); readingPage.Show(); }
public SelectReading(Project project, ReadingPage caller) { InitializeComponent(); this.Show(); selectedProject = project; selectedReading = caller.reading; readings = project.readings; callingForm = caller; initializeReadingListBox(); }
private void openReadingButton_Click(object sender, EventArgs e) { if (selectedProject == null) { System.Windows.Forms.MessageBox.Show("No Reading Selected!"); } else { this.Hide(); var readingPage = new ReadingPage(selectedProject, selectedReading); readingPage.Show(); } }
private void openButton_Click(object sender, EventArgs e) { currentReading.text = readingText.Text; if (currentReading.readingId < 0) { currentProject.readings.Add(currentReading); } var readingPage = new ReadingPage(currentProject, currentReading); DatabaseInterface.updateProject(currentProject); this.Hide(); readingPage.Show(); }
private void nxtButton_Click(object sender, EventArgs e) { updateReadingObject(); if (selectedReading.readingId > 0) { ReadingPage nextPage = new ReadingPage(selectedProject, selectedReading); this.Hide(); nextPage.Show(); } else { var nextPage = new ReadingTextPage(selectedReading.title, selectedReading, this); this.Hide(); nextPage.Show(); } }
private void openNewReadingPage(Boolean isNew) { //var nextPage = new ProjectSummary(); if (isNew == true) { var nextPage = new ReadingInfo(currentProject, null, isNew); //this.Hide(); nextPage.Show(); this.WindowState = FormWindowState.Minimized; } else { selectedReading = (Reading)readingsList.SelectedItem; var nextPage = new ReadingPage(currentProject, selectedReading); //this.Hide(); //this.WindowState = FormWindowState.Minimized; //nextPage.Show(); //nextPage.WindowState = FormWindowState.Normal; nextPage.Show(); this.WindowState = FormWindowState.Minimized; } }