From b6fd96bb26479621943577c82cdf38b1d565a01e Mon Sep 17 00:00:00 2001 From: Ivan Date: Wed, 31 May 2023 16:58:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=84=D0=B8=D0=BA=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B5=D0=B7=D0=BD=D0=B0=D1=87=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B2=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Calc3D.py | 8 ++++---- calculating.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Calc3D.py b/Calc3D.py index 0a5af1f..83fd836 100644 --- a/Calc3D.py +++ b/Calc3D.py @@ -47,8 +47,8 @@ def create_window(): [Sgi.Txt('_' * 46, pad=(10, 5))], [Sgi.Text(_('Время печати')), Sgi.Push(), Sgi.InputText('0', size=(5, 20)), Sgi.Text(_('ч.')), Sgi.InputText('0', size=(5, 0)), Sgi.Text(_('мин. '))], - [Sgi.Text(_('Вес детали')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), - Sgi.Text(_('гр. '))], + [Sgi.Text(_('Масса детали')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), + Sgi.Text(_('г. '))], [Sgi.Text(_('Количество экземпляров')), Sgi.Push(), Sgi.InputText('1', size=(10, 20), justification='right', ), Sgi.Text(_('шт. '))], [Sgi.Txt('_' * 46)], @@ -57,7 +57,7 @@ def create_window(): [Sgi.Text(_('Постобработка')), Sgi.Push(), Sgi.InputText('0', size=(10, 20), justification='right', ), Sgi.Text(_('руб. '))], [Sgi.Txt('_' * 46)], - [Sgi.Txt(' ' * 15), Sgi.ReadFormButton(_('Расчитать'), size=(10, 2)), Sgi.Cancel(_('Выход'), size=(10, 2))] + [Sgi.Txt(' ' * 15), Sgi.ReadFormButton(_('Рассчитать'), size=(10, 2)), Sgi.Cancel(_('Выход'), size=(10, 2))] ] return Sgi.Window(f'Calc3D by Risen ver.{ver}', layout, icon='logo.ico') @@ -86,7 +86,7 @@ def main(): except requests.exceptions.ConnectionError: Sgi.popup_ok(not_connect) - elif event == _('Расчитать'): + elif event == _('Рассчитать'): with open(os.path.expanduser('setts.json')) as f: params = json.load(f)["settings"] try: diff --git a/calculating.py b/calculating.py index 23f31b8..869bb00 100644 --- a/calculating.py +++ b/calculating.py @@ -15,7 +15,7 @@ def cost_prise(p, t, h, md, d, st, mk, am, post, x): x = int(x) # количество экземпляров except ValueError: x = 1 - result = (abs(p) / 1000 * abs(t) / 60 * abs(h)) + (abs(md) * abs(d) * (abs(st) / abs(mk)) + abs(am) + abs(post)) * x + result = (abs(p) / 1000 * abs(t) / 60 * abs(h)) + (abs(md) * abs(d) * (abs(st) / abs(mk)) + abs(am) + abs(post)) * abs(x) return round(result, 2)