Example #1
0
        internal void CheckChanging(SWinKeyInfo inKeyInfo, ILogPrinter inLogger)
        {
            CWindowTypeDescr type_descr = _window_type_descrs.GetDescr(WindowType);

            List <NamedId> unusing_params = new List <NamedId>(_params.Keys);

            foreach (SWindowParamDescr param_descr in type_descr)
            {
                if (param_descr == SWindowParamDescr.Name)
                {
                    CheckParam(param_descr, new string[] { inKeyInfo.Name });
                    unusing_params.Remove(param_descr.Id);
                }
                else
                {
                    bool     must_be = type_descr.IsMustBe(param_descr.Id);
                    string[] a       = Utils.TryGetParamsByNameFromSubKey(param_descr.Id.Name, inKeyInfo.WinKey, inLogger, must_be, CBaseParam.GetParamCount(param_descr.ParamType));
                    if (a != null)
                    {
                        CheckParam(param_descr, a);
                        unusing_params.Remove(param_descr.Id);
                    }
                }
            }

            unusing_params.ForEach(id =>
            {
                _params.Remove(id);

                SWindowParamDescr?pd = type_descr.GetWindowParamDescr(id);

                if (pd.HasValue)
                {
                    CBaseParam def_val = CBaseParam.CreateParam(pd.Value.ParamType, null);
                    OnWindowChange(pd.Value, def_val);
                }
            });

            IKey childs_key = inKeyInfo.WinKey.FindChildByName("Childs", StringComparison.InvariantCultureIgnoreCase);

            if (childs_key != null)
            {
                Build(childs_key, inLogger);
            }
        }
Example #2
0
 public void AddType(CWindowTypeDescr inTypeDescr)
 {
     _types.Add(inTypeDescr);
 }
Example #3
0
 public bool Equals(CWindowTypeDescr other)
 {
     return(Id == other.Id);
 }