+
+ # Connect Events
+ self.button_5.Bind( wx.EVT_BUTTON, self.OnKeys )
+ self.radio_dictchoice.Bind( wx.EVT_RADIOBOX, self.OnOther )
+
+ def __del__( self ):
+ pass
+
+
+ # Virtual event handlers, overide them in your derived class
+ def OnKeys( self, event ):
+ dial = AlcOptFrame(self, self.parent)
+ dial.CenterOnParent()
+ dial.ShowModal()
+ for i in range(0,len(dial.listlabel)):
+ dial.keys[dial.listcle[i]] = dial.listspin[i].GetValue()
+ DoConf().makeoptions(['KEY'], [dial.keys], outfile = self.parent.ConfigPath['key'])
+ dial.Destroy()
+
+ def OnOther( self, event ):
+ if self.radio_dictchoice.GetSelection() :
+ self.dictpath.Enable(True)
+ else :
+ self.dictpath.Enable(False)
+
+# class StatDialog(wx.Dialog):
+# def __init__(self, parent, *args, **kwds):
+# kwds['style'] = wx.DEFAULT_DIALOG_STYLE
+# wx.Dialog.__init__(self, *args, **kwds)
+# self.fileout = ""
+# self.parent = parent
+# self.label_lem = wx.StaticText(self, -1, _(u"Lemmatization").decode('utf8'))
+# self.radio_lem = wx.RadioBox(self, -1, u"", choices=[_(u'oui').decode('utf8'), _(u'non').decode('utf8')], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
+# #txt = u"""Fréquence minimum d'une forme
+# #analysée (0 = non utilisé)"""
+# #self.label_8 = wx.StaticText(self, -1, txt)
+# #self.spin_ctrl_5 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000, initial=0)
+# #self.label_max_actives = wx.StaticText(self, -1, u"Nombre maximum de formes analysées")
+# #self.spin_max_actives = wx.SpinCtrl(self, -1, "",size = (100,30), min=20, max=10000, initial=1500)
+# self.label_4 = wx.StaticText(self, -1, _(u"Keys settings").decode('utf8'))
+# self.button_5 = wx.Button(self, wx.ID_PREFERENCES, "")
+# self.labeldictchoice = wx.StaticText(self, -1, _(u"Dictionary").decode('utf8'))
+# self.radio_dictchoice = wx.RadioBox(self, -1, u"", choices=[_(u'indexation').decode('utf8'), _(u'other').decode('utf8')], majorDimension=0, style=wx.RA_SPECIFY_ROWS)
+# #self.labeldictpath = wx.StaticText(self, -1, _(u"Path").decode('utf8'))
+# self.dictpath = filebrowse.FileBrowseButton(self, -1, size=(350, -1), labelText = _(u"Path").decode('utf8'), fileMode = 2, fileMask = '*')
+# self.dictpath.Enable(False)
+# #self.Bind(wx.EVT_CHECKBOX, self.OnCheckUce, self.check_uce)
+# #self.Bind(wx.EVT_SPINCTRL, self.OnSpin, self.spin_ctrl_5)
+# self.Bind(wx.EVT_BUTTON, self.OnKeys, self.button_5)
+# self.Bind(wx.EVT_RADIOBOX, self.OnOther, self.radio_dictchoice)
+# self.__do_layout()
+# self.__set_properties()
+#
+# def __do_layout(self) :
+# first = wx.BoxSizer(wx.VERTICAL)
+# sizer = wx.FlexGridSizer(0,2,0,0)
+# sizer.Add(self.label_lem, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(self.radio_lem, 0, wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.txt_exp, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.exp, 0, wx.ALIGN_RIGHT, 5)
+# #sizer.Add(self.label_uce, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.check_uce, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.label_occuce, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.spin_ctrl_4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.label_8, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.spin_ctrl_5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.label_max_actives, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.spin_max_actives, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(self.label_4, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(self.button_5, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# sizer.Add(self.labeldictchoice, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(self.radio_dictchoice, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# #sizer.Add(self.labeldictpath, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(self.dictpath, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# sizer.Add(wx.StaticLine(self),0, wx.ALIGN_LEFT, 5)
+# #sizer.Add(box2, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5)
+# first.Add(sizer, 0, wx.ALL, 5)
+# btnsizer = wx.StdDialogButtonSizer()
+# btn = wx.Button(self, wx.ID_CANCEL)
+# btnsizer.AddButton(btn)
+# btn_ok = wx.Button(self, wx.ID_OK)
+# btn_ok.SetDefault()
+# btnsizer.AddButton(btn_ok)
+# btnsizer.Realize()
+# first.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5)
+# self.SetSizer(first)
+# first.Fit(self)
+#
+# def __set_properties(self) :
+# self.SetTitle(_(u"Settings").decode('utf8'))
+#
+# def OnKeys(self, evt):
+# dial = AlcOptFrame(self, self.parent.parent)
+# dial.CenterOnParent()
+# dial.ShowModal()
+# for i in range(0,len(dial.listlabel)):
+# dial.keys[dial.listcle[i]] = dial.listspin[i].GetValue()
+# DoConf().makeoptions(['KEY'], [dial.keys], outfile = self.parent.parent.ConfigPath['key'])
+# dial.Destroy()
+#
+# def OnOther(self, evt):
+# if self.radio_dictchoice.GetSelection() :
+# self.dictpath.Enable(True)
+# else :
+# self.dictpath.Enable(False)