software_updation.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:smartschool 作者: asifkodur 项目源码 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: update_win.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_installed_version = wx.StaticText(self, wx.ID_ANY, ("Installed Version:"))
        self.label_latest_version = wx.StaticText(self, wx.ID_ANY, ("Latest Version"))
        self.label_is_update = wx.StaticText(self, wx.ID_ANY, ("If Update available"))
        self.progress_bar = wx.Gauge(self, wx.ID_ANY, range=100)
        self.animation_panel = wx.Panel(self, wx.ID_ANY)
        self.label_status = wx.StaticText(self, wx.ID_ANY, (""))
        self.button_close = wx.Button(self, wx.ID_ANY, ("Cancel"))
        self.button_install = wx.Button(self, wx.ID_ANY, ("Check for Update"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_close)
        self.Bind(wx.EVT_BUTTON, self.on_install, self.button_install)
        self.Bind(wx.EVT_CLOSE, self.on_close)


        self.animation_panel.gif = None


        # create a pubsub receiver
        Publisher().subscribe(self.update, "update")
        Publisher().subscribe(self.error_report, "error_report")
        Publisher().subscribe(self.update_progress_bar, "progress_bar")
        Publisher().subscribe(self.get_versions, "update_versions")
        Publisher().subscribe(self.is_update, "is_update")
        Publisher().subscribe(self.play_animation, "play_animation")
        Publisher().subscribe(self.stop_animation, "stop_animation")
        Publisher().subscribe(self.updation_successful, "updation_successful")

        #self.play_animation('')
        #wx.FutureCall(10, self.start_thread)



        # end wxGlade
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号