/// <summary> /// recupere les valeurs edités sur le nom et group , et affecte au calculatedMeasure /// </summary> /// <param name="calculatedMeasure"></param> public void fillCalculatedMeasure(Kernel.Domain.CalculatedMeasure calculatedMeasure) { if (calculatedMeasure == null) { return; } calculatedMeasure.name = nameTextBox.Text; groupField.Group.subjectType = Kernel.Domain.SubjectType.CALCULATED_MEASURE.label; calculatedMeasure.group = groupField.Group; calculatedMeasure.visibleInShortcut = visibleInShortcutCheckBox.IsChecked.Value; }
public void AddOrUpdateCalculateMeasure(Kernel.Domain.CalculatedMeasure calculateMeasure) { for (int i = 0; i <= this.liste.Count - 1; i++) { if (this.liste[i] is Kernel.Domain.CalculatedMeasure) { var calculateM = this.liste[i] as CalculatedMeasure; if (calculateM.name == calculateMeasure.name) { this.liste[i] = calculateM; this.cvs.DeferRefresh(); return; } } } this.liste.Add(calculateMeasure); this.cvs.DeferRefresh(); }
/// <summary> /// affiche les valeurs dans le panel properties /// </summary> /// <param name="calculatedMeasure"></param> public void displayCalculatedMeasureProperties(Kernel.Domain.CalculatedMeasure calculatedMeasure) { if (calculatedMeasure == null) { return; } if (calculatedMeasure.calculatedMeasureItemListChangeHandler == null) { return; } nameTextBox.Text = calculatedMeasure.name; groupField.Group = calculatedMeasure.group; visibleInShortcutCheckBox.IsChecked = calculatedMeasure.visibleInShortcut; if (calculatedMeasure.calculatedMeasureItemListChangeHandler != null && calculatedMeasure.calculatedMeasureItemListChangeHandler.Items.Count > 0) { Misp.Kernel.Domain.CalculatedMeasureItem item = calculatedMeasure.calculatedMeasureItemListChangeHandler.Items.Last(); if (item.sign != null && item.sign.Equals("=")) { item = calculatedMeasure.GetItemByPosition(calculatedMeasure.calculatedMeasureItemListChangeHandler.Items.Count - 2); } //displayCalculatedMeasureItemIgnoreProperties(item); } }
public void DisplayCalculatedMeasure(Kernel.Domain.CalculatedMeasure calculatedMeasure) { this.OperationsPanel.DisplayCalculatedMeasure(calculatedMeasure); }