public static void Resize(FlagPosition flagPosition, TPoint offset , Controls controls) { foreach (ControlBase control in controls) { Rect controlRect = control.Rect; if ((flagPosition & FlagPosition.Left) == FlagPosition.Left) { controlRect.Left = controlRect.Left + offset.X; } else if ((flagPosition & FlagPosition.Right) == FlagPosition.Right) { controlRect.Right = controlRect.Right + offset.X; } if ((flagPosition & FlagPosition.Top) == FlagPosition.Top) { controlRect.Top = controlRect.Top + offset.Y; } else if ((flagPosition & FlagPosition.Bottom) == FlagPosition.Bottom) { controlRect.Bottom = controlRect.Bottom + offset.Y; } control.Rect = controlRect; } }
public ResizeControlState(Controls controls, StateManager stateManager, CommandManager commandManager, FlagPosition flagPosition) { m_flagPosition = flagPosition; m_controls = controls; m_stateManager = stateManager; m_commandManager = commandManager; }
public override int GetHashCode() { int hash = 1; if (EntityId != 0UL) { hash ^= EntityId.GetHashCode(); } if (FlagPosition != false) { hash ^= FlagPosition.GetHashCode(); } if (X != 0D) { hash ^= X.GetHashCode(); } if (Y != 0D) { hash ^= Y.GetHashCode(); } if (Z != 0D) { hash ^= Z.GetHashCode(); } if (FlagRotation != false) { hash ^= FlagRotation.GetHashCode(); } if (Yaw != 0F) { hash ^= Yaw.GetHashCode(); } if (Pitch != 0F) { hash ^= Pitch.GetHashCode(); } if (FlagMeta != false) { hash ^= FlagMeta.GetHashCode(); } if (meta_ != null) { hash ^= Meta.GetHashCode(); } return(hash); }
public ResizeControl(Controls controls, FlagPosition flagPosition, TPoint offset) { m_controls.Set(controls.Get()); m_flagPosition = flagPosition; m_offset = offset; }
public AnchorInfo(Rect rect, FlagPosition flag) { this.rect = rect; this.flag = flag; }
public AnchorInfo(int x, int y, FlagPosition flag) { rect = new Rect(new TPoint(x, y), Define.AnchorSize, Define.AnchorSize); this.flag = flag; }