Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
        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;
        }
            public ActivityDesignerGlyphCollection GetGlyphs(ActivityDesigner activityDesigner)
            {
                if (activityDesigner == null)
                {
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activityDesigner");
                }

                if (!activityDesigner.IsRootDesigner)
                {
                    return null;
                }
                ActivityDesignerGlyphCollection glyphs = new ActivityDesignerGlyphCollection();
                glyphs.Add(new HighlightOverlayGlyph(activityDesigner.Bounds, HighlightedDesigners));
                return glyphs;
            }
        ActivityDesignerGlyphCollection IDesignerGlyphProvider.GetGlyphs(ActivityDesigner activityDesigner)
        {
            ActivityDesignerGlyphCollection glyphCollection = new ActivityDesignerGlyphCollection();
            ConnectionPoint[] connectablePoints = ConnectablePoints;
            if (connectablePoints != null)
            {
                foreach (ConnectionPoint connectablePoint in connectablePoints)
                {
                    if (activityDesigner == connectablePoint.AssociatedDesigner)
                        glyphCollection.Add(new ConnectionPointGlyph(connectablePoint));
                }
            }

            return glyphCollection;
        }
 internal ActivityDesignerGlyphCollection GetDesignerGlyphs(ActivityDesigner designer)
 {
     ActivityDesignerGlyphCollection glyphs = new ActivityDesignerGlyphCollection();
     if (designer.Glyphs != null)
     {
         glyphs.AddRange(designer.Glyphs);
     }
     foreach (IDesignerGlyphProvider provider in this.designerGlyphProviders)
     {
         ActivityDesignerGlyphCollection collection = provider.GetGlyphs(designer);
         if (collection != null)
         {
             glyphs.AddRange(collection);
         }
     }
     glyphs.Sort(new Comparison<DesignerGlyph>(DesignerGlyph.OnComparePriority));
     return glyphs;
 }