using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace POSV.Component { public partial class ShopApiConfigSettings : AbstractSettings { public ShopApiConfigSettings() { InitializeComponent(); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (this.DesignMode) return; } private void ButtonOK_Click(object sender, EventArgs e) { var _data = this.shopApiConfigParameter1.Save(); if (_data.Item1) { DialogForm dialog = new DialogForm("参数更新成功", "保存生效", MessageBoxIcon.Information, MessageBoxButtons.OK); dialog.ShowDialog(); } else { this.ShowMessage(this.lblInfo, _data.Item2); } } private void ButtonClose_Click(object sender, EventArgs e) { var parent = this.FindForm(); if (parent != null && parent is SettingsForm) { var settings = parent as SettingsForm; settings.FormClose(); } } } }