void SetOnAdjustmentValueChanged(void);
///Enable or disable the Save button in header
- void SetSaveEnable(void);
+ void SetSaveEnable(bool isEnable);
///sets the memo content text color
/**
* @param the memo text color
__pSearchBar->SetShowState(false);
__pMemoListView->SetBounds(GetClientAreaBounds().x, 0, GetClientAreaBounds().width, GetClientAreaBounds().height);
+ MemoListPresentationModel::GetInstance()->SetDataEventListener(null);
return;
}
MemoTextEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
{
RepositionControls(ID_DEFAULT_POSITION);
- SetSaveEnable();
+ SetSaveEnable(false);
if (pArgs != null)
{
Integer* isNew = static_cast<Integer*>(pArgs->GetAt(0));
{
__cursorPosition = __pMemoContentEditarea->GetCursorPosition();
SetTextSize(value);
- SetSaveEnable();
+ SetSaveEnable(true);
return;
}
MemoTextEditorForm::OnColorChanged(const Control& source, const Color& color)
{
SetTextColor(color);
- SetSaveEnable();
+ SetSaveEnable(true);
return;
}
void
MemoTextEditorForm::OnTextValueChanged (const Control& source)
{
+ __isEdited = true;
if(__isEditMode == true && __isMemoTextMaxLength == true )
{
if(__pMemoContentEditarea->GetTextLength() < MAX_TEXTMEMO_LENGTH)
{
__isMemoTextMaxLength = false;
}
+ else
+ {
+ SetSaveEnable(false);
+ return;
+ }
}
- __isEdited = true;
- SetSaveEnable();
+ SetSaveEnable(true);
return;
}
}
void
-MemoTextEditorForm::SetSaveEnable(void)
+MemoTextEditorForm::SetSaveEnable(bool isEnable)
{
if (__pMemoContentEditarea->GetTextLength() == 0)
{
}
else
{
- if(__isMemoTextMaxLength == false)
- {
- String text = __pMemoContentEditarea->GetText();
- text.Trim();
- if(text.GetLength() == 0)
- {
- __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
- }
- else
- {
- __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
- }
- }
- else
- {
- __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
- }
+ String text = __pMemoContentEditarea->GetText();
+ text.Trim();
+ __pFormHeader->SetButtonEnabled(BUTTON_POSITION_LEFT, isEnable);
__pFormHeader->SetItemSelected(0);
}
__pFormHeader->Draw();