Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        public void Save()
        {
            IContractEditor edit = this.Editor as IContractEditor;

            edit.Save();

            if (SaveCompleted != null)
            {
                SaveCompleted.Invoke(this, EventArgs.Empty);
            }
        }
Esempio n. 3
0
        public override void Save()
        {
            IContractEditor edit = this.Editor as IContractEditor;

            edit.Save();
        }