Advertisement
dipollwody

con

Jul 27th, 2020
1,741
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.70 KB | None | 0 0
  1. #~przycisk inter konsole
  2. #+ Thread + Loading + function
  3. #+ log
  4. #+ data base
  5. #+ access to point
  6. #+ title
  7. #+ console Thread (name point)
  8. #+ console logistic
  9. #+ consloe logic
  10. #+ console / history move concept
  11. #+ console / info
  12. #+ console / log
  13. #///
  14. #back end
  15. #///
  16. #front end operations script ...
  17. #front table for access Date
  18. #view of control
  19.  
  20. #/// sprawdzenie działania poprzez debugger
  21.  
  22.  
  23.  
  24. #@-------------------------------------------------
  25.  
  26.  
  27. #@____Okno
  28. #@~Inferna na przycisk opener fest
  29. #+ console Thread (name point)
  30. #+ console logistic
  31. #+ consloe logic
  32. #+ console / history move concept
  33. #+ console / info
  34. #+ console / log
  35. #^-Inferna
  36. #@ debug
  37. #  zasięg pola
  38. #Informacje o funkcji
  39. #input z funkcją
  40. #+ log
  41. #+ access to point
  42. #+ data base
  43. #back end
  44. #///
  45. #front end operations script ...
  46. #front table for access Date
  47. #view of control
  48. #@____
  49.  
  50.  
  51. #$ consola / wielkość okna /
  52. #$ consola
  53.  
  54. #-----------------------------------------------
  55.  
  56.  
  57.  
  58. # importy
  59.  
  60.  
  61. from tkinter import ttk
  62. import sys
  63. import string
  64. import random
  65. import threading
  66. import logging
  67. from tkinter import *
  68. import os
  69. import time
  70. import linecache
  71. from tkinter import ttk
  72. from tkinter import Tk, Text, BOTH, W, N, E, S
  73. from tkinter.ttk import Frame, Button, Label, Style
  74. from math import *
  75. import csv
  76. import datetime
  77. import functools
  78. from concurrent import futures
  79.  
  80. try:
  81.     import tkinter as tk
  82. except ImportError:
  83.     import Tkinter as tk
  84.  
  85. def __init__(self, console):
  86.         self.console = True
  87.  
  88.  
  89.  
  90. #class
  91. #debug threads
  92. #debug window size
  93. #debug function
  94.  
  95.  
  96. #class
  97. #threads
  98.  
  99.  
  100. #Progaram / nazwy / console info / debug / info / warning / error / critical /
  101. #Progaram / nazwy /
  102.  
  103. #główny zadany / opisowy i wpływajacy na zakres wykonania zadania /
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111. #definicje
  112.  
  113. #funkcje
  114.  
  115.  
  116. #[log] {name} taks
  117.  
  118.  
  119.  
  120.  
  121.  
  122. def anwser_button_enter():
  123.     print("hollaa amiggggo")
  124.  
  125.  
  126. #class
  127. #bind an atribute open/close console
  128. #class / window / nawigacja
  129. def donothing():
  130.     filewin = Toplevel(root)
  131.     button = Button(filewin, text="Do nothing button")
  132.     button.pack()
  133.  
  134.         # class / window / console click
  135.  
  136. class console(Frame):
  137.     class Window(Frame):
  138. ---------------
  139.  
  140. class Window(Frame):
  141.  
  142.  
  143.     def __init__(self, master=None):
  144.         Frame.__init__(self, master)
  145.         self.master = master
  146.         self.init_window()
  147.  
  148.     #Creation of init_window
  149.     def init_window(self):
  150.  
  151.  
  152. -----------
  153.         def __init__(self, master=None):
  154.             Frame.__init__(self, master)
  155.             self.master = master
  156.             self.init_window()
  157.  
  158.         # Creation of init_window
  159.         def init_window(self):
  160.     def __init__(self, master=None):
  161.         self.root = master
  162.         self.style = master
  163.         self.frame = master
  164.         self.clear_text = master
  165.         self.master = master
  166.  
  167.         root = tk.Tk()
  168.         root.title("Console")
  169.         root.geometry('1200x400')
  170.         root.configure(background='black')
  171.  
  172.  
  173.         # style configuration
  174.  
  175.     def style(self, master, Text):
  176.         ttk.Style().configure('green/black.TLabel', foreground='green', background='black')
  177.         ttk.Style().configure('green/black.TButton', foreground='green', background='black')
  178.         ttk.Style().configure('green/black.TEntry', foreground='green', background='black')
  179.         self.large_font = Text(foreground='green')
  180.         self.large_font = Text(background = 'black')
  181.         self.large_font = Text(font=('Verdana', 15))
  182.  
  183.  
  184.     def frame(self, master, root, name_var, ttk):
  185.         name_var = tk.StringVar()
  186.         self.entry = tk.Entry(root, width=90, textvariable=name_var, font= large_font, foreground='green', background='black')
  187.  
  188.         name = name_var.get()
  189.         self.button = ttk.Button(root, text='.:?>', command=clear_text, style='green/black.TButton') #spacja wysyła dane
  190.  
  191.         self.button.grid(row=9, column=0)
  192.         self.button = ttk.Button(root, text='Delete', command=clear_text, style='green/black.TButton')
  193.         self.button.grid(row=10, column=0)
  194.         self.entry.grid(row=11,column=0)
  195.  
  196.         self.button = ttk.Button(root, text="Clear text", command=clear_text, style='green/black.TButton')
  197.         self.button.grid(row=12, column=0)
  198.  
  199.  
  200.     def clear_text(self, master):
  201.         self.entry.delete(0, 'end')
  202.  
  203.         mainloop()
  204.  
  205. #class / window / interfejs
  206. class MyFirstGUI():
  207.     def __init__(self, master):
  208.         root.config(menu=menubar)
  209.         root.attributes("-fullscreen", True)
  210.         root.bind("<F11>", lambda event: root.attributes("-fullscreen",not root.attributes("-fullscreen")))
  211.         root.bind("<Escape>", lambda event: root.attributes("-fullscreen", False))
  212.         root.bind("<`>", console)
  213.  
  214.  
  215.         self.master = master
  216.  
  217.         # class / window / zwykły wiondow
  218.  
  219.         self.label = Label(master, text="Czekam na tylko jeden napis w oknie")
  220.         self.label.pack()
  221.  
  222.  
  223.  
  224. #text positioning
  225. #input
  226. #color bg/fg
  227.  
  228. #return fg
  229.  
  230. #>nazwa [funkcja] /skąd  / tresc / lokalizacja / czas
  231. #> rozszerz o parametry
  232. #> rozszerz o funkcje
  233. #> zasada zawsze informuj
  234.  
  235. #class / lokacje
  236.  
  237. #class / pliki
  238.  
  239. #app
  240. #mainloop
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. root = Tk()
  250. menubar = Menu(root)
  251. root.title("Pracownik")
  252. root.geometry('600x500')
  253. filemenu = Menu(menubar, tearoff=0)
  254. filemenu.add_command(label="Utwórz środowisko gry", command=donothing)
  255. filemenu.add_command(label="Zapisz gre", command=donothing)
  256. filemenu.add_command(label="Wczytaj gre", command=donothing)
  257. filemenu.add_command(label="O autorze", command=donothing)
  258. filemenu.add_command(label="Graf", command=donothing)
  259.  
  260. filemenu.add_separator()
  261.  
  262. filemenu.add_command(label="Opuść grę", command=root.quit)
  263. menubar.add_cascade(label="Opcje Gry", menu=filemenu)
  264. editmenu = Menu(menubar, tearoff=0)
  265. editmenu.add_command(label="Statystyki postaci", command=donothing)
  266.  
  267. editmenu.add_separator()
  268.  
  269. editmenu.add_command(label="Giełda pracy", command=donothing)
  270. editmenu.add_command(label="Rynek deweloperski", command=donothing)
  271. editmenu.add_command(label="Fundusze", command=donothing)
  272. editmenu.add_command(label="Nauka", command=donothing)
  273. editmenu.add_command(label="Wycieczki", command=donothing)
  274. editmenu.add_command(label="Sport", command=donothing)
  275.  
  276. menubar.add_cascade(label="Statystki", menu=editmenu)
  277. hist = Menu(menubar, tearoff=0)
  278. hist.add_command(label="Instrukcja", command=donothing)
  279. hist.add_command(label="O grze", command=donothing)
  280. menubar.add_cascade(label="Instrukcja", menu=hist)
  281. helpmenu = Menu(menubar, tearoff=0)
  282. helpmenu.add_command(label="Help Index", command=donothing)
  283. helpmenu.add_command(label="About...", command=donothing)
  284. menubar.add_cascade(label="Pomoc", menu=helpmenu)
  285.  
  286.  
  287.  
  288.  
  289.  
  290. my_gui = MyFirstGUI(root)
  291.  
  292.  
  293. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement