|
5 | 5 | Bu Yazılımın Bir Kopyası GitHub da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/PyAppDevKit
|
6 | 6 | A Copy of This Software is published on GitHub To view: https://github.com/LinuxUsersLinuxMint/PyAppDevKit"""
|
7 | 7 |
|
| 8 | +from LibFunc.switch import * |
| 9 | + |
8 | 10 | def time(number):
|
9 | 11 | while number > 0:
|
10 | 12 | number -= 1
|
@@ -39,20 +41,35 @@ def exit_program_dialog(exit_dialog_msg):
|
39 | 41 | Example Dialog (exitDialog): "Exit program..."
|
40 | 42 | Example Dialog (errormsgDialog): "Invalid Command!" """
|
41 | 43 |
|
42 |
| -def all_exit(ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog): |
43 |
| - exit_select = int(input(ExitSelectDialog)) |
44 |
| - if exit_select == 0: |
45 |
| - userTime = int(input(userTimeDialog)) |
46 |
| - exit_program_dialog_time(exitDialog, userTime) |
47 |
| - elif exit_select == 1: |
48 |
| - userTime = int(input(userTimeDialog)) |
49 |
| - exit_program_time(userTime) |
50 |
| - elif exit_select == 2: |
51 |
| - exit_program_dialog(exitDialog) |
52 |
| - elif exit_select == 3: |
53 |
| - exit() |
54 |
| - else: |
55 |
| - print(errormsgDialog) |
| 44 | +def all_exit(dialog_switch,ExitSelectDialog,userTimeDialog,exitDialog,errormsgDialog): |
| 45 | + if dialog_switch == ON: |
| 46 | + exit_select = int(input(ExitSelectDialog)) |
| 47 | + if exit_select == 0: |
| 48 | + userTime = int(input(userTimeDialog)) |
| 49 | + exit_program_dialog_time(exitDialog, userTime) |
| 50 | + elif exit_select == 1: |
| 51 | + userTime = int(input(userTimeDialog)) |
| 52 | + exit_program_time(userTime) |
| 53 | + elif exit_select == 2: |
| 54 | + exit_program_dialog(exitDialog) |
| 55 | + elif exit_select == 3: |
| 56 | + exit() |
| 57 | + else: |
| 58 | + print(errormsgDialog) |
| 59 | + elif dialog_switch == OFF: |
| 60 | + exit_select = int(input("Select the method to exit the program (0: Dialogue and Time entry, 1: Time entry only, 2: Dialogue entry only, 3: Normal exit (old style)): ")) |
| 61 | + if exit_select == 0: |
| 62 | + userTime = int(input("After how many seconds should the program be closed?: ")) |
| 63 | + exit_program_dialog_time("Exit program...", userTime) |
| 64 | + elif exit_select == 1: |
| 65 | + userTime = int(input("After how many seconds should the program be closed?: ")) |
| 66 | + exit_program_time(userTime) |
| 67 | + elif exit_select == 2: |
| 68 | + exit_program_dialog("Exit program...") |
| 69 | + elif exit_select == 3: |
| 70 | + exit() |
| 71 | + else: |
| 72 | + print("Invalid Command!") |
56 | 73 |
|
57 | 74 | def app_info(dialog_one,dialog_one_t,dialog_two,dialog_two_t,dialog_three,dialog_three_t,dialog_four,dialog_four_t,dialog_five,dialog_five_t,dialog_six,dialog_six_t,dialog_seven,dialog_seven_t,dialog_eigth,dialog_eight_t,dialog_nine,dialog_nine_t,dialog_ten,dialog_ten_t):
|
58 | 75 | print("{0} {1}". format(dialog_one,dialog_one_t))
|
|
0 commit comments