Пример #1
0
 /// <summary>
 /// Initialzies an instance of the class
 /// </summary>
 public Animation()
 {
     _parser = new Parser();
     Screen = String.Empty;
     Iterations = "1";
     OnEnterExecutionNotDone = false;
     AnimationWidgetList = new List<AnimationWidget>();
     OnBack = new PCode();
     OnEnd = new PCode();
     OnSelect = new PCode();
     OnEnter = new PCode();
     SteppingTime = CoreGlobals.AppPreferences.SteppingTime;
     HesitateTime = CoreGlobals.AppPreferences.HesitateTime;
     CoreGlobals.AppPreferences.EvtPreferencesChanged += AppPreferences_EvtPreferencesChanged;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public Scripts()
 {
     _parser = new Parser();
 }
Пример #3
0
 /// <summary>
 /// Initializes the animation widget object
 /// </summary>
 public AnimationWidget()
 {
     _parser = new Parser();
     OnSelect = new PCode();
     OnBack = new PCode();
     OnHighlightOn = new PCode();
     OnHighlightOff = new PCode();
     OnMouseClick = new PCode();
     HesitateTime = CoreGlobals.AppPreferences.HesitateTime;
     CoreGlobals.AppPreferences.EvtPreferencesChanged += AppPreferences_EvtPreferencesChanged;
 }
Пример #4
0
        /// <summary>
        /// Load settings from the XML node, extract the attributes
        /// and set the values of members in this object
        /// </summary>
        /// <param name="node">The xml node</param>
        private void load(XmlNode node)
        {
            Name = XmlUtils.GetXMLAttrString(node, "name");
            Label = XmlUtils.GetXMLAttrString(node, "label");
            Value = XmlUtils.GetXMLAttrString(node, "value");
            FontSize = XmlUtils.GetXMLAttrInt(node, "fontsize", FontSize);
            FontName = XmlUtils.GetXMLAttrString(node, "fontname", FontName);
            FontBold = XmlUtils.GetXMLAttrBool(node, "bold", FontBold);
            IsVirtualKey = XmlUtils.GetXMLAttrBool(node, "virtualkey", false);
            ToolTip = XmlUtils.GetXMLAttrString(node, "toolTip", String.Empty);
            MouseClickActuate = XmlUtils.GetXMLAttrBool(node, "mouseClickActuate", true);
            String onMouseClick = XmlUtils.GetXMLAttrString(node, "onMouseClick");
            if (!String.IsNullOrEmpty(onMouseClick))
            {
                var parser = new Parser();
                parser.Parse(onMouseClick, ref OnMouseClick);
            }

            parseModifiers(XmlUtils.GetXMLAttrString(node, "modifiers"));

            String align = XmlUtils.GetXMLAttrString(node, "align");

            Alignment = Enum.IsDefined(typeof(ContentAlignment), align) ?
                                (ContentAlignment)Enum.Parse(typeof(ContentAlignment), align) :
                                (ContentAlignment?)null;
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public SwitchElement()
 {
     OnTrigger = null;
     SwitchName = String.Empty;
     _parser = new Parser();
 }