public override void Initialize(ResDT_ConditionInfo InConditionInfo) { base.Initialize(InConditionInfo); this.ContextProxy = this.CreateStarCondition(); StarCondition starCondition = this.ContextProxy as StarCondition; if (starCondition != null) { starCondition.OnStarConditionChanged += new OnStarConditionChangedDelegate(this.OnProxyChanged); } }
public override void Dispose() { if (this.ContextProxy != null) { StarCondition starCondition = this.ContextProxy as StarCondition; if (starCondition != null) { starCondition.OnStarConditionChanged -= new OnStarConditionChangedDelegate(this.OnProxyChanged); } this.ContextProxy.Dispose(); } }
protected void AddCondition(ResDT_ConditionInfo InCondConfig) { StarCondition item = ConditionFactory.Create((int)InCondConfig.dwType) as StarCondition; DebugHelper.Assert(item != null); if (item != null) { item.OnStarConditionChanged += new OnStarConditionChangedDelegate(this.OnConditionChanged); item.Initialize(InCondConfig); this.Conditions.Add(item); } }
protected void AddCondition(ResDT_ConditionInfo InCondConfig) { StarCondition starCondition = StarEvaluation.ConditionFactory.Create((int)InCondConfig.dwType) as StarCondition; DebugHelper.Assert(starCondition != null); if (starCondition != null) { starCondition.OnStarConditionChanged += new OnStarConditionChangedDelegate(this.OnConditionChanged); starCondition.Initialize(InCondConfig); this.Conditions.Add(starCondition); } }