-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
37 lines (34 loc) · 1.6 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from ctypes import CDLL
from multiprocessing import freeze_support
from utils import fillTextBoxAtStartup
from ui import IoursUi
import tkinter as tk
from ldr.loader_master import LoaderMaster
if __name__ == '__main__':
freeze_support()
dll_found = True
try:
dll = CDLL('./fight.dll')
except FileNotFoundError:
dll_found = False
root = tk.Tk()
root.title('IOUR Solvers v.1.2a')
app = IoursUi(root)
LoaderMaster().loadFile()
if not fillTextBoxAtStartup(app.RunesInputFrame.PetFrame.combat_box,
app.RunesInputFrame.PetFrame.runes_box,
app.RunesInputFrame.PetFrame.converge_box,
app.RunesInputFrame.RunesFrame,
app.RunesInputFrame.OpponentFrame,
app.ShipInputFrame.FrameShipStats,
app.ShipInputFrame.FrameShipGuild.guild_box):
app.RunesInputFrame.PetFrame.combat_box.delete('0.0', 'end')
app.RunesInputFrame.PetFrame.runes_box.delete('0.0', 'end')
app.RunesInputFrame.PetFrame.converge_box.delete('0', 'end')
app.RunesInputFrame.PetFrame.text1.insert('0.0', 'Wrong or no data\nfound in iou.txt\n'
'Its ok if you run\nthis app for the first time.')
if not dll_found:
app.RunesInputFrame.PetFrame.runes_box.delete('0.0', 'end')
app.RunesInputFrame.Petframe.runes_box.insert('0.0', 'Cannot find fight.dll\nProgram will not work.')
app.button.configure(state='disabled')
app.run()