public void OnVMConnectionStatusClicked() { if (EmulationWarnings.CheckRequirement((EmulationWarnings.Requirement.VMInstalled)) && !EmulatorManager.IsVMRunning() && !EmulatorManager.IsVMConnected()) { AnalyticsManager.GlobalInstance.LogEventAsync(AnalyticsLedger.EventCatagory.EmulationTab, AnalyticsLedger.EventAction.Clicked, "Emulation Start", AnalyticsLedger.getMilliseconds().ToString()); if (EmulatorManager.StartEmulator()) // If successful { EmulationDriverStation.Instance.SetActive(true); } else { UserMessageManager.Dispatch("Emulator failed to start.", EmulationWarnings.WARNING_DURATION); } } else if (EmulatorManager.IsVMRunning()) { EmulationDriverStation.Instance.SetKillEmulatorDialogActive(true); } }