private void btn_Show_PCB_Waiting_Click(object sender, RoutedEventArgs e)
        {
            SimulatorProcess selectedProcess = (SimulatorProcess)lst_WaitingProcesses.SelectedItem;

            if (selectedProcess == null)
            {
                MessageBox.Show("Please Select a Process");
                return;
            }
            ProcessControlBlockWindow window = new ProcessControlBlockWindow(this, new LinkedListNode <ProcessControlBlock>(selectedProcess.ControlBlock));

            window.Show();
        }
        private void btn_Pcb_Click(object sender, RoutedEventArgs e)
        {
            int selectedIndex = lst_Processes.SelectedIndex;

            if (selectedIndex < 0)
            {
                MessageBox.Show("Please Select a process to view its PCB");
                return;
            }
            ProcessControlBlockWindow window = new ProcessControlBlockWindow(this,
                                                                             new LinkedListNode <ProcessControlBlock>(processes[selectedIndex].ControlBlock));

            window.Show();
        }