Ejemplo n.º 1
0
        public bool GenerateBeepStream(Beeper beeper)
        {
            try
            {
                beeper?.GenerateStream();
            }
            catch (Exception ee)
            {
                ms.g("Nope", $"GET OUTTA HERE WITH DAT {format.error(ee)}!!");

                return(false);
            }

            return(true);
        }
Ejemplo n.º 2
0
        protected void OnOutputButtonClick(object sender, EventArgs e)
        {
            Beeper beeper = GenerateBeeper(KeyText.Text, ScriptText.Text, BpmText.Text, VolumeText.Text, ScriptTabList.SelectedIndex + 1);

            if (beeper != null)
            {
                string output = beeper.GetOutputCodes();

                if (output != null)
                {
                    Clipboard.SetText(output);

                    ms.g("Yay!", "THE CODE HAS BEEN COPIED TO YOUR CLIPBOARD!");
                }
            }
        }
Ejemplo n.º 3
0
        /// ******************************* EVENTS **********************************

        protected void OnPlayButtonClick(object sender, EventArgs e)
        {
            StopBeeping();

            Beeper[] beepers = new Beeper[ScriptTabs.Count];
            for (int i = 0, l = ScriptTabs.Count; i < l; i++)
            {
                beepers[i] = GenerateBeeper(KeyText.Text, ScriptTabs[i].ToolTipText, BpmText.Text, ScriptTabs[i].ImageKey, i + 1);

                if (!GenerateBeepStream(beepers[i]))
                {
                    return;
                }
            }

            BeeperManager.Play(beepers, RepeatCheck.Checked);
        }