SetGueValues() public method

public SetGueValues ( IVariableFinder rvf ) : void
rvf IVariableFinder
return void
Ejemplo n.º 1
0
        public void UpdateSelectedObjectsPositionAndDimensions()
        {
            var elementStack = SelectedState.Self.GetTopLevelElementStack();

            if (SelectedState.Self.SelectedInstances.GetCount() != 0)
            {
                foreach (var instance in SelectedState.Self.SelectedInstances)
                {
                    RefreshPositionsAndScalesForInstance(instance, elementStack);
                }

                foreach (var ipso in SelectedState.Self.SelectedIpsos)
                {
                    GraphicalUiElement asGue = ipso as GraphicalUiElement;
                    if (asGue != null)
                    {
                        RecursiveVariableFinder rvf = new RecursiveVariableFinder(asGue.Tag as InstanceSave, SelectedState.Self.SelectedElement);
                        asGue.SetGueValues(rvf);
                    }
                }
            }
            else
            {
                GraphicalUiElement ipso = WireframeObjectManager.Self.GetSelectedRepresentation();

                if (ipso != null)
                {
                    ElementSave elementSave = SelectedState.Self.SelectedElement;

                    var state = elementSave.DefaultState;
                    if (SelectedState.Self.SelectedStateSave != null)
                    {
                        state = SelectedState.Self.SelectedStateSave;
                    }
                    RecursiveVariableFinder rvf = new RecursiveVariableFinder(state);
                    (ipso as GraphicalUiElement).SetGueValues(rvf);
                }
                else if (SelectedState.Self.SelectedElement != null)
                {
                    foreach (var instance in SelectedState.Self.SelectedElement.Instances)
                    {
                        RefreshPositionsAndScalesForInstance(instance, elementStack);
                    }
                }
            }

            GuiCommands.Self.RefreshWireframe();
        }