示例#1
0
            public override Dictionary <string, object> ToDictionary()
            {
                Dictionary <string, object> toReturn;

                if (eventProperties == null)
                {
                    toReturn = new Dictionary <string, object>();
                }
                else
                {
                    toReturn = eventProperties.ToDictionary();
                }

                toReturn["type"] = "pointerMove";
                if (this.duration != TimeSpan.MinValue)
                {
                    toReturn["duration"] = Convert.ToInt64(this.duration.TotalMilliseconds);
                }

                if (this.target != null)
                {
                    toReturn["origin"] = this.ConvertElement();
                }
                else
                {
                    toReturn["origin"] = this.origin.ToString().ToLowerInvariant();
                }

                toReturn["x"] = this.x;
                toReturn["y"] = this.y;

                return(toReturn);
            }
示例#2
0
            public override Dictionary <string, object> ToDictionary()
            {
                Dictionary <string, object> toReturn;

                if (eventProperties == null)
                {
                    toReturn = new Dictionary <string, object>();
                }
                else
                {
                    toReturn = eventProperties.ToDictionary();
                }
                toReturn["type"]   = "pointerDown";
                toReturn["button"] = Convert.ToInt32(this.button, CultureInfo.InvariantCulture);

                return(toReturn);
            }