示例#1
0
    def OnInit(self):
        import os, inspect

        wx.GetApp().SetAppName("Scyther-gui")

        # Determine base directory (taking symbolic links into account)
        cmd_file = os.path.realpath(
            os.path.abspath(inspect.getfile(inspect.currentframe())))
        basedir = os.path.split(cmd_file)[0]

        # Parse arguments
        (opts, args) = parseArgs()

        # License option may abort here
        if opts.license:
            print Scyther.GetLicense()
            sys.exit(0)

        # Load preferences file
        Preference.init()

        #"""
        #Create and show the splash screen.  It will then create and show
        #the main frame when it is time to do so.
        #
        #The splash screen is disabled for automatic commands, and also
        #by a setting in the preferences file.
        #"""
        #if isSplashNeeded(opts):
        #    splash = MySplashScreen(basedir)
        #    splash.Show()

        self.mainWindow = Mainwindow.MainWindow(opts, args)
        self.SetTopWindow(self.mainWindow)
        self.mainWindow.Show()

        if isSplashNeeded(opts):
            dlg = About.AboutScyther(self.mainWindow, basedir)
            dlg.ShowModal()
            dlg.Destroy()

        return True
示例#2
0
    def OnInit(self):
        import os, inspect

        wx.GetApp().SetAppName("Scyther-gui")

        # Determine base directory (taking symbolic links into account)
        cmd_file = os.path.realpath(os.path.abspath(inspect.getfile( inspect.currentframe() )))
        basedir = os.path.split(cmd_file)[0]

        # Parse arguments
        (opts,args) = parseArgs()

        # License option may abort here
        if opts.license:
            print Scyther.GetLicense()
            sys.exit(0)

        # Load preferences file
        Preference.init()

        #"""
        #Create and show the splash screen.  It will then create and show
        #the main frame when it is time to do so.
        #
        #The splash screen is disabled for automatic commands, and also
        #by a setting in the preferences file.
        #"""
        #if isSplashNeeded(opts):
        #    splash = MySplashScreen(basedir)
        #    splash.Show()

        self.mainWindow = Mainwindow.MainWindow(opts,args)
        self.SetTopWindow(self.mainWindow)
        self.mainWindow.Show()

        if isSplashNeeded(opts):
            dlg = About.AboutScyther(self.mainWindow,basedir)
            dlg.ShowModal()
            dlg.Destroy()

        return True
示例#3
0
def isSplashNeeded(opts):
    if not opts.command:
        if opts.splashscreen and not (Preference.get('splashscreen') in ['false','off','disable','0']):
            return True
    return False
示例#4
0
def isSplashNeeded(opts):
    if not opts.command:
        if opts.splashscreen and not (Preference.get('splashscreen') in ['false','off','disable','0']):
            return True
    return False
示例#5
0
def isSplashNeeded(opts):
    if not opts.command:
        if opts.splashscreen and not (Preference.get("splashscreen") in ["false", "off", "disable", "0"]):
            return True
    return False