예제 #1
0
    def oninitConfDialog(self, event):
        dims = getDimensies()
        self.choiceDimensie.SetItems(dims)
        self.choiceDimensie.SetSelection(getUserDimensieID() - 1)  # index loopt anders dus -1
        self.checkPreview.SetValue(diversen.USER_PREVIEW)
        self.checkTooltip.SetValue(diversen.USER_TOOLTIP)
        self.checkWebNieuw.SetValue(diversen.USER_WEBNIEUW)
        self.checkUpdate.SetValue(diversen.USER_UPDATECHECK)
        self.confedtLoginName.SetValue(diversen.USER_USERNAME)
        self.txtVersie.SetLabel(self.txtVersie.GetLabelText() + APP_VERSION)

        if diversen.USER_FOLDER:
            self.dirpickFolder.SetPath(diversen.USER_FOLDER)
        else:
            from os.path import expanduser
            pad = expanduser("~")
            self.dirpickFolder.SetPath(pad)

        pick = self.dirpickFolder.GetPickerCtrl()
        if pick is not None:
            pick.SetLabel('Selecteer')
예제 #2
0
    def oninitConfDialog(self, event):
        dims = getDimensies()
        self.choiceDimensie.SetItems(dims)
        self.choiceDimensie.SetSelection(getUserDimensieID() -
                                         1)  # index loopt anders dus -1
        self.checkPreview.SetValue(diversen.USER_PREVIEW)
        self.checkTooltip.SetValue(diversen.USER_TOOLTIP)
        self.checkWebNieuw.SetValue(diversen.USER_WEBNIEUW)
        self.checkUpdate.SetValue(diversen.USER_UPDATECHECK)
        self.confedtLoginName.SetValue(diversen.USER_USERNAME)
        self.txtVersie.SetLabel(self.txtVersie.GetLabelText() + APP_VERSION)

        if diversen.USER_FOLDER:
            self.dirpickFolder.SetPath(diversen.USER_FOLDER)
        else:
            from os.path import expanduser
            pad = expanduser("~")
            self.dirpickFolder.SetPath(pad)

        pick = self.dirpickFolder.GetPickerCtrl()
        if pick is not None:
            pick.SetLabel('Selecteer')
예제 #3
0
파일: aquaf.py 프로젝트: labordus/aquaf
    def __init__(self, parent):
        # initialize parent class
        maingui.Mainframe.__init__(self, parent)

        if db.Initialize_db() is False:
            app.Exit()
#        if db.first_run() == 1:
#            dlg = wx.MessageDialog(None, 'Import data van vorige versie van deze applicatie?', 'Import', wx.YES_NO | wx.ICON_QUESTION)
#            result = dlg.ShowModal()
#            if result == wx.ID_YES:
#                dlg.Destroy()

        FillGlobals()

#        diversen.USER_WEBNIEUW = getUserWebNieuw()

        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap("icon.ico", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.SetSize((702, 538))

        log = self.infoBox
        # redirect text here
        redir = RedirectText(log)
        sys.stdout = redir

        # Windows laat anders dubbele entries zien,
        # en linux laat alleen bestanden zien met specifieke casing

        if (sys.platform.startswith('win')):  # dan win32 of win64
            self.tvFiles.SetFilter("plaatjes(*.bmp;*.jpg;*.png;*.tiff;*.tif;)|*.bmp;*.jpg;*.png;*.tiff;*.tif")
        else:  # posix
            self.tvFiles.SetFilter("plaatjes(*.bmp;*.BMP;*.jpg;*.JPG;*.png;*.PNG;*.tiff;*.TIFF;*.tif;*.TIF)|*.bmp;*.BMP;*.jpg;*.JPG;*.png;*.PNG;*.tiff;*.TIFF;*.tif;*.TIF")

        print "Hoi " + diversen.USER_USERNAME
        print "Welkom bij Aquaf " + APP_VERSION

        self.choiceDimensie.SetSelection(getUserDimensieID() - 1)
        ToolTip.Enable(diversen.USER_TOOLTIP)

        if diversen.USER_FOLDER == '' or diversen.USER_FOLDER is None:
            from os.path import expanduser

            pad = expanduser("~")
            # SetPath() triggert ontvFilesSelChanged()
            # en dus ook PreviewImage()
        else:
            pad = diversen.USER_FOLDER
        self.tvFiles.SetPath(pad)

        dims = getDimensies()
        self.choiceDimensie.SetItems(dims)
        self.choiceDimensie.SetSelection(getUserDimensieID() - 1)  # index loopt anders dus -1

        self.listFiles.InsertColumn(0, 'Bestand', width=150)
        self.listFiles.InsertColumn(1, 'Dimensie', width=75)
        self.listFiles.InsertColumn(2, 'Pad', width=140)

#        self.Layout()
        self.panelPreview.Show(diversen.USER_PREVIEW)
        self.Fit()

        if diversen.USER_UPDATECHECK:
            ReleaseVersion, ReleaseDate, ReleaseChanges = UpdateAvailable()
            if ReleaseVersion != '':
                update = updatedialog.Update(self)
                update.LoadText(ReleaseVersion, ReleaseDate, ReleaseChanges)
                update.CenterOnParent()
                update.ShowModal()
                update.Destroy()
예제 #4
0
    def __init__(self, parent):
        # initialize parent class
        maingui.Mainframe.__init__(self, parent)

        if db.Initialize_db() is False:
            app.Exit()
#        if db.first_run() == 1:
#            dlg = wx.MessageDialog(None, 'Import data van vorige versie van deze applicatie?', 'Import', wx.YES_NO | wx.ICON_QUESTION)
#            result = dlg.ShowModal()
#            if result == wx.ID_YES:
#                dlg.Destroy()

        FillGlobals()

        #        diversen.USER_WEBNIEUW = getUserWebNieuw()

        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap("icon.ico", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.SetSize((702, 538))

        log = self.infoBox
        # redirect text here
        redir = RedirectText(log)
        sys.stdout = redir

        # Windows laat anders dubbele entries zien,
        # en linux laat alleen bestanden zien met specifieke casing

        if (sys.platform.startswith('win')):  # dan win32 of win64
            self.tvFiles.SetFilter(
                "plaatjes(*.bmp;*.jpg;*.png;*.tiff;*.tif;)|*.bmp;*.jpg;*.png;*.tiff;*.tif"
            )
        else:  # posix
            self.tvFiles.SetFilter(
                "plaatjes(*.bmp;*.BMP;*.jpg;*.JPG;*.png;*.PNG;*.tiff;*.TIFF;*.tif;*.TIF)|*.bmp;*.BMP;*.jpg;*.JPG;*.png;*.PNG;*.tiff;*.TIFF;*.tif;*.TIF"
            )

        print "Hoi " + diversen.USER_USERNAME
        print "Welkom bij Aquaf " + APP_VERSION

        self.choiceDimensie.SetSelection(getUserDimensieID() - 1)
        ToolTip.Enable(diversen.USER_TOOLTIP)

        if diversen.USER_FOLDER == '' or diversen.USER_FOLDER is None:
            from os.path import expanduser

            pad = expanduser("~")
            # SetPath() triggert ontvFilesSelChanged()
            # en dus ook PreviewImage()
        else:
            pad = diversen.USER_FOLDER
        self.tvFiles.SetPath(pad)

        dims = getDimensies()
        self.choiceDimensie.SetItems(dims)
        self.choiceDimensie.SetSelection(getUserDimensieID() -
                                         1)  # index loopt anders dus -1

        self.listFiles.InsertColumn(0, 'Bestand', width=150)
        self.listFiles.InsertColumn(1, 'Dimensie', width=75)
        self.listFiles.InsertColumn(2, 'Pad', width=140)

        #        self.Layout()
        self.panelPreview.Show(diversen.USER_PREVIEW)
        self.Fit()

        if diversen.USER_UPDATECHECK:
            ReleaseVersion, ReleaseDate, ReleaseChanges = UpdateAvailable()
            if ReleaseVersion != '':
                update = updatedialog.Update(self)
                update.LoadText(ReleaseVersion, ReleaseDate, ReleaseChanges)
                update.CenterOnParent()
                update.ShowModal()
                update.Destroy()