예제 #1
0
        protected override void HandleModelChanged(object sender, ModelChangedArgs e)
        {
            switch (e.Context)
            {
            case EventContext.WorkitemPropertiesUpdatedFromView:
                HandleWorkitemPropertiesUpdated(PropertyUpdateSource.WorkitemView);
                break;

            case EventContext.WorkitemPropertiesUpdatedFromPropertyView:
                HandleWorkitemPropertiesUpdated(PropertyUpdateSource.WorkitemPropertyView);
                break;

            case EventContext.WorkitemsChanged:
                model.InvokeStructureChanged();
                break;

            case EventContext.ProjectSelected:
                HandleModelChanged();
                break;

            case EventContext.WorkitemsRequested:
                HandleModelChanged();
                break;

            case EventContext.WorkitemCacheInvalidated:
                assetCache.Drop();
                break;

            default:
                throw new NotSupportedException();
            }
        }