コード例 #1
0
        private void AddPromoteButton(int id, Func <Image> getImage, Point location)
        {
            PromoteButton promote = new PromoteButton(id);

            promote.Image    = getImage();
            promote.Location = location;
            this.Controls.Add(promote);
            promote.Click += new EventHandler(promote_Click);
        }
コード例 #2
0
        protected void promote_Click(object sender, EventArgs e)
        {
            PromoteButton panel = (PromoteButton)sender;

            boardController.Promote(Id, panel.Id);
        }