From 289c4a1c02a445cc768d2a33d2ce2a053e5bc099 Mon Sep 17 00:00:00 2001 From: Yami An Date: Mon, 17 Oct 2022 14:20:21 +0700 Subject: [PATCH] fit layout --- Mitsubishi Block/Script/Common.vb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Mitsubishi Block/Script/Common.vb b/Mitsubishi Block/Script/Common.vb index 28b275a..da181de 100644 --- a/Mitsubishi Block/Script/Common.vb +++ b/Mitsubishi Block/Script/Common.vb @@ -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) @@ -207,17 +207,11 @@ Friend Module Common ''' ''' Width. ''' Heigh. - ''' Circuit. - ''' Spread. - ''' Block. ''' Format. - 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