Ejemplo n.º 1
0
        public static string GetFriendlyValue(DiagramMarkType value)
        {
            switch (value)
            {
            case DiagramMarkType.Normal:
                return(Strings.DiagramMarkTypeNormalFriendlyValue);

            case DiagramMarkType.Muted:
                return(Strings.DiagramMarkTypeMutedFriendlyValue);

            case DiagramMarkType.Root:
                return(Strings.DiagramMarkTypeRootFriendlyValue);

            case DiagramMarkType.Open:
                return(Strings.DiagramMarkTypeOpenFriendlyValue);

            case DiagramMarkType.OpenRoot:
                return(Strings.DiagramMarkTypeOpenRootFriendlyValue);

            case DiagramMarkType.Bottom:
                return(Strings.DiagramMarkTypeBottomFriendlyValue);
            }

            return(GetFriendlyValue((object)value));
        }
Ejemplo n.º 2
0
        public DiagramMarkStyleWrapper(DiagramStyle style, DiagramMarkType markType = DiagramMarkType.Normal)
        {
            if (null == style)
            {
                throw new ArgumentNullException("style");
            }

            Style    = style;
            MarkType = markType;
        }
Ejemplo n.º 3
0
        public void ForEachMarkType(Action action)
        {
            if (null == action)
            {
                throw new ArgumentNullException("action");
            }

            DiagramMarkType original = MarkType;

            foreach (DiagramMarkType markType in (DiagramMarkType[])Enum.GetValues(typeof(DiagramMarkType)))
            {
                MarkType = markType;
                action();
            }

            MarkType = original;
        }
Ejemplo n.º 4
0
 public DiagramMarkStyleWrapper(DiagramStyle style, DiagramMarkType markType = DiagramMarkType.Normal)
 {
     Style    = style ?? throw new ArgumentNullException(nameof(style));
     MarkType = markType;
 }