: public Tizen::Ui::Controls::Form
, public virtual Tizen::Ui::IActionEventListener
, public virtual Tizen::Ui::IKeypadEventListener
+ , public virtual Tizen::Ui::Controls::IEditTextFilter
, public virtual Tizen::Ui::Controls::IFormBackEventListener
, public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
, public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
virtual result OnInitializing(void);
virtual result OnTerminating(void);
+ virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText);
+
virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
virtual int GetSectionCount(void);
, public virtual Tizen::Ui::IActionEventListener
, public virtual Tizen::Ui::IDateChangeEventListener
, public virtual Tizen::Ui::IKeypadEventListener
+ , public virtual Tizen::Ui::Controls::IEditTextFilter
, public virtual Tizen::Ui::Controls::IFormBackEventListener
, public virtual Tizen::Ui::Controls::ISectionTableViewItemEventListener
, public virtual Tizen::Ui::Controls::ISectionTableViewItemProvider
virtual void OnDateChanged(const Tizen::Ui::Control& source, int year, int month, int day);
virtual void OnDateChangeCanceled(const Tizen::Ui::Control& source);
+ virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText);
+
virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
virtual int GetSectionCount(void);
extern const wchar_t* IDS_CLD_BODY_2_DAYS_BEFORE;
extern const wchar_t* IDS_CLD_BODY_1_WEEK_BEFORE;
extern const wchar_t* IDS_CLD_BODY_BEFORE_LC;
+extern const wchar_t* IDS_CLD_POP_INVALID_TIME;
extern const wchar_t* IDS_CLD_BODY_EVERY_DAY_ATNT;
extern const wchar_t* IDS_CLD_BODY_EVERY_3_DAYS;
extern const wchar_t* IDS_CLD_BODY_EVERY_WEEK;
return E_SUCCESS;
}
+bool
+ReminderForm::ValidatePastedText(const String& pastedText, String& replacedText)
+{
+ int value = 0;
+ TryCatch(Integer::Parse(pastedText, value) == E_SUCCESS, , "[E_FAILURE] Invalid text is pasted.");
+ TryCatch(value > 0 && value < 100, , "[E_FAILURE] Invalid text is pasted.");
+
+ replacedText = Integer::ToString(value);
+ return pastedText.Equals(replacedText, true) == false;
+CATCH:
+ replacedText = L"";
+ MessageBox msgBox;
+ msgBox.Construct(L"", ResourceManager::GetString(IDS_CLD_POP_INVALID_TIME), MSGBOX_STYLE_NONE);
+ msgBox.ShowAndWait(value);
+ return true;
+}
+
void
ReminderForm::OnFormBackRequested(Form& source)
{
H_REMINDER_TYPE_CUSTOM_EDIT_FILED), EDIT_FIELD_STYLE_NUMBER, INPUT_STYLE_OVERLAY, false, 2);
__pEditFieldReminderTime->SetGuideText(L"00");
__pEditFieldReminderTime->AddKeypadEventListener(*this);
+ __pEditFieldReminderTime->SetEditTextFilter(this);
if (__customReminderTimeOffset > 0)
{
__pEditFieldReminderTime->SetText(Integer::ToString(__customReminderTimeOffset));
{
}
+bool
+RepeatForm::ValidatePastedText(const String& pastedText, String& replacedText)
+{
+ int value = 0;
+ TryCatch(Integer::Parse(pastedText, value) == E_SUCCESS, , "[E_FAILURE] Invalid text is pasted.");
+ TryCatch(value > 0 && value < 100, , "[E_FAILURE] Invalid text is pasted.");
+
+ replacedText = Integer::ToString(value);
+ return pastedText.Equals(replacedText, true) == false;
+CATCH:
+ replacedText = L"";
+ MessageBox msgBox;
+ msgBox.Construct(L"", ResourceManager::GetString(IDS_CLD_BODY_REPEAT_WARNING), MSGBOX_STYLE_NONE);
+ msgBox.ShowAndWait(value);
+ return true;
+}
+
void
RepeatForm::OnFormBackRequested(Form& source)
{
__pEditFieldRepeatCount->Construct(Rectangle(itemBounds.x, Y_REPEAT_UNTIL_TYPE_EDIT_FIELD, W_REPEAT_UNTIL_TYPE_EDIT_FIELD, H_REPEAT_UNTIL_TYPE_EDIT_FIELD),
EDIT_FIELD_STYLE_NUMBER, INPUT_STYLE_OVERLAY, false, 2);
__pEditFieldRepeatCount->AddKeypadEventListener(*this);
+ __pEditFieldRepeatCount->SetEditTextFilter(this);
pItem->AddControl(*__pEditFieldRepeatCount);
__pEditFieldRepeatCount->SetText(Integer::ToString(__repeatCount));
const wchar_t* IDS_CLD_BODY_2_DAYS_BEFORE = L"IDS_CLD_BODY_2_DAYS_BEFORE";
const wchar_t* IDS_CLD_BODY_1_WEEK_BEFORE = L"IDS_CLD_BODY_1_WEEK_BEFORE";
const wchar_t* IDS_CLD_BODY_BEFORE_LC = L"IDS_CLD_BODY_BEFORE_LC";
+const wchar_t* IDS_CLD_POP_INVALID_TIME = L"IDS_CLD_POP_INVALID_TIME";
const wchar_t* IDS_CLD_BODY_EVERY_DAY_ATNT = L"IDS_CLD_BODY_EVERY_DAY_ATNT";
const wchar_t* IDS_CLD_BODY_EVERY_3_DAYS = L"IDS_CLD_BODY_EVERY_3_DAYS";
const wchar_t* IDS_CLD_BODY_EVERY_WEEK = L"IDS_CLD_BODY_EVERY_WEEK";