ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/PrivDescriptionAssistant/trunk/PrivDescriptionAssistant_UI.py
Revision: 518
Committed: Wed Jan 29 15:38:29 2014 UTC (12 years, 2 months ago) by nino.borges
Content type: text/x-python
File size: 7867 byte(s)
Log Message:
updated the lists so that hw team can use it and moved addendum to top and renamed to draft

File Contents

# User Rev Content
1 ninoborges 8 """
2    
3     PrivDescriptionAssistantUI
4    
5     Created by
6     Emanuel Borges
7     05.02.2011
8    
9 nino.borges 346 This program will allow Concordance (Or any tool) users to speed up the process of creating
10 ninoborges 8 priv description sentances.
11    
12     """
13    
14     import wx
15    
16     class MyFrame(wx.Frame):
17     def __init__(self, parent, ID, title, pos=wx.DefaultPosition):
18     wx.Frame.__init__(self, parent, ID, title, pos, size =(550,580),style=wx.DEFAULT_FRAME_STYLE|wx.STAY_ON_TOP)
19     self.panel = wx.Panel(self,-1)
20    
21 nino.borges 346 #documentTypeList = ['','Email','Presentation','Memorandum','Spreadsheet']
22 nino.borges 518 #documentTypeList = ['','Email', 'Email chain', 'Presentation', 'Draft correspondence', 'Draft agreement',
23     # 'Executed correspondence', 'Executed agreement', 'Spreadsheet']
24     documentTypeList = ['','Letter','Internal memorandum','Memorandum','Email','Chart','Report','Presentation','Agreement']
25 ninoborges 8
26 nino.borges 346 #basisList = ['','sent to legal counsel requesting legal advice',
27     # 'between attorney-retained consultants',
28     # 'from legal counsel',
29     # 'from attorney-retained consultants providing advice',
30     # 'to attorney-retained consultants',
31     # 'sent to legal counsel requesting legal review and comment',
32     # 'sent to legal counsel for the purpose of obtaining legal advice',
33     # 'forwarding and discussing email providing advice from legal counsel []',
34     # 'referencing legal advice from legal counsel [] ',
35     # 'designated "Attorney Client Privileged"',
36     # ]
37 nino.borges 518 #basisList = ['','with', 'from counsel', 'to counsel', 'forwarding email from counsel', 'forwarding email chain with counsel', 'forwarding email chain to counsel']
38     basisList = ['','by counsel','from counsel','to counsel','with counsel']
39 nino.borges 346
40     #regardingList = ['','regarding []']
41     regardingList = ['','seeking legal advice regarding', 'seeking legal review regarding', 'providing legal advice regarding', 'providing legal review regarding', 'seeking and providing legal advice regarding',
42 nino.borges 518 'referencing legal advice provided by [fill in then delete brackets] regarding', 'forwarding and discussing legal advice provided by [fill in then delete brackets] regarding','seeking information to facilitate the provision of legal advice regarding',
43 nino.borges 346 'providing information to facilitate the provision of legal advice regarding']
44    
45     #adendumList = ['',
46     # 'for purposes of facilitating the provision of legal advice by counsel',
47     # 'redacted',
48     # 'and attached to foregoing email',]
49     #
50 nino.borges 518 #adendumList = ['','279 D Street LLC','Bitran Charitable Foundation','Bitran Family LP','Bitran Family Partnership',
51     # 'Boston Multi-Fam Prop. Dev.','Clearstream Investments','Crepaldi Bitran Charitable Trust','FPG 17 Wensley LLC','FPG Property Acquisition 1',
52     # 'GMB Capital Partners','Great Pond Mgmt','Isalia Property 1 LLC','Isalia Property Group LLC (fka Fisher)','Lecount Hollow Investments LP',
53     # 'Marco Bitran 2007 Irr. Fam. Trust','Marco Bitran Family Trust','Sababa Investments','Sabra Inc','Stoney Beach Rev Trust']
54     #
55     adendumList = ['','Draft']
56 nino.borges 346
57 nino.borges 518
58 ninoborges 8 docType_lbl = wx.StaticText(self.panel, -1, "Document Type : ")
59     self.docType_SelectBox = wx.Choice(self.panel, -1,(100, 50), choices = documentTypeList)
60     basis_lbl = wx.StaticText(self.panel, -1, "Basis : ")
61     self.basis_SelectBox = wx.Choice(self.panel, -1,(100, 50), choices = basisList)
62     regarding_lbl = wx.StaticText(self.panel, -1, "Regarding : ")
63     self.regarding_SelectBox = wx.Choice(self.panel, -1,(100, 50), choices = regardingList)
64 nino.borges 518 adendum_lbl = wx.StaticText(self.panel, -1, "Draft : ")
65 ninoborges 8 self.adendum_SelectBox = wx.Choice(self.panel, -1,(100, 50), choices = adendumList)
66    
67     self.privSentanceTextBox = wx.TextCtrl(self.panel,-1,style=wx.TE_MULTILINE, size=(450,100))
68    
69     self.CreateBoxesSection()
70    
71     mainSizer = wx.BoxSizer(wx.VERTICAL)
72 nino.borges 518 mainSizer.Add(adendum_lbl, 0, wx.ALIGN_CENTER|wx.ALL, 5)
73     mainSizer.Add(self.adendum_SelectBox , 0, wx.ALIGN_CENTER|wx.ALL, 5)
74 ninoborges 8 mainSizer.Add(docType_lbl , 0, wx.ALIGN_CENTER|wx.ALL, 5)
75     mainSizer.Add(self.docType_SelectBox, 0, wx.ALIGN_CENTER|wx.ALL, 5)
76     mainSizer.Add(basis_lbl, 0, wx.ALIGN_CENTER|wx.ALL, 5)
77     mainSizer.Add(self.basis_SelectBox, 0, wx.ALIGN_CENTER|wx.ALL, 5)
78     mainSizer.Add(regarding_lbl, 0, wx.ALIGN_CENTER|wx.ALL, 5)
79     mainSizer.Add(self.regarding_SelectBox, 0, wx.ALIGN_CENTER|wx.ALL, 5)
80 nino.borges 518
81 ninoborges 8 mainSizer.Add(self.privSentanceTextBox, 0, wx.ALIGN_CENTER|wx.ALL, 20)
82     mainSizer.Add(self.buttonSizer,0, wx.ALL|wx.ALIGN_BOTTOM|wx.ALIGN_CENTER, 10)
83     self.panel.SetSizer(mainSizer)
84    
85     self.Bind(wx.EVT_CHOICE, self.RescanSentance, self.docType_SelectBox)
86     self.Bind(wx.EVT_CHOICE, self.RescanSentance, self.basis_SelectBox)
87     self.Bind(wx.EVT_CHOICE, self.RescanSentance, self.regarding_SelectBox)
88     self.Bind(wx.EVT_CHOICE, self.RescanSentance, self.adendum_SelectBox)
89     self.Bind(wx.EVT_BUTTON, self.OnProcess, self.oKButton)
90     self.Bind(wx.EVT_BUTTON, self.CloseWindow, self.cancelButton)
91    
92     def RescanSentance(self,event):
93     self.privSentanceTextBox.Clear()
94 nino.borges 518 if self.adendum_SelectBox.GetStringSelection():
95     self.privSentanceTextBox.AppendText(self.adendum_SelectBox.GetStringSelection() + " ")
96 ninoborges 8 if self.docType_SelectBox.GetStringSelection():
97     self.privSentanceTextBox.AppendText(self.docType_SelectBox.GetStringSelection() + " ")
98     if self.basis_SelectBox.GetStringSelection():
99     self.privSentanceTextBox.AppendText(self.basis_SelectBox.GetStringSelection() + " ")
100 nino.borges 518 #if self.regarding_SelectBox.GetStringSelection():
101     # self.privSentanceTextBox.AppendText(self.regarding_SelectBox.GetStringSelection() + ".")
102 ninoborges 8 if self.regarding_SelectBox.GetStringSelection():
103     self.privSentanceTextBox.AppendText(self.regarding_SelectBox.GetStringSelection() + " ")
104    
105     def CreateBoxesSection(self):
106     self.oKButton = wx.Button(self.panel, wx.ID_OK)
107     self.oKButton.SetDefault()
108     self.oKButton.SetSize(self.oKButton.GetBestSize())
109     self.cancelButton = wx.Button(self.panel, wx.ID_CANCEL)
110     self.cancelButton.SetSize(self.cancelButton.GetBestSize())
111     self.buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
112     self.buttonSizer.Add(self.oKButton,0,wx.ALL,10)
113     self.buttonSizer.Add(self.cancelButton,0,wx.ALL,10)
114    
115     def CloseWindow(self, event):
116     self.Close(True)
117    
118     def OnProcess(self, event):
119     print self.privSentanceTextBox.GetValue()
120     cb_DataObj = wx.TextDataObject(self.privSentanceTextBox.GetValue())
121     if wx.TheClipboard.Open():
122     wx.TheClipboard.SetData(cb_DataObj)
123     wx.TheClipboard.Close()
124     self.privSentanceTextBox.Clear()
125 nino.borges 518 self.adendum_SelectBox.SetSelection(0)
126 ninoborges 8 self.docType_SelectBox.SetSelection(0)
127     self.basis_SelectBox.SetSelection(0)
128     self.regarding_SelectBox.SetSelection(0)
129 nino.borges 518
130 ninoborges 8
131     class MyApp(wx.App):
132     def OnInit(self):
133 nino.borges 518 self.frame = MyFrame(None, -1, "Priv Description Assistant BETA v.02")
134 ninoborges 8 self.frame.Show(True)
135     self.SetTopWindow(self.frame)
136     return True
137    
138    
139     if __name__ == '__main__':
140     app = MyApp(0)
141     app.MainLoop()