本文整理汇总了C#中Ict.Petra.Shared.MReporting.TParameterList.MoveColumn方法的典型用法代码示例。如果您正苦于以下问题:C# TParameterList.MoveColumn方法的具体用法?C# TParameterList.MoveColumn怎么用?C# TParameterList.MoveColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ict.Petra.Shared.MReporting.TParameterList
的用法示例。
在下文中一共展示了TParameterList.MoveColumn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddColumn
/// <summary>
/// Adds a new column to the column parameter list at the specified index.
/// </summary>
/// <param name="AColumnParameters">List with the current columns</param>
/// <param name="AColumnIndex">Index where the new column is added</param>
/// <returns>the MaxDisplayColumns number</returns>
public static System.Int32 AddColumn(ref TParameterList AColumnParameters, int AColumnIndex)
{
System.Int32 NewColumn;
System.Int32 NewMaxColumn;
System.Int32 Counter;
if (AColumnIndex == -1)
{
NewMaxColumn = AColumnParameters.Get("MaxDisplayColumns").ToInt();
NewColumn = NewMaxColumn;
AColumnParameters.Add("MaxDisplayColumns", NewColumn + 1);
}
else
{
NewColumn = AColumnIndex + 1;
NewMaxColumn = AColumnParameters.Get("MaxDisplayColumns").ToInt() + 1;
AColumnParameters.Add("MaxDisplayColumns", NewMaxColumn);
/* need to move the columns to the right */
for (Counter = NewMaxColumn - 1; Counter >= NewColumn + 1; Counter -= 1)
{
AColumnParameters.MoveColumn(Counter - 1, Counter);
}
}
return NewColumn;
}
示例2: RemoveColumn
/// <summary>
/// Remove one colum from the parameter list.
/// </summary>
/// <param name="AColumnParameters">List with the current columns</param>
/// <param name="AColumnIndex">Index of the column to remove</param>
/// <returns>the MaxDisplayColumns number</returns>
public static System.Int32 RemoveColumn(ref TParameterList AColumnParameters, int AColumnIndex)
{
AColumnParameters.RemoveColumn(AColumnIndex);
/* need to move the following columns to the left */
System.Int32 MaxColumn = AColumnParameters.Get("MaxDisplayColumns").ToInt() - 1;
for (int Counter = AColumnIndex + 1; Counter <= MaxColumn; Counter += 1)
{
AColumnParameters.MoveColumn(Counter, Counter - 1);
}
AColumnParameters.Add("MaxDisplayColumns", MaxColumn);
return MaxColumn;
}