public void Save() { if (!Valid) { return; } IContractEditor edit = Editor as IContractEditor; edit.Save(); IResultGetter result = Editor as IResultGetter; XmlElement authElement = result.GetAuthElement(); XmlHelper h = new XmlHelper("<Definition/>"); h.AddElement(".", authElement); try { Contract.SetDefinition(h.GetElement("."), _owner); MessageBox.Show("儲存完畢!", "成功", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("儲存失敗!" + ex.Message, "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void Save() { IContractEditor edit = this.Editor as IContractEditor; edit.Save(); if (SaveCompleted != null) { SaveCompleted.Invoke(this, EventArgs.Empty); } }
public override void Save() { IContractEditor edit = this.Editor as IContractEditor; edit.Save(); }