float lineWidth = __pGroupContainer->GetLineWidth();
Canvas* pCanvas = __pGroupContainer->GetVisualElement()->GetCanvasN();
+ SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[E SYSTEM] A system error has occurred. Failed to get the canvas.");
+
+ Canvas* pControlCanvas;
_Control* pControl = __pGroupContainer->GetSystemChild();
- Canvas* pControlCanvas = pControl->GetCanvasN();
- SysTryCatch(NID_UI_CTRL, pCanvas != null, ,E_SYSTEM, "A system error has occurred. Failed to get the canvas.");
+ SysTryCatch(NID_UI_CTRL, pControl != null, ,E_SYSTEM, "[E SYSTEM] A system error has occurred. Failed to get the child control.");
+
+ pControlCanvas = pControl->GetCanvasN();
+ SysTryCatch(NID_UI_CTRL, pControlCanvas != null, ,E_SYSTEM, "[E SYSTEM] A system error has occurred. Failed to get the canvas.");
pCanvas->SetBackgroundColor(__pGroupContainer->GetBackgroundColor());
pCanvas->Clear();
{
pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBarBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarBackgroundColor());
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
delete __pBarBgColorReplacementBitmap;
__pBarBgColorReplacementBitmap = null;
{
pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pResourceBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pProgress->GetBarColor());
r = GetLastResult();
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, pReplacementBitmap != null, , r, "[%s] Failed to get replacement color.", GetErrorMessage(r));
delete __pBarColorReplacementBitmap;
__pBarColorReplacementBitmap = null;
FloatRectangle secondPaneEndBounds(0.0f, 0.0f, 0.0f, 0.0f);
pFirstPane = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_FIRST);
+ SysTryReturnResult(NID_UI_CTRL, pFirstPane != null, GetLastResult(), "Propagating.");
+
pSecondPane = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_SECOND);
+ SysTryReturnResult(NID_UI_CTRL, pSecondPane != null, GetLastResult(), "Propagating.");
- if (pFirstPane)
- {
- pVEFirstPane = pFirstPane->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pVEFirstPane != null, GetLastResult(), "Propagating.");
+ pVEFirstPane = pFirstPane->GetVisualElement();
+ SysTryReturnResult(NID_UI_CTRL, pVEFirstPane != null, GetLastResult(), "Propagating.");
- pVEFirstPane->RemoveAllAnimations();
- }
+ pVEFirstPane->RemoveAllAnimations();
- if (pSecondPane)
- {
- pVESecondPane = pSecondPane->GetVisualElement();
- SysTryReturnResult(NID_UI_CTRL, pVESecondPane != null, GetLastResult(), "Propagating.");
+ pVESecondPane = pSecondPane->GetVisualElement();
+ SysTryReturnResult(NID_UI_CTRL, pVESecondPane != null, GetLastResult(), "Propagating.");
- pVESecondPane->RemoveAllAnimations();
- }
+ pVESecondPane->RemoveAllAnimations();
pAnimationFirstPane = GetVisualElementAnimation(L"bounds");
SysTryReturnResult(NID_UI_CTRL, pAnimationFirstPane != null, GetLastResult(), "Propagating.");
pAnimationSecondPane = GetVisualElementAnimation(L"bounds");
- SysTryReturnResult(NID_UI_CTRL, pAnimationSecondPane != null, GetLastResult(), "Propagating.");
+ r = GetLastResult();
+ SysTryCatch(NID_UI_CTRL, pAnimationSecondPane != null, , r, "[%s] Propagating.", GetErrorMessage(r));
clientBounds = __pSplitPanel->GetBoundsF();
firstPaneBounds = pFirstPane->GetBoundsF();
break;
}
- if (pFirstPane)
- {
- r = pAnimationFirstPane->SetStartValue(firstPaneStartBounds);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
+ //Animate first pane
+ r = pAnimationFirstPane->SetStartValue(firstPaneStartBounds);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
- r = pAnimationFirstPane->SetEndValue(firstPaneEndBounds);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
+ r = pAnimationFirstPane->SetEndValue(firstPaneEndBounds);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
- pFirstPane->SetBounds(firstPaneEndBounds);
+ pFirstPane->SetBounds(firstPaneEndBounds);
- if (pVEFirstPane)
- {
- pVEFirstPane->AddAnimation(L"Bounds", *pAnimationFirstPane);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating.");
- }
- }
+ pVEFirstPane->AddAnimation(L"Bounds", *pAnimationFirstPane);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating.");
- if (pSecondPane)
- {
- r = pAnimationSecondPane->SetStartValue(secondPaneStartBounds);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
+ //Animate second pane
+ r = pAnimationSecondPane->SetStartValue(secondPaneStartBounds);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
- r = pAnimationSecondPane->SetEndValue(secondPaneEndBounds);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
+ r = pAnimationSecondPane->SetEndValue(secondPaneEndBounds);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.");
- pSecondPane->SetBounds(secondPaneEndBounds);
+ pSecondPane->SetBounds(secondPaneEndBounds);
- if (pVESecondPane)
- {
- pVESecondPane->AddAnimation(L"Bounds", *pAnimationSecondPane);
- SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating.");
- }
- }
+ pVESecondPane->AddAnimation(L"Bounds", *pAnimationSecondPane);
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating.");
CATCH: