예제 #1
0
def cb_indicator(n, msg):
    global Indicates
    item = Indicates[n]
    if msg.data:
        timeout.set(functools.partial(cb_turnon, n), 0)
    else:
        if "sto" in item: timeout.clear(item["sto"])
        timeout.set(functools.partial(cb_turnoff, n), 0)
예제 #2
0
def cb_turnon(n):
    global Indicates
    item = Indicates[n]
    item["tag"]["foreground"] = litcolor
    item["tag"]["font"] = boldfont
    if "sto" in item: timeout.clear(item["sto"])
    item["sto"] = timeout.set(functools.partial(cb_turnoff, n),
                              item["timeout"])
예제 #3
0
def cb_button_enable(n, enable):
    if enable:
        item["button"]['state'] = tk.NORMAL
        item["button"]["background"] = litcolor
        if "sto" in item: timeout.clear(item["sto"])
        item["sto"] = timeout.set(
            functools.partial(cb_button_enable, n, False), item["timeout"])
    else:
        item["button"]['state'] = tk.DISABLED
        item["button"]["background"] = maskcolor
        if "sto" in item: item.pop("sto")
예제 #4
0
파일: recipe.py 프로젝트: t-akita/rtk_tools
def cb_edit_stat(msg):
    global statcheck
    flg = not msg.data
    if statcheck:
        timeout.clear(statcheck)
        statcheck = 0
    if msg.data:
        if "stat_timeout" in Config:
            statcheck = timeout.set(cb_button_normal, Config["stat_timeout"])
    if check_button_chenge(flg):
        timeout.set(functools.partial(cb_button_enable, flg), 0)