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: 346
Committed: Sat Apr 27 02:02:43 2013 UTC (12 years, 11 months ago) by nino.borges
Content type: text/x-python
File size: 7359 byte(s)
Log Message:
updated priv desc to add more items to lists

File Contents

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