Exemplo n.º 1
0
 public void SelectNext()
 {
     if (this.allWaveForms.Length > 0)
     {
         selectedWaveForm++;
         if (selectedWaveForm >= allWaveForms.Length)
         {
             selectedWaveForm = 0;
         }
         this.waveFormToSend = allWaveForms[selectedWaveForm];
         UpdateText();
     }
 }
Exemplo n.º 2
0
 public void SelectPrevious()
 {
     if (this.allWaveForms.Length > 0)
     {
         selectedWaveForm--;
         if (selectedWaveForm < 0)
         {
             selectedWaveForm = allWaveForms.Length - 1;
         }
         this.waveFormToSend = allWaveForms[selectedWaveForm];
         UpdateText();
     }
 }
Exemplo n.º 3
0
        // Use this for initialization
        void Start()
        {
            if (this.waveFormToSend != null)
            {
                int index = -1;
                for (int i = 0; i < this.allWaveForms.Length; i++)
                {
                    if (allWaveForms[i] == this.waveFormToSend)
                    {
                        index = i;
                        break;
                    }
                }
                this.selectedWaveForm = index;
            }
            else if (this.allWaveForms.Length > 0)
            {
                this.waveFormToSend   = allWaveForms[0];
                this.selectedWaveForm = 0;
            }
            //else we don;t have anything to send and no waveforms anyway.

            UpdateText();
        }