public int AddPropModel(IPropagationModel propModel)
 {
     propModel.PropModelID = this.getProdelModelID(propModel);
     propModel.PropModelName = this.ValidatePropModelName(propModel.PropModelName, propModel.PropModelID);
     this.m_PropModelNameMap.Add(propModel.PropModelName, propModel.PropModelID);
     this.m_PropModelList.Add(propModel);
     this.m_PropModelDictionary.Add(propModel.PropModelID, propModel);
     propModel.ReNameEvent += new ReName(this.PropModel_ReNameEvent);
     PropagationModelCategory category = this.m_PropModelCategoryDictionary[propModel.CategoryID];
     category.PropModelList.Add(propModel);
     //this.PropModelListAddEvent(propModel);
     PropagationDealedArgs result = new PropagationDealedArgs();
     result.DealOp = PropaDealedOper.ADD;
     result.PropagationModelName = propModel.PropModelName;
     this.OnPropagationDealEvent("", result);
     return propModel.PropModelID;
 }
 public void OnPropagationDealEvent(object sender, PropagationDealedArgs result)
 {
     EventHandler<PropagationDealedArgs> propagationDealEvent = this.PropagationDealEvent;
     if (propagationDealEvent != null)
     {
         propagationDealEvent(sender, result);
     }
 }
 public bool RenamePropModel(int propModelID, string strName)
 {
     IPropagationModel propModel = this.GetPropModel(propModelID);
     string sender = propModel.PropModelName;
     propModel.PropModelName = strName;
     PropagationDealedArgs result = new PropagationDealedArgs();
     result.DealOp = PropaDealedOper.MODIFY;
     result.PropagationModelName = strName;
     this.OnPropagationDealEvent(sender, result);
     return true;
 }
 public bool DeletePropModel(int propModelID)
 {
     if (!this.m_PropModelDictionary.ContainsKey(propModelID))
     {
         return false;
     }
     IPropagationModel item = this.m_PropModelDictionary[propModelID];
     PropagationModelCategory category = this.m_PropModelCategoryDictionary[item.CategoryID];
     this.m_PropModelNameMap.Remove(item.PropModelName);
     this.m_PropModelDictionary.Remove(propModelID);
     this.m_PropModelList.Remove(item);
     category.PropModelList.Remove(item);
     PropagationDealedArgs result = new PropagationDealedArgs();
     result.DealOp = PropaDealedOper.DELETE;
     this.OnPropagationDealEvent(item.PropModelName, result);
     return true;
 }