/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void grid_OnGridChanged(DataGrid grid, BlockStateArgs cause) { if (cause.Block.BlockType == BlockType.Delete) // deleted { Modify(Achievement.Identifier.NoDelete, __Increment); } else if (cause.State == BlockState.Placed) // just placed { switch (cause.Block.BlockType) { case BlockType.Normal: Modify(Achievement.Identifier.NoNormal, __Increment); break; case BlockType.Gel: Modify(Achievement.Identifier.NoGel, __Increment); break; case BlockType.LeftRamp: case BlockType.RightRamp: Modify(Achievement.Identifier.NoRamp, __Increment); break; case BlockType.Spring: Modify(Achievement.Identifier.NoSpring, __Increment); break; } } }
/// <summary> /// Method when event fires (a block changed state) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DataGrid_OnStateChanged(BlockStateArgs args) { // Bubble up this.OnGridChanged.Invoke(this, args); }