示例#1
0
 def __init__(self, parent):
     super(SetPhoneWizard, self).__init__(parent, -1,
                                          'Phone Setting Wizard')
     self._data = {}
     commport_page = CommPortPage(self)
     phonemodel_page = PhoneModelPage(self)
     summary_page = SummaryPage(self)
     wiz.WizardPageSimple_Chain(phonemodel_page, commport_page)
     wiz.WizardPageSimple_Chain(commport_page, summary_page)
     self.first_page = phonemodel_page
     self.GetPageAreaSizer().Add(phonemodel_page, 1, wx.EXPAND | wx.ALL, 5)
     wiz.EVT_WIZARD_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
     wiz.EVT_WIZARD_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged)
示例#2
0
    def __init__(self, filename, *args, **kwargs):
        kwargs['style'] = wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE
        super(CSVImportWizard, self).__init__(*args, **kwargs)

        self.optionsPage = CSVImportOptionsPage(filename, self)
        self.mappingPage = CSVImportMappingPage(self)
        self.optionsPage.SetNext(self.mappingPage)
        self.mappingPage.SetPrev(self.optionsPage)

        self.SetPageSize((600, -1))  # I know this is obsolete but it's the only one that works...

        wiz.EVT_WIZARD_PAGE_CHANGING(self, wx.ID_ANY, self.OnPageChanging)
        wiz.EVT_WIZARD_PAGE_CHANGED(self, wx.ID_ANY, self.OnPageChanged)
示例#3
0
 def __init__(self, parent):
     super(NewDBWizard, self).__init__(parent, -1,
                                       'New BitPim Storage Wizard')
     self.data = {}
     namepage = NamePage(self)
     pathpage = PathPage(self)
     optionspage = OptionsPage(self)
     summarypage = SummaryPage(self)
     wiz.WizardPageSimple_Chain(namepage, pathpage)
     wiz.WizardPageSimple_Chain(pathpage, optionspage)
     wiz.WizardPageSimple_Chain(optionspage, summarypage)
     self.firstpage = namepage
     self.GetPageAreaSizer().Add(namepage, 1, wx.EXPAND | wx.ALL, 5)
     wiz.EVT_WIZARD_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
     wiz.EVT_WIZARD_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged)
示例#4
0
    def __init__(self, parent, id=-1, title='Calendar Import Wizard'):
        super(ImportCalendarWizard, self).__init__(parent, id, title)
        self._data = {}
        _import_type_page = ImportTypePage(self)
        _import_source_page = ImportSourcePage(self)
        _import_data_all = ImportDataAll(self)
        _import_option = ImportOptionPage(self)

        wiz.WizardPageSimple_Chain(_import_type_page, _import_source_page)
        wiz.WizardPageSimple_Chain(_import_source_page, _import_data_all)
        wiz.WizardPageSimple_Chain(_import_data_all, _import_option)
        self.first_page = _import_type_page
        self.GetPageAreaSizer().Add(self.first_page, 1, wx.EXPAND | wx.ALL, 5)
        wiz.EVT_WIZARD_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
        wiz.EVT_WIZARD_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged)
示例#5
0
    def __init__(self, title, imageFileName):
        bmp = wx.Bitmap(imageFileName)
        self.wxId = wx.NewId()
        wiz.Wizard.__init__(self, ui.getMainPanel(), self.wxId, title, bmp)

        self.SetBorder(0)

        self.pageReaction = None

        # List of all the WizardPage objects associated with this
        # wizard.  This list does NOT define the order of the pages,
        # just that they're owned by this wizard.
        self.ownedPages = []

        wiz.EVT_WIZARD_PAGE_CHANGED(ui.getMainPanel(), self.wxId,
                                    self.onPageChange)
示例#6
0
    def __init__(self, parent, entry,
                 id=-1, title='Calendar Import Preset Wizard'):
        super(ImportCalendarPresetWizard, self).__init__(parent, id, title)
        self._data=entry
        _import_name_page=PresetNamePage(self)
        _import_type_page=imp_cal_wizard.ImportTypePage(self)
        _import_source_page=imp_cal_wizard.ImportSourcePage(self)
        _import_filter_page=PresetFilterPage(self)
        _import_option=ImportOptionPage(self)

        wiz.WizardPageSimple_Chain(_import_name_page, _import_type_page)
        wiz.WizardPageSimple_Chain(_import_type_page, _import_source_page)
        wiz.WizardPageSimple_Chain(_import_source_page, _import_filter_page)
        wiz.WizardPageSimple_Chain(_import_filter_page, _import_option)
        self.first_page=_import_name_page
        self.GetPageAreaSizer().Add(self.first_page, 1, wx.EXPAND|wx.ALL, 5)
        wiz.EVT_WIZARD_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging)
        wiz.EVT_WIZARD_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged)
示例#7
0
        page = event.GetPage()
        try:
            page._changedToThisPage(event)
        except AttributeError:
            pass


if __name__ == '__main__':
    app = wx.PySimpleApp()

    id = wx.NewId()
    wizard = wiz.Wizard(None, id, "Summarize Sales For A Month")
    wizard.data = {}

    page1 = ChooseFolderPage(wizard)
    page2 = ReadyPage(wizard)
    page3 = FeedbackPage(wizard)

    page1.SetNext(page2)
    page2.SetPrev(page1)
    page2.SetNext(page3)

    wiz.EVT_WIZARD_PAGE_CHANGING(app, id, onPageChanging)
    wiz.EVT_WIZARD_PAGE_CHANGED(app, id, onPageChanged)

    wizard.FitToPage(page1)
    wizard.RunWizard(page1)
    wizard.Destroy()

    app.MainLoop()