예제 #1
0
        public MainForm(SoundQueueConsumer soundQueueConsumer)
        {
            _soundQueueConsumer      = soundQueueConsumer;
            DispouseTemplateChangeRx = _soundQueueConsumer.SoundMessageChangeRx.Subscribe(SoundMessageChangeRxEventHandler);
            DispouseQueueChangeRx    = _soundQueueConsumer.QueueChangeRx.Subscribe(QueueChangeRxEventHandler);
            _soundQueueConsumer.StartQueue();

            InitializeComponent();
        }
예제 #2
0
 private void btn_StopQueue_Click(object sender, EventArgs e)
 {
     if (_stopQueue)
     {
         _soundQueueConsumer.StartQueue();
         _stopQueue         = false;
         btn_StopQueue.Text = "Stop Queue";
     }
     else
     {
         _soundQueueConsumer.StopQueue();
         _stopQueue         = true;
         btn_StopQueue.Text = "Start Queue";
     }
 }