//Instance public ScreenPointToAnchoredPosition(Camera cam, Canvas canvas, RectTransform baseRect, Vector2 rectOffset, OffsetDirection offsetDirection) { this.cam = cam; this.canvas = canvas; this.baseRect = baseRect; this.rectOffset = rectOffset; this.offsetDirection = offsetDirection; }
// Метод сдвига элементов массива на 1 позицию private void Offset(OffsetDirection direction) { for (int i = 0; i < data.Length - 1; i++) { if (direction == OffsetDirection.Right) { data[data.Length - 1 - i] = data[data.Length - 2 - i]; } else { data[i] = data[i + 1]; } } }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(Material != null ? Material.ToStepValue() : "$"); parameters.Add(LayerThickness != null ? LayerThickness.ToStepValue() : "$"); parameters.Add(IsVentilated != null ? IsVentilated.ToStepValue() : "$"); parameters.Add(Name != null ? Name.ToStepValue() : "$"); parameters.Add(Description != null ? Description.ToStepValue() : "$"); parameters.Add(Category != null ? Category.ToStepValue() : "$"); parameters.Add(Priority != null ? Priority.ToStepValue() : "$"); parameters.Add(OffsetDirection.ToStepValue()); parameters.Add(OffsetValues != null ? OffsetValues.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
public void EmitSingleDataTransfer(ConditionCode conditionCode, Indexing indexing, OffsetDirection offsetDirection, TransferSize transferSize, WriteBack writeBack, TransferType transferType, int firstRegister, int destinationRegister, ShiftType secondShiftType, int secondRegister) { Debug.Assert(destinationRegister <= 0xF); Debug.Assert(firstRegister <= 0xF); Debug.Assert(secondRegister <= 0xF); uint value = 0; value |= (uint)(GetConditionCode(conditionCode) << 28); value |= (uint)(1 << 26); value |= (uint)(1 << 25); value |= (uint)((indexing == Indexing.Post ? 0 : 1) << 24); value |= (uint)((transferSize == TransferSize.Word ? 0 : 1) << 23); value |= (uint)((offsetDirection == OffsetDirection.Down ? 0 : 1) << 22); value |= (uint)((writeBack == WriteBack.NoWriteBack ? 0 : 1) << 21); value |= (uint)((transferType == TransferType.Store ? 0 : 1) << 20); value |= (uint)(destinationRegister << 12); value |= (uint)(firstRegister << 16); value |= (uint)(GetShiftTypeCode(secondShiftType) << 4); value |= (uint)secondRegister; Write(value); }
public static uint EmitSingleDataTransfer(ConditionCode conditionCode, Indexing indexing, OffsetDirection offsetDirection, TransferSize transferSize, WriteBack writeBack, TransferType transferType, int firstRegister, int destinationRegister, ShiftType secondShiftType, int secondRegister) { Debug.Assert(destinationRegister <= 0xF); Debug.Assert(firstRegister <= 0xF); Debug.Assert(secondRegister <= 0xF); uint value = 0; value |= (uint)(GetConditionCode(conditionCode) << 28); value |= 1 << 26; value |= 1 << 25; value |= (uint)((indexing == Indexing.Post ? 0 : 1) << 24); value |= (uint)((transferSize == TransferSize.Word ? 0 : 1) << 23); value |= (uint)((offsetDirection == OffsetDirection.Down ? 0 : 1) << 22); value |= (uint)((writeBack == WriteBack.NoWriteBack ? 0 : 1) << 21); value |= (uint)((transferType == TransferType.Store ? 0 : 1) << 20); value |= (uint)(destinationRegister << 12); value |= (uint)(firstRegister << 16); value |= (uint)(GetShiftTypeCode(secondShiftType) << 4); value |= (uint)secondRegister; return(value); }
public void EmitSingleDataTransfer(ConditionCode conditionCode, Indexing indexing, OffsetDirection offsetDirection, TransferSize transferSize, WriteBack writeBack, TransferType transferType, int firstRegister, int destinationRegister, uint immediate) { Debug.Assert(destinationRegister <= 0xF); Debug.Assert(firstRegister <= 0xF); Debug.Assert(immediate <= 0xFFF); uint value = 0; value |= (uint)(GetConditionCode(conditionCode) << 28); value |= (uint)(1 << 26); value |= (uint)(1 << 25); value |= (uint)((indexing == Indexing.Post ? 0 : 1) << 24); value |= (uint)((transferSize == TransferSize.Word ? 0 : 1) << 23); value |= (uint)((offsetDirection == OffsetDirection.Down ? 0 : 1) << 22); value |= (uint)((writeBack == WriteBack.NoWriteBack ? 0 : 1) << 21); value |= (uint)((transferType == TransferType.Store ? 0 : 1) << 20); value |= (uint)(destinationRegister << 12); value |= (uint)(firstRegister << 16); value |= (uint)immediate; Write(value); }
private static bool IsSelectedCellsOnBoundaryOfWorksheet(Excel.Application application, Excel.Range selection, OffsetDirection direction) { foreach (Excel.Range subArea in selection.Areas) { if (direction == OffsetDirection.Left && subArea.Column == 1) { return(true); } if (direction == OffsetDirection.Right && subArea.Column + subArea.Columns.Count - 1 == application.Columns.Count) { return(true); } if (direction == OffsetDirection.Up && subArea.Row == 1) { return(true); } if (direction == OffsetDirection.Down && subArea.Row + subArea.Rows.Count - 1 == application.Rows.Count) { return(true); } } return(false); }