Skip to content

Commit

Permalink
fit layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Tynab committed Oct 17, 2022
1 parent 22eb302 commit 289c4a1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Mitsubishi Block/Script/Common.vb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Friend Module Common
End If
Next
' Output
Dim fmt = FmtNo(w, h, p, s, block)
Dim fmt = FmtNo(w, h)
Intro()
HxSty(vbTab & "W (mm)" & vbTab & vbTab & ": " + String.Format(fmt, w) & vbCrLf)
HxSty(vbTab & "H (mm)" & vbTab & vbTab & ": " + String.Format(fmt, h) & vbCrLf)
Expand Down Expand Up @@ -207,17 +207,11 @@ Friend Module Common
''' </summary>
''' <param name="w">Width.</param>
''' <param name="h">Heigh.</param>
''' <param name="c">Circuit.</param>
''' <param name="s">Spread.</param>
''' <param name="block">Block.</param>
''' <returns>Format.</returns>
Private Function FmtNo(w As Double, h As Double, c As Double, s As Double, block As Double)
Private Function FmtNo(w As Double, h As Double)
Dim wSize = w.ToString().Length
Dim hSize = h.ToString().Length
Dim cSize = c.ToString().Length
Dim sSize = s.ToString().Length
Dim blockSize = block.ToString().Length
Dim maxSize = Max(Max(Max(wSize, hSize), Max(cSize, sSize)), blockSize)
Dim maxSize = Max(wSize, hSize)
Return "{0," + maxSize.ToString() + ":####.#}"
End Function
#End Region
Expand Down

0 comments on commit 289c4a1

Please # to comment.