private void openMnuItem_Click(object sender, EventArgs e) { FunctionlUtility.SaveProject(RiverSimulationProfile.profile); if (!FunctionlUtility.OpenProjectFile(this, Program.GetProjectFileFullPath())) { return; } UpdateStatus(); }
private void saveMnuItem_Click(object sender, EventArgs e) { FunctionlUtility.SaveProject(RiverSimulationProfile.profile); MessageBox.Show("檔案儲存完成。", "提醒", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void exitMnuItem_Click(object sender, EventArgs e) { FunctionlUtility.SaveProject(RiverSimulationProfile.profile); this.Close(); }
private void RiverSimulationForm_FormClosed(object sender, FormClosedEventArgs e) { FunctionlUtility.SaveProject(RiverSimulationProfile.profile); }
private void startBtn_Click(object sender, EventArgs e) { if (status == Status.Ready) { if (!DoConvert()) { return; } if (p != null) { //string tempSave = Program.projectFolder + Program.tempSaveName; //RiverSimulationProfile.SerializeBinary(p, tempSave); FunctionlUtility.SaveProject(p); } p.GenerateInputFile(Program.GetProjectFileWorkingPath() + @"/resed.i"); if (p.IsMovableBedMode()) { p.GenerateSedFile(Program.GetProjectFileWorkingPath() + @"/sed.dat"); } if (p.Is3DMode()) { p.Generate3dFile(Program.GetProjectFileWorkingPath() + @"/3Dinput.dat"); } if (p.groundsillWorkSet) { p.GenerateStructureFile(p.groundsillWorkSets, Program.GetProjectFileWorkingPath() + @"/3.txt"); } if (p.sedimentationWeirSet) { p.GenerateStructureFile(p.sedimentationWeirSets, Program.GetProjectFileWorkingPath() + @"/4.txt"); } if (p.IsMovableBedMode() && p.quayStableAnalysisFunction) { p.GenerateQuayWallFile(Program.GetProjectFileWorkingPath() + @"/BANKINFO.txt"); } ResetChart(); RunSimulationMain(); EnterSimUI(Status.Running); } else if (status == Status.Running) { if (!simProcess.HasExited) { Utility.Suspend(simProcess); } //timer1.Stop(); EnterSimUI(Status.Pause); } else if (status == Status.Pause) { if (!simProcess.HasExited) { Utility.Resume(simProcess); } EnterSimUI(Status.Running); } }