using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Windows.Forms; using ArdupilotMega.Controls.BackstageView; using ArdupilotMega.Presenter; using Transitions; namespace ArdupilotMega.GCSViews.ConfigurationView { public partial class ConfigCameraStab : UserControl, IActivate { private ConfigCameraStabPresenter _presenter; private Transition[] _ErrorTransition; private Transition _NoErrorTransition; public ConfigCameraStab() { InitializeComponent(); PBOX_WarningIcon.Opacity = 0.0F; LBL_Error.Opacity = 0.0F; } public void Activate() { _presenter = new ConfigCameraStabPresenter(MainV2.comPort); presenterBindingSource.DataSource = _presenter; var delay = new Transition(new TransitionType_Linear(2000)); var fadeIn = new Transition(new TransitionType_Linear(800)); fadeIn.add(PBOX_WarningIcon, "Opacity", 1.0F); fadeIn.add(LBL_Error, "Opacity", 1.0F); _ErrorTransition = new[] { delay, fadeIn }; _NoErrorTransition = new Transition(new TransitionType_Linear(10)); _NoErrorTransition.add(PBOX_WarningIcon, "Opacity", 0.0F); _NoErrorTransition.add(LBL_Error, "Opacity", 0.0F); //setup button actions foreach (var btn in Controls.Cast().OfType