private void SetSweepDirection(object sender, NationalInstruments.UI.ActionEventArgs e) { if (sweepDirectionSwitch.Focused) // Only do it if its a UI event { WindfreakTabController castController = (WindfreakTabController)controller; bool state = GetSweepDirection(); bool channel = GetChannel(); castController.SetSweepDirection(state, channel); } }
public WindfreakTabView(WindfreakTabController controllerInstance) : base(controllerInstance) { InitializeComponent(); castController = (WindfreakTabController)controller; // saves casting in every method }