ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/MCP2/Trunk/AddNewClientDialog.py
Revision: 593
Committed: Tue Nov 3 22:48:38 2015 UTC (10 years, 4 months ago) by nino.borges
Content type: text/x-python
File size: 1809 byte(s)
Log Message:
working on a new version of the MCP.

File Contents

# Content
1 """
2
3 AddNewClientDialog
4
5 Created by
6 Emanuel Borges
7 11.20.2013
8
9 This dialog will allow you to add a new client and first project to your list.
10
11 """
12
13 import wx, NinoGenTools
14
15 class AddNewClientDialog(wx.Dialog):
16
17 def __init__(self, parent):
18
19 self.parent = parent
20 wx.Dialog.__init__(self, parent, -1, "Add New Client", style = wx.DEFAULT_DIALOG_STYLE, size = (330,180))
21 clientNameLabel = wx.StaticText(self, -1, "Client Name: ")
22 self.clientNameTextBox = wx.TextCtrl(self, -1, "", wx.DefaultPosition, (90,-1))
23 projectNameLabel = wx.StaticText(self, -1, "Project Name: ")
24 self.projectNameTextBox = wx.TextCtrl(self, -1, "", wx.DefaultPosition, (90,-1))
25
26 requiredSectionSizer = wx.GridBagSizer(10,2)
27 requiredSectionSizer.Add(clientNameLabel,pos = (0,0))
28 requiredSectionSizer.Add(self.clientNameTextBox,pos = (0,1),span=(1,4), flag = wx.EXPAND)
29 requiredSectionSizer.Add(projectNameLabel,pos = (1,0))
30 requiredSectionSizer.Add(self.projectNameTextBox,pos = (1,1))
31
32 mainSizer = wx.BoxSizer(wx.VERTICAL)
33 mainSizer.Add(requiredSectionSizer,0, wx.ALL, 20)
34
35 oKButton = wx.Button(self, wx.ID_OK)
36 oKButton.SetDefault()
37 cancelButton = wx.Button(self, wx.ID_CANCEL)
38 buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
39 buttonSizer.Add(oKButton,0,wx.ALL,5)
40 buttonSizer.Add(cancelButton,0,wx.ALL,5)
41 mainSizer.Add(buttonSizer,0, wx.ALL|wx.ALIGN_BOTTOM|wx.ALIGN_CENTER, 10)
42
43 self.SetSizer(mainSizer)
44
45 def GetValues(self):
46 clientName = self.clientNameTextBox.GetValue()
47 projectName = self.projectNameTextBox.GetValue()
48 return clientName, projectName