Ejemplo n.º 1
0
        protected void SetOrientation()
        {
            var orientation = OrientationModule.GetOrientationForElement(TargetNodes.First());

            switch (orientation)
            {
            case Orientation.Horizontal:
                StringOrientation = StringOrientation.Horizontal;
                break;

            default:
                StringOrientation = StringOrientation.Vertical;
                break;
            }
        }
Ejemplo n.º 2
0
        protected Tuple <bool, StringOrientation> GetOrientation()
        {
            var value = new Tuple <bool, StringOrientation>(false, StringOrientation.Vertical);
            var node  = TargetNodes.FirstOrDefault();

            if (node != null && node.Properties.Contains(OrientationDescriptor._typeId))
            {
                var orientation = OrientationModule.GetOrientationForElement(node);
                switch (orientation)
                {
                case Orientation.Horizontal:
                    value = new Tuple <bool, StringOrientation>(true, StringOrientation.Horizontal);
                    break;

                default:
                    value = new Tuple <bool, StringOrientation>(true, StringOrientation.Vertical);
                    break;
                }
            }

            return(value);
        }