Esempio n. 1
0
        /// <summary>
        /// Build all information and create the TableView. Use ToString() to get the result
        /// </summary>
        /// <returns></returns>
        public TableView Build()
        {
            this.Validate();
            var newRows = this.Rows.ToList();

            this.AddRowsHeader(newRows);
            this.ChunkRows(newRows);
            this.AddPaddingInRows(newRows);
            this.InsertColumnSeparator(newRows);
            this.InsertLineSeparator(newRows);

            this.AddPaddingTop();
            var lastRow = newRows.LastOrDefault();

            foreach (var row in newRows)
            {
                this.StrBuilder.Append(this.GetLine(row));
                if (row != lastRow)
                {
                    StrBuilder.AppendLine();
                }
            }
            this.AddPaddingBottom();
            return(this);
        }
Esempio n. 2
0
        private static string CreateLockText(VesselLockDisplay vesselLock)
        {
            StrBuilder.Length = 0;
            StrBuilder.AppendLine(vesselLock.VesselName)
            .Append("Control: ").Append(vesselLock.ControlLockOwner).AppendLine()
            .Append("Update: ").Append(vesselLock.UpdateLockOwner).AppendLine()
            .Append("UnlUpdate: ").Append(vesselLock.UnloadedUpdateLockOwner).AppendLine()
            .Append("Exists in store: ").Append(vesselLock.ExistsInStore);

            return(StrBuilder.ToString());
        }
Esempio n. 3
0
        private static string CreateLockText(VesselLockDisplay vesselLock)
        {
            StrBuilder.Length = 0;
            StrBuilder.AppendLine(vesselLock.VesselName)
            .Append("Loaded: ").Append(vesselLock.Loaded).AppendLine()
            .Append("Packed: ").Append(vesselLock.Packed).AppendLine()
            .Append("Immortal: ").Append(vesselLock.Immortal).AppendLine()
            .Append("Control: ").Append(vesselLock.ControlLockOwner).AppendLine()
            .Append("Update: ").Append(vesselLock.UpdateLockOwner).AppendLine()
            .Append("UnlUpdate: ").Append(vesselLock.UnloadedUpdateLockOwner);

            return(StrBuilder.ToString());
        }