public void Set(bool[] filter) { for (int i = 0; i < 100; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), GetColor(filter[i])); } }
public LaunchpadWindow(Launchpad launchpad) { InitializeComponent(); #if DEBUG this.AttachDevTools(); #endif UpdateTopmost(Preferences.AlwaysOnTop); Preferences.AlwaysOnTopChanged += UpdateTopmost; _launchpad = launchpad; Title = TitleText.Text = TitleCenter.Text = _launchpad.Name; for (int i = 0; i < 100; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), launchpad.GetColor(i).ToScreenBrush()); } observables.Add(Grid.GetObservable(Visual.BoundsProperty).Subscribe(Grid_Updated)); observables.Add(this.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated)); observables.Add(TitleText.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated)); observables.Add(TitleCenter.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated)); observables.Add(CenteringLeft.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated)); observables.Add(CenteringRight.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated)); }
public KeyFilterViewer(KeyFilter filter) { InitializeComponent(); _filter = filter; for (int i = 0; i < 101; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), GetColor(_filter[i])); } }
public PreviewViewer(Preview preview) { InitializeComponent(); _preview = preview; for (int i = 0; i < 100; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), new Color(0).ToScreenBrush()); } }
public void Set(Chain chain, bool[] filter) { int index = _multi.Chains.IndexOf(chain); if (index != -1 && _multi.Expanded != index) { return; } for (int i = 0; i < 100; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), GetColor(filter[i])); } }
public LaunchpadWindow(Launchpad launchpad) { InitializeComponent(); #if DEBUG this.AttachDevTools(); #endif UpdateTopmost(Preferences.AlwaysOnTop); Preferences.AlwaysOnTopChanged += UpdateTopmost; _launchpad = launchpad; Title = this.Get <TextBlock>("Title").Text = _launchpad.Name; for (int i = 0; i < 100; i++) { Grid.SetColor(LaunchpadGrid.SignalToGrid(i), launchpad.GetColor(i).ToScreenBrush()); } Grid.GetObservable(Visual.BoundsProperty).Subscribe(Bounds_Updated); }
public void SignalRender(Signal n) => Dispatcher.UIThread.InvokeAsync(() => { Grid.SetColor(LaunchpadGrid.SignalToGrid(n.Index), n.Color.ToScreenBrush()); });
void FadeExit(Signal n) => Dispatcher.UIThread.InvokeAsync(() => { Preview?.SetColor(LaunchpadGrid.SignalToGrid(n.Index), n.Color.ToScreenBrush()); });
void FadeExit(List <Signal> n) => Dispatcher.UIThread.InvokeAsync(() => { foreach (Signal s in n) { Preview?.SetColor(LaunchpadGrid.SignalToGrid(s.Index), s.Color.ToScreenBrush()); } });