protected bool Equals(HtmlElementData other) { return string.Equals (ID, other.ID) && Equals (Attributes, other.Attributes); }
private bool IsDroppable(HtmlElementData element) { var result = false; string value; if (element != null && element.Attributes.TryGetValue (DroppableAttributeName, out value)) Boolean.TryParse (value, out result); return result && GetMouseEffect (element) != 0; }
public void SetUp() { _dragAndDropEvent = new DragAndDropEvent (new ResourceManager()); var attributesDictionary = new Dictionary<string, string> { { DragAndDropEvent.DropConditionAttributeName, "1" }, { DragAndDropEvent.DroppableAttributeName, "true" } }; _droppableElementData = new HtmlElementData ("unique-id", attributesDictionary); _nonDroppableElementData = new HtmlElementData ("unique-id2", new Dictionary<string, string>()); }
private int GetMouseEffect(HtmlElementData element) { string value; var result = 0; if (element != null && element.Attributes.TryGetValue (DropConditionAttributeName, out value)) Int32.TryParse (value, out result); return result % c_dragdropEffectCount; }