Esempio n. 1
0
        private void FillStateDefinitionField()
        {
            var stateProperties = CurrentStateCombination.Class.StateProperties;

            if (stateProperties.Count > 1)
            {
                throw new NotSupportedException("Only classes with a zero or one StatePropertyDefinition are supported.");
            }

            var possibleStateDefinitions = new List <StateDefinition> ();

            if (stateProperties.Count > 0)
            {
                possibleStateDefinitions.AddRange(stateProperties[0].DefinedStates);
            }
            StateDefinitionField.SetBusinessObjectList(possibleStateDefinitions);
        }
Esempio n. 2
0
        public override void LoadValues(bool interim)
        {
            base.LoadValues(interim);

            if (CurrentStateCombination.Class.StateProperties.Count == 1)
            {
                if (!interim)
                {
                    FillStateDefinitionField();
                }

                var currentStateDefinition = GetStateDefinition(CurrentStateCombination);
                StateDefinitionField.LoadUnboundValue(currentStateDefinition, interim);
                StateDefinitionContainer.Visible = true;
            }
            else
            {
                StateDefinitionContainer.Visible = false;
            }
        }