def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab4Page, "DISABLED")) button_go_back.pack() tower_h = tk.StringVar() ent_tower_h = tk.Entry(self, textvariable=tower_h) ent_tower_h.insert(0, data_service.get_tab4_tower_h()) label = tk.Label(self, text=("""\nВисота башти ВЕУ:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_tower_h.pack() btn1 = tk.Button( self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_tab4_data(tower_h.get())) btn1.pack(padx=5, pady=5) button_to_set_timing = tk.Button( self, text="Корекція характеристики вітрової активності", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTimeUsageFrame, "DISABLED")) button_to_set_timing.pack(padx=15, pady=15)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab4Page, "DISABLED")) button_go_back.pack() speed_input = tk.StringVar() ent_speed_input = tk.Entry(self, textvariable=speed_input) ent_speed_input.insert(0, data_service.get_tab4_last_speed()) dur_input = tk.StringVar() ent_dur_input = tk.Entry(self, textvariable=dur_input) ent_dur_input.insert(0, data_service.get_tab4_dur_for_this_speed()) label = tk.Label(self, text=("""\nШвидкість вітру:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_speed_input.pack() label = tk.Label(self, text=("""\nТривалість вітрової активності:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_dur_input.pack() btn1 = tk.Button(self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_tab4_speed_dur( speed_input.get(), dur_input.get())) btn1.pack(padx=5, pady=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab5Page, "DISABLED")) button_go_back.pack() name_of_device = tk.StringVar() ent_name_of_device = tk.Entry(self, textvariable=name_of_device) ent_name_of_device.insert(0, data_service.get_active_nasos_tab5()) label = tk.Label(self, text=("""\nДоступні насоси:(""", ','.join( list(data_service.get_tn_map().keys())), ")"), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_name_of_device.pack() btn1 = tk.Button(self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_active_nasos_tab5( name_of_device.get())) btn1.pack(padx=5, pady=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button(self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active(controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button(self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Page, "DISABLED")) button_go_back.pack() var_from = tk.StringVar() var_to = tk.StringVar() ent_from = tk.Entry(self, textvariable=var_from) ent_from.insert(0, data_service.get_date_muni_interval()[0]) ent_to = tk.Entry(self, textvariable=var_to) ent_to.insert(0, data_service.get_date_muni_interval()[1]) label = tk.Label(self, text=("""\n\n\nФормат введення: місяць/день/рік"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='yellow') label.pack(pady=20, padx=10) label = tk.Label(self, text=("""\n\n\nЗначення дати для початку інтервалу:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=20, padx=10) ent_from.pack() label = tk.Label(self, text=("""\nЗначення дати для кінця інтервалу:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=20, padx=10) ent_to.pack() btn1 = tk.Button(self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_date_muni_interval(var_from.get(), var_to.get())) btn1.pack(padx=10, pady=30)
def form_tab2_subtab(frame, controller, figure): button_to_main = tk.Button( frame, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( frame, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Page, "DISABLED")) button_go_back.pack() canvas = FigureCanvasTkAgg(figure, frame) # canvas.show() canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True) toolbar = NavigationToolbar2Tk(canvas, frame) toolbar.update() canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
def form_tab1_subtab(frame, controller, figure): # label = tk.Label(frame, text="Змодельовані дані:", font=my_view.LARGE_FONT) # label.pack(pady=10, padx=10) button_to_main = tk.Button(frame, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active(controller, router.WelcomePage, "DISABLED")) # command=lambda: controller.show_frame(router.WelcomePage)) button_to_main.pack() button_go_back = tk.Button(frame, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Page, "DISABLED")) # command=lambda: controller.show_frame(Tab1Page)) button_go_back.pack() canvas = FigureCanvasTkAgg(figure, frame) # canvas.show() canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True) toolbar = NavigationToolbar2Tk(canvas, frame) toolbar.update() canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text=("""\nОберіть процес моделювання:\n\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') graph1_btn = tk.Button( self, text="Розрахунок потреб у теплі", width=60, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab5Graph1, "5_1")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) graph1_btn = tk.Button( self, text="Розрахунок для теплового насоса", width=60, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab5Graph2, "5_2")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) button_exit = tk.Button( self, text="на головну", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_exit.config(font=my_view.CONSOLE_FONT_12) button_exit.pack(pady=10, padx=10) label = tk.Label(self, text=("""\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') button_set_interval = tk.Button( self, text="Вказати дані моделювання", width=50, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTab5Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Page, "DISABLED")) button_go_back.pack() name_of_device = tk.StringVar() ent_name_of_device = tk.Entry(self, textvariable=name_of_device) ent_name_of_device.insert(0, data_service.get_cur_device()) list_usage = tk.StringVar() ent_list_usage = tk.Entry(self, textvariable=list_usage) ent_list_usage.insert( 0, ','.join(data_service.get_electric_consumption_devices()[ data_service.get_cur_device()].week_list[ data_service.get_cur_day_of_week()])) day_of_week = tk.StringVar() ent_day_of_week = tk.Entry(self, textvariable=day_of_week) ent_day_of_week.insert(0, data_service.get_cur_day_of_week()) label = tk.Label( self, text=("""\nНазва приладу:(""", ','.join( list(data_service.get_electric_consumption_devices().keys())), ")"), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_name_of_device.pack() label = tk.Label( self, text= ("""\nДень використання:("Mn", "Tu", "Wd", "Th", "Fr", "Sa", "Sn")""" ), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_day_of_week.pack() label = tk.Label( self, text= ("""\nГодини використання:(через кому або "fulltime" - для повного дня)""" ), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_list_usage.pack() btn1 = tk.Button( self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_time_for_certain_device( day_of_week.get(), name_of_device.get(), list_usage.get().split(',').copy())) btn1.pack(padx=5, pady=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Page, "DISABLED")) button_go_back.pack() N_people = tk.StringVar() ent_N_people = tk.Entry(self, textvariable=N_people) ent_N_people.insert(0, data_service.get_n_people()) label = tk.Label(self, text=("""\nКількість мешканців:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_N_people.pack() is_optimized = tk.StringVar() ent_is_optimized = tk.Entry(self, textvariable=is_optimized) ent_is_optimized.insert( 0, "+ " if data_service.get_tab2_optimized() is True else "-") label = tk.Label( self, text=("""\nВідображати оптимізовані графіки('+' або '-'):"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_is_optimized.pack() btn1 = tk.Button(self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_tab2_data( N_people.get(), is_optimized.get())) btn1.pack(padx=5, pady=5) button_to_set_timing = tk.Button( self, text="Вказати часові інтервали використання приладів", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTimeUsageFrame, "DISABLED")) button_to_set_timing.pack(padx=15, pady=15)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text=("""\nОберіть процес моделювання:\n\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') graph1_btn = tk.Button( self, text="Графіки електричного навантаження", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph1, "2_1_1")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) graph1_btn = tk.Button( self, text="Сумарний Г.Е.Н. за день", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph6, "2_2")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) graph1_btn = tk.Button( self, text="Тижневий графік навантаження", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph7, "2_3")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) button_exit = tk.Button( self, text="на головну", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_exit.config(font=my_view.CONSOLE_FONT_12) button_exit.pack(pady=10, padx=10) label = tk.Label(self, text=("""\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') button_set_interval = tk.Button( self, text="Вказати дані", width=50, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTab2Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5)
def form_tab2_subtab_for_full_day(frame, controller, figure): button_to_main = tk.Button( frame, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( frame, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Page, "DISABLED")) button_go_back.pack() #### btn = tk.Button(frame, text="пн", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Mn")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="вт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Tu")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="ср", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Wd")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="чт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Th")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="пт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Fr")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="сб", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Sa")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="нд", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Sn")) btn.pack(side=tk.LEFT) #### canvas = FigureCanvasTkAgg(figure, frame) # canvas.show() canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True) toolbar = NavigationToolbar2Tk(canvas, frame) toolbar.update() canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab3Page, "DISABLED")) button_go_back.pack() var_from = tk.StringVar() var_to = tk.StringVar() N_people = tk.StringVar() S = tk.StringVar() N_dush = tk.StringVar() N_vann = tk.StringVar() t_desired = tk.StringVar() ent_from = tk.Entry(self, textvariable=var_from) ent_from.insert(0, data_service.get_date_tab3_interval()[0]) ent_to = tk.Entry(self, textvariable=var_to) ent_to.insert(0, data_service.get_date_tab3_interval()[1]) ent_N_people = tk.Entry(self, textvariable=N_people) ent_N_people.insert(0, data_service.get_n_people()) ent_S = tk.Entry(self, textvariable=S) ent_S.insert(0, data_service.get_S()) ent_N_dush = tk.Entry(self, textvariable=N_dush) ent_N_dush.insert(0, data_service.get_n_dush()) ent_N_vann = tk.Entry(self, textvariable=N_vann) ent_N_vann.insert(0, data_service.get_n_vann()) ent_t_desired = tk.Entry(self, textvariable=t_desired) ent_t_desired.insert(0, data_service.get_temperature_desired()) label = tk.Label( self, text=("""\n\n\nФормат введення дати: рік-місяць-день"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='yellow') label.pack(pady=2, padx=2) label = tk.Label( self, text=("""\n\n\nЗначення дати для початку інтервалу:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_from.pack() label = tk.Label(self, text=("""\nЗначення дати для кінця інтервалу:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_to.pack() label = tk.Label(self, text=("""\nКількість мешканців:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_N_people.pack() label = tk.Label(self, text=("""\nЗначення площі(м^2):"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_S.pack() label = tk.Label(self, text=("""\nЗначення Nдуш:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_N_dush.pack() label = tk.Label(self, text=("""\nЗначення Nванн:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_N_vann.pack() label = tk.Label(self, text=("""\nЗначення бажаної температури (℃):"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_t_desired.pack() btn1 = tk.Button(self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_tab3_data( N_people.get(), S.get(), N_dush.get(), N_vann.get( ), t_desired.get(), var_from.get(), var_to.get())) btn1.pack(padx=5, pady=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text=("""\nОберіть процес моделювання:\n\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') graph1_btn = tk.Button( self, text="Eнергетична характерисника вітроенергетичної установки", width=60, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab4Graph1, "4_1")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) graph1_btn = tk.Button( self, text="Обсяги генерування енергії ВЕУ ", width=60, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab4Graph2, "4_2")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) button_exit = tk.Button( self, text="на головну", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_exit.config(font=my_view.CONSOLE_FONT_12) button_exit.pack(pady=10, padx=10) label = tk.Label(self, text=("""\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') button_set_interval = tk.Button( self, text="Вказати дані моделювання", width=50, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTab4Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text=("""\nОберіть процес моделювання:\n\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') graph1_btn = tk.Button(self, text="Температурні умови", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph1_TemperatureCond, "1_1")) # command=lambda: controller.show_frame(Tab1Graph1_TemperatureCond)) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) graph2_btn = tk.Button(self, text="Тривалість температурних режимів", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph2_TemperatureDuration, "1_2")) # command=lambda: controller.show_frame(Tab1Graph2_TemperatureDuration)) graph2_btn.config(font=my_view.CONSOLE_FONT_12) graph2_btn.pack(pady=5, padx=5) graph3_btn = tk.Button(self, text="Троянда вітрів", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph3_WindRose, "1_3")) # command=lambda: controller.show_frame(Tab1Graph3_WindRose)) graph3_btn.config(font=my_view.CONSOLE_FONT_12) graph3_btn.pack(pady=5, padx=5) graph4_btn = tk.Button(self, text="Тривалість режимів вітрової активності", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph4_WindDuration, "1_4")) # command=lambda: controller.show_frame(Tab1Graph4_WindDuration)) graph4_btn.config(font=my_view.CONSOLE_FONT_12) graph4_btn.pack(pady=5, padx=5) graph5_btn = tk.Button(self, text="Інтенсивність сонячної інсоляції", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph5_SolarInsolation, "1_5")) # command=lambda: controller.show_frame(Tab1Graph5_SolarInsolation)) graph5_btn.config(font=my_view.CONSOLE_FONT_12) graph5_btn.pack(pady=5, padx=5) graph6_btn = tk.Button(self, text="Тривалість режимів сонячної активності", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, Tab1Graph6_SolarActivityDuration, "1_6")) # command=lambda: controller.show_frame(Tab1Graph6_SolarActivityDuration)) graph6_btn.config(font=my_view.CONSOLE_FONT_12) graph6_btn.pack(pady=5, padx=5) button_exit = tk.Button(self, text="на головну", width=40, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, router.WelcomePage, "DISABLED")) button_exit.config(font=my_view.CONSOLE_FONT_12) button_exit.pack(pady=10, padx=10) label = tk.Label(self, text=("""\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') button_set_interval = tk.Button(self, text="Вказати інтервал для температурних даних.", width=40, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, GetInput1Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5) button_set_interval = tk.Button(self, text="Вказати інтервал для даних по сонцю.", width=40, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active(controller, GetInput2Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) button_to_main = tk.Button( self, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( self, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab5Page, "DISABLED")) button_go_back.pack() n_modules = tk.StringVar() ent_n_modules = tk.Entry(self, textvariable=n_modules) ent_n_modules.insert(0, data_service.get_tab5_n_modules()) label = tk.Label(self, text=("""\nКількість модулів :"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_n_modules.pack() n_circ_nasos = tk.StringVar() ent_n_circ_nasos = tk.Entry(self, textvariable=n_circ_nasos) ent_n_circ_nasos.insert(0, data_service.get_tab5_n_circ_nasos()) label = tk.Label(self, text=("""\nКількість циркуляційних насосів :"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_n_circ_nasos.pack() n_funcoyles = tk.StringVar() ent_n_funcoyles = tk.Entry(self, textvariable=n_funcoyles) ent_n_funcoyles.insert(0, data_service.get_tab5_n_funcoyles()) label = tk.Label(self, text=("""\nКількість фанкойлів :"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_n_funcoyles.pack() power_circ_nasos = tk.StringVar() ent_power_circ_nasos = tk.Entry(self, textvariable=power_circ_nasos) ent_power_circ_nasos.insert(0, data_service.get_tab5_power_circ_nasos()) label = tk.Label(self, text=("""\nПотужність циркуляційних насосів :"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_power_circ_nasos.pack() power_funcoyles = tk.StringVar() ent_power_funcoyles = tk.Entry(self, textvariable=power_funcoyles) ent_power_funcoyles.insert(0, data_service.get_tab5_power_funcoyles()) label = tk.Label(self, text=("""\nПотужність фанкойлів:"""), font=my_view.CONSOLE_FONT_12) label.configure(background='black', foreground='green') label.pack(pady=3, padx=3) ent_power_funcoyles.pack() btn1 = tk.Button( self, text="OK", width=10, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.set_tab5_data(n_modules.get( ), n_circ_nasos.get(), n_funcoyles.get(), power_circ_nasos.get(), power_funcoyles.get())) btn1.pack(padx=5, pady=5) button_to_set_timing = tk.Button( self, text="Обрати тепловий насос", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetTN_Input, "DISABLED")) button_to_set_timing.pack(padx=15, pady=15)
def form_tab2_subtab_for_1_graph(frame, controller, figure): # all_measured_devices = list(data_service.get_electric_consumption_devices().keys()) # all_measured_devices_graphs = [Tab2Graph1, # Tab2Graph2, # Tab2Graph3, # Tab2Graph4, # Tab2Graph5] btn = tk.Button(frame, text="холодильник", width=12, bg='black', fg='green', command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph1, "2_1_1")) btn.pack(side=tk.RIGHT) btn = tk.Button(frame, text="плита", width=9, bg='black', fg='green', command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph2, "2_1_2")) btn.pack(side=tk.RIGHT) btn = tk.Button(frame, text="мікрохв. піч", width=12, bg='black', fg='green', command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph3, "2_1_3")) btn.pack(side=tk.RIGHT) btn = tk.Button(frame, text="чайник", width=9, bg='black', fg='green', command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph4, "2_1_4")) btn.pack(side=tk.RIGHT) btn = tk.Button(frame, text="комп\'ютер", width=12, bg='black', fg='green', command=lambda: data_service.display_graph_and_set_active( controller, Tab2Graph5, "2_1_5")) btn.pack(side=tk.RIGHT) #### btn = tk.Button(frame, text="пн", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Mn")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="вт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Tu")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="ср", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Wd")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="чт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Th")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="пт", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Fr")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="сб", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Sa")) btn.pack(side=tk.LEFT) btn = tk.Button(frame, text="нд", width=4, bg='black', fg='green', command=lambda: data_service.set_tab2_day_of_week("Sn")) btn.pack(side=tk.LEFT) #### button_to_main = tk.Button( frame, text="на головну", width=40, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_to_main.pack() button_go_back = tk.Button( frame, text="назад", width=40, command=lambda: data_service.display_graph_and_set_active( controller, Tab2Page, "DISABLED")) button_go_back.pack() canvas = FigureCanvasTkAgg(figure, frame) # canvas.show() canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True) toolbar = NavigationToolbar2Tk(canvas, frame) toolbar.update() canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text=("""\nОберіть процес моделювання:\n\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') graph1_btn = tk.Button( self, text="Залежність тепловтрат будівлі від температурних умов", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab3Graph1_Qwaste, "3_1")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) # graph1_btn = tk.Button(self, text="Затрати на опалення відносно температур", # width=50, bg='lightgreen', fg='blue', relief='flat', # bd=10, highlightthickness=4, highlightcolor="#37d3ff", # highlightbackground="#37d3ff", borderwidth=4, # command=lambda: data_service.display_graph_and_set_active(controller, # Tab3Graph2_Prices, # "3_2")) # graph1_btn.config(font=my_view.CONSOLE_FONT_12) # graph1_btn.pack(pady=5, padx=5) graph1_btn = tk.Button( self, text="Витрати енергії на опалення за визначений період", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, Tab3Graph3_WarmerPrices, "3_3")) graph1_btn.config(font=my_view.CONSOLE_FONT_12) graph1_btn.pack(pady=5, padx=5) button_exit = tk.Button( self, text="на головну", width=50, bg='lightgreen', fg='blue', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, router.WelcomePage, "DISABLED")) button_exit.config(font=my_view.CONSOLE_FONT_12) button_exit.pack(pady=10, padx=10) label = tk.Label(self, text=("""\n"""), font=my_view.CONSOLE_FONT_16) label.pack(pady=5, padx=5) label.configure(background='black', foreground='lightblue') button_set_interval = tk.Button( self, text="Вказати інтервал для температурних даних.", width=50, bg='lightblue', fg='green', relief='flat', bd=10, highlightthickness=4, highlightcolor="#37d3ff", highlightbackground="#37d3ff", borderwidth=4, command=lambda: data_service.display_graph_and_set_active( controller, GetInputTab3Frame, "DISABLED")) button_set_interval.config(font=my_view.CONSOLE_FONT_12) button_set_interval.pack(pady=5, padx=5)