/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Start != null) { hashCode = hashCode * 59 + Start.GetHashCode(); } if (End != null) { hashCode = hashCode * 59 + End.GetHashCode(); } if (Size != null) { hashCode = hashCode * 59 + Size.GetHashCode(); } if (Coloring != null) { hashCode = hashCode * 59 + Coloring.GetHashCode(); } if (ShowLines != null) { hashCode = hashCode * 59 + ShowLines.GetHashCode(); } if (ShowLabels != null) { hashCode = hashCode * 59 + ShowLabels.GetHashCode(); } if (LabelFont != null) { hashCode = hashCode * 59 + LabelFont.GetHashCode(); } if (LabelFormat != null) { hashCode = hashCode * 59 + LabelFormat.GetHashCode(); } if (Operation != null) { hashCode = hashCode * 59 + Operation.GetHashCode(); } if (Value != null) { hashCode = hashCode * 59 + Value.GetHashCode(); } return(hashCode); } }
public void OnDrawGizmos() { if (portals == null) { InitPortals(); } if (lines == null) { lines = GetComponent <ShowLines>(); } lines.Show(portals); }
public void OnDrawGizmos() { if (keyAndDoor == null) { InitKeyAndDoor(); } if (lines == null) { lines = GetComponent <ShowLines>(); } lines.Show(keyAndDoor); }
public bool Equals([AllowNull] Contours other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Start == other.Start && Start != null && other.Start != null && Start.Equals(other.Start)) && (End == other.End && End != null && other.End != null && End.Equals(other.End)) && (Size == other.Size && Size != null && other.Size != null && Size.Equals(other.Size)) && (Coloring == other.Coloring && Coloring != null && other.Coloring != null && Coloring.Equals(other.Coloring)) && (ShowLines == other.ShowLines && ShowLines != null && other.ShowLines != null && ShowLines.Equals(other.ShowLines)) && (ShowLabels == other.ShowLabels && ShowLabels != null && other.ShowLabels != null && ShowLabels.Equals(other.ShowLabels)) && (LabelFont == other.LabelFont && LabelFont != null && other.LabelFont != null && LabelFont.Equals(other.LabelFont)) && (LabelFormat == other.LabelFormat && LabelFormat != null && other.LabelFormat != null && LabelFormat.Equals(other.LabelFormat)) && (Operation == other.Operation && Operation != null && other.Operation != null && Operation.Equals(other.Operation)) && (Value == other.Value && Value != null && other.Value != null && Value.Equals(other.Value))); }
void InitLines() { lines = GetComponent <ShowLines>(); }
protected override void RenderContents(HtmlTextWriter output) { StringBuilder tree = new StringBuilder(string.Empty); var getControlID = "function getControlID(queryString) {" + " queryString = queryString.substring(queryString.indexOf('?'));" + " queryString = queryString.substring(queryString.indexOf('c=') + 2);" + " var nextParamIndex = queryString.indexOf('&');" + " if (nextParamIndex != -1)" + " queryString = queryString.substring(0, nextParamIndex);"+ " return queryString;" + "}"; string pattern = @"<script type=""text/javascript""> var {2}={{ AddItem:function(data){{ var selected = $('#{1}').tree('getSelected'); var targetNode = null; if(selected) targetNode = selected.target; $('#{1}').tree('append', {{ parent: targetNode, data: data }}); }}, GetSelectedNode:function(){{ var selected = $('#{1}').tree('getSelected'); var targetNode = null; if(selected) targetNode = selected; return targetNode; }}, GetChildren:function(target){{ return $('#{1}').tree('getChildren',target); }}, Update:function(node){{ $('#{1}').tree('beginEdit',node.target); }}, GetParent:function(){{ var selected = $('#{1}').tree('getSelected'); var targetNode = null; if(selected) targetNode = selected.target; var parentNode= $('#{1}').tree('getParent',targetNode); if(!parentNode) return targetNode; else return parentNode; }}, FindNode:function(id){{ var node = $('#{1}').tree('find', id); if(node) return $('#{1}').tree('select', node.target); else return null; }}, Reload:function(){{ $('#{1}').tree('reload',null); }}, GetChecked:function(){{ return $('#{1}').tree('getChecked') }}, LoadData:function(data){{ return $('#{1}').tree('loadData',data); }} }} {0} $(document).ready(function (){{ var queryString = $('#{1}').parents('form:first').attr('action'); $('#{1}').tree({{ url:'DataGridHandler.aspx/GetTreeNode', method:'get', animate:true, checkbox:{3}, lines:{4}, queryParams:{{id:'\'\'',cID:'\'{2}\'',c:""'""+getControlID(queryString)+""'"",srch:'\'\''}}, {5} onClick: function(node){{ {6} }}, onAfterEdit:function(node){{ {7} }}, formatter:function(node){{ {8} }}, onBeforeLoad:function(node,param){{ {9} }}, onLoadSuccess:function(node,data){{ {10} }}, onExpand:function(node){{ {11} }}, onBeforeExpand:function(node){{ {12} }} }}); }}); </script> <ul id='{2}' class='easyui-tree'></ul>" ; tree.AppendFormat(pattern, getControlID, //0 this.ClientID, //1 this.ID, //2 ShowCheckBox.ToString().ToLower(), //3 ShowLines.ToString().ToLower(), //4 GetContextMenu(), //5 OnClick, //6 OnAfterEdit, //7 GetNodeFormatter(), //8 BeforeLoad, //9 SuccessLoad, //10 Expand, //11 BeforeExpand //12 ); output.Write(tree.ToString()); }