public MappingDlg()
        {
            InitializeComponent();

            //Add the types that are valid for input to the input combo.
            foreach(MssMsgType msgType in MssMsgRangeEntryMetadata.VALID_INPUT_TYPES)
            {
                this.inTypeCombo.Items.Add(MssMsg.MssMsgTypeNames[(int)msgType]);
            }

            this.learnMode = LearnMode.Off;
            this.lastMsgReceived = null;
        }
        public MappingDlg()
        {
            InitializeComponent();

            //Add the types that are valid for input to the input combo.
            foreach (MssMsgType msgType in MssMsgRangeEntryMetadata.VALID_INPUT_TYPES)
            {
                this.inTypeCombo.Items.Add(MssMsg.MssMsgTypeNames[(int)msgType]);
            }

            this.learnMode       = LearnMode.Off;
            this.lastMsgReceived = null;
        }
        private void outLearnBtn_Click(object sender, EventArgs e)
        {
            if (this.learnMode == LearnMode.Out)
            {
                this.learnMode        = LearnMode.Off;
                this.lastMsgReceived  = null;
                this.outLearnBtn.Text = "Learn";
            }
            else
            {
                this.learnMode        = LearnMode.Out;
                this.outLearnBtn.Text = "Stop Learn";
            }

            this.inLearnBtn.Text = "Learn";
        }
Exemple #4
0
        private void InitMessenger()
        {
            ServiceBus.Instance.Register <OpenMainMenuWindow>(
                this,
                msg =>
            {
                MainMenu mainmenu = new MainMenu();
                mainmenu.Show();
            });

            ServiceBus.Instance.Register <OpenStatisticsWindow>(
                this,
                msg =>
            {
                Statistics statWindow = new Statistics();
                statWindow.Show();
            });

            ServiceBus.Instance.Register <OpenViewCategoryWindow>(
                this,
                msg =>
            {
                Category category = new Category();
                category.Show();
            });

            ServiceBus.Instance.Register <OpenExamModeWindow>(
                this,
                msg =>
            {
                Prüfungsmodus examMode = new Prüfungsmodus();
                examMode.Show();
            });

            ServiceBus.Instance.Register <OpenLearnModeWindow>(
                this,
                msg =>
            {
                LearnMode learnmode = new LearnMode();

                learnmode.Show();
            });
            ServiceBus.Instance.Register <OpenExportWindow>(
                this,
                msg =>
            {
                Export export = new Export();
                export.Show();
            });
            ServiceBus.Instance.Register <OpenViewMarkedCardsWindow>(
                this,
                msg =>
            {
                ViewMarkedCards vmc = new ViewMarkedCards();
                vmc.Show();
            }

                );

            ServiceBus.Instance.Register <OpenCreateCardWindow>(
                this,
                msg =>
            {
                CreateCard createCardWindow = new CreateCard();
                createCardWindow.Show();
            });
            ServiceBus.Instance.Register <OpenEditCardWindow>(
                this,
                msg =>
            {
                EditCard editCard = new EditCard();
                editCard.Show();
            });

            ServiceBus.Instance.Register <OpenImportWindow>(
                this,
                msg =>
            {
                ImportExportXML importExportxml = new ImportExportXML();
                importExportxml.Show();
            });

            ServiceBus.Instance.Register <OpenCreateCategoryWindow>(
                this,
                msg =>
            {
                CreateCategory createCategory = new CreateCategory();
                createCategory.Show();
            });
        }
        private void outLearnBtn_Click(object sender, EventArgs e)
        {
            if (this.learnMode == LearnMode.Out)
            {
                this.learnMode = LearnMode.Off;
                this.lastMsgReceived = null;
                this.outLearnBtn.Text = "Learn";
            }
            else
            {
                this.learnMode = LearnMode.Out;
                this.outLearnBtn.Text = "Stop Learn";
            }

            this.inLearnBtn.Text = "Learn";
        }
        /// <summary>
        /// Toggles Midi learn mode for this track.
        /// </summary>
        private void ToggleMidiLearnMode()
        {
            if (LearnMode == LearnModes.MidiLearnMode)
            {
                LearnMode = LearnModes.None;
            }
            else
            {
                LearnMode = LearnModes.MidiLearnMode;
                //Broadcast learn mode to deslect sample in library control so selection is captured
                Messenger.Default.Send <LearnModes>(LearnMode);

                Messenger.Default.Send <NotificationMessage>(new NotificationMessage(this, LearnMode.ToString()));
            }
        }