private void RefreshPeriodsGrid()
        {
            periodGrid.ItemsSource = null;
            if (this.periodName == null)
            {
                return;
            }
            PeriodName item = new PeriodName();

            FillObject(item);
            if (!canBuildPeriodsGrid())
            {
                noResultLabel.Visibility = System.Windows.Visibility.Visible;
                periodGrid.Visibility    = System.Windows.Visibility.Collapsed;
                return;
            }
            if (!periodGridExpander.IsExpanded)
            {
                return;
            }
            noResultLabel.Visibility = System.Windows.Visibility.Collapsed;
            periodGrid.Visibility    = System.Windows.Visibility.Visible;
            BuildPeriods(item);
            periodGrid.ItemsSource = item.GetRootPeriodInterval().Leafs;
        }
 private void BuildPeriods(PeriodName item)
 {
     if (item == null)
     {
         return;
     }
     item.GetRootPeriodInterval().childrenListChangeHandler.originalList = PeriodNameUtil.buildIntervals(item);
 }
Ejemplo n.º 3
0
        private void OnSelectionChanged(object sender, DevExpress.Xpf.Grid.TreeList.TreeListSelectionChangedEventArgs e)
        {
            PeriodName periodName = this.periodTree.GetSelectedValue();

            if (periodName != null && !periodName.IsDefault)
            {
                selectedPeriodNamePosition = periodName.position;
            }
            this.PeriodIntervalleTree.DisplayPeriodInterval(periodName != null ? periodName.GetRootPeriodInterval() : null);
            if (periodName != null)
            {
                e.Handled = true;
            }
        }
Ejemplo n.º 4
0
 private void OnValidateChange(object item, bool changed)
 {
     if (item is Kernel.Domain.PeriodName)
     {
         this.EditedObject.UpdateChild(editedPeriodName);
         this.PeriodIntervalleTree.DisplayPeriodInterval(editedPeriodName.GetRootPeriodInterval());
         //this.periodTree.DisplayPeriod(this.EditedObject);
         this.PeriodTree.treeList.RefreshData();
         this.periodTree.SetSelectedValue(editedPeriodName);
         if (Changed != null)
         {
             Changed();
         }
     }
 }