0
0
RhSolutions-Api/RhSolutions.QueryModifiers/DrinkingWaterHeatingFittings/BendFormerHeating.cs

40 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace RhSolutions.QueryModifiers.DrinkingWaterHeatingFittings;
public class BendFormerHeating : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота";
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
string diameter = diameterMatch.Groups["Diameter"].Value;
if (diameter == "16")
{
diameter += "/17";
}
var angleMatch = _angle.Match(query);
string angle = angleMatch.Success ? angleMatch.Groups["Angle"].Value : "90";
return $"{_title} {diameter}/{angle}°";
}
}
public class BendFormerDrinking : DrinkingWaterHeatingFitting
{
protected override string _title => "Фиксатор поворота с кольцами";
protected override string? BuildRhSolutionsName(string query)
{
var diameterMatch = _diameter.Match(query);
if (!diameterMatch.Success)
{
return null;
}
string diameter = diameterMatch.Groups["Diameter"].Value;
var angleMatch = _angle.Match(query);
string angle = angleMatch.Success ? angleMatch.Groups["Angle"].Value : "90";
return $"{_title} {angle}° {diameter}";
}
}