def vmethod_2(self, string_0): stringBuilder = StringBuilder() stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.NAME, self.name)) if (self.m_a.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "a", self.m_a.method_0(":u"))) if (self.m_b.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "b", self.m_b.method_0(":u"))) if (self.m_h.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "h", self.m_h.method_0(":u"))) if (self.m_r.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "r", self.m_r.method_0(":u"))) if (self.m_D.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "D", self.m_D.method_0(":u"))) if (self.m_H.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "H", self.m_H.method_0(":u"))) if (self.m_L.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "L", self.m_L.method_0(":u"))) if (self.m_phi.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, "ɸ", self.m_phi.method_0(":u"))) stringBuilder.AppendLine("{0}{1}\t{2}".format( string_0, Captions.STANDARD, Extensions.smethod_26(self.hardCoded))) return stringBuilder.ToString()
def method_6(self, string_0, treeNodeCollection_0): value = None # using (TextWriter streamWriter = new StreamWriter(string_0, false, Encoding.Unicode)) streamWriter = open(string_0, 'w') stringBuilder = StringBuilder() QARecord.smethod_0(self.fileNameQA, stringBuilder) streamWriter.write(stringBuilder.ToString()) fileInfo = QFileInfo(string_0) directoryName = fileInfo.path() num = 1 for treeNodeCollection0 in treeNodeCollection_0: tag = treeNodeCollection0.Tag# as QAReportEntry stringBuilder = StringBuilder() stringBuilder.AppendLine("<p align=\"left\"><H2><br>{0}. {1}<br></H2></p>".format(str(treeNodeCollection0.Index + 1), treeNodeCollection0.Text)) if (tag.Value != None): value = tag.Value if (value.Type != QARecordType.Snapshot): value.method_6(stringBuilder, None, False, False) else: value._class_ = QASnapshot num = value.method_12(stringBuilder, value, directoryName, num) else: for node in treeNodeCollection0.Nodes: tag = node.Tag# as QAReportEntry stringBuilder.AppendLine("<p align=\"left\"><H3><br>{0}.{1} {2}<br></H3></p>".format(str(treeNodeCollection0.Index + 1), str(node.Index + 1), node.Text)) value = tag.Value if (value.Type != QARecordType.Snapshot): value.method_6(stringBuilder, None, False, False) else: value._class_ = QASnapshot num = value.method_12(stringBuilder, value, directoryName, num) streamWriter.write(stringBuilder.ToString()) stringBuilder = StringBuilder() QARecord.smethod_1(stringBuilder) streamWriter.write(stringBuilder.ToString())
def method_5(self, string_0, qaexportType_0): resultStr = "" stringBuilder = StringBuilder() fileInfo = QFileInfo(string_0) QARecord.smethod_0(self.fileNameQA, stringBuilder) streamWriter = open(string_0, 'w') resultStr += stringBuilder.ToString() + "\n" # streamWriter.write(stringBuilder.ToString()) directoryName = fileInfo.path() num = 1 num1 = 1 for i in range(len(self.sessions)): item = self.sessions[i] if (qaexportType_0 == QAExportType.QA): stringBuilder = StringBuilder() str0 = Extensions.smethod_19(item.Stamp) if (item.SessionType != QASessionType.Started): stringBuilder.AppendLine( "<p align=\"left\"><H2><br>{0} {1} ({2})<br></H2></p>". format(str(i + 1), Captions.QA_OPENED, str0)) else: stringBuilder.AppendLine( "<p align=\"left\"><H2><br>{0} {1} ({2})<br></H2></p>". format(str(i + 1), Captions.QA_STARTED, str0)) item.method_6(stringBuilder, None, False, False) resultStr += stringBuilder.ToString() + "\n" # streamWriter.write(stringBuilder.ToString()) for j in range(len(item.Children)): qARecord = item.Children[j] if (qARecord.Type != QARecordType.Session): stringBuilder = StringBuilder() if (qaexportType_0 != QAExportType.QA): stringBuilder.AppendLine( "<p align=\"left\"><H2><br>{0}. {1}<br></H2></p>". format(str(num1), qARecord.Heading)) else: longTimeString = qARecord.Stamp.ToLongTimeString() heading = [ i + 1, j + 1, qARecord.Heading, longTimeString ] stringBuilder.AppendLine( "<p align=\"left\"><H3><br>{0}.{1} {2} ({3})<br></H3></p>" .format(str(i + 1), str(j + 1), qARecord.Heading, longTimeString)) if (qARecord.Type != QARecordType.Snapshot): qARecord.method_6(stringBuilder, None, False, False) else: qARecord._class_ = QASnapshot num = qARecord.method_12(stringBuilder, qARecord, directoryName, num) resultStr += stringBuilder.ToString() + "\n" # streamWriter.write(stringBuilder.ToString()) num1 += 1 stringBuilder = StringBuilder() QARecord.smethod_1(stringBuilder) resultStr += stringBuilder.ToString() + "\n" streamWriter.write(resultStr)
def vmethod_2(self, string_0): stringBuilder = StringBuilder() stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.NAME, self.name)) if (self.slope.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.SLOPE, self.slope.method_0(":u"))) if (self.startingHeight.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.STARTING_HEIGHT, self.startingHeight.method_0(":u"))) if (self.finishingDistance.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.FINISHING_DISTANCE, self.finishingDistance.method_0(":u"))) return stringBuilder.ToString()
def ToString(self, format_0 = None): stringBuilder = StringBuilder() if format_0 == None: format_0 = "" if not isinstance(format_0, QString): format_0 = String.Str2QString(format_0) # if (provider == null) # { # provider = CultureInfo.CurrentCulture # } if (not String.IsNullOrEmpty(format_0)): format_0 = format_0.toUpper() if (format_0.contains("QA:")): format_0 = format_0.replace("QA:", "") num = 0 try: num = int(format_0) except: num = 0 stringBuilder = StringBuilder() str0 = "" for i in range(num): str0 = QString(String.Concat([str0, " "])) if (not String.IsNullOrEmpty(self.id)): stringBuilder.AppendLine("{0}{1}\t{2}".format(str0, Captions.ID, self.id)) if (not self.xy): lATITUDE = Captions.LATITUDE degree = Degrees.smethod_1(self.xlat) stringBuilder.AppendLine("{0}{1}\t{2}".format(str0, lATITUDE, degree.method_2())) lONGITUDE = Captions.LONGITUDE degree1 = Degrees.smethod_5(self.ylon) stringBuilder.Append("{0}{1}\t{2}".format(str0, lONGITUDE, degree1.method_2())) else: stringBuilder.AppendLine("{0}{1}\t{2}".format(str0, Captions.X, str(self.xlat)))#.ToString(Formats.GridXYFormat, provider))) stringBuilder.Append("{0}{1}\t{2}".format(str0, Captions.Y, str(self.ylon)))#.ToString(Formats.GridXYFormat, provider))) if (not self.altitude == None): altitude = Altitude(self.altitude) stringBuilder.AppendLine("") aLTITUDE = [str0, Captions.ALTITUDE, altitude.ToString(":m"), altitude.ToString(":ft")] stringBuilder.Append("{0}{1}\t{2} ({3})".format(str0, Captions.ALTITUDE, altitude.ToString(":m"), altitude.ToString(":ft"))) return stringBuilder.ToString() stringBuilder = StringBuilder() if (not String.IsNullOrEmpty(self.id)): stringBuilder.Append(self.id + ", ") if (not self.xy): degree2 = Degrees.smethod_1(self.xlat) str1 = degree2.method_2() degree3 = Degrees.smethod_5(self.ylon) stringBuilder.Append(str1 + ", " + degree3.method_2()) else: stringBuilder.Append(str(self.xlat) + ", " + str(self.ylon)) if (not self.altitude == None): altitude1 = Altitude(self.altitude) stringBuilder.Append(", {0} ({1})", ", " + altitude1.ToString(":m") + " (" + altitude1.ToString(":ft") + ")") return stringBuilder.ToString()
def vmethod_2(self, string_0): stringBuilder = StringBuilder() stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.NAME, self.name)) if (self.m_alfa.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, "Alpha (α - Cone)", self.m_alfa.method_0(":u"))) if (self.m_R.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, "Radius (R - Cone)", self.m_R.method_0(":u"))) if (self.m_r.IsValid()): stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, "Radius (r - Cylinder)", self.m_r.method_0(":u"))) stringBuilder.AppendLine("{0}{1}\t{2}".format(string_0, Captions.STANDARD, Extensions.smethod_26(self.hardCoded))) return stringBuilder.ToString()
def btnUpdateQA_Click(self): # clip = QApplication.clipboard() # QMessageBox.warning(self, "WWW", clip.text()) # dlg = QaWindow(self) # dlg.show() if (not self.method_27(False)): return text = self.windowTitle() flag, text = DlgQaHeading.smethod_0(self, text) if (flag): qATable = QATable() qATable.TableType = QATableType.General, qATable.Heading = text stringBuilder = StringBuilder() stringBuilder.AppendLine("Runway THR") stringBuilder.AppendLine( self.parametersPanel.pnlTHR.method_8(" ")) stringBuilder.AppendLine("Navigational AID Position") stringBuilder.AppendLine( self.parametersPanel.pnlNavAid.method_8(" ")) stringBuilder.AppendLine( self.parametersPanel.grbParameters.title()) stringBuilder.AppendLine( self.parametersPanel.txtDirection.method_6(" ")) stringBuilder.AppendLine( ComboBox.method_11(self.parametersPanel.cmbCategory, self.parametersPanel.label_69, " ")) qATable.Text = stringBuilder.ToString() FlightPlanBaseSimpleDlg.method_27(self, qATable)
def getText(self): stringBuilder = StringBuilder() if (self.sessionType == QASessionType.Started): stringBuilder.AppendLine("{0}\t{1}".format(Captions.PROJECT, self.tagProject)) stringBuilder.AppendLine("{0}\t{1}".format(Captions.NAME, self.tagName)) stringBuilder.AppendLine("{0}\t{1}".format(Captions.SECTION, self.tagSection)) stringBuilder.AppendLine("{0}\t{1}".format(Captions.REASON, self.tagReason)) stringBuilder.AppendLine("{0}\t{1}".format(Captions.DWG_NAME, self.dwgFileName)) if (not self.dwgCreated.toString() == self.NULLDATE.toString()): stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_CREATED, Extensions.smethod_19(self.dwgCreated))) if (not self.dwgSaved.toString() == self.NULLDATE.toString()): stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_LAST_SAVED, Extensions.smethod_19(self.dwgSaved))) if (self.dwgSizeOpened > 0): if (self.dwgSizeOpened >= 1024): stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_SIZE_SESSION_OPENED, "{0:0.###} {1}".format(self.dwgSizeOpened / float(1024), Captions.MB))) else: stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_SIZE_SESSION_OPENED, "{0:0.###} {1}".format(self.dwgSizeOpened, Captions.KB))) if (self.dwgSizeClosed > 0): if (self.dwgSizeClosed >= 1024): stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_SIZE_SESSION_SAVED, "{0:0.###} {1}".format(self.dwgSizeClosed / float(1024), Captions.MB))) else: stringBuilder.AppendLine("{0}\t{1}".format( Captions.DWG_SIZE_SESSION_SAVED, "{0:0.###} {1}".format(self.dwgSizeClosed, Captions.KB))) if (not self.qaLastSaved.toString() == self.NULLDATE.toString()): stringBuilder.AppendLine("{0}\t{1}".format( Captions.QA_LAST_SAVED, Extensions.smethod_19(self.qaLastSaved))) if (not self.correlation): stringBuilder.AppendLine("{0}\t{1}".format( Captions.WARNING, Captions.NO_CORRELATION)) if (self.corrupted): stringBuilder.AppendLine("{0}\t{1}".format( Captions.WARNING, Captions.POSSIBLE_QA_FILE_CORRUPTION)) return stringBuilder.ToString()
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 method_6(self, bool_0, string_0, string_1): position = None stringBuilder = StringBuilder() str0 = "qa:{0}".format(string_1.Length) if (self.method_5(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, PositionType.Items[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_5(PositionType.THR)): position = self.method_1(PositionType.THR).method_3() if ( not bool_0) else self.method_1(PositionType.THR).method_2() stringBuilder.AppendLine( String.Concat( [string_0, PositionType.Items[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, PositionType.Items[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_5(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, PositionType.Items[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_5(PositionType.SWY)): position = self.method_1(PositionType.SWY).method_3() if ( not bool_0) else self.method_1(PositionType.SWY).method_2() stringBuilder.AppendLine( String.Concat( [string_0, PositionType.Items[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) if (self.method_5(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, PositionType.Items[position.Type - 1]])) stringBuilder.AppendLine(position.method_5(str0)) return stringBuilder.ToString()