private void OnDeleted(object item) { RPeriodItemPanel panel = (RPeriodItemPanel)item; if (panel.PeriodItem == null) { return; } if (this.Period == null) { this.Period = GetNewPeriod(); } if (panel.PeriodItem.isInValidDefault()) { if (this.panel.Children.Count > 1 && panel.Index >= 0) { this.panel.Children.RemoveAt(panel.Index); } return; } if (this.Period.Contains(panel.PeriodItem)) { if (ItemDeleted != null && panel.PeriodItem != null) { ItemDeleted(panel.PeriodItem); } } else { } }
private void OnAdd(object item) { if (Added != null) { RPeriodItemPanel panel = (RPeriodItemPanel)item; panel.PeriodItem.name = GetPeriodName(); Added(item); } }
private void OnValidateFormula(object item) { if (ValidateFormula != null) { RPeriodItemPanel panel = (RPeriodItemPanel)item; panel.PeriodItem.name = GetPeriodName(); ValidateFormula(item); } }
private void OnUpdate(object item) { if (Updated != null) { RPeriodItemPanel panel = (RPeriodItemPanel)item; panel.PeriodItem.name = GetPeriodName(); Updated(item); } }
private void OnAdded(object item) { RPeriodItemPanel panel = (RPeriodItemPanel)item; if (this.Period == null) { this.Period = GetNewPeriod(); } if (panel.PeriodItem != null) { this.Period.AddPeriodItem(panel.PeriodItem); OnChanged(panel.PeriodItem); } }
private void OnDelete(object item) { if (Deleted != null) { RPeriodItemPanel panel = (RPeriodItemPanel)item; if (this.ItemPanel2.PeriodItem != null) { this.ItemPanel2.PeriodItem.name = GetPeriodName(); Deleted(this.ItemPanel2); } if (this.ItemPanel1.PeriodItem != null) { this.ItemPanel1.PeriodItem.name = GetPeriodName(); Deleted(this.ItemPanel1); } } }
private void OnUpdated(object item) { RPeriodItemPanel panel = (RPeriodItemPanel)item; if (this.Period == null) { this.Period = GetNewPeriod(); } if (this.Period.itemListChangeHandler.Items.Contains(panel.PeriodItem)) { this.Period.UpdatePeriodItem(panel.PeriodItem); } else { this.Period.AddPeriodItem(panel.PeriodItem); } OnChanged(panel.PeriodItem); }