Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "NotificationThreadUnit.h"
|
||||
#include "NotificationFormUnit.h"
|
||||
#pragma package(smart_init)
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall TNotificationThread::TNotificationThread(bool CreateSuspended, TForm* pForm)
|
||||
: TThread(CreateSuspended)
|
||||
{
|
||||
m_pForm = pForm;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TNotificationThread::Execute()
|
||||
{
|
||||
|
||||
if( ((TNotificationForm *)m_pForm)->ParseJson() &&
|
||||
((TNotificationForm *)m_pForm)->LoadImg() )
|
||||
{
|
||||
PostMessage(Application->MainForm->Handle, UM_NOTIFICATION,
|
||||
NOTIFICATION_SHOW_FORM , 0 );
|
||||
}else{
|
||||
PostMessage(Application->MainForm->Handle, UM_NOTIFICATION,
|
||||
NOTIFICATION_NO_JSONDATA, 0 );
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user