Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SuperLabel"/> class.
        /// </summary>
        public SuperLabel()
        {
#if DYNAMIC_ASMS
            _slbl = DynLoader.CreateC1SuperLabel();
#else
            _slbl = new C1.Win.C1SuperTooltip.C1SuperLabel();
#endif
            //
            PictureAlign = PictureAlignEnum.Clip;
        }
Example #2
0
        /// <summary>
        /// Returns the specified static C1Maps class.
        /// </summary>
        /// <param name="fieldName">The class name.</param>
        /// <returns>The class.</returns>
        public static object CallC1MapsStaticMethod(string className, string methodName, params object[] args)
        {
            Type t = DynLoader.GetC1MapsType(className);

            Type[] types;
            if (args != null)
            {
                types = new Type[args.Length];
                for (int i = 0; i < args.Length; ++i)
                {
                    types[i] = args[i].GetType(); // NOTE: this won't work if one of the arguments is null
                }
            }
            else
            {
                types = null;
            }
            MethodInfo mi = t.GetMethod(methodName, BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.Public, null, types, null);

            return(mi.Invoke(null, args));
        }
Example #3
0
        /// <summary>
        /// Returns the value of a specified public static field of the C1Maps class.
        /// </summary>
        /// <param name="fieldName">The field name.</param>
        /// <returns>The field's value.</returns>
        public static object GetC1MapsStaticFieldValue(string fieldName)
        {
            var t = DynLoader.GetC1MapsType("C1Maps");

            return(t.GetField(fieldName, BindingFlags.Static | BindingFlags.Public).GetValue(null));
        }