示例#1
0
        private void ProcessCommand_ShapeSheet_ShapeTransform(Microsoft.Office.Interop.Visio.Shape shape, XElement shapeTransformElement)
        {
            VisioHlp.DisplayInWatchWindow(string.Format("{0}()",
                                                        System.Reflection.MethodInfo.GetCurrentMethod().Name));

            try
            {
                string width      = GetAttributeValueOrNull(shapeTransformElement.Attribute("Width"));
                string height     = GetAttributeValueOrNull(shapeTransformElement.Attribute("Height"));
                string pinX       = GetAttributeValueOrNull(shapeTransformElement.Attribute("PinX"));
                string pinY       = GetAttributeValueOrNull(shapeTransformElement.Attribute("PinY"));
                string flipX      = GetAttributeValueOrNull(shapeTransformElement.Attribute("FlipX"));
                string flipY      = GetAttributeValueOrNull(shapeTransformElement.Attribute("FlipY"));
                string locPinX    = GetAttributeValueOrNull(shapeTransformElement.Attribute("LocPinX"));
                string locPinY    = GetAttributeValueOrNull(shapeTransformElement.Attribute("LocPinY"));
                string angle      = GetAttributeValueOrNull(shapeTransformElement.Attribute("Angle"));
                string resizeMode = GetAttributeValueOrNull(shapeTransformElement.Attribute("Angle"));

                Actions.Visio_Shape.Set_ShapeTransform_Section(shape, width, height, pinX, pinY, flipX, flipY, locPinX, locPinY, angle, resizeMode);
            }
            catch (Exception ex)
            {
                VisioHlp.DisplayInWatchWindow(ex.ToString());
            }
        }
示例#2
0
        private void ProcessCommand_ShapeSheet_SetTextBlockFormat(Microsoft.Office.Interop.Visio.Shape shape, XElement setTextBlockFormatElement)
        {
            VisioHlp.DisplayInWatchWindow(string.Format("{0}()",
                                                        System.Reflection.MethodInfo.GetCurrentMethod().Name));

            try
            {
                string leftMargin     = setTextBlockFormatElement.Attribute("LeftMargin").Value;
                string topMargin      = setTextBlockFormatElement.Attribute("TopMargin").Value;
                string rightMargin    = setTextBlockFormatElement.Attribute("RightMargin").Value;
                string bottomMargin   = setTextBlockFormatElement.Attribute("BottomMargin").Value;
                string textDirection  = setTextBlockFormatElement.Attribute("TextDirection").Value;
                string verticalAlign  = setTextBlockFormatElement.Attribute("VerticalAlign").Value;
                string textBkgnd      = setTextBlockFormatElement.Attribute("TextBkgnd").Value;
                string textBkgndTrans = setTextBlockFormatElement.Attribute("TextBkgndTrans").Value;
                string defaultTabStop = setTextBlockFormatElement.Attribute("DefaultTabStop").Value;

                Actions.Visio_Shape.Set_TextBlockFormat_Section(shape, leftMargin, topMargin, rightMargin, bottomMargin,
                                                                textDirection, verticalAlign, textBkgnd, textBkgndTrans, defaultTabStop);
            }
            catch (Exception ex)
            {
                VisioHlp.DisplayInWatchWindow(ex.ToString());
            }
        }
示例#3
0
        private void ProcessCommand_ShapeSheet_SetFillFormat(Microsoft.Office.Interop.Visio.Shape shape, XElement setFillFormatElement)
        {
            VisioHlp.DisplayInWatchWindow(string.Format("{0}()",
                                                        System.Reflection.MethodInfo.GetCurrentMethod().Name));

            try
            {
                string fillForegnd = GetAttributeValueOrNull(setFillFormatElement.Attribute("FillForegnd"));

                string fillForegndTrans = GetAttributeValueOrNull(setFillFormatElement.Attribute("FillForegndTrans"));
                string fillBkgnd        = GetAttributeValueOrNull(setFillFormatElement.Attribute("FillBkgnd"));
                string fillBkgndTrans   = GetAttributeValueOrNull(setFillFormatElement.Attribute("FillBkgndTrans"));
                string fillPattern      = GetAttributeValueOrNull(setFillFormatElement.Attribute("FillPattern"));

                string shdwForegnd      = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShdwForegnd"));
                string shdwForegndTrans = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShdwForegndTrans"));
                string shdwPattern      = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShdwPattern"));
                string shapeShdwOffsetX = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwOffsetX"));
                string shapeShdwOffsetY = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwOffsetY"));

                string shapeShdwType         = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwType"));
                string shapeShdwObliqueAngle = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwObliqueAngle"));
                string shapeShdwScaleFactor  = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwScaleFactor"));

                string shapeShdwBlur = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwBlur"));
                string shapeShdwShow = GetAttributeValueOrNull(setFillFormatElement.Attribute("ShapeShdwShow"));

                //attribute = setFillFormatElement.Attribute("FillForegnd");
                //if (attribute != null) fillForegnd = setFillFormatElement.Attribute("FillForegnd").Value;


                //string fillForegndTrans = setFillFormatElement.Attribute("FillForegndTrans").Value;
                //string fillBkgnd = setFillFormatElement.Attribute("FillBkgnd").Value;
                //string fillBkgndTrans = setFillFormatElement.Attribute("FillBkgndTrans").Value;
                //string fillPattern = setFillFormatElement.Attribute("FillPattern").Value;

                //string shdwForegnd = setFillFormatElement.Attribute("ShdwForegnd").Value;
                //string shdwForegndTrans = setFillFormatElement.Attribute("ShdwForegndTrans").Value;
                //string shdwPattern = setFillFormatElement.Attribute("ShdwPattern").Value;
                //string shapeShdwOffsetX = setFillFormatElement.Attribute("ShapeShdwOffsetX").Value;
                //string shapeShdwOffsetY = setFillFormatElement.Attribute("ShapeShdwOffsetY").Value;

                //string shapeShdwType = setFillFormatElement.Attribute("ShapeShdwType").Value;
                //string shapeShdwObliqueAngle = setFillFormatElement.Attribute("ShapeShdwObliqueAngle").Value;
                //string shapeShdwScaleFactor = setFillFormatElement.Attribute("ShapeShdwScaleFactor").Value;

                //string shapeShdwBlur = setFillFormatElement.Attribute("ShapeShdwBlur").Value;
                //string shapeShdwShow = setFillFormatElement.Attribute("ShapeShdwShow").Value;


                Actions.Visio_Shape.Set_FillFormat_Section(shape,
                                                           fillForegnd, fillForegndTrans, fillBkgnd, fillBkgndTrans, fillPattern,
                                                           shdwForegnd, shdwForegndTrans, shdwPattern, shapeShdwOffsetX, shapeShdwOffsetY,
                                                           shapeShdwType, shapeShdwObliqueAngle, shapeShdwScaleFactor, shapeShdwBlur, shapeShdwShow);
            }
            catch (Exception ex)
            {
                VisioHlp.DisplayInWatchWindow(ex.ToString());
            }
        }
示例#4
0
        private void ProcessCommand_ShapeSheet_AddControlsRow(Microsoft.Office.Interop.Visio.Shape shape, XElement addControlsRowElement)
        {
            VisioHlp.DisplayInWatchWindow(string.Format("{0}()",
                                                        System.Reflection.MethodInfo.GetCurrentMethod().Name));

            try
            {
                // Required attributes

                string rowName   = addControlsRowElement.Attribute("Name").Value;
                string X         = addControlsRowElement.Attribute("X").Value;
                string Y         = addControlsRowElement.Attribute("Y").Value;
                string XDynamics = addControlsRowElement.Attribute("XDynamics").Value;
                string YDynamics = addControlsRowElement.Attribute("YDynamics").Value;
                string XBehavior = addControlsRowElement.Attribute("XBehavior").Value;
                string YBehavior = addControlsRowElement.Attribute("YBehavior").Value;
                string canGlue   = addControlsRowElement.Attribute("CanGlue").Value;
                string tip       = addControlsRowElement.Attribute("Tip").Value;

                Actions.Visio_Shape.Populate_Controls_Section(shape, rowName, X, Y, XDynamics, YDynamics, XBehavior, YBehavior, canGlue, tip);
            }
            catch (Exception ex)
            {
                VisioHlp.DisplayInWatchWindow(ex.ToString());
            }
        }