public override void Release()
 {
     this.ReleaseWantList();
     this.ReleaseReceiveList();
     this.ReleaseSendList();
     base.Release();
     FriendPresentRootWindow.m_Instance = (FriendPresentRootWindow)null;
 }
 public override void Initialize(FlowWindowBase.SerializeParamBase param)
 {
     FriendPresentRootWindow.m_Instance = this;
     base.Initialize(param);
     this.m_Param = param as FriendPresentRootWindow.SerializeParam;
     if (this.m_Param == null)
     {
         throw new Exception(this.ToString() + " > Failed serializeParam null.");
     }
     this.m_ValueList = (SerializeValueBehaviour)this.m_Param.window.GetComponent <SerializeValueBehaviour>();
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ValueList, (UnityEngine.Object)null))
     {
         this.m_ReceiveToggle = this.m_ValueList.list.GetUIToggle("tgl_receive");
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ReceiveToggle, (UnityEngine.Object)null))
         {
             ((Selectable)this.m_ReceiveToggle).set_interactable(false);
         }
         this.m_SendToggle = this.m_ValueList.list.GetUIToggle("tgl_send");
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SendToggle, (UnityEngine.Object)null))
         {
             ((Selectable)this.m_SendToggle).set_interactable(false);
         }
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Param.wantList, (UnityEngine.Object)null))
     {
         this.m_WantController = (ContentController)this.m_Param.wantList.GetComponentInChildren <ContentController>();
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_WantController, (UnityEngine.Object)null))
         {
             this.m_WantController.SetWork((object)this);
         }
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Param.receiveList, (UnityEngine.Object)null))
     {
         this.m_ReceiveController = (ContentController)this.m_Param.receiveList.GetComponentInChildren <ContentController>();
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ReceiveController, (UnityEngine.Object)null))
         {
             this.m_ReceiveController.SetWork((object)this);
         }
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Param.sendList, (UnityEngine.Object)null))
     {
         this.m_SendController = (ContentController)this.m_Param.sendList.GetComponentInChildren <ContentController>();
         if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SendController, (UnityEngine.Object)null))
         {
             this.m_SendController.SetWork((object)this);
         }
     }
     this.Close(true);
 }
 public override void Complete(WWWResult www)
 {
     if (Network.IsError)
     {
         this.m_Node.OnFailed();
     }
     else
     {
         DebugMenu.Log("API", this.url + ":" + www.text);
         WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqPresentList.Api_PresentListSend.Json> >(www.text);
         DebugUtility.Assert(jsonBodyResponse != null, "res == null");
         if (jsonBodyResponse.body != null && jsonBodyResponse.body.result && FriendPresentRootWindow.instance != null)
         {
             FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDING);
         }
         Network.RemoveAPI();
         this.Success();
     }
 }
 public override void Complete(WWWResult www)
 {
     if (Network.IsError)
     {
         this.m_Node.OnFailed();
     }
     else
     {
         DebugMenu.Log("API", this.url + ":" + www.text);
         WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json> jsonBodyResponse = (WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json>)JsonUtility.FromJson <WebAPI.JSON_BodyResponse <FlowNode_ReqPresentStatus.Api_PresentListStatus.Json> >(www.text);
         DebugUtility.Assert(jsonBodyResponse != null, "res == null");
         if (jsonBodyResponse.body != null)
         {
             if (string.IsNullOrEmpty(jsonBodyResponse.body.result))
             {
                 FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.UNSENT);
             }
             else if (jsonBodyResponse.body.result == "0")
             {
                 FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDING);
             }
             else if (jsonBodyResponse.body.result == "1")
             {
                 FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENDED);
             }
             else if (jsonBodyResponse.body.result == "9")
             {
                 FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.SENTFAILED);
             }
             else
             {
                 FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.NONE);
             }
         }
         else
         {
             FriendPresentRootWindow.SetSendStatus(FriendPresentRootWindow.SendStatus.NONE);
         }
         Network.RemoveAPI();
         this.Success();
     }
 }