Share via


IDesignerGlyphProvider Arabirim

Tanım

Dikkat

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

Glif sağlayıcı sınıflarının bir etkinlik tasarımcısında görüntülenecek bir dizi glif oluşturmak için kullandığı yöntemi tanımlar.

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
Öznitelikler

Örnekler

Aşağıdaki kod örneği arabirimini nasıl uygulayabileceğinizi IDesignerGlyphProvider gösterir. Bir etkinlik tasarımcısı yüzeyine özel glif nesneleri çizmek için yöntemini nasıl uygulayabileceğinizi GetGlyphs gösterir.

Bu kod örneği, DesignerGlyphProvider.cs dosyasındaki İş Akışı İzleyicisi SDK Örneğinin bir parçasıdır. Daha fazla bilgi için bkz . İş Akışı İzleyicisi.

//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

Açıklamalar

Not

Bu malzeme artık kullanılmayan türleri ve ad alanlarını açıklamaktadır. Daha fazla bilgi için bkz. Windows Workflow Foundation 4.5'te Kullanım Dışı Türler.

Bu arabirim, etkinlik tasarımcılarına uygun bir nesne kümesi DesignerGlyph sağlamak için sınıfları uygulayan yöntemi tanımlar. Uygulayan sınıf da nesneleri nesne üzerinde ActivityDesigner işlemelidirDesignerGlyph.

Yöntemler

GetGlyphs(ActivityDesigner)
Geçersiz.

Belirtilen etkinlik tasarımcısıyla ilişkili bir dizi glif döndürür.

Şunlara uygulanır

Ayrıca bkz.