Ejemplo n.º 1
0
 public Spooky2Generator(SerialDevice sd)
 {
     device   = sd;
     combined = new CombinedChannel(this);
     channel1 = new SingleChannel(0, this);
     channel2 = new SingleChannel(1, this);
 }
Ejemplo n.º 2
0
 public async override Task ExecuteAsync(object parameter)
 {
     _stopShell.StatusExecutable = true;
     _stopShell.FontText         = "";
     if (SingleChannel.ShareChannelWriter.TryComplete())
     {
         SingleChannel.ResetChannel();
     }
     await Task.Delay(1);
 }
Ejemplo n.º 3
0
 private async Task SetChanelLength(T param)
 {
     _queue.StatusExecutable = false;
     if (int.TryParse(param as string, out int t))
     {
         SingleChannel.SetChannel(t);
     }
     else
     {
         SingleChannel.SetChannel(1000);
     }
     await Task.Delay(1);
 }
Ejemplo n.º 4
0
        public async override Task ExecuteAsync(object parameter)
        {
            foreach (var s in _shellList)
            {
                s.IsExecuting = false;
            }
            _stopShell.StatusExecutable = true;
            int.TryParse((string)parameter, out int t);
            await Task.Delay(Math.Max(t, 3000));

            _stopShell.FontText = "";
            if (SingleChannel.ShareChannelWriter.TryComplete())
            {
                SingleChannel.ResetChannel();
            }

            _stopShell.IsExecuting = false;
        }