コード例 #1
0
 def ShowAboutBox(self, evt):
     info = wx.adv.AboutDialogInfo()
     info.Name = "pyfa"
     time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S')
     info.Version = config.getVersion() + '\nEVE Data Version: {} ({})'.format(gamedata_version, time)  # gui.aboutData.versionString
     #
     # try:
     #     import matplotlib
     #     matplotlib_version = matplotlib.__version__
     # except:
     #     matplotlib_version = None
     #
     # info.Description = wordwrap(gui.aboutData.description + "\n\nDevelopers:\n\t" +
     #                             "\n\t".join(gui.aboutData.developers) +
     #                             "\n\nAdditional credits:\n\t" +
     #                             "\n\t".join(gui.aboutData.credits) +
     #                             "\n\nLicenses:\n\t" +
     #                             "\n\t".join(gui.aboutData.licenses) +
     #                             "\n\nEVE Data: \t" + gamedata_version +
     #                             "\nPython: \t\t" + '{}.{}.{}'.format(v.major, v.minor, v.micro) +
     #                             "\nwxPython: \t" + wx.__version__ +
     #                             "\nSQLAlchemy: \t" + sqlalchemy.__version__ +
     #                             "\nmatplotlib: \t {}".format(matplotlib_version if matplotlib_version else "Not Installed"),
     #                             500, wx.ClientDC(self))
     # if "__WXGTK__" in wx.PlatformInfo:
     #     forumUrl = "http://forums.eveonline.com/default.aspx?g=posts&t=466425"
     # else:
     #     forumUrl = "http://forums.eveonline.com/default.aspx?g=posts&t=466425"
     # info.WebSite = (forumUrl, "pyfa thread at EVE Online forum")
     wx.adv.AboutBox(info)
コード例 #2
0
ファイル: mainFrame.py プロジェクト: petosorus/Pyfa
 def ShowAboutBox(self, evt):
     info = wx.adv.AboutDialogInfo()
     info.Name = "pyfa"
     time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S')
     info.Version = config.getVersion() + '\nEVE Data Version: {} ({})'.format(gamedata_version, time)  # gui.aboutData.versionString
     #
     # try:
     #     import matplotlib
     #     matplotlib_version = matplotlib.__version__
     # except:
     #     matplotlib_version = None
     #
     # info.Description = wordwrap(gui.aboutData.description + "\n\nDevelopers:\n\t" +
     #                             "\n\t".join(gui.aboutData.developers) +
     #                             "\n\nAdditional credits:\n\t" +
     #                             "\n\t".join(gui.aboutData.credits) +
     #                             "\n\nLicenses:\n\t" +
     #                             "\n\t".join(gui.aboutData.licenses) +
     #                             "\n\nEVE Data: \t" + gamedata_version +
     #                             "\nPython: \t\t" + '{}.{}.{}'.format(v.major, v.minor, v.micro) +
     #                             "\nwxPython: \t" + wx.__version__ +
     #                             "\nSQLAlchemy: \t" + sqlalchemy.__version__ +
     #                             "\nmatplotlib: \t {}".format(matplotlib_version if matplotlib_version else "Not Installed"),
     #                             500, wx.ClientDC(self))
     # if "__WXGTK__" in wx.PlatformInfo:
     #     forumUrl = "http://forums.eveonline.com/default.aspx?g=posts&t=466425"
     # else:
     #     forumUrl = "http://forums.eveonline.com/default.aspx?g=posts&t=466425"
     # info.WebSite = (forumUrl, "pyfa thread at EVE Online forum")
     wx.adv.AboutBox(info)
コード例 #3
0
ファイル: mainWindow.py プロジェクト: GNOME/gnome-schedule
    def on_about_menu_activate (self, *args):

        gtk.about_dialog_set_url_hook(self.open_url, "bogusbar")
        dlg = gtk.AboutDialog ()
        dlg.set_title (_("About Gnome Schedule"))
        dlg.set_name (_("Gnome Schedule"))
        dlg.set_version (config.getVersion())
        dlg.set_copyright (_("Copyright (c) %(year)s %(name)s.") % ({ 'year' : "2004-2015", 'name' : "Gaute Hope"}))
        #dlg.set_comments ()
        #dlg.set_license ()
        dlg.set_website ("http://gnome-schedule.sourceforge.net")
        dlg.set_website_label("http://gnome-schedule.sourceforge.net")
        dlg.set_authors (
            ["Gaute Hope <*****@*****.**>",
             "Philip Van Hoof <pvanhoof at gnome dot org>",
             "Kristof Vansant <de_lupus at pandora dot be>"]
            )
        dlg.set_documenters (
            ["Rodrigo Marcos Fombellida <*****@*****.**>"]
            )
        dlg.set_translator_credits (_("translator-credits"))
        dlg.set_logo (self.iconPixbuf)

        if (dlg.run() != gtk.RESPONSE_YES):
            dlg.destroy()
            del dlg
            return
        dlg.destroy()
        del dlg
コード例 #4
0
    def on_about_menu_activate(self, *args):

        gtk.about_dialog_set_url_hook(self.open_url, "bogusbar")
        dlg = gtk.AboutDialog()
        dlg.set_title(_("About Gnome Schedule"))
        dlg.set_name(_("Gnome Schedule"))
        dlg.set_version(config.getVersion())
        dlg.set_copyright(
            _("Copyright (c) %(year)s %(name)s.") % ({
                'year': "2004-2013",
                'name': "Gaute Hope"
            }))
        #dlg.set_comments ()
        #dlg.set_license ()
        dlg.set_website("http://gnome-schedule.sourceforge.net")
        dlg.set_website_label("http://gnome-schedule.sourceforge.net")
        dlg.set_authors([
            "Gaute Hope <*****@*****.**>",
            "Philip Van Hoof <pvanhoof at gnome dot org>",
            "Kristof Vansant <de_lupus at pandora dot be>"
        ])
        dlg.set_documenters(
            ["Rodrigo Marcos Fombellida <*****@*****.**>"])
        dlg.set_translator_credits(_("translator-credits"))
        dlg.set_logo(self.iconPixbuf)

        if (dlg.run() != gtk.RESPONSE_YES):
            dlg.destroy()
            del dlg
            return
        dlg.destroy()
        del dlg
コード例 #5
0
ファイル: errorDialog.py プロジェクト: blitzmann/Pyfa
    def __init__(self, parent=None, error_title='Error!'):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title="pyfa error", pos=wx.DefaultPosition, size=wx.Size(500, 600),
                          style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER | wx.STAY_ON_TOP)

        from eos.config import gamedata_version, gamedata_date

        time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S')
        version = "pyfa " + config.getVersion() + '\nEVE Data Version: {} ({})\n\n'.format(gamedata_version, time)  # gui.aboutData.versionString

        desc = "pyfa has experienced an unexpected issue. Below is a message that contains crucial\n" \
               "information about how this was triggered. Please contact the developers with the\n" \
               "information provided through the EVE Online forums or file a GitHub issue."

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        if 'wxMSW' in wx.PlatformInfo:
            self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        headSizer = wx.BoxSizer(wx.HORIZONTAL)

        headingText = wx.StaticText(self, wx.ID_ANY, error_title, wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE)
        headingText.SetFont(wx.Font(14, 74, 90, 92, False))

        headSizer.Add(headingText, 1, wx.ALL, 5)
        mainSizer.Add(headSizer, 0, wx.EXPAND, 5)

        mainSizer.Add(wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL), 0, wx.EXPAND | wx.ALL, 5)

        box = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(box, 0, wx.EXPAND | wx.ALIGN_TOP)

        descText = wx.StaticText(self, wx.ID_ANY, desc)
        box.Add(descText, 1, wx.ALL, 5)

        # github = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, label="Github", URL="https://github.com/pyfa-org/Pyfa/issues")
        # box.Add(github, 0, wx.ALL, 5)
        #
        # eveForums = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, label="EVE Forums", URL="https://forums.eveonline.com/t/27156")
        # box.Add(eveForums, 0, wx.ALL, 5)

        # mainSizer.AddSpacer((0, 5), 0, wx.EXPAND, 5)

        self.errorTextCtrl = wx.TextCtrl(self, wx.ID_ANY, version + version_block.strip(), wx.DefaultPosition,
                                         (-1, 400), wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2 | wx.TE_DONTWRAP)
        self.errorTextCtrl.SetFont(wx.Font(8, wx.FONTFAMILY_TELETYPE, wx.NORMAL, wx.NORMAL))
        mainSizer.Add(self.errorTextCtrl, 0, wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, 5)
        self.errorTextCtrl.AppendText("\n")
        self.errorTextCtrl.Layout()

        self.SetSizer(mainSizer)
        mainSizer.Layout()
        self.Layout()

        self.Centre(wx.BOTH)
        self.Bind(wx.EVT_CLOSE, self.OnClose)

        self.Show()
コード例 #6
0
ファイル: errorDialog.py プロジェクト: bsmr/pyfa-org-Pyfa
    def __init__(self, parent=None, error_title='Error!'):
        super().__init__(parent, id=wx.ID_ANY, title="pyfa error", pos=wx.DefaultPosition, size=wx.Size(500, 600))

        from eos.config import gamedata_version, gamedata_date

        time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S')
        version = "pyfa " + config.getVersion() + '\nEVE Data Version: {} ({})\n\n'.format(gamedata_version, time)  # gui.aboutData.versionString

        desc = "pyfa has experienced an unexpected issue. Below is a message that contains crucial\n" \
               "information about how this was triggered. Please contact the developers with the\n" \
               "information provided through the EVE Online forums or file a GitHub issue."

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        mainSizer = wx.BoxSizer(wx.VERTICAL)
        headSizer = wx.BoxSizer(wx.HORIZONTAL)

        headingText = wx.StaticText(self, wx.ID_ANY, error_title, wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE)
        headingText.SetFont(wx.Font(14, 74, 90, 92, False))

        headSizer.Add(headingText, 1, wx.ALL, 5)
        mainSizer.Add(headSizer, 0, wx.EXPAND, 5)

        mainSizer.Add(wx.StaticLine(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL), 0, wx.EXPAND | wx.ALL, 5)

        box = wx.BoxSizer(wx.VERTICAL)
        mainSizer.Add(box, 0, wx.EXPAND | wx.ALIGN_TOP)

        descText = wx.StaticText(self, wx.ID_ANY, desc)
        box.Add(descText, 1, wx.ALL, 5)

        # github = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, label="Github", URL="https://github.com/pyfa-org/Pyfa/issues")
        # box.Add(github, 0, wx.ALL, 5)
        #
        # eveForums = wx.lib.agw.hyperlink.HyperLinkCtrl(self, wx.ID_ANY, label="EVE Forums", URL="https://forums.eveonline.com/t/27156")
        # box.Add(eveForums, 0, wx.ALL, 5)

        # mainSizer.AddSpacer((0, 5), 0, wx.EXPAND, 5)

        self.errorTextCtrl = wx.TextCtrl(self, wx.ID_ANY, version + version_block.strip(), wx.DefaultPosition,
                                         (-1, 400), wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH2 | wx.TE_DONTWRAP)
        self.errorTextCtrl.SetFont(wx.Font(8, wx.FONTFAMILY_TELETYPE, wx.NORMAL, wx.NORMAL))
        mainSizer.Add(self.errorTextCtrl, 0, wx.EXPAND | wx.ALL, 5)
        self.errorTextCtrl.AppendText("\n")
        self.errorTextCtrl.Layout()

        self.SetSizer(mainSizer)
        mainSizer.Layout()
        self.Layout()
        self.SetMinSize(self.GetSize())

        self.Centre(wx.BOTH)
コード例 #7
0
from service.market import Market
from eos.const import FittingModuleState, FittingHardpoint, FittingSlot
from service.const import PortEftRigSize
from eos.saveddata.module import Module
from eos.saveddata.drone import Drone
from eos.effectHandlerHelpers import HandledList
from eos.db import gamedata_session, getCategory, getAttributeInfo, getGroup
from eos.gamedata import Attribute, Effect, Group, Item, ItemEffect
from eos.utils.spoolSupport import SpoolType, SpoolOptions
from gui.fitCommands.calc.module.localAdd import CalcAddLocalModuleCommand
from gui.fitCommands.calc.module.localRemove import CalcRemoveLocalModulesCommand
from gui.fitCommands.calc.module.changeCharges import CalcChangeModuleChargesCommand
from gui.fitCommands.helpers import ModuleInfo

pyfalog = Logger(__name__)
pyfaVersion = getVersion()


class EfsPort:
    wepTestSet = {}
    version = 0.04

    @staticmethod
    def attrDirectMap(values, target, source):
        for val in values:
            target[val] = source.getModifiedItemAttr(val)

    @staticmethod
    def getT2MwdSpeed(fit, sFit):
        fitID = fit.ID
        propID = None
コード例 #8
0
ファイル: pyfa.py プロジェクト: thauser/Pyfa
        else:
            pyfalog.info("Running in a thawed state.")

        # Lets get to the good stuff, shall we?
        import eos.db
        import eos.events  # todo: move this to eos initialization?

        # noinspection PyUnresolvedReferences
        import service.prefetch  # noqa: F401

        # Make sure the saveddata db exists
        if not os.path.exists(config.savePath):
            os.mkdir(config.savePath)

        eos.db.saveddata_meta.create_all()

        from gui.mainFrame import MainFrame

        # set title if it wasn't supplied by argument
        if options.title is None:
            options.title = "pyfa %s - Python Fitting Assistant" % (
                config.getVersion())

        pyfa = wx.App(False)
        mf = MainFrame(options.title)
        ErrorHandler.SetParent(mf)
        pyfa.MainLoop()

        # TODO: Add some thread cleanup code here. Right now we bail, and that can lead to orphaned threads or threads not properly exiting.
        sys.exit()
コード例 #9
0
#
# pyfa is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyfa.  If not, see <http://www.gnu.org/licenses/>.
# =============================================================================

import config
import wx
_t = wx.GetTranslation

try:
    versionString = "{0}".format(config.getVersion())
except NameError:
    # is caught in case we run test and there are no config values initialized
    versionString = "0.0"

licenses = (
    _t("pyfa is released under GNU GPLv3 - see included LICENSE file"),
    _t("All EVE-Online related materials are property of CCP hf."),
    _t("Silk Icons Set by famfamfam.com - Creative Commons Attribution 2.5 License"
       ),
    _t("Fat Cow Icons by fatcow.com - Creative Commons Attribution 3.0 License"
       ))
developers = ("blitzmann \tSable Blitzmann (maintainer)",
              "cncfanatics \tSakari Orisi (retired)",
              "DarkPhoenix \tKadesh Priestess (retired)",
              "Darriele \t\tDarriele (retired)",
コード例 #10
0
def read_root():
    version = getVersion()
    return {"Hello": "World", "version": version}
コード例 #11
0
 def __init__(self, bot):
     self.bot = bot
     self.version = config.getVersion()
     self.backstage = int(config.getBackstage())
コード例 #12
0
        import eos.events  # todo: move this to eos initialization?

        # noinspection PyUnresolvedReferences
        import service.prefetch  # noqa: F401

        # Make sure the saveddata db exists
        if not os.path.exists(config.savePath):
            os.mkdir(config.savePath)

        eos.db.saveddata_meta.create_all()

        from gui.mainFrame import MainFrame

        # set title if it wasn't supplied by argument
        if options.title is None:
            options.title = "pyfa %s - Python Fitting Assistant" % (config.getVersion())

        pyfa = wx.App(False)
        mf = MainFrame(options.title)
        ErrorHandler.SetParent(mf)

        if options.profile_path:
            profile_path = os.path.join(options.profile_path, 'pyfa-{}.profile'.format(datetime.datetime.now().strftime('%Y%m%d_%H%M%S')))
            pyfalog.debug("Starting pyfa with a profiler, saving to {}".format(profile_path))
            import cProfile
            cProfile.run('pyfa.MainLoop()', profile_path)
        else:
            pyfa.MainLoop()

        # TODO: Add some thread cleanup code here. Right now we bail, and that can lead to orphaned threads or threads not properly exiting.
        sys.exit()
コード例 #13
0
ファイル: pyfa.py プロジェクト: Sectoid/Pyfa
        import eos.events  # todo: move this to eos initialization?

        # noinspection PyUnresolvedReferences
        import service.prefetch  # noqa: F401

        # Make sure the saveddata db exists
        if not os.path.exists(config.savePath):
            os.mkdir(config.savePath)

        eos.db.saveddata_meta.create_all()

        from gui.mainFrame import MainFrame

        # set title if it wasn't supplied by argument
        if options.title is None:
            options.title = "pyfa %s - Python Fitting Assistant" % (config.getVersion())

        pyfa = wx.App(False)
        mf = MainFrame(options.title)
        ErrorHandler.SetParent(mf)

        if options.profile_path:
            profile_path = os.path.join(options.profile_path, 'pyfa-{}.profile'.format(datetime.datetime.now().strftime('%Y%m%d_%H%M%S')))
            pyfalog.debug("Starting pyfa with a profiler, saving to {}".format(profile_path))
            import cProfile
            cProfile.run('pyfa.MainLoop()', profile_path)
        else:
            pyfa.MainLoop()

        # TODO: Add some thread cleanup code here. Right now we bail, and that can lead to orphaned threads or threads not properly exiting.
        sys.exit()
コード例 #14
0
ファイル: main.py プロジェクト: laurieliyang/WavePad
# -*- coding: utf-8 -*-

import wx
import config

APP_MAIN = wx.App(False)
MKDN_PAD = None
HTML_PAD = None

class MainFrame(wx.Frame):
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title=title)
        MAIN_SIZER = wx.BoxSizer(wx.HORIZONTAL)
        MKDN_PAD = wx.TextCtrl(self, style=wx.TE_MULTILINE)
        HTML_PAD = wx.TextCtrl(self, style=wx.TE_MULTILINE)
        MAIN_SIZER.Add(MKDN_PAD, wx.EXPAND|wx.TOP)
        MAIN_SIZER.Add(HTML_PAD, wx.EXPAND|wx.TOP)
        
        # self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
        

mainFrm = MainFrame(parent=None, title='WavePad - ' + config.getVersion())
mainFrm.Show()

APP_MAIN.MainLoop()

コード例 #15
0
ファイル: pyfa.py プロジェクト: m-sasha/PyfaAT
        import eos.events  # todo: move this to eos initialization?

        # noinspection PyUnresolvedReferences
        import service.prefetch  # noqa: F401

        # Make sure the saveddata db exists
        if not os.path.exists(config.savePath):
            os.mkdir(config.savePath)

        eos.db.saveddata_meta.create_all()

        from gui.mainFrame import MainFrame

        # set title if it wasn't supplied by argument
        if options.title is None:
            options.title = "PyfaAT %s" % (config.getVersion())

        pyfa = wx.App(False)
        mf = MainFrame(options.title)
        ErrorHandler.SetParent(mf)

        from at.setupsFrame import SetupsFrame
        SetupsFrame.getInstance().Show()

        if options.profile_path:
            profile_path = os.path.join(
                options.profile_path, 'pyfa-{}.profile'.format(
                    datetime.datetime.now().strftime('%Y%m%d_%H%M%S')))
            pyfalog.debug("Starting pyfa with a profiler, saving to {}".format(
                profile_path))
            import cProfile