private string NewLabel(int suffix) { StringBuilder buffer = new StringBuilder(); buffer.Append(LabelPrefix); if (!(LabelPrefix != null && LabelPrefix.Length == 0) && !LabelPrefix.EndsWith(Separator)) { buffer.Append(Separator); } buffer.Append(CurrentIteration()); buffer.Append(Separator); buffer.Append(suffix); return(buffer.ToString()); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Color != null) { hashCode = hashCode * 59 + Color.GetHashCode(); } if (Smoothing != null) { hashCode = hashCode * 59 + Smoothing.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (AutoTypeNumbers != null) { hashCode = hashCode * 59 + AutoTypeNumbers.GetHashCode(); } if (AutoRange != null) { hashCode = hashCode * 59 + AutoRange.GetHashCode(); } if (RangeMode != null) { hashCode = hashCode * 59 + RangeMode.GetHashCode(); } if (Range != null) { hashCode = hashCode * 59 + Range.GetHashCode(); } if (FixedRange != null) { hashCode = hashCode * 59 + FixedRange.GetHashCode(); } if (CheaterType != null) { hashCode = hashCode * 59 + CheaterType.GetHashCode(); } if (TickMode != null) { hashCode = hashCode * 59 + TickMode.GetHashCode(); } if (NTicks != null) { hashCode = hashCode * 59 + NTicks.GetHashCode(); } if (TickVals != null) { hashCode = hashCode * 59 + TickVals.GetHashCode(); } if (TickText != null) { hashCode = hashCode * 59 + TickText.GetHashCode(); } if (ShowTickLabels != null) { hashCode = hashCode * 59 + ShowTickLabels.GetHashCode(); } if (TickFont != null) { hashCode = hashCode * 59 + TickFont.GetHashCode(); } if (TickAngle != null) { hashCode = hashCode * 59 + TickAngle.GetHashCode(); } if (TickPrefix != null) { hashCode = hashCode * 59 + TickPrefix.GetHashCode(); } if (ShowTickPrefix != null) { hashCode = hashCode * 59 + ShowTickPrefix.GetHashCode(); } if (TickSuffix != null) { hashCode = hashCode * 59 + TickSuffix.GetHashCode(); } if (ShowTickSuffix != null) { hashCode = hashCode * 59 + ShowTickSuffix.GetHashCode(); } if (ShowExponent != null) { hashCode = hashCode * 59 + ShowExponent.GetHashCode(); } if (ExponentFormat != null) { hashCode = hashCode * 59 + ExponentFormat.GetHashCode(); } if (MinExponent != null) { hashCode = hashCode * 59 + MinExponent.GetHashCode(); } if (SeparateThousands != null) { hashCode = hashCode * 59 + SeparateThousands.GetHashCode(); } if (TickFormat != null) { hashCode = hashCode * 59 + TickFormat.GetHashCode(); } if (TickFormatStops != null) { hashCode = hashCode * 59 + TickFormatStops.GetHashCode(); } if (CategoryOrder != null) { hashCode = hashCode * 59 + CategoryOrder.GetHashCode(); } if (CategoryArray != null) { hashCode = hashCode * 59 + CategoryArray.GetHashCode(); } if (LabelPadding != null) { hashCode = hashCode * 59 + LabelPadding.GetHashCode(); } if (LabelPrefix != null) { hashCode = hashCode * 59 + LabelPrefix.GetHashCode(); } if (LabelSuffix != null) { hashCode = hashCode * 59 + LabelSuffix.GetHashCode(); } if (ShowLine != null) { hashCode = hashCode * 59 + ShowLine.GetHashCode(); } if (LineColor != null) { hashCode = hashCode * 59 + LineColor.GetHashCode(); } if (LineWidth != null) { hashCode = hashCode * 59 + LineWidth.GetHashCode(); } if (GridColor != null) { hashCode = hashCode * 59 + GridColor.GetHashCode(); } if (GridWidth != null) { hashCode = hashCode * 59 + GridWidth.GetHashCode(); } if (ShowGrid != null) { hashCode = hashCode * 59 + ShowGrid.GetHashCode(); } if (MinorGridCount != null) { hashCode = hashCode * 59 + MinorGridCount.GetHashCode(); } if (MinorGridWidth != null) { hashCode = hashCode * 59 + MinorGridWidth.GetHashCode(); } if (MinorGridColor != null) { hashCode = hashCode * 59 + MinorGridColor.GetHashCode(); } if (StartLine != null) { hashCode = hashCode * 59 + StartLine.GetHashCode(); } if (StartLineColor != null) { hashCode = hashCode * 59 + StartLineColor.GetHashCode(); } if (StartLineWidth != null) { hashCode = hashCode * 59 + StartLineWidth.GetHashCode(); } if (EndLine != null) { hashCode = hashCode * 59 + EndLine.GetHashCode(); } if (EndlineWidth != null) { hashCode = hashCode * 59 + EndlineWidth.GetHashCode(); } if (EndlineColor != null) { hashCode = hashCode * 59 + EndlineColor.GetHashCode(); } if (Tick0 != null) { hashCode = hashCode * 59 + Tick0.GetHashCode(); } if (DTick != null) { hashCode = hashCode * 59 + DTick.GetHashCode(); } if (ArrayTick0 != null) { hashCode = hashCode * 59 + ArrayTick0.GetHashCode(); } if (ArrayDTick != null) { hashCode = hashCode * 59 + ArrayDTick.GetHashCode(); } if (TickValsSrc != null) { hashCode = hashCode * 59 + TickValsSrc.GetHashCode(); } if (TickTextSrc != null) { hashCode = hashCode * 59 + TickTextSrc.GetHashCode(); } if (CategoryArraySrc != null) { hashCode = hashCode * 59 + CategoryArraySrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] AAxis other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Color == other.Color || Color != null && Color.Equals(other.Color) ) && ( Smoothing == other.Smoothing || Smoothing != null && Smoothing.Equals(other.Smoothing) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( AutoTypeNumbers == other.AutoTypeNumbers || AutoTypeNumbers != null && AutoTypeNumbers.Equals(other.AutoTypeNumbers) ) && ( AutoRange == other.AutoRange || AutoRange != null && AutoRange.Equals(other.AutoRange) ) && ( RangeMode == other.RangeMode || RangeMode != null && RangeMode.Equals(other.RangeMode) ) && ( Equals(Range, other.Range) || Range != null && other.Range != null && Range.SequenceEqual(other.Range) ) && ( FixedRange == other.FixedRange || FixedRange != null && FixedRange.Equals(other.FixedRange) ) && ( CheaterType == other.CheaterType || CheaterType != null && CheaterType.Equals(other.CheaterType) ) && ( TickMode == other.TickMode || TickMode != null && TickMode.Equals(other.TickMode) ) && ( NTicks == other.NTicks || NTicks != null && NTicks.Equals(other.NTicks) ) && ( Equals(TickVals, other.TickVals) || TickVals != null && other.TickVals != null && TickVals.SequenceEqual(other.TickVals) ) && ( Equals(TickText, other.TickText) || TickText != null && other.TickText != null && TickText.SequenceEqual(other.TickText) ) && ( ShowTickLabels == other.ShowTickLabels || ShowTickLabels != null && ShowTickLabels.Equals(other.ShowTickLabels) ) && ( TickFont == other.TickFont || TickFont != null && TickFont.Equals(other.TickFont) ) && ( TickAngle == other.TickAngle || TickAngle != null && TickAngle.Equals(other.TickAngle) ) && ( TickPrefix == other.TickPrefix || TickPrefix != null && TickPrefix.Equals(other.TickPrefix) ) && ( ShowTickPrefix == other.ShowTickPrefix || ShowTickPrefix != null && ShowTickPrefix.Equals(other.ShowTickPrefix) ) && ( TickSuffix == other.TickSuffix || TickSuffix != null && TickSuffix.Equals(other.TickSuffix) ) && ( ShowTickSuffix == other.ShowTickSuffix || ShowTickSuffix != null && ShowTickSuffix.Equals(other.ShowTickSuffix) ) && ( ShowExponent == other.ShowExponent || ShowExponent != null && ShowExponent.Equals(other.ShowExponent) ) && ( ExponentFormat == other.ExponentFormat || ExponentFormat != null && ExponentFormat.Equals(other.ExponentFormat) ) && ( MinExponent == other.MinExponent || MinExponent != null && MinExponent.Equals(other.MinExponent) ) && ( SeparateThousands == other.SeparateThousands || SeparateThousands != null && SeparateThousands.Equals(other.SeparateThousands) ) && ( TickFormat == other.TickFormat || TickFormat != null && TickFormat.Equals(other.TickFormat) ) && ( Equals(TickFormatStops, other.TickFormatStops) || TickFormatStops != null && other.TickFormatStops != null && TickFormatStops.SequenceEqual(other.TickFormatStops) ) && ( CategoryOrder == other.CategoryOrder || CategoryOrder != null && CategoryOrder.Equals(other.CategoryOrder) ) && ( Equals(CategoryArray, other.CategoryArray) || CategoryArray != null && other.CategoryArray != null && CategoryArray.SequenceEqual(other.CategoryArray) ) && ( LabelPadding == other.LabelPadding || LabelPadding != null && LabelPadding.Equals(other.LabelPadding) ) && ( LabelPrefix == other.LabelPrefix || LabelPrefix != null && LabelPrefix.Equals(other.LabelPrefix) ) && ( LabelSuffix == other.LabelSuffix || LabelSuffix != null && LabelSuffix.Equals(other.LabelSuffix) ) && ( ShowLine == other.ShowLine || ShowLine != null && ShowLine.Equals(other.ShowLine) ) && ( LineColor == other.LineColor || LineColor != null && LineColor.Equals(other.LineColor) ) && ( LineWidth == other.LineWidth || LineWidth != null && LineWidth.Equals(other.LineWidth) ) && ( GridColor == other.GridColor || GridColor != null && GridColor.Equals(other.GridColor) ) && ( GridWidth == other.GridWidth || GridWidth != null && GridWidth.Equals(other.GridWidth) ) && ( ShowGrid == other.ShowGrid || ShowGrid != null && ShowGrid.Equals(other.ShowGrid) ) && ( MinorGridCount == other.MinorGridCount || MinorGridCount != null && MinorGridCount.Equals(other.MinorGridCount) ) && ( MinorGridWidth == other.MinorGridWidth || MinorGridWidth != null && MinorGridWidth.Equals(other.MinorGridWidth) ) && ( MinorGridColor == other.MinorGridColor || MinorGridColor != null && MinorGridColor.Equals(other.MinorGridColor) ) && ( StartLine == other.StartLine || StartLine != null && StartLine.Equals(other.StartLine) ) && ( StartLineColor == other.StartLineColor || StartLineColor != null && StartLineColor.Equals(other.StartLineColor) ) && ( StartLineWidth == other.StartLineWidth || StartLineWidth != null && StartLineWidth.Equals(other.StartLineWidth) ) && ( EndLine == other.EndLine || EndLine != null && EndLine.Equals(other.EndLine) ) && ( EndlineWidth == other.EndlineWidth || EndlineWidth != null && EndlineWidth.Equals(other.EndlineWidth) ) && ( EndlineColor == other.EndlineColor || EndlineColor != null && EndlineColor.Equals(other.EndlineColor) ) && ( Tick0 == other.Tick0 || Tick0 != null && Tick0.Equals(other.Tick0) ) && ( DTick == other.DTick || DTick != null && DTick.Equals(other.DTick) ) && ( ArrayTick0 == other.ArrayTick0 || ArrayTick0 != null && ArrayTick0.Equals(other.ArrayTick0) ) && ( ArrayDTick == other.ArrayDTick || ArrayDTick != null && ArrayDTick.Equals(other.ArrayDTick) ) && ( TickValsSrc == other.TickValsSrc || TickValsSrc != null && TickValsSrc.Equals(other.TickValsSrc) ) && ( TickTextSrc == other.TickTextSrc || TickTextSrc != null && TickTextSrc.Equals(other.TickTextSrc) ) && ( CategoryArraySrc == other.CategoryArraySrc || CategoryArraySrc != null && CategoryArraySrc.Equals(other.CategoryArraySrc) )); }
public string CreatePage() { LabelPrefix = LabelPrefix.ToLower(); var table = $"<table id=\"{LabelPrefix}dg\" width=\"100%\" height=\"360\"></table>\r\n"; var toolbar = $"<div id=\"{LabelPrefix}tb\" style=\"padding:2px 5px;\">\r\n" + //$"\t//<input type=\"checkbox\" id=\"ck{LabelPrefix}\" onclick=\"initHd()\" />\r\n" + //$"\t//<label for=\"ck{LabelPrefix}\">只显示无法匹配的信息</label>\r\n" + SearchString() + $"\t<a href=\"javascript:$('#{LabelPrefix}dg').datagrid().reload;\" class=\"easyui-linkbutton\" iconCls=\"icon-search\">查询</a>\r\n" + $"\t<a href=\"#\" class=\"easyui-linkbutton\" iconCls=\"icon-edit\" onclick=\"edit{CamelLabel}()\">操作</a>\r\n" + $"\t<a href=\"#\" class=\"easyui-linkbutton\" iconCls=\"icon-remove\" onclick=\"delete{CamelLabel}()\">删除</a>\r\n" + "\t<br />\r\n" + //"\t<label style=\"color:red\">*注:双击数据行可触发操作功能</label>\r\n" + "</div>\r\n"; var panel = "<div class=\"easyui-panel\" fit=\"true\" title=\"操作\" style=\"padding:10px;\">\r\n" + $"\t<form id=\"{LabelPrefix}fm\" method=\"post\">\r\n" + "\t\t<div style=\"margin:10px;\">\r\n" + SetValueString() + "\t\t</div>\r\n" + "\t\t<div style=\"margin:10px;display:none\">\r\n" + "\t\t\t@*<div style=\"margin:10px\">*@\r\n" + "\t\t\t<input name=\"Id\" label=\"系统编号:\" class=\"easyui-textbox\" editable=\"false\" style=\"width:49%\" />\r\n" + "\t\t</div>\r\n" + $"\t\t<a href=\"#\" onclick=\"submit{CamelLabel}()\" class=\"easyui-linkbutton\" style=\"width:99%\" iconCls=\"icon-ok\">提交</a>\r\n" + "\t</form>\r\n" + "</div>\r\n"; var script = "@section scripts{\r\n" + "\t<script>\r\n" + "\t\t$(function () {\r\n" + $"\t\t\tinit{CamelLabel}();\r\n" + "\t\t})\r\n" + $"\t\tfunction init{CamelLabel}() {{\r\n" + $"\t\t\t$('#{LabelPrefix}dg').datagrid({{\r\n" + "\t\t\t\trownumbers: true,\r\n" + "\t\t\t\tstriped: true,\r\n" + $"\t\t\t\ttoolbar: '#{LabelPrefix}tb',\r\n" + "\t\t\t\tfitColumns: true,\r\n" + "\t\t\t\tpagination: true,\r\n" + "\t\t\t\tsingleSelect: true,\r\n" + "\t\t\t\tpageSize: 10,\r\n" + "\t\t\t\tloader: function (param, success, error) {\r\n" + $"\t\t\t\t\t//param.Flag = document.getElementById('ck{LabelPrefix}').checked;\r\n" + "\t\t\t\t\t//param.Hdlx = $('#Chd').val();\r\n" + JsSearchString() + $"\t\t\t\t\t$.post(\"/{ControllerName}/Get{CamelLabel}Data\", param, function (data) {{\r\n" + "\t\t\t\t\t\tsuccess(data);\r\n" + "\t\t\t\t\t});\r\n" + "\t\t\t\t},\r\n" + "\t\t\t\tcolumns: [[\r\n" + "\t\t\t\t\t{ field: 'Id', title: '系统编号', hidden: true },\r\n" + ColumnString() + "\t\t\t\t]],\r\n" + "\t\t\t\tonDblClickRow: function (index, row) {\r\n" + $"\t\t\t\t\tedit{CamelLabel}();\r\n" + "\t\t\t\t}\r\n" + "\t\t\t});\r\n" + "\t\t}\r\n" + $"\t\tfunction edit{CamelLabel}() {{\r\n" + $"\t\t\tvar row = $('#{LabelPrefix}dg').datagrid('getSelected');\r\n" + "\t\t\tif (row) {\r\n" + $"\t\t\t\t$('#{LabelPrefix}fm').form('load', row);\r\n" + "\t\t\t}\r\n" + "\t\t}\r\n" + $"\t\tfunction delete{CamelLabel}() {{\r\n" + $"\t\t\tvar row = $('#{LabelPrefix}dg').datagrid('getSelected');\r\n" + "\t\t\tif (row && row.Id != null) {\r\n" + "\t\t\t\tswal({ title: \"确定要删除?\", icon: \"warning\", buttons: [\"取消\", \"确定\"], })\r\n" + "\t\t\t\t\t.then((willDelete) => {\r\n" + "\t\t\t\t\t\tif (willDelete) {\r\n" + $"\t\t\t\t\t\t\t$.post(\"/{ControllerName}/{CamelLabel}Delete\", {{ Id: row.Id }}, function (data) {{\r\n" + "\t\t\t\t\t\t\t\tif (data.success) {\r\n" + "\t\t\t\t\t\t\t\t\tswal(\"信息\", \"删除成功\", \"success\");\r\n" + $"\t\t\t\t\t\t\t\t\t$('#{LabelPrefix}dg').datagrid('reload');\r\n" + "\t\t\t\t\t\t\t\t} else {\r\n" + "\t\t\t\t\t\t\t\t\tswal(\"信息\", data.errorMsg, \"error\");\r\n" + "\t\t\t\t\t\t\t\t}\r\n" + "\t\t\t\t\t\t\t});\r\n" + "\t\t\t\t\t\t}\r\n" + "\t\t\t\t\t});\r\n" + "\t\t\t} else {\r\n" + "\t\t\t\tswal(\"信息\", \"请选择有系统编号的数据\", \"error\");\r\n" + "\t\t\t}\r\n" + "\t\t}\r\n" + $"\t\tfunction submit{CamelLabel}() {{\r\n" + $"\t\t\t$('#{LabelPrefix}fm').form('submit', {{\r\n" + $"\t\t\t\turl: '/{ControllerName}/{CamelLabel}Change',\r\n" + "\t\t\t\tonSubmit: function (param) {\r\n" + "\t\t\t\t\treturn $(this).form('validate');\r\n" + "\t\t\t\t},\r\n" + "\t\t\t\tsuccess: function (result) {\r\n" + "\t\t\t\t\tvar result = eval('(' + result + ')');\r\n" + "\t\t\t\t\tif (result.success) {\r\n" + "\t\t\t\t\t\tswal(\"信息\", \"提交成功\", \"success\");\r\n" + $"\t\t\t\t\t\t$('#{LabelPrefix}fm').form('clear');\r\n" + $"\t\t\t\t\t\t$('#{LabelPrefix}dg').datagrid('reload');\r\n" + "\t\t\t\t\t} else {\r\n" + "\t\t\t\t\t\tswal(\"信息\", result.errorMsg, \"error\");\r\n" + "\t\t\t\t\t}\r\n" + "\t\t\t\t}\r\n" + "\t\t\t});\r\n" + "\t\t}\r\n" + "\t</script>\r\n" + "}"; return($"{table}{toolbar}{panel}{script}"); }