alpha release
This commit is contained in:
37
db/models.py
37
db/models.py
@@ -45,7 +45,42 @@ class KatDorogi(Base):
|
|||||||
return "KatDor(kategoria=%s, minshirinapolosu=%s, maxshirinapolosu=%s, shirinaobochinu=%s, maxpivedinetns=%s)" % \
|
return "KatDor(kategoria=%s, minshirinapolosu=%s, maxshirinapolosu=%s, shirinaobochinu=%s, maxpivedinetns=%s)" % \
|
||||||
(self.kategoria, self.minshirinapolosu, self.maxshirinapolosu, self.shirinaobochinu, self.maxpivedinetns)
|
(self.kategoria, self.minshirinapolosu, self.maxshirinapolosu, self.shirinaobochinu, self.maxpivedinetns)
|
||||||
|
|
||||||
|
class Zadanie():
|
||||||
|
__tablename__ = 'KatDor'
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
N1 = Column("N1", Float(Precision=16))
|
||||||
|
N11 = Column("N11", Float(Precision=16))
|
||||||
|
N12 = Column("N11", Float(Precision=16))
|
||||||
|
N13 = Column("N11", Float(Precision=16))
|
||||||
|
N1p = Column("N11", Float(Precision=16))
|
||||||
|
N2 = Column("N11", Float(Precision=16))
|
||||||
|
N21 = Column("N11", Float(Precision=16))
|
||||||
|
N22 = Column("N11", Float(Precision=16))
|
||||||
|
N23 = Column("N11", Float(Precision=16))
|
||||||
|
N2p = Column("N11", Float(Precision=16))
|
||||||
|
N3 = Column("N11", Float(Precision=16))
|
||||||
|
N31 = Column("N11", Float(Precision=16))
|
||||||
|
N32 = Column("N11", Float(Precision=16))
|
||||||
|
N33 = Column("N11", Float(Precision=16))
|
||||||
|
N3p = Column("N11", Float(Precision=16))
|
||||||
|
N4 = Column("N11", Float(Precision=16))
|
||||||
|
N41 = Column("N11", Float(Precision=16))
|
||||||
|
N42 = Column("N11", Float(Precision=16))
|
||||||
|
N43 = Column("N11", Float(Precision=16))
|
||||||
|
N4p = Column("N11", Float(Precision=16))
|
||||||
|
|
||||||
|
def __init__(self, n1, n11, n12, n13):
|
||||||
|
self.n1 = n1
|
||||||
|
self.n11 = n11
|
||||||
|
self.n12 = n12
|
||||||
|
self.n13 = n13
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
meta.create_all(engine)
|
meta.create_all(engine)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,10 @@ class SecondPageFrame(wx.Frame):
|
|||||||
print(self.pr_Vert)
|
print(self.pr_Vert)
|
||||||
if len(self.text_ctrl_1.GetValue()) > 0:
|
if len(self.text_ctrl_1.GetValue()) > 0:
|
||||||
if str(self.pr_hor) == self.text_ctrl_1.GetValue():
|
if str(self.pr_hor) == self.text_ctrl_1.GetValue():
|
||||||
|
self.file = open("123", "w").close()
|
||||||
|
self.file = open("123", "w")
|
||||||
|
self.file.writelines(self.text_ctrl_1.GetValue()+"\n")
|
||||||
|
self.file.close()
|
||||||
print("good")
|
print("good")
|
||||||
self.bitmap_2.Hide()
|
self.bitmap_2.Hide()
|
||||||
self.img1 = "/Users/danamir/PycharmProjects/odd-perekrestok/img/good.jpg"
|
self.img1 = "/Users/danamir/PycharmProjects/odd-perekrestok/img/good.jpg"
|
||||||
|
|||||||
11
gui/page3.py
11
gui/page3.py
@@ -50,6 +50,7 @@ class Page3Frame(wx.Frame):
|
|||||||
self.text_ctrl_12 = wx.TextCtrl(self.panel_1, wx.ID_ANY, style=wx.TE_PROCESS_ENTER)
|
self.text_ctrl_12 = wx.TextCtrl(self.panel_1, wx.ID_ANY, style=wx.TE_PROCESS_ENTER)
|
||||||
self.text_ctrl_12.Bind(wx.EVT_TEXT_ENTER, self.proverka_vvoda12)
|
self.text_ctrl_12.Bind(wx.EVT_TEXT_ENTER, self.proverka_vvoda12)
|
||||||
self.btn_page4 = wx.Button(self, wx.ID_ANY, u"\u0414\u0430\u043b\u0435\u0435")
|
self.btn_page4 = wx.Button(self, wx.ID_ANY, u"\u0414\u0430\u043b\u0435\u0435")
|
||||||
|
self.btn_page4.Bind(wx.EVT_BUTTON, self.gopage4)
|
||||||
|
|
||||||
|
|
||||||
self.__do_layout()
|
self.__do_layout()
|
||||||
@@ -334,7 +335,7 @@ class Page3Frame(wx.Frame):
|
|||||||
self.label_17.SetLabel("N11 = " + str(self.data[1][0]) + "=")
|
self.label_17.SetLabel("N11 = " + str(self.data[1][0]) + "=")
|
||||||
self.label_18.SetLabel("N12 = " + str(self.data[2][0]) + "=")
|
self.label_18.SetLabel("N12 = " + str(self.data[2][0]) + "=")
|
||||||
self.label_19.SetLabel("N1 прямо = " + str(self.data[0][1]) + "-" + str(self.data[1][1]) + "-" + str(self.data[2][1]) + "=")
|
self.label_19.SetLabel("N1 прямо = " + str(self.data[0][1]) + "-" + str(self.data[1][1]) + "-" + str(self.data[2][1]) + "=")
|
||||||
|
|
||||||
self.label_20.SetLabel("N2 =" + str(self.data[3][0]) + "=")
|
self.label_20.SetLabel("N2 =" + str(self.data[3][0]) + "=")
|
||||||
self.label_21.SetLabel("N21 =" + str(self.data[4][0]) + "=")
|
self.label_21.SetLabel("N21 =" + str(self.data[4][0]) + "=")
|
||||||
self.label_22.SetLabel("N22 =" + str(self.data[5][0]) + "=")
|
self.label_22.SetLabel("N22 =" + str(self.data[5][0]) + "=")
|
||||||
@@ -418,8 +419,12 @@ class Page3Frame(wx.Frame):
|
|||||||
if len(self.text_ctrl_4.GetValue()) > 0:
|
if len(self.text_ctrl_4.GetValue()) > 0:
|
||||||
self.s = float(self.data[0][1]) - float(self.data[1][1]) - float(self.data[2][1])
|
self.s = float(self.data[0][1]) - float(self.data[1][1]) - float(self.data[2][1])
|
||||||
self.s1 = "%.2f" % self.s
|
self.s1 = "%.2f" % self.s
|
||||||
|
self.file = open("123", "a")
|
||||||
|
self.file.writelines(self.s1)
|
||||||
|
self.file.close()
|
||||||
|
|
||||||
if self.text_ctrl_4.GetValue() == str(self.s1):
|
if self.text_ctrl_4.GetValue() == str(self.s1):
|
||||||
|
|
||||||
print("good")
|
print("good")
|
||||||
print( str(float(self.data[0][1]) - float(self.data[1][1]) - float(self.data[2][1])))
|
print( str(float(self.data[0][1]) - float(self.data[1][1]) - float(self.data[2][1])))
|
||||||
|
|
||||||
@@ -611,6 +616,10 @@ class Page3Frame(wx.Frame):
|
|||||||
self.bitmap_2.Show()
|
self.bitmap_2.Show()
|
||||||
self.text_ctrl_1.SetValue(str(self.s1))
|
self.text_ctrl_1.SetValue(str(self.s1))
|
||||||
self.Refresh()
|
self.Refresh()
|
||||||
|
def gopage4(self, event):
|
||||||
|
from gui import page4
|
||||||
|
page4.MyApp.OnInit(page4)
|
||||||
|
self.Destroy()
|
||||||
|
|
||||||
|
|
||||||
class Page3(wx.App):
|
class Page3(wx.App):
|
||||||
|
|||||||
Reference in New Issue
Block a user