| 1 |
nino.borges |
695 |
"""
|
| 2 |
|
|
|
| 3 |
|
|
DatReportDialog
|
| 4 |
|
|
|
| 5 |
|
|
Created by
|
| 6 |
|
|
Emanuel Borges
|
| 7 |
|
|
2020.05.13
|
| 8 |
|
|
|
| 9 |
|
|
This dialog displays the results of the DAT analysis.
|
| 10 |
|
|
|
| 11 |
|
|
"""
|
| 12 |
|
|
|
| 13 |
|
|
|
| 14 |
|
|
|
| 15 |
|
|
|
| 16 |
|
|
import wx
|
| 17 |
|
|
|
| 18 |
|
|
class DatReportDialog(wx.Dialog):
|
| 19 |
|
|
|
| 20 |
|
|
def __init__(self, parent, totalRecordCount, fullFieldList, populatedFieldsList, emptyFieldsList, parsingErrorCount):
|
| 21 |
nino.borges |
696 |
self.parent = parent
|
| 22 |
|
|
wx.Dialog.__init__(self, parent, -1, "DAT Report Results ", style = wx.DEFAULT_DIALOG_STYLE, size = (330,180))
|
| 23 |
|
|
recordCountLabel = wx.StaticText(self, -1, "Number of records in DAT: %s "% totalRecordCount)
|
| 24 |
|
|
parsingErrorCountLabel = wx.StaticText(self, -1, "Parsing errors in DAT: %s "% parsingErrorCount)
|
| 25 |
|
|
#self.projectNameTextBox = wx.TextCtrl(self, -1, "", wx.DefaultPosition, (90,-1))
|
| 26 |
|
|
|
| 27 |
|
|
requiredSectionSizer = wx.GridBagSizer(10,2)
|
| 28 |
|
|
requiredSectionSizer.Add(recordCountLabel,pos = (0,0))
|
| 29 |
|
|
requiredSectionSizer.Add(parsingErrorCountLabel,pos = (0,1),span=(1,4), flag = wx.EXPAND)
|
| 30 |
|
|
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
| 31 |
|
|
mainSizer.Add(requiredSectionSizer,0, wx.ALL, 20)
|
| 32 |
|
|
|
| 33 |
|
|
oKButton = wx.Button(self, wx.ID_OK)
|
| 34 |
|
|
oKButton.SetDefault()
|
| 35 |
|
|
cancelButton = wx.Button(self, wx.ID_CANCEL)
|
| 36 |
|
|
buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
|
| 37 |
|
|
buttonSizer.Add(oKButton,0,wx.ALL,5)
|
| 38 |
|
|
buttonSizer.Add(cancelButton,0,wx.ALL,5)
|
| 39 |
|
|
mainSizer.Add(buttonSizer,0, wx.ALL|wx.ALIGN_BOTTOM|wx.ALIGN_CENTER, 10)
|
| 40 |
|
|
|
| 41 |
|
|
self.SetSizer(mainSizer)
|