Exemple #1
0
        public void Ignore()
        {
            m_uiEngine.DisplayProgress("Rejecting Meeting: " + Info.MeetingNumber);

            APIRequest rejectRequest = null;

            rejectRequest = m_webInterface.RejectMeeting(Info.Id).OnRequestComplete(
                (isNetworkError, message) =>
            {
                status             = MeetingStatus.IDLE;
                JsonData oututData = JsonMapper.ToObject(message);
                if (!isNetworkError && (bool)oututData["success"] == true)
                {
                    ExternalChangesDone?.Invoke(this, EventArgs.Empty);

                    //m_uiEngine.CloseLastScreen();
                    Error error     = new Error(Error.OK);
                    error.ErrorText = "";
                    m_uiEngine.DisplayResult(error);
                }
                else
                {
                    Error error     = new Error(Error.E_Exception);
                    error.ErrorText = (string)oututData["error"]["message"];
                    m_uiEngine.DisplayResult(error);
                }
            }
                );
        }
Exemple #2
0
 public override void WebRefresh()
 {
     m_webInterface.GetCategories(ResourceType.USER, (val) =>
     {
         ExternalChangesDone?.Invoke(this, EventArgs.Empty);
     }, true);
 }
Exemple #3
0
        public void Accept()
        {
            m_uiEngine.DisplayProgress("Accepting Meeting: " + Info.MeetingNumber);

            APIRequest rejectRequest = null;

            rejectRequest = m_webInterface.AcceptMeeting(Info.Id).OnRequestComplete(
                (isNetworkError, message) =>
            {
                status             = MeetingStatus.IDLE;
                JsonData oututData = JsonMapper.ToObject(message);
                if (!isNetworkError && (bool)oututData["success"] == true)
                {
                    ExternalChangesDone?.Invoke(this, EventArgs.Empty);

                    if (Array.FindIndex(Fordi.Networking.Network.Rooms, item => item.Name == m_meetingInfo.MeetingNumber) != -1)
                    {
                        if (m_roomButton != null)
                        {
                            m_roomButton.onClick.RemoveAllListeners();
                        }
                        else
                        {
                            m_roomButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                        };
                        m_roomButton.GetComponentInChildren <TextMeshProUGUI>().text = "Join";
                        m_roomButton.onClick.AddListener(() => Join());
                    }

                    //m_uiEngine.CloseLastScreen();
                    Error error     = new Error(Error.OK);
                    error.ErrorText = "";
                    m_uiEngine.DisplayResult(error);
                }
                else
                {
                    Error error     = new Error(Error.E_Exception);
                    error.ErrorText = (string)oututData["error"]["message"];
                    m_uiEngine.DisplayResult(error);
                }
            }
                );
        }
Exemple #4
0
 public void ResetToDefaultSettings()
 {
     ExternalChangesDone?.Invoke(this, EventArgs.Empty);
     Save();
 }