/// <summary> 将整个模型导出到 xml 文档 </summary> private void tsm_SaveAs_Click(object sender, EventArgs e) { StringBuilder errorMessage = new StringBuilder(); if (_model.Validate(ref errorMessage)) { string filePath = sdUtils.ChooseSaveStationModel("导出车站模型"); if (filePath != null) { ModelForm.SetModelFilePath(this, filePath); ModelForm.SaveModel(); } } else { MessageBox.Show("当前模型不符合导出规范 \n\r" + errorMessage, "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); } }
private void tsm_Save_Click(object sender, EventArgs e) { ModelForm.SaveModel(); }