예제 #1
0
        /// <summary>
        /// Commands the specified command struct.
        /// </summary>
        /// <param name="CommandStruct">The command struct.</param>
        /// <returns>Returns result of event operation.</returns>
        public override object OnCommand(ref REXCommand CommandStruct)
        {
            //Step 7.1.: Data exchange
            Dictionary <string, object> dictionary = CommandStruct.CommandObject as Dictionary <string, object>;

            if (dictionary != null)
            {
                try
                {
                    Data.H            = Convert.ToDouble(dictionary["H"]);
                    Data.B            = Convert.ToDouble(dictionary["B"]);
                    Data.FamilySymbol = dictionary["FamilySymbol"].ToString();
                    ExtensionRef.OnRun();
                    return(true);
                }
                catch
                {
                    return(false);
                }
            }
            else
            {
                return(base.OnCommand(ref CommandStruct));
            }
        }
예제 #2
0
        /// <summary>
        /// Runs process calculations or other operations.
        /// </summary>
        public override void OnRun()
        {
            //Step 4.9.: Extension class
            base.OnRun();

            if (ExtensionRef != null)
            {
                ExtensionRef.OnRun();
            }
        }
예제 #3
0
        /// <summary>
        /// Runs process calculations or other operations.
        /// </summary>
        public override void OnRun()
        {
            base.OnRun();

            // insert code here.

            if (ExtensionRef != null)
            {
                ExtensionRef.OnRun();
            }
        }