private void UIPanel_ChangeCurrentPrev(object sender, ChangePrevEventArgs e) { if (e.Prev == null) { foreach (var slider in sliders) { slider.Visible = false; } foreach (var button in notStaticButtons) { button.Visible = false; } PrevView = null; } else { SetColorSliders(e.Prev.Image.Color); PrevView = (TexturePrev)CurrentPrev.Clone(); if (PrevView != null) { PrevView.Visible = true; } foreach (var button in notStaticButtons) { button.Visible = true; } } }
private void OnChangeCurrentPrev(ChangePrevEventArgs e) { EventHandler <ChangePrevEventArgs> changeCurrentPrev = ChangeCurrentPrev; if (changeCurrentPrev != null) { changeCurrentPrev(this, e); } }