Ejemplo n.º 1
0
        private void Awake()
        {
            onAuthTokenUpdate += SetAuthentication;

            try
            {
                configuration = GetConfiguration();
                requester     = new Requester(configuration.Host, GetAuthentication(), configuration.SecretToken, UnauthorizedConnectionDetected);
                onAPILoaded?.Invoke();
            }
            catch (NullReferenceException)
            {
                warningsManager.ShowWarning(NoSecretTokenFoundMessage);
            }

            StartSynchronization();
        }
Ejemplo n.º 2
0
        public void Open(int daysToShow, string tag)
        {
            try
            {
                this.daysToShow = Mathf.Clamp(daysToShow, MinimumDaysToShow, MaximumDaysToShow);
                this.tag        = tag;

                if (string.IsNullOrEmpty(tag))
                {
                    throw new NoDataException();
                }

                GraphPointData[] graphData = CreateGraphData();
                Appear();
                dashboardGraph.Initialize(GetMinScore(graphData), GetMaxScore(graphData), this.daysToShow);
                dashboardGraph.ShowElements(graphData);
            }
            catch (NoDataException)
            {
                warningsManager.ShowWarning(EmptyDashboardMessage);
            }
        }