@@ -78,19 +78,21 @@ def __init__(self, title):
78
78
super ().__init__ ()
79
79
self .geometry ("1080x720" )
80
80
self .grid_columnconfigure ((0 ,1 ), weight = 1 )
81
- self .grid_rowconfigure (0 , weight = 1 )
82
- # Label for TOP_LEVEL WINDOW
83
-
84
-
81
+ self .grid_rowconfigure (( 0 , 1 ) , weight = 1 )
82
+ # Back button for TOP_LEVEL WINDOW
83
+ self . back_Btn = customtkinter . CTkButton ( self , text = "Back to Main" , command = self . backToMain )
84
+ self . back_Btn . grid ( row = 0 , column = 0 , sticky = "ew" , columnspan = 2 )
85
85
# Instantiating Process Table Frame
86
86
self .Process_Table_Box = ProcessTableBox (self )
87
- self .Process_Table_Box .grid (row = 0 , column = 0 , sticky = "nsew" , pady = 20 , padx = 20 )
87
+ self .Process_Table_Box .grid (row = 1 , column = 0 , sticky = "ew" )
88
88
89
89
# Instantiating Process
90
90
self .Gantt_Chart_Box = GanttChartBox (self , title )
91
- self .Gantt_Chart_Box .grid (row = 0 , column = 1 , sticky = "nsew" , pady = 20 , padx = 20 )
91
+ self .Gantt_Chart_Box .grid (row = 1 , column = 1 , sticky = "ew" )
92
92
93
93
94
+ def backToMain (self ):
95
+ self .destroy ()
94
96
95
97
class OptionWindow (customtkinter .CTkFrame ): # Amo adi an window kun hain naka butang an mga buttons
96
98
def __init__ (self , master ):
@@ -160,13 +162,15 @@ def startExecution(self):
160
162
global NP
161
163
global WT
162
164
global TT
165
+
163
166
NP = int (self .Process_Input .get ())
164
167
if self .AlgoMenu .get () == "Preemptive Priority Scheduling" :
165
168
166
169
processList = self .PPS_Instance .inputRandom (int (self .Process_Input .get ()), math .trunc (self .Burst_Time .get ()))
167
- completed_list = self .PPS_Instance .schedulingProcess (process_list = processList )
168
- WT = self .PPS_Instance .waitingTime
169
- TT = self .PPS_Instance .turnaroundTime
170
+ # completed_list = self.PPS_Instance.schedulingProcess(process_list=processList)
171
+ # WT = self.PPS_Instance.waitingTime
172
+ # TT = self.PPS_Instance.turnaroundTime
173
+ print (processList )
170
174
171
175
172
176
elif self .AlgoMenu .get () == "Non-Preemtive Priotity Scheduling" :
@@ -178,6 +182,7 @@ def startExecution(self):
178
182
179
183
## The two lines below are used sa printing of process table
180
184
global data
185
+
181
186
data = processList
182
187
self .toplev = ToplevelWindow (self .AlgoMenu .get ())
183
188
0 commit comments