📄 container.cs
字号:
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddLT_MM(Double rX, Double rY, RepObj repObj) {
AddLT(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
internal void AddCT(Double rX, Double rY, RepObj repObj) {
AddAligned(rX, RepObj.rAlignCenter, rY, RepObj.rAlignTop, repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddCT_MM(Double rX, Double rY, RepObj repObj) {
AddCT(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
internal void AddCC(Double rX, Double rY, RepObj repObj) {
AddAligned(rX, RepObj.rAlignCenter, rY, RepObj.rAlignCenter, repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddCC_MM(Double rX, Double rY, RepObj repObj) {
AddCC(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
internal void AddCB(Double rX, Double rY, RepObj repObj) {
AddAligned(rX, RepObj.rAlignCenter, rY, RepObj.rAlignBottom, repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddCB_MM(Double rX, Double rY, RepObj repObj) {
AddCB(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
internal void AddRT(Double rX, Double rY, RepObj repObj) {
AddAligned(rX, RepObj.rAlignRight, rY, RepObj.rAlignTop, repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddRT_MM(Double rX, Double rY, RepObj repObj) {
AddRT(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
internal void AddRC(Double rX, Double rY, RepObj repObj) {
AddAligned(rX, RepObj.rAlignRight, rY, RepObj.rAlignCenter, repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Adds a report object to the container and sets the alignment.</summary>
/// <param name="rX">X-coordinate of the report object</param>
/// <param name="rY">Y-coordinate of the report object</param>
/// <param name="repObj">Report object to add to the container</param>
public void AddRC_MM(Double rX, Double rY, RepObj repObj) {
AddRC(RT.rPointFromMM(rX), RT.rPointFromMM(rY), repObj);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Returns an enumerator that can iterate through the report objects.</summary>
/// <returns>An enumerator that can be used to iterate through the report objects</returns>
public IEnumerator GetEnumerator() {
return new RepObjEnumerator(this);
}
//****************************************************************************************************
/// <summary>Enumerator class to iterate through the report objects.</summary>
public class RepObjEnumerator: IEnumerator {
/// <summary>Container</summary>
Container container;
/// <summary>Current report object</summary>
RepObj repObj_Cur;
//----------------------------------------------------------------------------------------------------x
/// <summary>Creates the report object enumerator</summary>
/// <param name="container">The report objects of this container will be enumerated</param>
public RepObjEnumerator(Container container) {
this.container = container;
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Sets the enumerator to its initial position, which is before the first element in the collection.</summary>
public void Reset() {
repObj_Cur = null;
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Advances the enumerator to the next report object of the container.</summary>
/// <returns>true if the enumerator was successfully advanced to the next report object,
/// false if the enumerator has passed the end of the collection.</returns>
public bool MoveNext() {
if (repObj_Cur == null) {
repObj_Cur = container.repObj_First;
}
else {
repObj_Cur = repObj_Cur.repObj_Next;
}
return (repObj_Cur != null);
}
//----------------------------------------------------------------------------------------------------x
/// <summary>Gets the current report object of the container.</summary>
object IEnumerator.Current {
get { return repObj_Cur; }
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -