Ejemplo n.º 1
0
        private void CalcSize(SizeViewModel sizeVM)
        {
            if (Item == null)
                return;

            if (sizeVM != null) {
                Item.ItemSizeUId = sizeVM.ItemSize.ItemSizeUId;
                Item.Size = sizeVM.ItemSize.Size * Item.SizeFactor;
            }
            else {
                Item.Size = null;
                Item.ItemSizeUId = null;
            }

            OnPropertyChanged("ItemSize");
            OnPropertyChanged("ItemSizeString");
            OnPropertyChanged("ConfigSize");
        }
Ejemplo n.º 2
0
        private void SetItemOccurrenceContraint(SizeViewModel sizeVM, ItemOccurrenceContraints constraint)
        {
            executor.StartBackgroundTask(
                () => { backlogService.UpdateItemSizeOccurrenceContraint(sizeVM.ItemSize.ItemSizeUId, constraint.ToString()); },
                () => {
                    // remove the previous planning/delivery selection
                    if(constraint==ItemOccurrenceContraints.PLANNING_OCC)
                        PlanningSize.OccurrenceConstraint = (int) ItemOccurrenceContraints.DEVELOPMENT_OCC;
                    if (constraint == ItemOccurrenceContraints.DELIVERY_OCC)
                        DeliverySize.OccurrenceConstraint = (int)ItemOccurrenceContraints.DEVELOPMENT_OCC;

                    // mark the new one
                    sizeVM.OccurrenceConstraint = (int)constraint;
                });
        }
Ejemplo n.º 3
0
 private void OnItemSizeDeleted(SizeViewModel deletedSize)
 {
     Sizes.Remove(deletedSize);
     aggregator.Publish(ScrumFactoryEvent.ActiveSizesChanged);
 }
Ejemplo n.º 4
0
 private void DeleteSize(SizeViewModel sizeVM)
 {
     executor.StartBackgroundTask(
         () => { backlogService.DeleteItemSize(sizeVM.ItemSize.ItemSizeUId); },
         () => { OnItemSizeDeleted(sizeVM); });
 }
Ejemplo n.º 5
0
        private SizeViewModel CreateSinglePointSize()
        {
            ItemSize singleSize = new ItemSize();
            singleSize.ItemSizeUId = SINGLE_POINT_UID;
            singleSize.Name = Properties.Resources.One_unit_point;
            singleSize.Description = Properties.Resources.One_unit_point;
            singleSize.Size = 1;
            singleSize.IsActive = true;
            singleSize.OccurrenceConstraint = 1;

            backlogService.AddItemSize(singleSize);

            SizeViewModel sizeVm = new SizeViewModel(singleSize);
            Sizes.Add(sizeVm);
            SelectedSize = sizeVm;
            sizeVm.NotifyAdded();

            aggregator.Publish(ScrumFactoryEvent.ActiveSizesChanged);

            return sizeVm;
        }
Ejemplo n.º 6
0
        private void AddNewSize()
        {
            ItemSize newSize = new ItemSize() { ItemSizeUId = System.Guid.NewGuid().ToString(), Size = 0, Name = Properties.Resources.New_size, IsActive = true, Description = string.Empty, OccurrenceConstraint = (int) ItemOccurrenceContraints.DEVELOPMENT_OCC };

            AddDefaultIdealHours(newSize);

            executor.StartBackgroundTask(
                () => { backlogService.AddItemSize(newSize);},
                () => {
                    SizeViewModel sizeVm = new SizeViewModel(newSize);
                    Sizes.Add(sizeVm);
                    SelectedSize = sizeVm;
                    sizeVm.NotifyAdded();
                });

            aggregator.Publish(ScrumFactoryEvent.ActiveSizesChanged);
        }