本文整理汇总了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);
}
示例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);
}
}
示例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) );
}
示例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);
}
示例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++;
}
}
示例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);
}
}