, public Tizen::Ui::Controls::ITokenFilter
, public Tizen::Ui::IFocusEventListener
, public Tizen::Ui::IKeyEventListener
+ , public Tizen::Ui::IWindowEventListener
{
public:
virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnWindowActivated (const Tizen::Ui::Window &source);
+ virtual void OnWindowDeactivated (const Tizen::Ui::Window &source);
+
void AdjustHeight(void);
void SetMode(MODE newMode);
void SetUserEventFlagValue(bool value);
private:
MODE __mode;
+ bool __isWindowDeactived;
+ int __showMessageBox;
int __width;
float __expandedHeight;
bool __alreadyValidated;
RecipientField::RecipientField(void)
: __mode(READ_WRITE_MODE)
+ , __isWindowDeactived(false)
+ , __showMessageBox(0)
, __width(W_RECIPIENT_AREA)
, __expandedHeight(H_RECIPIENT_AREA)
, __alreadyValidated(false)
RecipientField::~RecipientField(void)
{
+ AppLogDebug("ENTER");
+
if (__pRecipientList != null)
{
__pRecipientList->RemoveAll(true);
delete __pRecipientList;
}
+
+ Frame* pFrame = EmailApp::GetInstance()->GetFrame(IDS_EMAIL_TEXT);
+ pFrame->RemoveWindowEventListener(*this);
+
+ AppLogDebug("EXIT");
}
result
Panel::Construct(relLayout, bounds, GROUP_STYLE_NONE);
+ Frame* pFrame = EmailApp::GetInstance()->GetFrame(IDS_EMAIL_TEXT);
+ pFrame->AddWindowEventListener(*this);
+
if (pAppResource)
{
pContactBitmap = pAppResource->GetBitmapN(IDB_ADDCONTACT, BITMAP_PIXEL_FORMAT_ARGB8888);
}
else if (requestId == IDA_SHOW_INVALID_ADDRESS_MESSAGE_BOX)
{
+ if (__isWindowDeactived == true)
+ {
+ __showMessageBox = IDA_SHOW_INVALID_ADDRESS_MESSAGE_BOX;
+ }
+ else
+ {
+ int modRes;
+ MessageBox msgBox;
+ msgBox.Construct(Utils::GetResourceString(L"IDS_COM_POP_ERROR"), Utils::GetResourceString(L"IDS_EMAIL_POP_INVALID_EMAIL_ADDRESS"), MSGBOX_STYLE_OK, 300000);
+ msgBox.ShowAndWait(modRes);
+ }
+ }
+ else if (requestId == IDA_SHOW_DUPLICATE_ADDRESS_MESSAGE_BOX)
+ {
+ if (__isWindowDeactived == true)
+ {
+ __showMessageBox = IDA_SHOW_DUPLICATE_ADDRESS_MESSAGE_BOX;
+ }
+ else
+ {
+ int modRes;
+ MessageBox msgBox;
+ msgBox.Construct(Utils::GetResourceString(L"IDS_COM_POP_ERROR"), Utils::GetResourceString(L"IDS_MSGC_BODY_DUPLICATED_RECIPIENT"), MSGBOX_STYLE_OK, 300000);
+ msgBox.ShowAndWait(modRes);
+ }
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+RecipientField::OnWindowActivated (const Tizen::Ui::Window &source)
+{
+ AppLogDebug("ENTER");
+
+ __isWindowDeactived = false;
+
+ if (__showMessageBox == IDA_SHOW_INVALID_ADDRESS_MESSAGE_BOX)
+ {
+ __showMessageBox = 0;
int modRes;
MessageBox msgBox;
msgBox.Construct(Utils::GetResourceString(L"IDS_COM_POP_ERROR"), Utils::GetResourceString(L"IDS_EMAIL_POP_INVALID_EMAIL_ADDRESS"), MSGBOX_STYLE_OK, 300000);
msgBox.ShowAndWait(modRes);
}
- else if (requestId == IDA_SHOW_DUPLICATE_ADDRESS_MESSAGE_BOX)
+ else if (__showMessageBox == IDA_SHOW_DUPLICATE_ADDRESS_MESSAGE_BOX)
{
+ __showMessageBox = 0;
int modRes;
MessageBox msgBox;
msgBox.Construct(Utils::GetResourceString(L"IDS_COM_POP_ERROR"), Utils::GetResourceString(L"IDS_MSGC_BODY_DUPLICATED_RECIPIENT"), MSGBOX_STYLE_OK, 300000);
AppLogDebug("EXIT");
}
+
+void
+RecipientField::OnWindowDeactivated (const Tizen::Ui::Window &source)
+{
+ AppLogDebug("ENTER");
+
+ __isWindowDeactived = true;
+
+ AppLogDebug("EXIT");
+}
+