Exemple #1
0
    public void LastUnitDS_CB(string jsonUnitDS)
    {
        _unitLatest = JsonUtility.FromJson <UnitLatest>(jsonUnitDS);

        if (_unitLatest._url == _imgProvider.GetCurrentUrl() && _imgProvider.GetTexture2D() != null)
        {
            _unitLatest._texture = _imgProvider.GetTexture2D();
            PublishUnit();
            return;
        }
        _iImgProxy.ReqTexture(_unitLatest._url, ImgProxy.TextureCB_CallerID.APP_UNIT);
    }
Exemple #2
0
 void ReNewDraft()
 {
     _uDraft          = new UnitLatest();
     _uDraft._texture = scrollViewImgContent.texture as Texture2D;
     if (_imgProvider.GetTexture2D() == _uDraft._texture)
     {
         _uDraft._url = _imgProvider.GetCurrentUrl();
     }
     else if (_unitProvider.GetTexture2D() == _uDraft._texture)
     {
         _uDraft._url = _unitProvider.GetCurrentUrl();
     }
     // TODO: else, throw exception
 }
Exemple #3
0
 public void SaveUnit_CB(string uJSON)
 {
     _unitLatest = JsonUtility.FromJson <UnitLatest>(uJSON);
     if (!string.IsNullOrEmpty(_unitLatest._url))
     {
         if (_unitLatest._url == _imgProvider.GetCurrentUrl() && _imgProvider.GetTexture2D() != null)
         {
             _unitLatest._texture = _imgProvider.GetTexture2D();
             PublishUnit();
             return;
         }
         _iImgProxy.ReqTexture(_unitLatest._url, ImgProxy.TextureCB_CallerID.APP_UNIT);
     }
 }
Exemple #4
0
 public void ReNewUnitLatestDS()
 {
     _unitLatest = new UnitLatest();
 }
Exemple #5
0
 void AppUnitToDraft()
 {
     _uDraft = _unitProvider.GetUnitLatestDS();
 }