public void StartDialogue(pathType path, Item obj) { running = true; bonusLength = 2; switch (path) { case pathType.Story: dialogueQueue.Enqueue(story[storyCount]); if (storyCount < story.Count) { storyCount++; } break; case pathType.Inventory: dialogueQueue.Enqueue(obj.GetDialogue()); dialogueQueue.Enqueue(inventory.GetDialogue(obj)); break; } SetCurrentDialogue(); }
public string GetRecPath(int id, pathType type) { switch (type) { case pathType.fullUserRecPath: return GetUserRecPath(id); case pathType.fullSampleRecPath: return GetSampleRecPath(id); case pathType.partialUserRecPath: return GetUserRecHtmlPath(id); case pathType.partialSampleRecPath: return GetSampleRecHtmlPath(id); default: return null; } }
public string GetRecPath(int id, pathType type) { switch (type) { case pathType.fullUserRecPath: return(GetUserRecPath(id)); case pathType.fullSampleRecPath: return(GetSampleRecPath(id)); case pathType.partialUserRecPath: return(GetUserRecHtmlPath(id)); case pathType.partialSampleRecPath: return(GetSampleRecHtmlPath(id)); default: return(null); } }
public static IEnumerable<string> getFiles(pathType type, string urlDir, IEnumerable<IEnumerable<string>> sources) { foreach (var f in sources.SelectMany(s => s)) { switch (type) { case pathType.relUrl: yield return VirtualPathUtility.MakeRelative("/" + urlDir + "/x.htm", "/" + f.ToLower()); break; case pathType.fileName: yield return basicPath + f.ToLower().Replace('/', '\\'); break; } } }
public static double VOTX(double t, double x, pathType path) { return VOTX_recursive(t, x, 0.001, 1000.0, path); }
public static double TOVX(double v, double x, pathType path) { return TOVX_recursive(v, x, 0.01, 1200.0, path); }
/*Description - Returns a Vector3[] of the points along a requested path * to the requested target value. This will also include the current * specified location. * * Params: pathType -> The type of path to calculate * strength -> The energy to add / remove if negative * currentLocation -> The points current location * graphOrigin -> The origin(Translation) of the Mesh specified by graphSpace * graphSpace -> The type of graph to create the point from * */ public static Vector3[] GetConstraintPath(pathType pathType, double strength, Vector3 currentLocation, Vector3 graphOrigin, graphSpaceEnums graphSpace) { ArrayList pathInThermoPoints = new ArrayList(); //Used to easily store all of a point's atributes, then depending on graph type use specific attributes bool inPositive = (strength > 0); //Will be used to switch between logic for adding or removing energy, "very nifty this is" Vector3[] pathPoints; //Returned to caller int gridPointStart = 0; //Index in V/T_Vals that provided point starts from currentLocation = currentLocation - graphOrigin; //currentLocation must be adjusted out of unity space double currentT = (double)Mathf.Exp(currentLocation.x); //Real temperature of current point double currentV = (double)Mathf.Exp(-currentLocation.z); //Real volume of current point double currentU = ThermoMath.GetU_TV(currentT, currentV, false); //Real energy at current point double currentP = ThermoMath.GetP_TV(currentT, currentV, false); //Real Pressure at current point double currentH = ThermoMath.GetH_TV(currentT, currentV, false); //Real Enthalpy at current point double currentS = ThermoMath.GetS_TV(currentT, currentV, false); //Real Entropy at current point double targetU = currentU + strength; //Target Internal Energy based on the strength double finalV = ThermoMath.VOTX(currentT, targetU, pathType.CONSTANT_U); //Volume at targetU double finalT = ThermoMath.TOVX(currentV, targetU, pathType.CONSTANT_U); //Temperature at targetU //If no positive path exists return an empty array if(inPositive ? currentU > targetU : currentU < targetU) return new Vector3[]{}; //Construct path ThermoPoints depending on constraint switch(pathType){ /*CONSTANT TEMPERATURE*/ case pathType.CONSTANT_T: //Find the first specific volume on the grid that is greater than the specific volume of the current point for(gridPointStart = 0; gridPointStart < V_Vals.Length; gridPointStart++){ if(V_Vals[gridPointStart] > currentV) break; } //Adjust counter depending on if we are adding or removing energy gridPointStart = inPositive ? gridPointStart : (gridPointStart - 1); //Set the first point in the path to be the current point pathInThermoPoints.Add(new ThermoPoint(currentT, currentV, ThermoMath.GetP_TV(currentT, currentV, false), ThermoMath.GetU_TV(currentT, currentV, false), ThermoMath.GetH_TV(currentT, currentV, false), ThermoMath.GetS_TV(currentT, currentV, false), ThermoMath.area.UNKNOWN, 0)); //Find all points in the path that line up with the grid (spacing) and are below the target energy value for(gridPointStart = gridPointStart + 0; (inPositive ? (gridPointStart < V_Vals.Length) : (gridPointStart >= 0)) && (inPositive ? (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) < targetU) : (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) > targetU)); gridPointStart = (inPositive ? (gridPointStart+1) : (gridPointStart-1))){ pathInThermoPoints.Add(new ThermoPoint(currentT, V_Vals[gridPointStart], ThermoMath.GetP_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetH_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetS_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); } //Set the final point to the point with the target energy value if((inPositive ? (gridPointStart != 0) : (gridPointStart != -1)) && gridPointStart != V_Vals.Length) pathInThermoPoints.Add(new ThermoPoint(currentT, finalV, ThermoMath.GetP_TV(currentT, finalV, false), targetU, ThermoMath.GetH_TV(currentT, finalV, false), ThermoMath.GetS_TV(currentT, finalV, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); break; /*CONSTANT VOLUME*/ case pathType.CONSTANT_V: //Find the first Temperature on the grid that is greater than the Temperature of the current point for(gridPointStart = 0; gridPointStart < T_Vals.Length; gridPointStart++){ if(T_Vals[gridPointStart] > currentT) break; } //Adjust counter depending on if we are adding or removing energy gridPointStart = inPositive ? gridPointStart : (gridPointStart - 1); //Set the first point in the path to be the current point pathInThermoPoints.Add(new ThermoPoint(currentT, currentV, ThermoMath.GetP_TV(currentT, currentV, false), ThermoMath.GetU_TV(currentT, currentV, false), ThermoMath.GetH_TV(currentT, currentV, false), ThermoMath.GetS_TV(currentT, currentV, false), ThermoMath.area.UNKNOWN, 0)); //Find all points in the path that line up with the grid (spacing) and are below the target energy value for(gridPointStart = gridPointStart + 0; (inPositive ? (gridPointStart < T_Vals.Length) : (gridPointStart >= 0)) && (inPositive ? (ThermoMath.GetU_TV(T_Vals[gridPointStart], currentV, false) < targetU) : (ThermoMath.GetU_TV(T_Vals[gridPointStart], currentV, false) > targetU)); gridPointStart = (inPositive ? (gridPointStart+1) : (gridPointStart-1))){ pathInThermoPoints.Add(new ThermoPoint(T_Vals[gridPointStart], currentV, ThermoMath.GetP_TV(T_Vals[gridPointStart], currentV, false), ThermoMath.GetU_TV(T_Vals[gridPointStart], currentV, false), ThermoMath.GetH_TV(T_Vals[gridPointStart], currentV, false), ThermoMath.GetS_TV(T_Vals[gridPointStart], currentV, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); } //If we ended on a point not equal to the target energy value set the final point to the point with the //target energy value if((inPositive ? (gridPointStart != 0) : (gridPointStart != -1)) && gridPointStart != T_Vals.Length) pathInThermoPoints.Add(new ThermoPoint(finalT, currentV, ThermoMath.GetP_TV(finalT, currentV, false), targetU, ThermoMath.GetH_TV(finalT, currentV, false), ThermoMath.GetS_TV(finalT, currentV, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); break; case pathType.CONSTANT_P: //Find the first Volume on the grid that is greater than the Volume of the current point for(gridPointStart = 0; gridPointStart < V_Vals.Length; gridPointStart++){ if(V_Vals[gridPointStart] > currentV) break; } //Adjust counter depending on if we are adding or removing energy gridPointStart = inPositive ? gridPointStart : (gridPointStart - 1); //Set the first point in the path to be the current point pathInThermoPoints.Add(new ThermoPoint(currentT, currentV, ThermoMath.GetP_TV(currentT, currentV, false), ThermoMath.GetU_TV(currentT, currentV, false), ThermoMath.GetH_TV(currentT, currentV, false), ThermoMath.GetS_TV(currentT, currentV, false), ThermoMath.area.UNKNOWN, 0)); //As we will be using currentT throughout the path calculation, set it based on the first volume //greater than that of the current position currentT = ThermoMath.TOVX(V_Vals[gridPointStart], currentP, pathType.CONSTANT_P); //Find all points in the path that line up with the grid (spacing) and are below the target energy value for(gridPointStart = gridPointStart + 0; (inPositive ? (gridPointStart < V_Vals.Length) : (gridPointStart >= 0)) && (inPositive ? (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) < targetU && currentT < T_Vals[T_Vals.Length-1]) : (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) > targetU && currentT > T_Vals[0])); gridPointStart = (inPositive ? (gridPointStart+1) : (gridPointStart-1))){ pathInThermoPoints.Add(new ThermoPoint( currentT, V_Vals[gridPointStart], currentP, ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetH_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetS_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count) ); //Update currentT unless we are on the first/last Volume of the grid if(inPositive ? (gridPointStart+1 != V_Vals.Length) : (gridPointStart != 0)) currentT = ThermoMath.TOVX(V_Vals[gridPointStart+1], currentP, pathType.CONSTANT_P); } //Adjust final Temperature and Volume values in case we've extended beyond the surface bounds if(inPositive ? (finalV > V_Vals[V_Vals.Length-1]) : (finalV < V_Vals[0])) finalV = inPositive ? V_Vals[V_Vals.Length-1] : V_Vals[0]; if(inPositive ? (finalT > T_Vals[T_Vals.Length-1]) : (finalT < T_Vals[0])) finalT = inPositive ? T_Vals[T_Vals.Length-1] : T_Vals[0]; //If we ended on a point not equal to the target energy value set the final point to the point with the //target energy value if(inPositive ? (gridPointStart == V_Vals.Length) : (gridPointStart == -1)) pathInThermoPoints.Add(new ThermoPoint(finalT, finalV, currentP, targetU, ThermoMath.GetH_TV(finalT, finalV, false), ThermoMath.GetS_TV(finalT, finalV, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); break; //CONSTANT INTERNAL ENERGY case pathType.CONSTANT_U: targetU = currentU; finalT = -1; finalV = -1; double t; double v; //double u; int length = 0; //Find where constant Internal Energy path will go out of bounds. for (gridPointStart = 0; gridPointStart < V_Vals.Length; gridPointStart++) { t = ThermoMath.TOVX(V_Vals[gridPointStart], targetU, pathType.CONSTANT_U); //t = ThermoMath.TOVU(V_Vals[gridPointStart], targetU); length++; if (t < .011) { break; } } //Find the first specific volume on the grid that is greater / less than the specific volume of the current point for(gridPointStart = 0; gridPointStart < V_Vals.Length; gridPointStart++){ if(V_Vals[gridPointStart] > currentV) break; } //Adjust depending on whether adding / removing energy gridPointStart = (inPositive ? gridPointStart : gridPointStart - 1); //Set the first point in the path to be the current point pathInThermoPoints.Add(new ThermoPoint(currentT, currentV, ThermoMath.GetP_TV(currentT, currentV, false), targetU, ThermoMath.GetH_TV(currentT, currentV, false), ThermoMath.GetS_TV(currentT, currentV, false), ThermoMath.area.UNKNOWN, 0)); //Find all points in the path that line up with the grid (spacing) and are within the surface / formula bounds for (int volumeIndex = gridPointStart; (inPositive ? (volumeIndex < length) : (volumeIndex >= 0)); volumeIndex = (inPositive ? (volumeIndex+1) : (volumeIndex-1))) { v = V_Vals[volumeIndex]; t = ThermoMath.TOVX(v, targetU, pathType.CONSTANT_U); //Retrieve the best Temperature for the constant Internal energy and grid aligned Volume point //t = ThermoMath.TOVU(v, targetU); //Add a new point to the path based on the retrieved temperature value pathInThermoPoints.Add(new ThermoPoint(t, v, ThermoMath.GetP_TV(t, v, false), targetU, ThermoMath.GetH_TV(t, v, false), ThermoMath.GetS_TV(t, v, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); } break; /*case pathType.CONSTANT_H: break;*/ case pathType.CONSTANT_S: bool lowTemp, highTemp, lowVol, highVol; //Find the first Volume on the grid that is greater than the Volume of the current point for(gridPointStart = 0; gridPointStart < V_Vals.Length; gridPointStart++){ if(V_Vals[gridPointStart] > currentV) break; } //Adjust counter depending on if we are adding or removing energy gridPointStart = inPositive ? gridPointStart : (gridPointStart - 1); //Set the first point in the path to be the current point pathInThermoPoints.Add(new ThermoPoint(currentT, currentV, ThermoMath.GetP_TV(currentT, currentV, false), ThermoMath.GetU_TV(currentT, currentV, false), ThermoMath.GetH_TV(currentT, currentV, false), ThermoMath.GetS_TV(currentT, currentV, false), ThermoMath.area.UNKNOWN, 0)); //As we will be using currentT and currentV throughout the path calculation, set it based on the first volume //greater than that of the current position currentT = ThermoMath.TOVX(V_Vals[gridPointStart], currentS, pathType.CONSTANT_S); currentV = V_Vals[gridPointStart]; lowTemp = currentT > T_Vals[1]; highVol = currentV < V_Vals[V_Vals.Length-1]; lowVol = currentV > V_Vals[1]; highTemp = currentT < T_Vals[T_Vals.Length-1]; //Catches the case where we are at a position so close the surface edge, that we will not enter the path calculation //loop. if(inPositive ? gridPointStart+1 != V_Vals.Length && !lowTemp || !highVol : gridPointStart != 0 && !lowVol || !highTemp) pathInThermoPoints.Add(new ThermoPoint( currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], ThermoMath.GetP_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), ThermoMath.GetU_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), ThermoMath.GetH_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), currentS, //ThermoMath.GetS_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count) ); //Find all points in the path that line up with the grid (spacing) and are below the target energy value for(gridPointStart = gridPointStart + 0; (inPositive ? (gridPointStart < V_Vals.Length) : (gridPointStart >= 0)) && (inPositive ? (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) < targetU && lowTemp && highVol) : (ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false) > targetU && lowVol && highTemp)); gridPointStart = (inPositive ? (gridPointStart+1) : (gridPointStart-1))){ pathInThermoPoints.Add(new ThermoPoint( currentT, V_Vals[gridPointStart], ThermoMath.GetP_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetU_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.GetH_TV(currentT, V_Vals[gridPointStart], false), currentS, //ThermoMath.GetS_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count) ); //Update currentT unless we are on the first/last Volume of the grid if(inPositive ? (gridPointStart+1 != V_Vals.Length) : (gridPointStart != 0)){ currentT = ThermoMath.TOVX(V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], currentS, pathType.CONSTANT_S); currentV = V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1]; //Edge check lowTemp = currentT >= T_Vals[1]; highVol = currentV < V_Vals[V_Vals.Length-1]; lowVol = currentV >= V_Vals[1]; highTemp = currentT < T_Vals[T_Vals.Length-1]; } //If close to the edge calculate the last point before exiting if(inPositive ? !lowTemp || !highVol : !lowVol || !highTemp) pathInThermoPoints.Add(new ThermoPoint( currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], ThermoMath.GetP_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), ThermoMath.GetU_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), ThermoMath.GetH_TV(currentT, V_Vals[inPositive ? gridPointStart+1 : gridPointStart-1], false), currentS, //ThermoMath.GetS_TV(currentT, V_Vals[gridPointStart], false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count) ); } //Adjust final Temperature and Volume values in case we've extended beyond the surface bounds //if(inPositive ? (finalV > V_Vals[V_Vals.Length-1]) : (finalV < V_Vals[0])) // finalV = inPositive ? V_Vals[V_Vals.Length-1] : V_Vals[0]; //if(inPositive ? (finalT > T_Vals[T_Vals.Length-1]) : (finalT < T_Vals[0])) // finalT = inPositive ? T_Vals[T_Vals.Length-1] : T_Vals[0]; //finalT = ThermoMath.TOVX(V_Vals[inPositive ? gridPointStart-1 : gridPointStart+1], currentS, pathType.CONSTANT_S); //finalV = ThermoMath.VOTX(finalT, currentS, pathType.CONSTANT_S); //If we ended on a point not equal to the target energy value set the final point to the point with the //target energy value //if(inPositive ? (gridPointStart != V_Vals.Length) : (gridPointStart != -1)) //Add catch here for finalT/V // pathInThermoPoints.Add(new ThermoPoint(finalT, finalV, ThermoMath.GetP_TV(finalT, finalV, false), // targetU, ThermoMath.GetH_TV(finalT, finalV, false), // ThermoMath.GetS_TV(finalT, finalV, false), ThermoMath.area.UNKNOWN, pathInThermoPoints.Count)); break; } pathPoints = new Vector3[pathInThermoPoints.Count]; //Depending on graphSpace set the accurate order of quantities defining each point //offset by the graphOrigin switch(graphSpace){ case graphSpaceEnums.TPV_Space: for(int i = 0; i < pathPoints.Length; i++){ pathPoints[i] = graphOrigin + new Vector3(Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).T)), Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).P)), -Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).V))); } break; case graphSpaceEnums.TUV_Space: for(int i = 0; i < pathPoints.Length; i++){ pathPoints[i] = graphOrigin + new Vector3(Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).T)), Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).U)), -Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).V))); } break; case graphSpaceEnums.THV_Space: for(int i = 0; i < pathPoints.Length; i++){ pathPoints[i] = graphOrigin + new Vector3(Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).T)), Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).H)), -Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).V))); } break; case graphSpaceEnums.TSV_Space: for(int i = 0; i < pathPoints.Length; i++){ pathPoints[i] = graphOrigin + new Vector3(Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).T)), Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).S)), -Mathf.Log((float)((pathInThermoPoints[i] as ThermoPoint).V))); } break; } return pathPoints; }
/// <summary> /// Use simple binary search to find the best temperature value to go with the given specific volume and /// internal energy, entropy, pressure, or enthalpy values. /// Note: this function calls itself recursively. /// </summary> /// <param name="v">Specific volume in m^3 / kg</param> /// <param name="x">Specific internal energy, entropy, pressure or enthalpy</param> /// <param name="minTemp">Minimum temperature (degrees C) in the range we are currently considering</param> /// <param name="maxTemp">Maximum temperature (degrees C) in the range we are currently considering</param> /// <param name="path">ThermoMath.pathType specifying the other property to use in finding V</para> /// <returns></returns> protected static double VOTX_recursive(double t, double x, double minVol, double maxVol, pathType path) { double midVol = (minVol + maxVol) / 2; double midX = -1; //if (maxVol - minVol < .00001) if (maxVol - minVol < midVol / 1000) return midVol; switch(path){ case pathType.CONSTANT_S: midX = ThermoMath.GetS_TV(t, midVol, false); break; case pathType.CONSTANT_P: midX = ThermoMath.GetP_TV(t, midVol, false); break; case pathType.CONSTANT_H: midX = ThermoMath.GetH_TV(t, midVol, false); break; case pathType.CONSTANT_U: midX = ThermoMath.GetU_TV(t, midVol, false); break; } if(midX == -1) throw new MissingReferenceException("Invalid 'path' parameter."); if (x < midX) { return VOTX_recursive(t, x, minVol, midVol, path); } else { return VOTX_recursive(t, x, midVol, maxVol, path); } }
/// <summary> /// Use simple binary search to find the best temperature value to go with the given specific volume and /// internal energy, entropy, pressure, or enthalpy values. /// Note: this function calls itself recursively. /// </summary> /// <param name="v">Specific volume in m^3 / kg</param> /// <param name="x">Specific internal energy, entropy, pressure, or enthalpy</param> /// <param name="minTemp">Minimum temperature (degrees C) in the range we are currently considering</param> /// <param name="maxTemp">Maximum temperature (degrees C) in the range we are currently considering</param> /// <param name="path">ThermoMath.pathType specifying the other property to use in finding V</para> /// <returns></returns> protected static double TOVX_recursive(double v, double x, double minTemp, double maxTemp, pathType path) { double midTemp = (minTemp + maxTemp) / 2; double midX = -1; //if (maxTemp - minTemp < .00001) if (maxTemp - minTemp < midTemp / 1000) return midTemp; switch(path){ case pathType.CONSTANT_S: midX = ThermoMath.GetS_TV(midTemp, v, false); break; case pathType.CONSTANT_P: midX = ThermoMath.GetP_TV(midTemp, v, false); break; case pathType.CONSTANT_H: midX = ThermoMath.GetH_TV(midTemp, v, false); break; case pathType.CONSTANT_U: midX = ThermoMath.GetU_TV(midTemp, v, false); break; } if(midX == -1) throw new MissingReferenceException("Invalid 'path' parameter."); if (x < midX) { return TOVX_recursive(v, x, minTemp, midTemp, path); } else { return TOVX_recursive(v, x, midTemp, maxTemp, path); } }
/// <summary> /// 获得文件的存储位置 /// 返回例如 OEBPS\Text\ /// </summary> /// <param name="type"></param> /// <returns></returns> private static string _getPath(pathType type) { string path = TopPath; if (type == pathType.Text) path += @"OEBPS\Text\"; else if (type == pathType.Images) path += @"OEBPS\Images\"; else if (type == pathType.Styles) path += @"OEBPS\Styles\"; else if (type == pathType.content_opf || type == pathType.toc_ncx) path += @"OEBPS\"; else if (type == pathType.container_xml) path += @"META-INF\"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } return path; }