ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/MCP2/Trunk/AddNewProjectDialog.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: 1499 byte(s)
Log Message:
working on a new version of the MCP.

File Contents

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