Exemplo n.º 1
0
        /// <summary>
        /// 载入事件处理
        /// </summary>
        protected override void OnLoad()
        {
            if (TargetConfig.Key == Guid.Empty)
            {
                TargetConfig.Key = Guid.NewGuid();
            }

            GlobalConfig.AddConfig(TargetConfig);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 属性事件处理
        /// </summary>
        /// <param name="property"></param>
        protected override void OnPropertyChanged(string property)
        {
            switch (property)
            {
            case nameof(ConfigDesignOption.Key):
                GlobalConfig.AddConfig(Option);
                break;

            case nameof(ConfigDesignOption.IsLock):
                GlobalConfig.RemoveConfig(Option);
                break;
            }
        }