示例#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);
                }
            }
        }
示例#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);
                }
            }
        }