// Start loading data in the given sessiondata container
        public void OpenSessionFile(SessionData _sessionData)
        {
            HideSessionListMenu();

            string filePath = _sessionData.sessionFolder.sessionFilepath;

            if (_sessionData.isLoaded)
            {
                SessionLoaded(_sessionData);
            }
            else
            {
                try
                {
                    _sessionData.sessionVariables = SessionVariablesController.instance.LoadSessionValues(filePath);
                }
                catch (System.Exception e)
                {
                    Debug.Log("Exception while opening session from path " + filePath + " > " + e.Message);
                    return;
                }

                EoM_Events.Send_SessionDataLoaded(_sessionData);
            }
        }
        public void Remove(int _subGraphID, int _sessionDataKey)
        {
            Debug.Log("ValueDisplayer Remove " + entryType);

            switch (entryType)
            {
            case EntryTypes.INSTANTMARKERS:
                timeLineEntry.RemoveEntry();
                break;

            case EntryTypes.EXCITEOMETER:
                EoM_Events.Send_RemoveAllFromSession(_sessionDataKey);
                break;

            case EntryTypes.LINEGRAPH:
                timeLineEntry.rightBlock.GetComponent <LineGraphData>().RemoveSubGraph(_subGraphID);
                break;
            }
        }
Esempio n. 3
0
        // ====================================================================================================
        #region Timeline Updates

        void UpdateTimeline()
        {
            ClearObjects();

            // resize the content to the full width on this zoom level
            float newWidth = oneSecondUnit * oneTimeChunk;

            rightScrollableContent.sizeDelta = new Vector2(newWidth, rightScrollableContent.sizeDelta.y);
            scrollableTimeBar.sizeDelta      = new Vector2(newWidth, scrollableTimeBar.sizeDelta.y);

            // BG
            holderBackgroundDividers.GetComponent <HorizontalLayoutGroup>().spacing = (dividerBackgroundFrequency * oneSecondUnit) - 1;

            for (int b = 0; b < ((oneTimeChunk / dividerBackgroundFrequency) + 1); b++)
            {
                backgroundDividers.Add(Instantiate(TimelineDivider, holderBackgroundDividers.transform));
            }

            // Seconds
            holderHeaderDividers.GetComponent <HorizontalLayoutGroup>().spacing = (dividerHeaderFrequency * oneSecondUnit) - 1;

            for (int s = 0; s < ((oneTimeChunk / dividerHeaderFrequency) + 1); s++)
            {
                headerDividers.Add(Instantiate(TimelineDivider, holderHeaderDividers.transform));
            }

            // Labels
            for (int n = 0; n < ((oneTimeChunk / LabelFrequency) + 1); n++)
            {
                GameObject label = Instantiate(TimeIndicatorPrefab, holderlabels.transform);
                label.GetComponent <TextMeshProUGUI>().text           = TimeLineHelpers.GetTimeFormat((startTime) + (n * LabelFrequency), false);
                label.GetComponent <RectTransform>().anchoredPosition = new Vector2((n * LabelFrequency) * oneSecondUnit, 0);
                labels.Add(label);
            }

            EoM_Events.Send_RefreshGraphs();
        }
 void SendCurrentTimeValue()
 {
     EoM_Events.Send_UpdateCurrentTimeValue(Timeline.instance.CalculateTimestampOnPosition(rectTransform.anchoredPosition.x));
 }
Esempio n. 5
0
 // When the user clicked on the TIMEBAR
 public void OnPointerDown()
 {
     EoM_Events.Send_SetTimeMarkerOnX(mouse.position.x.ReadValue());
 }
 // When the user clicked on the TIMEBAR
 public void OnPointerDown()
 {
     EoM_Events.Send_SetTimeMarkerOnX(Input.mousePosition.x);
 }
 public void HideTooltip()
 {
     EoM_Events.Send_HideTooltip();
 }
 public void ShowTooltip()
 {
     EoM_Events.Send_ShowTooltipInfo(label == null ? "Dummie tooltip random number " + UnityEngine.Random.Range(0f, 1000f) : label.text);
 }