void CDummyRepeaterFrame::onHeader(wxEvent& event) { CDummyRepeaterHeaderEvent& hdrEvent = dynamic_cast<CDummyRepeaterHeaderEvent&>(event); CHeaderData* header = hdrEvent.getHeaderData(); if (header != NULL) { wxDateTime dateTime = header->getTime(); wxString hrdDateTime = dateTime.FormatISODate() + wxT(" ") + dateTime.FormatISOTime(); m_heard->InsertItem(0L, hrdDateTime); wxString urCall = header->getYourCall(); m_hrdYour->SetLabel(urCall); m_heard->SetItem(0L, 1, urCall); wxString myCall = header->getMyCall1(); wxString myCall2 = header->getMyCall2(); if (!myCall2.IsSameAs(wxT(" "))) { myCall.Append(wxT("/")); myCall.Append(myCall2); } m_hrdMy->SetLabel(myCall); m_heard->SetItem(0L, 2, myCall); wxString rpt1Call = header->getRptCall1(); m_hrdRpt1->SetLabel(rpt1Call); m_heard->SetItem(0L, 3, rpt1Call); wxString rpt2Call = header->getRptCall2(); m_hrdRpt2->SetLabel(rpt2Call); m_heard->SetItem(0L, 4, rpt2Call); wxString flags; flags.Printf(wxT("%02X %02X %02X"), header->getFlag1(), header->getFlag2(), header->getFlag3()); m_hrdFlags->SetLabel(flags); m_hrdMessage->SetLabel(wxEmptyString); delete header; } else { m_hrdYour->SetLabel(wxEmptyString); m_hrdMy->SetLabel(wxEmptyString); m_hrdRpt1->SetLabel(wxEmptyString); m_hrdRpt2->SetLabel(wxEmptyString); m_hrdFlags->SetLabel(wxEmptyString); m_hrdMessage->SetLabel(wxEmptyString); } }
void CDVToolReaderFrame::onHeader(wxEvent& event) { CHeaderEvent& hdrEvent = dynamic_cast<CHeaderEvent&>(event); CHeaderData* header = hdrEvent.getHeaderData(); if (header != NULL) { wxDateTime dateTime = header->getTime(); wxString hrdDateTime = dateTime.FormatISODate() + wxT(" ") + dateTime.FormatISOTime(); wxString urCall = header->getYourCall(); m_your->SetLabel(urCall); wxString myCall = header->getMyCall1(); wxString myCall2 = header->getMyCall2(); if (!myCall2.IsSameAs(wxT(" "))) { myCall.Append(wxT("/")); myCall.Append(myCall2); } m_my->SetLabel(myCall); wxString rpt1Call = header->getRptCall1(); m_rpt1->SetLabel(rpt1Call); wxString rpt2Call = header->getRptCall2(); m_rpt2->SetLabel(rpt2Call); wxString flags; flags.Printf(wxT("%02X %02X %02X"), header->getFlag1(), header->getFlag2(), header->getFlag3()); m_flags->SetLabel(flags); m_message->SetLabel(wxEmptyString); delete header; } else { m_fileName->SetLabel(wxEmptyString); m_your->SetLabel(wxEmptyString); m_my->SetLabel(wxEmptyString); m_rpt1->SetLabel(wxEmptyString); m_rpt2->SetLabel(wxEmptyString); m_flags->SetLabel(wxEmptyString); m_message->SetLabel(wxEmptyString); } }