コード例 #1
0
        private async Task OnHandleValuesChanged(ParameterBase parameter)
        {
            // Path
            var identifierPath = parameter.IdentifierPath;

            // Check if it is string parameter
            var stringParameter = parameter as StringParameter;

            if (stringParameter != null)
            {
                ChangedTreeEvent?.Invoke(identifierPath, stringParameter.Value, stringParameter.Path);
            }

            var boolParameter = parameter as BooleanParameter;

            if (boolParameter != null)
            {
                ChangedTreeEvent?.Invoke(identifierPath, boolParameter.Value, boolParameter.Path);
            }

            var intParameter = parameter as IntegerParameter;

            if (intParameter != null)
            {
                ChangedTreeEvent?.Invoke(identifierPath, (int)intParameter.Value, intParameter.Path);
            }
        }
コード例 #2
0
        private void OnHandleValuesChanged(ParameterBase parameter)
        {
            // Path
            var identifierPath = parameter.IdentifierPath;

            // Check if it is string parameter
            if (parameter is StringParameter stringParameter)
            {
                ChangedTreeEvent?.Invoke(identifierPath, stringParameter.Value, stringParameter.Path);
            }

            if (parameter is BooleanParameter boolParameter)
            {
                ChangedTreeEvent?.Invoke(identifierPath, boolParameter.Value, boolParameter.Path);
            }

            if (parameter is IntegerParameter intParameter)
            {
                ChangedTreeEvent?.Invoke(identifierPath, (int)intParameter.Value, intParameter.Path);
            }
        }