public void Awake()
 {
     Instance = this;
     LoadSequenceInstances             = new List <PollImageSequenceComponent>();
     LoadConfirmationSequenceInstances = new List <PollImageSequenceComponent>();
     PollData = new PollData(Application.dataPath + "/poll-questions.json");
     StartCoroutine(PollData.GetData());
 }
 public void BeginPoll()
 {
     ScreensaverManager.Instance.DiableScreensaver = true;
     HideInstructions();
     StartCoroutine(Data.GetData());
     m_LeaderboardData.SetData(ExhibitGameManager.Instance.Player.GetLeaderboardString());
     StartCoroutine(CheckIsDoneParsing());
 }
Exemplo n.º 3
0
    private void DisplayPage(int PageNumber, String Status)
    {
        int Poll1Count = (PageNumber - 1) * 2 + 1;
        int Poll2Count = (PageNumber - 1) * 2 + 2;

        p         = new PollData();
        pollCount = p.GetTotalPollCount(muser.currentResident.SocietyID, DisplayStatus);

        lblPollP1.Text = "Poll " + Poll1Count + " of " + pollCount;

        lblPollP2.Text = "Poll " + Poll2Count + " of " + pollCount;

        String orderby = "";

        p        = new PollData();
        pollList = p.GetData(currPageNumber, orderby, muser.currentResident.SocietyID, Status);

        if (pollList.Count != 0)
        {
            lblEmptyPie1.Visible = false;
            if (PageNumber == 1)
            {
                btnPreBottom.Visible = false;
            }
            else
            {
                btnPreBottom.Visible = true;
            }
            if (pollCount <= currPageNumber * 2)
            {
                btnNextBottom.Visible = false;
            }
            else
            {
                btnNextBottom.Visible = true;

                pnlchart2.Visible = true;
            }

            CreatePieChart1(pollList[0]);

            if (pollCount >= currPageNumber * 2)
            {
                CreatePieChart2(pollList[1]);
            }
            else
            {
                HidePieChart2();
            }
        }
        else
        {
            ShowEmptyPage();
        }
    }