program.py 文件源码

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

项目:HeaTDV4A 作者: HeaTTheatR 项目源码 文件源码
def send_mail_or_show_profile(self, user_name, instance_open_mail=None):
        """??????? ???? ? ???????? ?????? ??????? ??? ????? ??? ????????
        ????????? ?????????? ????????????.

        type instance_open_mail: <class 'messageviewer.MessageViewer'>;
        param instance_open_mail: ???????? ???? ? ??????? ????????????????
                                  ?????????;
        """

        def _send_mail_or_show_profile(*args):
            name_button = args[0][0]  # "???????"/"?????????"

            if name_button == core.string_lang_item_menu_profile:
                progress = \
                    self.create_window(text=core.string_lang_info_your)
                Clock.schedule_once(lambda *arg: self.show_user_profile(
                    progress, user_name, instance_open_mail), 1)
            elif name_button == core.string_lang_write_message_status:
                self.send_mail(user_name)

        self.create_window(
            callback=lambda *args: _send_mail_or_show_profile(args),
            param="query", dismiss=True,
            text=core.string_lang_username.format(user_name),
            button_ok=core.string_lang_item_menu_profile,
            button_cancel=core.string_lang_write_message_status)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号