/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void PasteBox_Click(object sender, EventArgs e) { if (CopyId == -1) { return; } if (Decoration == null) { Decoration = DecorationSet.AddDecoration((int)DecorationIdBox.Value); } Decoration deco = DecorationSet.GetDecoration(CopyId); if (deco == null) { return; } foreach (ViewFieldPosition view in Enum.GetValues(typeof(ViewFieldPosition))) { Decoration.SetTileId(view, deco.GetTileId(view)); Decoration.SetLocation(view, deco.GetLocation(view)); Decoration.SetSwap(view, deco.GetSwap(view)); } Decoration.ForceDisplay = deco.ForceDisplay; Decoration.IsBlocking = deco.IsBlocking; Decoration.HideItems = deco.HideItems; UpdateViewBoxStatus(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TileIdBox_ValueChanged(object sender, System.EventArgs e) { if (Decoration == null) { Decoration = DecorationSet.AddDecoration((int)DecorationIdBox.Value); } Decoration.SetTileId(ViewPositionBox.Position, (int)TileIdBox.Value); // If position is empty (aka X=-999 & y=-999), set it to zero if (Decoration.GetLocation(ViewPositionBox.Position).X < -500 && Decoration.GetLocation(ViewPositionBox.Position).Y < -500) { Decoration.SetLocation(ViewPositionBox.Position, Point.Empty); } UpdateViewBoxStatus(); }