Exemplo n.º 1
0
        protected void Done()
        {
            Rectangle rectScaled   = ScaleRectSelection();
            Rectangle rectUnScaled = new Rectangle(_rectSelection.X, _rectSelection.Y, _rectSelection.Width, _rectSelection.Height);

            //NULL-Bedingungsoperator https://msdn.microsoft.com/de-de/library/dn986595.aspx
            AreaSelected?.Invoke(this, new RectangleEventArgs(rectScaled, rectUnScaled, _myScreen));
        }
Exemplo n.º 2
0
 private void OnAreaSelected(EventArgs e)
 {
     //  AreaSelected?.Invoke(this, e);
     if (AreaSelected != null)
     {
         AreaSelected.Invoke(this, e);
     }
 }
Exemplo n.º 3
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     if (!_snippingMode)
     {
         return;
     }
     _snippingMode = false;
     if (_rect.Width < 4 || _rect.Height < 4)
     {
         return;
     }
     _rect.X += Location.X;
     _rect.Y += Location.Y;
     AreaSelected?.Invoke(_rect);
 }
 private void OnAreaSelected(EventArgs e)
 {
     AreaSelected?.Invoke(this, e);
 }
Exemplo n.º 5
0
 // Checks which selected items have changed and raises the corresponding events.
 // [wip] Order the statements according to call hierarchy?
 private void RaiseChangeEvents(ActiveItems a)
 {
     if (a.ActiveTileSet != ActiveTileSet || a.ActiveBackground != ActiveBackground)
     {
         LoadBackground();
     }
     if (a.ActiveTileSet != ActiveTileSet)
     {
         LoadRoomTiles(TileSetIndex);
         TileSetSelected?.Invoke(this, null);
     }
     if (a.ActiveScrollColor != ActiveScrollColor)
     {
         ScrollColorSelected?.Invoke(this, null);
     }
     if (a.ActiveEnemyType != ActiveEnemyType)
     {
         EnemyTypeSelected(this, null);
     }
     if (a.ActiveEnemyGfx != ActiveEnemyGfx)
     {
         EnemyGfxSelected?.Invoke(this, null);
     }
     if (a.ActiveEnemy != ActiveEnemy)
     {
         EnemySelected?.Invoke(this, null);
     }
     if (a.ActivePlmType != ActivePlmType)
     {
         PlmTypeSelected?.Invoke(this, null);
     }
     if (a.ActivePlm != ActivePlm)
     {
         PlmSelected?.Invoke(this, null);
     }
     if (a.ActiveDoor != ActiveDoor)
     {
         DoorSelected?.Invoke(this, null);
     }
     if (a.ActiveRoomState != ActiveRoomState)
     {
         RoomStateSelected?.Invoke(this, null);
         LevelDataSelected?.Invoke(this, null);
         PlmListChanged?.Invoke(this, new ListLoadEventArgs(PlmIndex));
         EnemyListChanged?.Invoke(this, new ListLoadEventArgs(EnemyIndex));
         EnemyGfxListChanged?.Invoke(this, new ListLoadEventArgs(EnemyGfxIndex));
         ScrollDataListChanged?.Invoke(this, new ListLoadEventArgs(ScrollDataIndex));
     }
     else if (a.ActiveLevelData != ActiveLevelData)
     {
         LevelDataSelected.Invoke(this, null);
     }
     if (a.ActiveRoom != ActiveRoom)
     {
         RoomSelected?.Invoke(this, null);
         RoomStateListChanged?.Invoke(this, new ListLoadEventArgs(RoomStateIndex));
         DoorListChanged?.Invoke(this, new ListLoadEventArgs(DoorIndex));
     }
     if (a.ActiveArea != AreaIndex)
     {
         AreaSelected?.Invoke(this, null);
         RoomListChanged?.Invoke(this, new ListLoadEventArgs(RoomIndex));
     }
     if (a.ActiveScrollData != ActiveScrollData)
     {
         ScrollDataSelected?.Invoke(this, null);
         var e = new LevelDataEventArgs()
         {
             AllScreens = true
         };
         LevelDataModified?.Invoke(this, e);
     }
     if (a.ActiveFx != ActiveFx)
     {
         FxSelected?.Invoke(this, null);
         FxDataListChanged?.Invoke(this, new ListLoadEventArgs(FxDataIndex));
     }
     if (a.ActiveFxData != ActiveFxData)
     {
         FxDataSelected?.Invoke(this, null);
     }
 }
Exemplo n.º 6
0
 private void OnAreaSelected(EventArgs e)
 {
     AreaSelected?.Invoke(this, e);
     MessageBox.Show("Copied to clipboard...");
 }
Exemplo n.º 7
0
 private void DrawingFormOverlay_MouseUp(object sender, MouseEventArgs e)
 {
     isDown = false;
     AreaSelected?.Invoke(this, new AreaSelectedEventArgs(Screen.FromControl(this), rect));
 }