本文整理汇总了C#中System.Workflow.ComponentModel.Design.ActivityDesigner类的典型用法代码示例。如果您正苦于以下问题:C# ActivityDesigner类的具体用法?C# ActivityDesigner怎么用?C# ActivityDesigner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActivityDesigner类属于System.Workflow.ComponentModel.Design命名空间,在下文中一共展示了ActivityDesigner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetGlyphs
/// <summary>
/// Gets the glyphs for the associated activity designer
/// </summary>
/// <param name="activityDesigner"></param>
/// <returns></returns>
public ActivityDesignerGlyphCollection GetGlyphs(ActivityDesigner activityDesigner)
{
ActivityDesignerGlyphCollection glyphs = new ActivityDesignerGlyphCollection();
//The glyph position indicates how far down the glyph is drawn
int glyphPosition = -1;
string validationError = string.Empty;
if (profileManager.IsActivityValid(activityDesigner.Activity, out validationError))
{
//Add an error glyph if the selected activity is not configured correctly
++glyphPosition;
glyphs.Add(new ErrorActivityGlyph(validationError));
}
if (profileManager.IsTracked(activityDesigner.Activity))
{
//Add the glyph for the trackpoint
glyphs.Add(new TrackedActivityGlyph(++glyphPosition, redPin));
}
if (profileManager.IsMatchedByDerivedTrackPoint(activityDesigner.Activity))
{
//Add faded derive match glyph
glyphs.Add(new TrackedActivityGlyph(++glyphPosition, fadedRedPin));
}
string annotation = profileManager.GetAnnotation(activityDesigner.Activity);
if (annotation != null)
{
//If an annotation exists, use the tooltip via the description.
activityDesigner.Activity.Description = annotation;
}
return glyphs;
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:35,代码来源:TrackingProfileGlyph.cs
示例2: OnPaint
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
Rectangle bounds = GetBounds(designer, activated);
graphics.FillRectangle(AmbientTheme.FadeBrush, bounds);
graphics.FillRectangle(ambientTheme.CommentIndicatorBrush, bounds);
graphics.DrawRectangle(ambientTheme.CommentIndicatorPen, bounds);
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:7,代码来源:CommentGlyph.cs
示例3: GetGrabHandles
public virtual Rectangle[] GetGrabHandles(ActivityDesigner designer)
{
Size selectionSize = WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize;
Size grabHandleSize = new Size(selectionSize.Width, selectionSize.Height);
Rectangle selectionRect = GetBounds(designer, false);
selectionRect.Inflate(selectionSize.Width, selectionSize.Height);
//we need grab handles only in case this activity is an immediate child of a free-form activity
//otherwise, no grab handles
ActivityDesigner parentDesigner = designer.ParentDesigner;
Rectangle[] grabHandles = null;
if (parentDesigner != null && parentDesigner is FreeformActivityDesigner)
{
grabHandles = new Rectangle[8];
grabHandles[0] = new Rectangle(selectionRect.Location, grabHandleSize);
grabHandles[1] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Top), grabHandleSize);
grabHandles[2] = new Rectangle(selectionRect.Right - grabHandleSize.Width, selectionRect.Top, grabHandleSize.Width, grabHandleSize.Height);
grabHandles[3] = new Rectangle(new Point(selectionRect.Right - grabHandleSize.Width, selectionRect.Top + (selectionRect.Height - grabHandleSize.Height) / 2), grabHandleSize);
grabHandles[4] = new Rectangle(selectionRect.Right - grabHandleSize.Width, selectionRect.Bottom - grabHandleSize.Height, grabHandleSize.Width, grabHandleSize.Height);
grabHandles[5] = new Rectangle(new Point(selectionRect.Left + (selectionRect.Width - grabHandleSize.Width) / 2, selectionRect.Bottom - grabHandleSize.Height), grabHandleSize);
grabHandles[6] = new Rectangle(selectionRect.Left, selectionRect.Bottom - grabHandleSize.Height, grabHandleSize.Width, grabHandleSize.Height);
grabHandles[7] = new Rectangle(new Point(selectionRect.Left, selectionRect.Top + (selectionRect.Height - grabHandleSize.Height) / 2), grabHandleSize);
return grabHandles;
}
else
{
grabHandles = new Rectangle[1];
grabHandles[0] = new Rectangle(selectionRect.Location, grabHandleSize);
}
return grabHandles;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:33,代码来源:SelectionGlyph.cs
示例4: GetSizingEdge
private DesignerEdges GetSizingEdge(ActivityDesigner designer, Point point)
{
DesignerEdges none = DesignerEdges.None;
Size selectionSize = WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize;
Rectangle bounds = designer.Bounds;
Point[] line = new Point[] { new Point(bounds.Left, bounds.Top), new Point(bounds.Left, bounds.Bottom) };
if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, line)) <= (selectionSize.Width + 1))
{
none |= DesignerEdges.Left;
}
Point[] pointArray2 = new Point[] { new Point(bounds.Left, bounds.Top), new Point(bounds.Right, bounds.Top) };
if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, pointArray2)) <= (selectionSize.Height + 1))
{
none |= DesignerEdges.Top;
}
Point[] pointArray3 = new Point[] { new Point(bounds.Right, bounds.Top), new Point(bounds.Right, bounds.Bottom) };
if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, pointArray3)) <= (selectionSize.Width + 1))
{
none |= DesignerEdges.Right;
}
Point[] pointArray4 = new Point[] { new Point(bounds.Left, bounds.Bottom), new Point(bounds.Right, bounds.Bottom) };
if (Math.Floor(DesignerGeometryHelper.DistanceFromPointToLineSegment(point, pointArray4)) <= (selectionSize.Height + 1))
{
none |= DesignerEdges.Bottom;
}
return none;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:ResizingMessageFilter.cs
示例5: OnPaint
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);
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:7,代码来源:DesignerGlyphProvider.cs
示例6: DesignerLayoutConnectionPoint
public DesignerLayoutConnectionPoint(ActivityDesigner associatedDesigner, int connectionIndex, CompositeActivity eventHandler, DesignerEdges designerEdges)
: base(associatedDesigner, designerEdges, connectionIndex)
{
Debug.Assert(designerEdges == DesignerEdges.Left || designerEdges == DesignerEdges.Right);
_eventHandler = eventHandler;
_designerEdges = designerEdges;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:StateDesigner.Layouts.cs
示例7: OnPaint
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
if (!this.GetBounds(designer, activated).Size.IsEmpty)
{
bool roundEdges = (designer.DesignerTheme.DesignerGeometry == DesignerGeometry.RoundedRectangle) && !designer.IsRootDesigner;
ActivityDesignerPaint.DrawDropShadow(graphics, designer.Bounds, designer.DesignerTheme.BorderPen.Color, 4, LightSourcePosition.Top | LightSourcePosition.Left, 0.5f, roundEdges);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ShadowGlyph.cs
示例8: DesignerView
public DesignerView(int viewId, string text, Image image, ActivityDesigner associatedDesigner)
: this(viewId, text, image)
{
if (associatedDesigner == null)
throw new ArgumentNullException("associatedDesigner");
this.designer = associatedDesigner;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:8,代码来源:DesignerView.cs
示例9: GetBounds
public virtual Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
{
throw new ArgumentNullException("designer");
}
return designer.Bounds;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:DesignerGlyph.cs
示例10: GetBounds
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
throw new ArgumentNullException("designer");
Rectangle bounds = _layout.Bounds;
return bounds;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:StateDesigner.CommentLayoutGlyph.cs
示例11: GetBounds
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
throw new ArgumentNullException("designer");
Rectangle rectangle = designer.Bounds;
rectangle.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize.Width / 2, WorkflowTheme.CurrentTheme.AmbientTheme.SelectionSize.Height / 2);
return rectangle;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:SelectionGlyph.cs
示例12: ActivityDesignerAccessibleObject
/// <summary>
/// Constructs the accessibility class for ActivityDesigner
/// </summary>
/// <param name="activityDesigner">ActivityDesigner associated with accessiblity object</param>
public ActivityDesignerAccessibleObject(ActivityDesigner activityDesigner)
{
if (activityDesigner == null)
throw new ArgumentNullException("activityDesigner");
if (activityDesigner.Activity == null)
throw new ArgumentException(DR.GetString(DR.DesignerNotInitialized), "activityDesigner");
this.activityDesigner = activityDesigner;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:13,代码来源:ActivityDesignerAccessibleObject.cs
示例13: HitTestInfo
public HitTestInfo(ActivityDesigner designer, HitTestLocations location)
{
if (designer == null)
{
throw new ArgumentNullException("designer");
}
this.activityDesigner = designer;
this.location = location;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:HitTestInfo.cs
示例14: OnPaint
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
Rectangle bounds = GetBounds(designer, activated);
if (!bounds.Size.IsEmpty)
{
bool drawRounded = (designer.DesignerTheme.DesignerGeometry == DesignerGeometry.RoundedRectangle && !designer.IsRootDesigner);
ActivityDesignerPaint.DrawDropShadow(graphics, designer.Bounds, designer.DesignerTheme.BorderPen.Color, AmbientTheme.DropShadowWidth, LightSourcePosition.Left | LightSourcePosition.Top, 0.5f, drawRounded);
}
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:ShadowGlyph.cs
示例15: OnActivate
protected override void OnActivate(ActivityDesigner designer)
{
if ((designer != null) && (designer.DesignerActions.Count > 0))
{
Rectangle bounds = this.GetBounds(designer, false);
Point location = designer.ParentView.LogicalPointToScreen(new Point(bounds.Left, bounds.Bottom));
DesignerHelpers.ShowDesignerVerbs(designer, location, DesignerHelpers.GetDesignerActionVerbs(designer, designer.DesignerActions));
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:ConfigErrorGlyph.cs
示例16: GetBounds
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
throw new ArgumentNullException("designer");
Rectangle bounds = designer.Bounds;
bounds.Inflate(AmbientTheme.DropShadowWidth + 1, AmbientTheme.DropShadowWidth + 1);
return bounds;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:ShadowGlyph.cs
示例17: GetBounds
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
throw new ArgumentNullException("designer");
Rectangle bounds = designer.Bounds;
bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin);
return bounds;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:9,代码来源:ReadOnlyActivityGlyph.cs
示例18: GetBounds
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
{
throw new ArgumentNullException("designer");
}
Rectangle bounds = designer.Bounds;
bounds.Inflate(5, 5);
return bounds;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:ShadowGlyph.cs
示例19: OnPaint
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
if (designer == null)
throw new ArgumentNullException("designer");
if (graphics == null)
throw new ArgumentNullException("graphics");
Rectangle bounds = GetBounds(designer, false);
graphics.FillRectangle(StateMachineDesignerPaint.FadeBrush, bounds);
graphics.FillRectangle(ambientTheme.CommentIndicatorBrush, bounds);
graphics.DrawRectangle(ambientTheme.CommentIndicatorPen, bounds);
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:11,代码来源:StateDesigner.CommentLayoutGlyph.cs
示例20: DrawDesignerGlyphs
internal void DrawDesignerGlyphs(ActivityDesignerPaintEventArgs e, ActivityDesigner designer)
{
foreach (DesignerGlyph glyph in this.GetDesignerGlyphs(designer))
{
glyph.Draw(e.Graphics, designer);
}
if ((this.activeGlyph != null) && (designer == this.activeDesigner))
{
this.activeGlyph.DrawActivated(e.Graphics, this.activeDesigner);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:GlyphManager.cs
注:本文中的System.Workflow.ComponentModel.Design.ActivityDesigner类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论