예제 #1
0
        public static AlternativeStateShape CreateFromShape(Page page, Shape alternativeStateShape)
        {
            AlternativeStateShape stateShape = new AlternativeStateShape(page, alternativeStateShape);

            stateShape.InitStyle();
            stateShape.GenerateMenu();
            return(stateShape);
        }
예제 #2
0
        public static AlternativeStateShape CreateWithNewShape(Page page, int alternativeIndex,
                                                               AlternativeState state)
        {
            string pathToStencil = Constants.MyShapesFolder + VisioFormulas.HiddenStencil;
            Shape  shape         = CreateShapeFromStencilMaster(page, pathToStencil, VisioFormulas.AlternativeState_ShapeMaster);

            AlternativeStateShape stateShape = new AlternativeStateShape(page, shape);

            stateShape.GenerateMenu();
            stateShape.RationallyType = ShapeNames.TypeAlternativeState;
            stateShape.Index          = alternativeIndex;
            stateShape.Name           = ShapeNames.AlternativeState;

            stateShape.State = state;
            stateShape.AddAction("addAlternative", string.Format(VisioFormulas.Formula_QUEUMARKEREVENT, "add"), Messages.Menu_AddAlternative, false);
            stateShape.AddAction("deleteAlternative", string.Format(VisioFormulas.Formula_QUEUMARKEREVENT, "delete"), Messages.Menu_DeleteAlternative,
                                 false);
            stateShape.InitStyle();
            return(stateShape);
        }