public static bool RemoveMaterial(Materials mat, bool changeWithNew) { foreach (Materials oldMat in mainMatList) { if (oldMat.Name == mat.Name) { mainMatList.Remove(oldMat); if (changeWithNew) { mainMatList.Add(mat); } return(true); } } return(false); }
//public static bool operator ==(Treatment firstTreat, Treatment secondTreat) //{ //} public void Copy(Treatment copyTreat) { anest = copyTreat.anest.Copy(); //applica = copyTreat.applica; anest = copyTreat.anest; heal = copyTreat.heal; iso = copyTreat.iso; otsroch = copyTreat.otsroch; temporalPlomb = copyTreat.temporalPlomb; //usingAnestetic = copyTreat.usingAnestetic; //usingApplication = copyTreat.usingApplication; //mlOfAnest = copyTreat.mlOfAnest; usingHealFill = copyTreat.usingHealFill; usingIsoFill = copyTreat.usingIsoFill; usingPlomb.Copy(copyTreat.usingPlomb); usingColors.Clear(); foreach (string col in copyTreat.usingColors) { usingColors.Add(col); } }
public Materials(Materials copyMat) { this.Copy(copyMat); }