Exemple #1
0
        /*
         *      public string Description {
         *              get {
         *                      return _parent.GetHost().PreferenceSupplier.GetDescription(this);
         *              }
         *      }
         */

        protected PreferenceValidationResult GetSharedValidationResult()
        {
            PreferenceValidationResult r = _parent.GetHost().SharedValidationResult;

            r.Reset();
            return(r);
        }
Exemple #2
0
        public void Import(IPreferenceFolder newvalues)
        {
            if (this.FullQualifiedId != newvalues.FullQualifiedId)
            {
                throw new InvalidOperationException("ID mismatch");
            }

            PreferenceValidationResult r = GetHost().SharedValidationResult;

            r.Reset();

            GetSupplier().ValidateFolder(newvalues, r);
            if (!r.Validated)
            {
                GetHost().ValidationError(this, r);
            }
            else
            {
                //fire listener
                //このあたりの仕様いまいちだな。Folderの階層とイベントの関係を明らかにしておきたい
                if (_listenerList != null)
                {
                    foreach (IPreferenceChangeListener l in _listenerList)
                    {
                        l.OnPreferenceImport(this, newvalues);
                    }
                }

                ImportSnapshot(newvalues as PreferenceFolder);
            }
        }