def __init__(self, *args, **kwds):
# begin wxGlade: sampoorna_win.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login"))
self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username"))
self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password"))
self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>"))
self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard"))
self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard"))
self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard"))
self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous"))
self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>"))
self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress"))
self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
self.progress_each = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status"))
self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished"))
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
# create a pubsub receiver
Publisher().subscribe(self.updateDisplay, "update")
# end wxGlade
python类TE_PROCESS_ENTER的实例源码
def __init__(self, *args, **kwds):
# begin wxGlade: sampoorna_win.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna credentials. It is used for one time login"))
self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
self.label_progress_perc = wx.StaticText(self.panel_2, wx.ID_ANY, (""))
self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
#self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
# create a pubsub receiver
Publisher().subscribe(self.update_display, "update")
Publisher().subscribe(self.final_report, "report")
Publisher().subscribe(self.update_progress_bar, "progress_bar")
Publisher().subscribe(self.update_current_class, "change_class")
# end wxGlade
def __init__(self, *args, **kwds):
# begin wxGlade: sampoorna_win.__init__
kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN
wx.Dialog.__init__(self, *args, **kwds)
self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna username or password. It is used for one time login"))
self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
self.progress_each =wx.StaticText(self.panel_2, wx.ID_ANY)# wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_READONLY)
self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
# end wxGlade
# create a pubsub receiver
Publisher().subscribe(self.update_display, "update")
Publisher().subscribe(self.final_report, "report")
Publisher().subscribe(self.update_progress_bar, "progress_bar")
Publisher().subscribe(self.update_current_class, "change_class")
def __init__(self, parent):
wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"List Frame", pos=wx.DefaultPosition,
size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)
sizer = wx.BoxSizer(wx.VERTICAL)
gb_sizer = wx.GridBagSizer(5, 5)
gb_sizer.SetFlexibleDirection(wx.BOTH)
gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)
list_boxChoices = []
self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, list_boxChoices, 0)
gb_sizer.Add(self.list_box, wx.GBPosition(0, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)
combo_boxChoices = []
self.combo_box = wx.ComboBox(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
combo_boxChoices, 0)
gb_sizer.Add(self.combo_box, wx.GBPosition(1, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)
choiceChoices = []
self.choice = wx.Choice(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choiceChoices, 0)
self.choice.SetSelection(0)
gb_sizer.Add(self.choice, wx.GBPosition(2, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)
self.text_ctrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
wx.TE_PROCESS_ENTER)
gb_sizer.Add(self.text_ctrl, wx.GBPosition(3, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)
self.button = wx.Button(self, wx.ID_ANY, u"Add", wx.DefaultPosition, wx.DefaultSize, 0)
gb_sizer.Add(self.button, wx.GBPosition(3, 1), wx.GBSpan(1, 1), wx.ALL, 0)
gb_sizer.AddGrowableCol(0)
gb_sizer.AddGrowableRow(0)
sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)
self.SetSizer(sizer)
self.Layout()
self.Centre(wx.BOTH)
# Connect Events
self.button.Bind(wx.EVT_BUTTON, self.on_add)
self.text_ctrl.Bind(wx.EVT_TEXT_ENTER, self.on_add)
self.model = WatchableDict()
self.model["list"] = []
self.model["text"] = ""
pywatch.wx.ValueChanger(self.text_ctrl, self.model, "text")
pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "list")
pywatch.wx.ItemContainerItemWatcher(self.choice, self.model, "list")
pywatch.wx.ItemContainerItemWatcher(self.combo_box, self.model, "list")
# Virtual event handlers, overide them in your derived class
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_TFRAME, name='TFrame', parent=prnt,
pos=wx.Point(254, 241), size=wx.Size(829, 786),
style=wx.DEFAULT_FRAME_STYLE, title=u'PAWS Terminal')
self._init_utils()
self.SetClientSize(wx.Size(821, 748))
self.SetMenuBar(self.TMenuBar)
self.SetAutoLayout(True)
self.SetToolTipString('TFrame')
self.SetMinSize(wx.Size(-1, 21))
self.TStatusBar = wx.StatusBar(id=wxID_TFRAMETSTATUSBAR,
name='TStatusBar', parent=self, style=0)
self.TStatusBar.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
u'Courier New'))
self._init_coll_TStatusBar_Fields(self.TStatusBar)
self.SetStatusBar(self.TStatusBar)
self.TInput = wx.TextCtrl(id=wxID_TFRAMETINPUT, name='TInput',
parent=self, pos=wx.Point(1, 728), size=wx.Size(819, 20),
style=wx.SIMPLE_BORDER | wx.TE_PROCESS_ENTER, value="''")
self.TInput.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
u'Courier'))
self.TInput.SetToolTipString(u'Type command here.')
self.TInput.SetAutoLayout(False)
self.TInput.SetEditable(True)
self.TInput.Enable(False)
self.TInput.Bind(wx.EVT_TEXT_ENTER, self.OnTInputTextEnter,
id=wxID_TFRAMETINPUT)
self.TDisplay = wx.TextCtrl(id=wxID_TFRAMETDISPLAY, name='TDisplay',
parent=self, pos=wx.Point(0, 0), size=wx.Size(821, 728),
style=wx.TE_RICH2 | wx.TE_MULTILINE | wx.TE_READONLY,
value=u'To run a game, choose File ? Pick Game … then choose a game from the list.')
self.TDisplay.SetMinSize(wx.Size(517, 440))
self.TDisplay.SetEditable(False)
self.TDisplay.SetToolTipString(u"Game's output displays here.")
self.TDisplay.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.NORMAL, False,
u'Arial'))
self.TDisplay.Enable(True)
self._init_sizers()