Beispiel #1
0
            public override void PrepareSearch()
            {
                instance = this;

                Search(typeof(TRootKeyword));
                Search(typeof(TRootMetaword));
            }
Beispiel #2
0
        ///---------------------------------------------------------------------
        #region IGlobalManager integration
        //public override void OnInitialize()
        //{
        //    base.OnInitialize();

        //    var type = flagDatas.maskType;
        //    if (type == null || !type.IsEnum)
        //    {
        //        //todo DaemonRegistry.Instance.Unregister(GetType());
        //        return;
        //    }

        //    //var values = (ulong[])Enum.GetValues(type);
        //    //var default_mask = new Helpers.Mask256();
        //    //if (values.Length < Helpers.Mask256.MAX_SIZE)
        //    //{
        //    //    Registry.Instance.Unregister(GetType());
        //    //    return;
        //    //}

        //    //this.values = values;
        //    //names = Enum.GetNames(type);
        //    //mask = Editors.Prefs.Get(String.Format("{0}_{1}", GetType().Name, type.Name), default_mask);
        //    //parents = new int[values.Length];
        //    //for (int i = 0; i < parents.Length; i++)
        //    //{
        //    //    parents[i] = -1;
        //    //}
        //}
        #endregion IGlobalManager integration

        ///---------------------------------------------------------------------
        private void Init()
        {
            if (worker == null)
            {
                return;
            }

            worker = FlagsForagerWorker.Instance;

            foreach (var flag in worker.flags)
            {
                flagStatuses.Add(flag, new FlagStatus(flag, true));
                activeFlags.Add(flag);
            }

            foreach (var overlay in worker.overlays)
            {
                flagStatuses.Add(overlay, new FlagStatus(overlay, false));
            }

            foreach (var flagStatus in flagStatuses.Values)
            {
                flagStatus.Build(flagStatuses);
            }
        }