def method_5(self, bool_0, string_0, string_1): position = Position() stringBuilder = StringBuilder() string_1 = QString(string_1) str0 = "qa:{0}".format(string_1.length()) sAFETYAREAWIDTH = Captions.SAFETY_AREA_WIDTH distance = Distance(self.safetyAreaWidth) stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, sAFETYAREAWIDTH, distance.method_0("0.##:m"))) sAFETYAREALENGTHSTART = Captions.SAFETY_AREA_LENGTH_START distance1 = Distance(self.safetyAreaStart) stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, sAFETYAREALENGTHSTART, distance1.method_0("0.##:m"))) sAFETYAREALENGTHEND = Captions.SAFETY_AREA_LENGTH_END distance2 = Distance(self.safetyAreaEnd) stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, sAFETYAREALENGTHEND, distance2.method_0("0.##:m"))) if (self.method_4(PositionType.START)): position = self.method_1(PositionType.START).method_3() if(not bool_0) else self.method_1(PositionType.START).method_2() stringBuilder.AppendLine(String.Concat([string_0, position.Type.VariableNames[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) for position1 in self: if (position1.Type != PositionType.Position or not position1.IsValidIncludingAltitude): continue position = position1.method_3() if(not bool_0) else position1.method_2() stringBuilder.AppendLine(String.Concat([string_0, position.Type.VariableNames[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_4(PositionType.END)): position = self.method_1(PositionType.END).method_3() if(not bool_0) else self.method_1(PositionType.END).method_2() stringBuilder.AppendLine(String.Concat([string_0, position.Type.VariableNames[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_4(PositionType.CWY)): position = self.method_1(PositionType.CWY).method_3() if(not bool_0) else self.method_1(PositionType.CWY).method_2() stringBuilder.AppendLine(String.Concat([string_0, position.Type.VariableNames[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) return stringBuilder.ToString()
def smethod_11(string_0, string_1, string_2): if (String.IsNullOrEmpty(string_1)): return string_0 stringBuilder = StringBuilder() if not isinstance(string_0, QString): string_0 = QString(string_0) if not isinstance(string_1, QString): string_1 = QString(string_1) if not isinstance(string_2, QString): string_2 = QString(string_2) length = string_1.length() num = -1 num1 = 0 while (True): num = string_0.indexOf(string_1, num + 1) if (num < 0): break stringBuilder.Append(string_0, num1, num - num1) stringBuilder.Append(string_2) num1 = num + length stringBuilder.Append(string_0, num1, string_0.length() - num1) return QString(stringBuilder.ToString())