public async void AddSelectedDataTypesToTimeLineAsync(SessionData _sessionData, List <DataType> _dataTypes)
        {
            Debug.Log("______________Adding:");
            Debug.Log("From: " + _sessionData.sessionFolder.sessionId);

            foreach (DataType dt in _dataTypes)
            {
                switch (TimeLineHelpers.GetEntryTypeForDataType(dt))
                {
                case EntryTypes.INSTANTMARKERS:
                    Debug.Log(dt);
                    Timeline.instance.AddMarkerGraph(_sessionData, dt);
                    break;

                case EntryTypes.LINEGRAPH:
                    Debug.Log(dt);
                    Timeline.instance.AddLineGraph(_sessionData, dt);
                    break;
                }

                // Build in a break
                await Task.Delay(10);
            }

            HideDataTypeListMenu();
        }
Exemplo n.º 2
0
        public void UpdateCurrentTimeValue(float _timeStamp)
        {
            float result = TimeLineHelpers.GetValueAtTimestamp(_timeStamp, data);

            valueDisplayer.UpdateGraphValues(subGraphID, result);

            if (dataType == DataType.EOM)
            {
                sessionData.currentEOMvalue = result;
            }
        }
Exemplo n.º 3
0
        // ====================================================================================================

        public void InitData(SessionData _sessionData, DataType _dataType)
        {
            sessionData = _sessionData;
            dataType    = _dataType;

            valueDisplayer.SetBarColor(sessionData.sessionColor);
            valueDisplayer.SetMarkersInfo(TimeLineHelpers.SplitCamelCase(_dataType.ToString()), sessionData.sessionVariables.timeseries[_dataType].timestamp.Count.ToString());

            // Tell the button on the displayer to remove entire entry when clicked
            valueDisplayer.markersCloseButton.onClick.AddListener(delegate { RemoveBridge(); });

            // Flag this datatype as shown
            sessionData.dataTypes[_dataType] = true;

            RefreshGraph();
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
0
 void UpdateCurrentTime(float _timeStamp)
 {
     currentTimeStampField.text = TimeLineHelpers.GetTimeFormat(_timeStamp, true);
 }