IDesignerGlyphProvider 인터페이스

정의

주의

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

Activity Designer에 표시할 문자 모양 배열을 만들기 위해 문자 공급자 클래스가 사용하는 메서드를 정의합니다.

public interface class IDesignerGlyphProvider
public interface IDesignerGlyphProvider
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public interface IDesignerGlyphProvider
type IDesignerGlyphProvider = interface
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type IDesignerGlyphProvider = interface
Public Interface IDesignerGlyphProvider
특성

예제

다음 코드 예제에서는 IDesignerGlyphProvider 인터페이스를 구현하는 방법을 보여 줍니다. Activity Designer 화면에 사용자 지정 문자 모양 개체를 그리기 위해 GetGlyphs 메서드를 구현하는 방법을 보여 줍니다.

이 코드 예제는 DesignerGlyphProvider.cs 파일에 있는 Workflow Monitor SDK 샘플의 일부입니다. 자세한 내용은 워크플로 모니터합니다.

//Custom glyphprovider used to draw the monitor glyphs on the designer surface
internal class WorkflowMonitorDesignerGlyphProvider : IDesignerGlyphProvider
{
    private Dictionary<string, ActivityStatusInfo> activityStatusList;

    internal WorkflowMonitorDesignerGlyphProvider(Dictionary<string, ActivityStatusInfo> activityStatusList)
    {
        this.activityStatusList = activityStatusList;
    }

    ActivityDesignerGlyphCollection IDesignerGlyphProvider.GetGlyphs(ActivityDesigner activityDesigner)
    {
        ActivityDesignerGlyphCollection glyphList = new ActivityDesignerGlyphCollection();

        //Walk all of the activities and use the 'CompletedGlyph' for all activities that are not 'closed'
        foreach (ActivityStatusInfo activityStatus in activityStatusList.Values)
        {
            if (activityStatus.Name == activityDesigner.Activity.QualifiedName)
            {
                if (activityStatus.Status == "Closed")
                    glyphList.Add(new CompletedGlyph());
                else
                    glyphList.Add(new ExecutingGlyph());
            }
        }

        return glyphList;
    }
}
'Custom glyphprovider used to draw the monitor glyphs on the designer surface
Friend Class WorkflowMonitorDesignerGlyphProvider
    Implements IDesignerGlyphProvider

    Dim activityStatusList As Dictionary(Of String, ActivityStatusInfo)

    Friend Sub New(ByVal activityStatusList As Dictionary(Of String, ActivityStatusInfo))
        Me.activityStatusList = activityStatusList
    End Sub
    Public Function GetGlyphs(ByVal activityDesigner As System.Workflow.ComponentModel.Design.ActivityDesigner) As System.Workflow.ComponentModel.Design.ActivityDesignerGlyphCollection Implements System.Workflow.ComponentModel.Design.IDesignerGlyphProvider.GetGlyphs
        Dim glyphList As ActivityDesignerGlyphCollection = New ActivityDesignerGlyphCollection()

        'Walk all of the activities and use the 'CompletedGlyph' for all activities that are not 'closed'
        For Each activityStatus As ActivityStatusInfo In activityStatusList.Values
            If activityStatus.Name = activityDesigner.Activity.Name Then
                If activityStatus.Status = "Closed" Then
                    glyphList.Add(New CompletedGlyph())
                Else
                    glyphList.Add(New ExecutingGlyph())
                End If
            End If
        Next

        Return glyphList
    End Function
End Class

설명

참고

이 자료에서는 더 이상 사용되지 않는 형식과 네임스페이스에 대해 설명합니다. 자세한 내용은 Deprecated Types in Windows Workflow Foundation 4.5(Windows Workflow Foundation 4.5에서 사용되지 않는 형식)를 참조하세요.

이 인터페이스에서는 Activity Designer에 해당 DesignerGlyph 개체 집합을 제공하기 위해 구현 클래스가 사용해야 하는 메서드를 정의합니다. 또한 구현 클래스는 DesignerGlyph 개체를 ActivityDesigner 개체에 렌더링해야 합니다.

메서드

GetGlyphs(ActivityDesigner)
사용되지 않음.

지정된 Activity Designer와 연결된 문자 모양의 배열을 반환합니다.

적용 대상

추가 정보