public SettingFrm(Form owner) { this.Owner = owner; InitializeComponent(); InitUser(); SettingDict.Add(nudSearchTimeSpan, new KeyValuePair <string, string>(YUConst.CONFIG_SEARCH_TIMESPAN, "SearchTimeSpan")); SettingDict.Add(cbIsMiniWhenClose, new KeyValuePair <string, string>(YUConst.CONFIG_ISMINIWHENCLOSE, "IsMiniWhenClose")); SettingDict.Add(cbIsSyncTiming, new KeyValuePair <string, string>(YUConst.CONFIG_SYNC_AUTO, "IsSyncTiming")); SettingDict.Add(cbIsEnablePostFileName, new KeyValuePair <string, string>(YUConst.CONFIG_ENABLEPOSTFILENAME, "IsEnablePostFileName")); SettingDict.Add(cbAutoSign, new KeyValuePair <string, string>(YUConst.CONFIG_SIGN_AUTO, "IsAutoSign")); SettingDict.Add(dtpSignTime, new KeyValuePair <string, string>(YUConst.CONFIG_SIGN_TIME, "SignTime")); FormUtils.BindControlValue(Global.Config, SettingDict.Select(x => new KeyValuePair <Control, string>(x.Key, x.Value.Value))); FormUtils.BindControlDataChanged(SettingDict.Select(x => x.Key), Control_DataChanged); dtpSignTime.ValueChanged += OnSignChanged; cbAutoSign.CheckedChanged += OnSignChanged; cbIsSyncTiming.CheckedChanged += OnSyncChanged; }