예제 #1
0
        private void OnAddButtonClick(object sender, EventArgs args)
        {
            var input  = new StringInput();
            var dialog = new ValueDialog <StringInput>("Player name: ", input);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                friendManager.Add(input.Text);
            }
        }
예제 #2
0
        public override void Edit(GoGame game, byte x, byte y)
        {
            var input  = new StringInput();
            var dialog = new ValueDialog <StringInput>("Label: ", input);

            if (dialog.ShowDialog() == DialogResult.OK && input.Text != string.Empty)
            {
                ClearMarkup(game, x, y);
                var node = game.CurrentNode;
                node.EnsureMarkup();
                node.Markup.Labels.Add(new TextLabel(x, y, input.Text));
            }
        }