DesignerGlyph 클래스

정의

주의

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

Activity Designer의 맨 위 Z 순서 위치에서 문자 모양을 그립니다.

public ref class DesignerGlyph abstract
public abstract class DesignerGlyph
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public abstract class DesignerGlyph
type DesignerGlyph = class
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type DesignerGlyph = class
Public MustInherit Class DesignerGlyph
상속
DesignerGlyph
파생
특성

예제

다음 코드 예제에서는 DesignerGlyph 클래스에서 파생되는 문자 모양 클래스를 보여 줍니다. 코드는 GetBoundsOnPaint 메서드를 재정의합니다.

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

//Define a glyph to show an activity is executing, i.e. not 'closed'
internal sealed class ExecutingGlyph : DesignerGlyph
{
    internal ExecutingGlyph()
    {
    }

    public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
    {
        Rectangle imageBounds = Rectangle.Empty;
        Image image = Resources.Executing;
        if (image != null)
        {
            Size glyphSize = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize;
            imageBounds.Location = new Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2);
            imageBounds.Size = glyphSize;
        }
        return imageBounds;
    }

    protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
    {
        Bitmap bitmap = Resources.Executing;
        bitmap.MakeTransparent(Color.FromArgb(0, 255, 255));
        if (bitmap != null)
            graphics.DrawImage(bitmap, GetBounds(designer, activated), new Rectangle(Point.Empty, bitmap.Size), GraphicsUnit.Pixel);
    }
}
'Define a glyph to show an activity is executing, i.e. not 'closed'
Friend Class ExecutingGlyph
    Inherits DesignerGlyph
    Public Overrides Function GetBounds(ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner, ByVal activated As Boolean) As System.Drawing.Rectangle
        Dim imageBounds As Rectangle = Rectangle.Empty
        Dim image As Image = AppResources.Executing
        If Not image Is Nothing Then
            Dim glyphSize As Size = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize
            imageBounds.Location = New Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2)
            imageBounds.Size = glyphSize
        End If
        Return imageBounds
    End Function

    Protected Overrides Sub OnPaint(ByVal graphics As System.Drawing.Graphics, ByVal activated As Boolean, ByVal ambientTheme As System.Workflow.ComponentModel.Design.AmbientTheme, ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner)
        Dim bitmap As Bitmap = AppResources.Executing
        bitmap.MakeTransparent(Color.FromArgb(0, 255, 255))

        If Not bitmap Is Nothing Then
            graphics.DrawImage(bitmap, GetBounds(designer, activated), New Rectangle(Point.Empty, bitmap.Size), GraphicsUnit.Pixel)
        End If
    End Sub
End Class

설명

참고

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

DesignerGlyph 클래스는 워크플로 디자인 화면에서 사용하는 모든 디자이너 문자 모양의 기본 클래스입니다.

활동 디자이너 개발자는 DesignerGlyph에서 상속된 클래스를 사용하여 사용자 지정 문자 모양을 ActivityDesigner의 화면에 그릴 수 있습니다. DesignerGlyph 클래스는 최상위 Z 순서에서 그러한 문자 모양을 그리며, 사용자 지정 문자 모양의 Priority 값을 기준으로 디자이너의 다른 모든 문자 모양의 맨 위에 사용자 지정 문자 모양을 시각적으로 배치합니다. Priority 속성의 하위 값은 상위 우선 순위를 나타내므로 Activity Designer의 맨 위 Z 순서 위치에 문자 모양을 그립니다.

구현자 참고

DesignerGlyph에서 상속하는 경우 OnPaint(Graphics, Boolean, AmbientTheme, ActivityDesigner) 멤버를 재정의해야 합니다.

생성자

DesignerGlyph()
사용되지 않음.

파생 클래스에서 구현되는 경우에는 DesignerGlyph 클래스의 새 인스턴스를 초기화합니다.

필드

HighestPriority
사용되지 않음.

DesignerGlyph에 대해 가능한 최상위 우선 순위를 나타냅니다. 이 값은 상수입니다.

LowestPriority
사용되지 않음.

DesignerGlyph에 대해 가능한 최하위 우선 순위를 나타냅니다. 이 값은 상수입니다.

NormalPriority
사용되지 않음.

DesignerGlyph에 대한 보통 우선 순위를 나타냅니다. 이 값은 상수입니다.

속성

CanBeActivated
사용되지 않음.

DesignerGlyph가 자신과 연결된 ActivityDesigner에서 포커스를 얻을 수 있는지 여부를 나타내는 값을 가져옵니다.

Priority
사용되지 않음.

활동 디자인 화면의 디자이너 문자 모양에 대한 우선 순위 설정을 가져옵니다.

메서드

Equals(Object)
사용되지 않음.

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetBounds(ActivityDesigner, Boolean)
사용되지 않음.

지정된 ActivityDesigner의 문자 모양의 경계를 반환합니다.

GetHashCode()
사용되지 않음.

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()
사용되지 않음.

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()
사용되지 않음.

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnActivate(ActivityDesigner)
사용되지 않음.

문자 모양을 활성화한 작업이 수행된 문자 모양을 나타냅니다.

OnPaint(Graphics, Boolean, AmbientTheme, ActivityDesigner)
사용되지 않음.

파생 클래스에서 재정의된 경우 활동 디자이너 화면에 문자 모양을 렌더링하는 데 필요한 작업을 수행합니다.

ToString()
사용되지 않음.

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보