当前位置: 首页>>代码示例>>Python>>正文


Python Dialog.start方法代码示例

本文整理汇总了Python中dialog.Dialog.start方法的典型用法代码示例。如果您正苦于以下问题:Python Dialog.start方法的具体用法?Python Dialog.start怎么用?Python Dialog.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dialog.Dialog的用法示例。


在下文中一共展示了Dialog.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: start

# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
    def start(self, delay_msec=UPDATE_MSEC):

        Dialog.start(self)

        self.schedule_display_task(delay_msec)

        height = int(self.driver.canvas['height'])-100
        self.scrollbar.place(x=0, y=0, width=SCROLLBAR_WIDTH, height=height)
        self.listbox.place(x=SCROLLBAR_WIDTH, y=0, width=self.driver.canvas['width'], height=str(height))
        self.checkbox.place(x=10, y = height+10)
开发者ID:robert-b,项目名称:hackflight,代码行数:12,代码来源:messages.py

示例2: start

# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
    def start(self, delay_msec=UPDATE_MSEC):

        Dialog.start(self)

        self.throttle_gauge = self._new_gauge(0, 'Throttle', 'red', minval=0)   # T
        self.roll_gauge     = self._new_gauge(1, '    Roll', 'blue')            # A
        self.pitch_gauge    = self._new_gauge(2, '   Pitch', 'green')           # E
        self.yaw_gauge      = self._new_gauge(3, '     Yaw', 'orange')          # R
        self.switch_gauge   = self._new_gauge(4, '     Aux', 'purple')

        self.schedule_display_task(delay_msec)
开发者ID:robert-b,项目名称:hackflight,代码行数:13,代码来源:receiver.py

示例3: int

# 需要导入模块: from dialog import Dialog [as 别名]
# 或者: from dialog.Dialog import start [as 别名]
        scope.way = "forward"
    elif movement_way == "back":
        scope.way = "backward"
    else:
        responses.put("failed")
        scope._exit = True
    scope.move_time = int(scope.move_time)
    scope.distance = scope.move_time
    scope.position = 0

def after(scope, responses):
    scope.channel.send(None)
    if scope.channel.receive() == "success":
        pass

@handle(callbacks, before=before, after=after)
def movement(requests, responses, scope):
    if not scope.stopped:
        print(scope.position)
        scope.channel.send(scope.way)
        scope.position += 0.1
        time.sleep(0.1)
        if scope.position >= scope.distance:
            responses.put("finished")
            scope._exit = True

if __name__ == "__main__":
    DLG = Dialog(globals())
    DLG.load("control.dlg")
    DLG.start()
开发者ID:kusha,项目名称:dialog,代码行数:32,代码来源:main.py


注:本文中的dialog.Dialog.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。