Beispiel #1
0
        ReadStyle
        (
            ExcelTableReader.ExcelTableRow oRow,
            EdgeStyleConverter oEdgeStyleConverter,
            IEdge oEdge
        )
        {
            Debug.Assert(oRow != null);
            Debug.Assert(oEdgeStyleConverter != null);
            AssertValid();

            String sStyle;

            if (!oRow.TryGetNonEmptyStringFromCell(EdgeTableColumnNames.Style,
                                                   out sStyle))
            {
                return;
            }

            EdgeStyle eStyle;

            if (!oEdgeStyleConverter.TryWorkbookToGraph(sStyle, out eStyle))
            {
                OnWorkbookFormatErrorWithDropDown(oRow, EdgeTableColumnNames.Style,
                                                  "style");
            }

            oEdge.SetValue(ReservedMetadataKeys.PerEdgeStyle, eStyle);
        }
Beispiel #2
0
        //*************************************************************************
        //  Constructor: ReadWorkbookContext()
        //
        /// <summary>
        /// Initializes a new instance of the <see cref="ReadWorkbookContext" />
        /// class.
        /// </summary>
        //*************************************************************************

        public ReadWorkbookContext()
        {
            m_bIgnoreVertexLocations   = true;
            m_bFillIDColumns           = false;
            m_bPopulateVertexWorksheet = false;
            m_bReadEdgeWeights         = false;
            m_bReadGroups                  = false;
            m_bSaveGroupVertices           = false;
            m_bReadVertexLabels            = false;
            m_bReadEdgeLabels              = false;
            m_bReadVertexImages            = false;
            m_oDefaultVertexImageSize      = new Nullable <Single>();
            m_eDefaultVertexShape          = VertexShape.Disk;
            m_bReadAllEdgeAndVertexColumns = false;
            m_oGraphRectangle              = Rectangle.FromLTRB(0, 0, 100, 100);
            m_oColorConverter2             = new ColorConverter2();
            m_oBooleanConverter            = new BooleanConverter();
            m_oEdgeWidthConverter          = new EdgeWidthConverter();
            m_oEdgeStyleConverter          = new EdgeStyleConverter();
            m_oVertexRadiusConverter       = new VertexRadiusConverter();

            m_oVertexLocationConverter =
                new VertexLocationConverter(m_oGraphRectangle);

            m_oVertexNameDictionary  = new Dictionary <String, IVertex>();
            m_oEdgeRowIDDictionary   = new Dictionary <Int32, IIdentityProvider>();
            m_oVertexRowIDDictionary = new Dictionary <Int32, IIdentityProvider>();

            AssertValid();
        }