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; using System.Collections; namespace ArdupilotMega.GCSViews.ConfigurationView { public partial class ConfigMount : UserControl, IActivate { private Transition[] _ErrorTransition; private Transition _NoErrorTransition; bool startup = true; public ConfigMount() { InitializeComponent(); PBOX_WarningIcon.Opacity = 0.0F; LBL_Error.Opacity = 0.0F; 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