internal DictionaryRootExtended(DictionaryRoot dic)
        {
            Dictionary = dic ?? throw new ArgumentNullException(nameof(dic));

            controller      = controllerInfo.GetValue(dic);
            appProxy        = appProxyInfo.GetValue(controller);
            dispatch        = (IAppDispatch)appDispatchInfo.GetValue(appProxy);
            setParamHandler = (SetParamHandler)setParaHandlerInfo.CreateDelegate(typeof(SetParamHandler), appProxy);
        }
        public static Guid Add(short productId, string formName, string menuText, string acceleratorKey)
        {
            Guid           eventTag = Guid.NewGuid();
            DictionaryRoot root     = new DictionaryRoot(productId, false);

            root.Forms[formName].AddMenuHandler((sender, e) => FireEvent((DictionaryForm)sender, eventTag), menuText, acceleratorKey);

            return(eventTag);
        }
コード例 #3
0
        public static DictionaryRoot Get(int productId, bool isFormsDictionary)
        {
            if (isFormsDictionary)
            {
                if (!fCache.ContainsKey(productId))
                {
                    fCache[productId] = new DictionaryRoot(productId, isFormsDictionary);
                }

                return(fCache[productId]);
            }
            else
            {
                if (!mCache.ContainsKey(productId))
                {
                    mCache[productId] = new DictionaryRoot(productId, isFormsDictionary);
                }

                return(mCache[productId]);
            }
        }
コード例 #4
0
        public static DictionaryRootExtended Extended(this DictionaryRoot dic)
        {
            if (dic.IsFormsDictionary)
            {
                if (!fCache.ContainsKey(dic.ProductId))
                {
                    fCache[dic.ProductId] = new DictionaryRootExtended(dic);
                }

                return(fCache[dic.ProductId]);
            }
            else
            {
                if (!mCache.ContainsKey(dic.ProductId))
                {
                    mCache[dic.ProductId] = new DictionaryRootExtended(dic);
                }

                return(mCache[dic.ProductId]);
            }
        }