Create opentrons_ui.py
Browse files- opentrons_ui.py +52 -0
opentrons_ui.py
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import tkinter as tk
|
2 |
+
from tkinter import ttk
|
3 |
+
|
4 |
+
# Create the main window
|
5 |
+
root = tk.Tk()
|
6 |
+
root.title("Opentrons Protocol Generator")
|
7 |
+
|
8 |
+
# Create a notebook for different sections
|
9 |
+
notebook = ttk.Notebook(root)
|
10 |
+
notebook.pack(pady=10, expand=True)
|
11 |
+
|
12 |
+
# Create the "General" tab
|
13 |
+
general_frame = ttk.Frame(notebook)
|
14 |
+
notebook.add(general_frame, text="General")
|
15 |
+
|
16 |
+
# Add widgets to the "General" tab
|
17 |
+
num_samples_label = ttk.Label(general_frame, text="Number of Samples:")
|
18 |
+
num_samples_label.grid(row=0, column=0, padx=5, pady=5, sticky="w")
|
19 |
+
|
20 |
+
num_samples_entry = ttk.Entry(general_frame)
|
21 |
+
num_samples_entry.grid(row=0, column=1, padx=5, pady=5)
|
22 |
+
|
23 |
+
# Create the "Reagents" tab
|
24 |
+
reagents_frame = ttk.Frame(notebook)
|
25 |
+
notebook.add(reagents_frame, text="Reagents")
|
26 |
+
|
27 |
+
# Add widgets to the "Reagents" tab
|
28 |
+
reagent_label = ttk.Label(reagents_frame, text="Reagents:")
|
29 |
+
reagent_label.grid(row=0, column=0, padx=5, pady=5, sticky="w")
|
30 |
+
|
31 |
+
reagents_listbox = tk.Listbox(reagents_frame, height=5)
|
32 |
+
reagents_listbox.grid(row=1, column=0, padx=5, pady=5, sticky="ew")
|
33 |
+
|
34 |
+
add_reagent_button = ttk.Button(reagents_frame, text="Add Reagent")
|
35 |
+
add_reagent_button.grid(row=2, column=0, padx=5, pady=5, sticky="w")
|
36 |
+
|
37 |
+
# Create the "Operations" tab
|
38 |
+
operations_frame = ttk.Frame(notebook)
|
39 |
+
notebook.add(operations_frame, text="Operations")
|
40 |
+
|
41 |
+
# Add widgets to the "Operations" tab
|
42 |
+
operation_label = ttk.Label(operations_frame, text="Operations:")
|
43 |
+
operation_label.grid(row=0, column=0, padx=5, pady=5, sticky="w")
|
44 |
+
|
45 |
+
operations_listbox = tk.Listbox(operations_frame, height=5)
|
46 |
+
operations_listbox.grid(row=1, column=0, padx=5, pady=5, sticky="ew")
|
47 |
+
|
48 |
+
add_operation_button = ttk.Button(operations_frame, text="Add Operation")
|
49 |
+
add_operation_button.grid(row=2, column=0, padx=5, pady=5, sticky="w")
|
50 |
+
|
51 |
+
# Start the main event loop
|
52 |
+
root.mainloop()
|