コード例 #1
0
    public void propMaterialGetMPIsotropic(BuildingMaterial material)
    {
        string message = "VRE to SAPTranslator: propMaterialGetMPIsotropic(" + material.GetName() + ")";

        sendString(message);
        material.MPIsotropic = readPropMaterialGetMPIsotropic();
    }
コード例 #2
0
    public void addBuildingMaterialToXMLList(BuildingMaterial buildingMaterial)
    {
        BuildingMaterialForXML newElement = new BuildingMaterialForXML(buildingMaterial.GetName(), buildingMaterial.GetRegion(), buildingMaterial.GetMaterialType(), buildingMaterial.GetStandard(), buildingMaterial.GetGrade());

        elementsListsForXML.buildingMaterialForXMLList.Add(newElement);
        saveToXML();
    }
コード例 #3
0
 public void deletebuildingMaterialFromXMLList(BuildingMaterial buildingMaterial)
 {
     deletebuildingMaterialFromXMLList(buildingMaterial.GetName());
 }
コード例 #4
0
 /// <summary>
 /// Sets the material given a BuildingMaterial type
 /// </summary>
 public void SetMaterial(BuildingMaterial newMaterial)
 {
     buildingMaterialName = newMaterial.GetName();
 }
コード例 #5
0
    /// <summary>
    /// Deletes a building material given its name
    /// </summary>
    public void deleteBuildingMaterialWithName(string name)
    {
        BuildingMaterial bm = findBuildingMaterialWithName(name);

        if (bm != null)
        {
            buildingMaterials.Remove(bm);
            myXmlController.GetComponent <xmlController>().deletebuildingMaterialFromXMLList(name);

            string sapTranslatorCommand = "VRE to SAPTranslator: propMaterialDelete(" + bm.GetName() + ")";
            // arguments: (name)
            mySapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand);
        }
        if (buildingMaterials.Count == 0)
        {
            //addBuildingMaterial(defaultBuildingMaterial);
        }
    }
コード例 #6
0
    /// <summary>
    /// Adds a BuildingMaterial to the list of materials
    /// This is called after a new material is created given its name or name and parameters
    /// Also sends the data to SAP Translator,
    /// and tells SAP Translator to set the MPIsotropic object of the material. (currently commented-out)
    /// </summary>
    public void addBuildingMaterial(BuildingMaterial newMaterial)
    {
        buildingMaterials.Add(newMaterial);
        myXmlController.GetComponent <xmlController>().addBuildingMaterialToXMLList(newMaterial);


        string sapTranslatorCommand = "VRE to SAPTranslator: propMaterialAddMaterial(" +
                                      newMaterial.GetMaterialType() + ", " + newMaterial.GetRegion() + ", " +
                                      newMaterial.GetStandard() + ", " + newMaterial.GetGrade() + ", " + newMaterial.GetName() + ")";

        // arguments: (matType, region, standard, grade, userName)
        mySapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand);
        //mySapTranslatorIpcHandler.propMaterialGetMPIsotropic(newMaterial);
    }