public static string GetPageName(ICDUScreen cdu) { var val = cdu?.GetRow(0).Trim(); logger.Info($"GetPagename = '{val}'"); return(val); }
public void CDUAvailable(object sender, ISPADEventArgs e) { logger.Info($"EfisHelper: CDUAvailable {e}"); logger.Info($"Sender {sender}"); ICDUScreen cdu = e.NewValue as ICDUScreen; logger.Info($"CDU {cdu}"); if ((cdu != null) && (cdu.IsValid) && (cdu.IsPowered) && (cdu.CDUNumber == CDU_NUMBER.Captain)) { logger.Info("CDU Available"); if (!SwitchAndWaitForPage(cdu, "MENU", CDU_KEYS.KEY_MENU)) { return; } var efisLine = cdu.GetRow(4, 19); if (efisLine != "EFIS>") { logger.Info($"'{efisLine}' != 'EFIS>'"); cdu.SendKey(CDU_KEYS.KEY_R1); // Enable Efis } } }