void CreateRuleImage(KeyValuePair<PropertyEditor, RuleType> keyValuePair, TableEx tableEx) {
     var tableCell = tableEx.Rows[0].Cells[0];
     var image = new System.Web.UI.WebControls.Image();
     var imageName = keyValuePair.Value.ToString();
     ImageInfo imageInfo = ImageLoader.Instance.GetImageInfo(imageName);
     image.AlternateText = imageName;
     image.ImageUrl = imageInfo.ImageUrl;
     image.Width = imageInfo.Width;
     image.Height = imageInfo.Height;
     image.ToolTip = keyValuePair.Key.ErrorMessage;
     image.Style["margin"] = "5px";
     tableCell.Controls.Clear();
     tableCell.Controls.Add(image);
 }
Beispiel #2
0
        void CreateItemLayoutTable(int itemCount)
        {
            float w = (itemWidth + itemMargin.left + itemMargin.right) * colItemCount;

            rowItemCount = itemCount / colItemCount;

            int m = itemCount % colItemCount;

            if (m > 0)
            {
                rowItemCount--;
            }
            float contentHeight = rowItemCount * (itemHeight + itemMargin.top + itemMargin.bottom);

            ////
            itemLayoutTable = new TableEx(rowItemCount, colItemCount);
            itemLayoutTable.SetTablePosition(0, 0);
            itemLayoutTable.SetTableSize(w, contentHeight);

            itemLayoutTable.ReLayout();
        }
Beispiel #3
0
        void CreateViewLayoutTable(int itemCount)
        {
            float w = (itemWidth + itemMargin.left + itemMargin.right) * colItemCount;

            rowItemCount = itemCount / colItemCount;

            int m = itemCount % colItemCount;

            if (m > 0)
            {
                rowItemCount--;
            }
            float contentHeight = rowItemCount * (itemHeight + itemMargin.top + itemMargin.bottom);
            float viewHeight    = headerHeight + contentViewHeight;

            viewLayoutTable = new TableEx(2, 1);
            viewLayoutTable.SetTablePosition(0, 0);
            viewLayoutTable.SetTableSize(w, viewHeight);

            TableLine tableLine = new TableLine(LineDir.HORIZONTAL);

            tableLine.lineComputeMode = LineComputeMode.ABSOLUTE;

            tableLine.computeParam = headerHeight;
            viewLayoutTable.SetLineArea(0, tableLine);

            tableLine.computeParam = contentViewHeight;
            viewLayoutTable.SetLineArea(1, tableLine);

            //
            itemContentLayoutTable = headerLayoutTable = new TableEx(0, headerNames.Count());
            itemContentLayoutTable.SetTableSize(w, headerHeight);
            viewLayoutTable.AddCellChildTable(0, 0, headerLayoutTable);


            //
            SetTableData();

            viewLayoutTable.ReLayout();
        }
Beispiel #4
0
 /// <summary>
 /// 校验并返回与数据源一致的条件查询语句
 /// (例如table的数据源是mdb,条件查询语句为 BH like '440101%',则返回结果为 BH like '440101*')
 /// </summary>
 /// <param name="featureClass">执行条件查询的要素类</param>
 /// <param name="whereClause">需要校验的条件查询语句</param>
 public static string ValidateWhereClause(this IFeatureClass featureClass, string whereClause) =>
 TableEx.ValidateWhereClause(featureClass as ITable, whereClause);
Beispiel #5
0
 /// <summary>
 /// 校验并返回与数据源一致的条件查询语句
 /// <para>例如eType == <see cref="EWorkspaceType.Access"/>,条件查询语句为 BH like '440101%',则返回结果为 BH like '440101*'</para>
 /// </summary>
 /// <param name="eType">数据源类型</param>
 /// <param name="whereClause">需要校验的条件查询语句</param>
 public static string ValidateWhereClause(EWorkspaceType eType, string whereClause) =>
 TableEx.ValidateWhereClause(eType, whereClause);
Beispiel #6
0
        void CreateRuleImage(KeyValuePair <PropertyEditor, Validation.RuleType.RuleType> keyValuePair, TableEx tableEx)
        {
            var       tableCell = tableEx.Rows[0].Cells[0];
            var       image     = new System.Web.UI.WebControls.Image();
            var       imageName = keyValuePair.Value.ToString();
            ImageInfo imageInfo = ImageLoader.Instance.GetImageInfo(imageName);

            image.AlternateText   = imageName;
            image.ImageUrl        = imageInfo.ImageUrl;
            image.Width           = imageInfo.Width;
            image.Height          = imageInfo.Height;
            image.ToolTip         = keyValuePair.Key.ErrorMessage;
            image.Style["margin"] = "5px";
            tableCell.Controls.Clear();
            tableCell.Controls.Add(image);
        }
Beispiel #7
0
 /// <summary>
 /// 校验并返回与数据源一致的条件查询语句
 /// <para>例如eType == <see cref="EWorkspaceType.Access"/>,条件查询语句为 BH like '440101%',则返回结果为 BH like '440101*'</para>
 /// </summary>
 /// <param name="eType">数据源类型</param>
 /// <param name="whereClause">需要校验的条件查询语句</param>
 public static string ValidateWhereClause(EWorkspaceType eType, string whereClause)
 {
     return(TableEx.ValidateWhereClause(eType, whereClause));
 }