protected MsofbtClientAnchorRecord GenerateClientAnchorRecord() { MsofbtClientAnchorRecord rec = new MsofbtClientAnchorRecord(); this.SetLeftPosition(rec); this.SetRightPosition(rec); this.SetBottomPosition(rec); this.SetTopPosition(rec); return(rec); }
private void SetTopPosition(MsofbtClientAnchorRecord rec) { int columnWidthOrRowHeight = 17; int num2 = 0; int top = this.top; while (top > columnWidthOrRowHeight) { top -= columnWidthOrRowHeight; num2++; } rec.TopColumnIndex = num2; rec.TopOffset = this.ConvertPixelsToOffsetValue(columnWidthOrRowHeight, top, false); }
private void SetRightPosition(MsofbtClientAnchorRecord rec) { int columnWidthOrRowHeight = 64; int num2 = 0; int right = this.right; while (right > columnWidthOrRowHeight) { right -= columnWidthOrRowHeight; num2++; } rec.RightColumnIndex = num2; rec.RightOffset = this.ConvertPixelsToOffsetValue(columnWidthOrRowHeight, right, true); }
private void SetLeftPosition(MsofbtClientAnchorRecord rec) { int columnWidthOrRowHeight = 64; int num2 = 0; int left = this.left; while (left > columnWidthOrRowHeight) { left -= columnWidthOrRowHeight; num2++; } rec.LeftColumnIndex = num2; rec.LeftOffset = this.ConvertPixelsToOffsetValue(columnWidthOrRowHeight, left, true); }
private void SetBottomPosition(MsofbtClientAnchorRecord rec) { int columnWidthOrRowHeight = 17; int num2 = 0; int bottom = this.bottom; while (bottom > columnWidthOrRowHeight) { bottom -= columnWidthOrRowHeight; num2++; } rec.BottomColumnIndex = num2; rec.BottomOffset = this.ConvertPixelsToOffsetValue(columnWidthOrRowHeight, bottom, false); }