public Spooky2Generator(SerialDevice sd) { device = sd; combined = new CombinedChannel(this); channel1 = new SingleChannel(0, this); channel2 = new SingleChannel(1, this); }
public async override Task ExecuteAsync(object parameter) { _stopShell.StatusExecutable = true; _stopShell.FontText = ""; if (SingleChannel.ShareChannelWriter.TryComplete()) { SingleChannel.ResetChannel(); } await Task.Delay(1); }
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); }
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; }