示例#1
0
 public static void Clear()
 {
     TrackingProfileManager.ClearCache();
 }
        private void InitializeProfileDesigner(Type workflowType, TrackingProfile profile)
        {
            this.toolStrip1.Visible = true;
            if (workflowType != null)
            {
                profileManager = new TrackingProfileManager();
                if (profile != null)
                {
                    profileManager.TrackingProfile = profile;
                }
                this.workflowDesignerControl1.WorkflowType = workflowType;
            }

            this.workflowDesignerControl1.SelectionChanged += this.OnActivitySelected;
            
            //Once a workflow is loaded, ensure our glyph provider is added
            IDesignerGlyphProviderService glyphManager = this.workflowDesignerControl1.GetService(typeof(IDesignerGlyphProviderService)) as IDesignerGlyphProviderService;
            if (glyphManager == null)
            {
                MessageBox.Show("There was an error loading the workflow type " + workflowType.AssemblyQualifiedName);
                return;
            }
            glyphManager.AddGlyphProvider(new TrackingGlyphProvider(profileManager));
            
            WorkflowType = workflowType;
        }