예제 #1
0
        private void UpdateFeatures()
        {
            featureTicketsStack.Children.Clear();

            IEnumerable <Feature> sortedFeatures;

            if (Sprint != null)
            {
                sortedFeatures = Sprint.Features.OrderBy(x => x.Name);
            }
            else
            {
                sortedFeatures = Project.Features.OrderBy(x => x.Name);
            }

            foreach (var feature in sortedFeatures)
            {
                var featurePanel = new FeatureTicketsPanel(Context, feature, Sprint, ShowClosedTickets);

                if (!ShowEmptyFeatures && featurePanel.IsEmpty)
                {
                    continue;
                }

                var featureHeader = CreateFeatureHeader(feature);

                featurePanel.Updated += entity => Update(entity);
                featurePanel.SetVisiblity(!feature.IsMinimised);

                featureHeader.MouseRightButtonDown += (s, e) => ViewDirector.EditEntity(featurePanel.Feature, Context);

                featureTicketsStack.Children.Add(featureHeader);
                featureTicketsStack.Children.Add(featurePanel);
            }

            featureTicketsStack.Children.Add(CreateAddNewFeatureButton());
        }
예제 #2
0
 private void ToggleVisibility(FeatureTicketsPanel featurePanel)
 {
     featurePanel.Feature.IsMinimised = !featurePanel.Feature.IsMinimised;
     featurePanel.SetVisiblity(!featurePanel.Feature.IsMinimised);
 }