当前位置: 首页>>代码示例>>C#>>正文


C# IEdge.SetValue方法代码示例

本文整理汇总了C#中IEdge.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# IEdge.SetValue方法的具体用法?C# IEdge.SetValue怎么用?C# IEdge.SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEdge的用法示例。


在下文中一共展示了IEdge.SetValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssertValid

    SetCollapsedDConnectorMotifEdgeColor
    (
        IEdge oEdge,
        System.Drawing.Color oColor
    )
    {
        AssertValid();

        // If the edge already has a color, save it.  This will be restored by
        // RestoreExternalEdge().

        Object oPerColorAsObject;

        if ( oEdge.TryGetValue(ReservedMetadataKeys.PerColor,
            typeof(System.Drawing.Color), out oPerColorAsObject) )
        {
            oEdge.SetValue(ReservedMetadataKeys.PreCollapsePerEdgeColor,
                oPerColorAsObject);
        }

        // Set the new color.

        oEdge.SetValue(ReservedMetadataKeys.PerColor, oColor);
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:24,代码来源:CollapsedGroupDrawingManager.cs

示例2: typeof

    RestoreExternalEdge
    (
        IEdge expandedExternalEdge
    )
    {
        Debug.Assert(expandedExternalEdge != null);

        // If this class saved the edge's width before it was collapsed,
        // restore it.

        Object oPreCollapsePerEdgeWidthAsObject;

        if ( expandedExternalEdge.TryGetValue(
            ReservedMetadataKeys.PreCollapsePerEdgeWidth, typeof(Single),
            out oPreCollapsePerEdgeWidthAsObject) )
        {
            expandedExternalEdge.SetValue(ReservedMetadataKeys.PerEdgeWidth,
                oPreCollapsePerEdgeWidthAsObject);
        }

        // If this class saved the edge's color before it was collapsed,
        // restore it.

        Object oPreCollapsePerEdgeColorAsObject;

        if ( expandedExternalEdge.TryGetValue(
            ReservedMetadataKeys.PreCollapsePerEdgeColor,
            typeof(System.Drawing.Color),
            out oPreCollapsePerEdgeColorAsObject) )
        {
            expandedExternalEdge.SetValue(ReservedMetadataKeys.PerColor,
                oPreCollapsePerEdgeColorAsObject);
        }
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:34,代码来源:CollapsedGroupDrawingManager.cs

示例3: AssertValid

    ReadLabelFontSize
    (
        ExcelTableReader.ExcelTableRow oRow,
        FontSizeConverter oFontSizeConverter,
        IEdge oEdge
    )
    {
        Debug.Assert(oRow != null);
        Debug.Assert(oFontSizeConverter != null);
        AssertValid();

        String sLabelFontSize;

        if ( !oRow.TryGetNonEmptyStringFromCell(
            EdgeTableColumnNames.LabelFontSize, out sLabelFontSize) )
        {
            return;
        }

        Single fLabelFontSize;

        if ( !Single.TryParse(sLabelFontSize, out fLabelFontSize) )
        {
            Range oInvalidCell = oRow.GetRangeForCell(
                EdgeTableColumnNames.LabelFontSize);

            OnWorkbookFormatError( String.Format(

                "The cell {0} contains an invalid label font size.  The label"
                + " font size, which is optional, must be a number.  Any"
                + " number is acceptable, although {1} is used for any number"
                + " less than {1} and {2} is used for any number greater than"
                + " {2}."
                ,
                ExcelUtil.GetRangeAddress(oInvalidCell),
                FontSizeConverter.MinimumFontSizeWorkbook,
                FontSizeConverter.MaximumFontSizeWorkbook
                ),

                oInvalidCell
            );
        }

        oEdge.SetValue(ReservedMetadataKeys.PerEdgeLabelFontSize, 
            oFontSizeConverter.WorkbookToGraph(fLabelFontSize) );
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:46,代码来源:EdgeWorksheetReader.cs

示例4:

    HideEdge
    (
        IEdge oEdge
    )
    {
        Debug.Assert(oEdge != null);

        VisibilityKeyValue eSavedVisibility;

        if ( !TryGetEdgeVisibility(oEdge, ReservedMetadataKeys.Visibility,
            out eSavedVisibility) )
        {
            eSavedVisibility = VisibilityKeyValue.Visible;
        }

        oEdge.SetValue(ReservedMetadataKeys.SavedVisibility, eSavedVisibility);

        oEdge.SetValue(ReservedMetadataKeys.Visibility,
            VisibilityKeyValue.Hidden);
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:20,代码来源:GroupMetadataManager.cs

示例5: AssertValid

    CopyTo
    (
        IEdge [] array,
        Int32 index
    )
    {
        AssertValid();

        ArgumentChecker oArgumentChecker = this.ArgumentChecker;
        const String MethodName = "CopyTo";
        const String ArrayArgumentName = "array";
        const String IndexArgumentName = "index";

        oArgumentChecker.CheckArgumentNotNull(
            MethodName, ArrayArgumentName, array);

        oArgumentChecker.CheckArgumentNotNegative(
            MethodName, IndexArgumentName, index);

        if (array.Length - index < this.Count)
        {
            oArgumentChecker.ThrowArgumentException(MethodName,
                ArrayArgumentName,

                "The array is not large enough to hold the copied collection."
                );
        }

        foreach (IEdge oEdge in this)
        {
            Debug.Assert(index < array.Length);

            array.SetValue(oEdge, index);

            index++;
        }
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:37,代码来源:EdgeCollection.cs

示例6: AssertValid

    DrawEdge
    (
        IEdge oEdge,
        GraphDrawingContext oGraphDrawingContext
    )
    {
        Debug.Assert(oEdge != null);
        Debug.Assert(oGraphDrawingContext != null);
        AssertValid();

        EdgeDrawingHistory oEdgeDrawingHistory;

        if ( m_oEdgeDrawer.TryDrawEdge(oEdge, oGraphDrawingContext,
            out oEdgeDrawingHistory) )
        {
            Debug.Assert(oEdgeDrawingHistory != null);

            GetEdgeDrawingVisuals(oEdgeDrawingHistory).Children.Add(
                oEdgeDrawingHistory.DrawingVisual);

            // Save the EdgeDrawingHistory object.

            oEdge.SetValue(ReservedMetadataKeys.EdgeDrawingHistory,
                oEdgeDrawingHistory);
        }
    }
开发者ID:2014-sed-team3,项目名称:term-project,代码行数:26,代码来源:GraphDrawer.cs


注:本文中的IEdge.SetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。