void SDeviceOutputLog::OnDeviceSelectionChanged(FTargetDeviceEntryPtr DeviceEntry, ESelectInfo::Type SelectInfo) { CurrentDeviceOutputPtr.Reset(); OnClearLog(); if (DeviceEntry.IsValid()) { ITargetDevicePtr PinnedPtr = DeviceEntry->DeviceWeakPtr.Pin(); if (PinnedPtr.IsValid() && PinnedPtr->IsConnected()) { CurrentDeviceOutputPtr = PinnedPtr->CreateDeviceOutputRouter(this); } } }
FText SDeviceOutputLog::GetTargetDeviceText(FTargetDeviceEntryPtr DeviceEntry) const { if (DeviceEntry.IsValid()) { ITargetDevicePtr PinnedPtr = DeviceEntry->DeviceWeakPtr.Pin(); if (PinnedPtr.IsValid() && PinnedPtr->IsConnected()) { return FText::FromString(DeviceEntry->DeviceName); } else { return FText::Format(NSLOCTEXT("OutputLog", "TargetDeviceOffline", "{0} (Offline)"), FText::FromString(DeviceEntry->DeviceName)); } } else { return NSLOCTEXT("OutputLog", "UnknownTargetDevice", "<Unknown device>"); } }