Example #1
0
        /// <summary>
        /// Handler called when a user selects the pin to start context menu option on a category.
        /// </summary>
        /// <param name="sender">The sender of this event.</param>
        /// <param name="e">The event arguments for this event.</param>
        private void OnCategoryPinned(object sender, EventArgs e)
        {
            Category tappedCategory = GetTagAs <Category>(sender);

            if (null != tappedCategory)
            {
                AddTile.AddLiveTile(tappedCategory);
            }
        }
Example #2
0
        /// <summary>
        /// Handler called when a user selects the pin to start context menu option on a feed.
        /// </summary>
        /// <param name="sender">The sender of this event.</param>
        /// <param name="e">The event arguments for this event.</param>
        private void OnFeedPinned(object sender, EventArgs e)
        {
            Feed tappedFeed = GetTagAs <Feed>(sender);

            if (null != tappedFeed)
            {
                AddTile.AddLiveTile(tappedFeed);
            }
        }
Example #3
0
        public void AddTile()
        {
            AddTile addTileForm = new AddTile();

            state = GameState.Frozen;
            addTileForm.ShowDialog();
            if (addTileForm.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                Rectangle colRect = new Rectangle(addTileForm.topLeftCornerX,
                                                  addTileForm.topLeftCornerY,
                                                  addTileForm.bottomRightCornerX - addTileForm.topLeftCornerX,
                                                  addTileForm.bottomRightCornerY - addTileForm.topLeftCornerY);
                int  id      = map.TileManager.Tiles.Count;
                Tile newTile = new Tile(addTileForm.isGround, addTileForm.isSolid, addTileForm.isEmpty, addTileForm.isOneWay, tileSet.Selected, colRect, id);
                map.TileManager.AddTile(newTile);
            }
            state = GameState.Active;
        }