コード例 #1
0
        public void SetData(MeasurementViewData data)
        {
            _leftLinePullGauge.SetPullForce(data.LineColor, data.LeftLinePull);
            _rightLinePullGauge.SetPullForce(data.LineColor, data.RightLinePull);

            _holdLines.color = data.LineColor;
            _holdLines.SetMutableString(data.HoldLines);

            _speedStr
            .Clear()
            .Append("↘ ")
            .Append(data.Speed)
            .Append(" ")
            .Append(data.SpeedUnit);
            _speed.SetValue(_speedStr);

            _speedDetailStr.Clear();
            const string indentation = "    ";

            _speedDetailStr.Append(indentation)
            .Append("→ ")
            .Append(data.HorizontalSpeed)
            .Append(" ")
            .Append(data.SpeedUnit)
            .Append(Environment.NewLine)
            .Append(indentation)
            .Append("↓ ")
            .Append(data.VerticalSpeed)
            .Append(" ")
            .Append(data.SpeedUnit);
            _speedDetail.SetMutableString(_speedDetailStr);

            _altitudeStr
            .Clear()
            .Append("↕ ")
            .Append(data.Altitude)
            .Append(data.AltitudeUnit);
            _altitude.SetValue(_altitudeStr);

            WriteValue(_glideRatio, _glideRatioStr, data.GlideRatio);
            WriteValue(_gforce, _gForceStr, data.GForce);
        }