示例#1
0
        private static void DataProvider_ItemChanged(NetSettings.Data.ItemChangedArgs changedArgs)
        {
            ItemChangedEventArgs args;

            args.key   = changedArgs.Key;
            args.value = changedArgs.Val != null?changedArgs.Val.ToString().ToLower() : "";

            args.mode = changedArgs.ChangedMode;
            args.type = changedArgs.type;
            OnItemChanged(args);
        }
示例#2
0
        public void SetValue(ItemChangedArgs aArgs)
        {
            string name     = aArgs.Key;
            object valueNew = aArgs.Val;

            object valueCurrent;

            fDataBinding.TryGetValue(name, out valueCurrent);

            if (!Object.Equals(valueNew, valueCurrent) || aArgs.ChangedMode == ItemChangedMode.UserConfirmed)
            {
                fDataBinding[name] = valueNew;
                ItemChanged(aArgs);
                UpdateViews(aArgs.sender);
            }
        }