Ejemplo n.º 1
0
def main():
    app = WxAsyncApp()
    frame = TitanFrame(None, title=f"{NAME} {VERSION}")
    frame.Show()
    app.SetTopWindow(frame)
    loop = get_event_loop()
    loop.run_until_complete(app.MainLoop())
Ejemplo n.º 2
0
def main_async():
    # see https://github.com/sirk390/wxasync
    app = WxAsyncApp()
    frame = SelectableFrame()
    frame.Show(True)
    app.SetTopWindow(frame)
    loop = get_event_loop()
    loop.run_until_complete(app.MainLoop())
Ejemplo n.º 3
0
def createWindow(msg_queue, buffer, client_network_main, ip, port):
    print("Creating Window")
    loop = asyncio.get_event_loop()
    loop.create_task(client_network_main(msg_queue, buffer, ip, port))
    app = WxAsyncApp()
    player = Player("Stream Media Player", buffer, msg_queue)
    player.Show()
    app.SetTopWindow(player)
    print("Running")
    # loop.set_debug(True)
    loop.run_until_complete(app.MainLoop())
Ejemplo n.º 4
0
        self.dwbtn = wx.Button(panel, label='下载', size=(-1, 27))
        grid_sizer.AddMany([(self.tag_ctrl, 1, wx.EXPAND), (self.begin),
                            (self.end), (self.dwbtn)])

        AsyncBind(wx.EVT_BUTTON, self.download, self.dwbtn)

        box_sizer.Add(grid_sizer, 1, wx.ALL | wx.CENTER, 20)

        self.img_list = wx.ListCtrl(panel, -1, style=wx.LC_REPORT)
        self.img_list.InsertColumn(0, '图片名')

        box_sizer.Add(self.img_list, 1, wx.EXPAND | wx.ALL ^ wx.TOP, 20)

        panel.SetSizer(box_sizer)

        self.Centre()

    async def download(self, evt):
        pass


if __name__ == '__main__':
    app = WxAsyncApp()
    frame = MainFrame()
    app.SetTopWindow(frame)
    frame.Show()

    evt = asyncio.get_event_loop()
    evt.run_until_complete(app.MainLoop())
Ejemplo n.º 5
0
async def main():            
    app = WxAsyncApp()
    frame = TestFrame()
    frame.Show()
    app.SetTopWindow(frame)
    await app.MainLoop()
Ejemplo n.º 6
0
async def run_app():
    app = WxAsyncApp()
    main_window = MainWindow()
    main_window.Show()
    app.SetTopWindow(main_window)
    await app.MainLoop()
Ejemplo n.º 7
0
def main():
    app = WxAsyncApp()
    frame = TitanPatcherFrame(None, title=f"Titan Patcher")
    app.SetTopWindow(frame)
    loop = get_event_loop()
    loop.run_until_complete(app.MainLoop())
Ejemplo n.º 8
0
import asyncio
import logging
import os

from demo.windows.main_window import MainWindow
from wxasync import WxAsyncApp

_LOGGER = logging.getLogger(__name__)

if __name__ == "__main__":
    os.environ["DEBUGGING"] = "1"
    logging.basicConfig(level=logging.DEBUG)
    loop = asyncio.get_event_loop()
    app = WxAsyncApp()
    main_window = MainWindow()
    main_window.Show()
    app.SetTopWindow(main_window)
    loop.run_until_complete(app.MainLoop())