Ejemplo n.º 1
0
        private void chooseBtn_Click(object sender, EventArgs e)
        {
            var d = new ChooseSlotDialog(MainForm, false);

            d.FocusedPad  = Controller.Index;
            d.ShowAllPads = false;
            d.ShowDialog(this.ParentForm);

            if (d.DialogResult == DialogResult.OK)
            {
                if (d.SelectedNode == null)
                {
                    return;
                }

                var tag = d.SelectedNode.Tag;

                if (tag is ChooseSlotDialog.SlotNodeTag)
                {
                    var slot = (tag as ChooseSlotDialog.SlotNodeTag).slot.Clone();
                    slot.ButtonGesture = ButtonGesture;
                    SetInput(slot);
                }
            }
        }
Ejemplo n.º 2
0
        private void chooseBtn_Click(object sender, EventArgs e)
        {
            var d = new ChooseSlotDialog(MainForm, false);
            d.FocusedPad = Controller.Index;
            d.ShowAllPads = false;
            d.ShowDialog(this.ParentForm);

            if (d.DialogResult == DialogResult.OK) {
                if (d.SelectedNode == null) return;

                var tag = d.SelectedNode.Tag;

                if (tag is ChooseSlotDialog.SlotNodeTag) {
                    var slot = (tag as ChooseSlotDialog.SlotNodeTag).slot.Clone();
                    slot.ButtonGesture = ButtonGesture;
                    SetInput(slot);
                }
            }
        }