Esempio n. 1
0
        public void ConfigureButtons(OptionPane.Buttons buttonStyle)
        {
            buttonContainer.Clear();
            buttonContainer.ColumnConstraints.Clear();

            CreateButtonFor(buttonStyle, OptionPane.Buttons.Ok, Common.OK);
            CreateButtonFor(buttonStyle, OptionPane.Buttons.Yes, Common.Yes);
            CreateButtonFor(buttonStyle, OptionPane.Buttons.No, Common.No);
            CreateButtonFor(buttonStyle, OptionPane.Buttons.Cancel, Common.Cancel);
        }
Esempio n. 2
0
        void CreateButtonFor(OptionPane.Buttons flags, OptionPane.Buttons bs, string text)
        {
            if (!flags.HasFlag(bs))
            {
                return;
            }

            var b = new Button(UIStyle);

            b.Content.Label.Text = text;
            b.ActionPerformed   += (s, o) => actionPerformedSupport.Raise(this, new OptionPaneActionArgs(bs));
            buttonContainer.ColumnConstraints.Add(LengthConstraint.Auto);
            buttonContainer.Add(b, new Point(buttonContainer.Count, 0));
        }
Esempio n. 3
0
 public OptionPaneActionArgs(OptionPane.Buttons button)
 {
     this.Button = button;
 }