/// <summary>
 /// Constructor for ProcessListWindow when constructing from OperatingSystemMainWindow
 /// </summary>
 /// <param name="parent">the window that is creating this window</param>
 /// <param name="processes"> the list of processes to display</param>
 public ProcessListWindow(OperatingSystemMainWindow parent, List <SimulatorProcess> processes)
 {
     this.parent    = parent;
     this.processes = processes;
     InitializeComponent();
     currentInstance = this;
 }
 /// <summary>
 /// Default Constructor of ProcessListWindow
 /// </summary>
 public ProcessListWindow()
 {
     processes = new List <SimulatorProcess>();
     parent    = null;
     InitializeComponent();
     currentInstance = this;
 }
示例#3
0
 /// <summary>
 /// Constructor for process control block window when constructing from OperatingSystemMainWindow
 /// </summary>
 /// <param name="os_Parent"> the window that is creating this window</param>
 /// <param name="currentControlBlock"> the control block to be loaded</param>
 public ProcessControlBlockWindow(OperatingSystemMainWindow os_Parent, LinkedListNode <ProcessControlBlock> currentControlBlock)
 {
     this.os_Parent       = os_Parent;
     this.main_Parent     = null;
     this.procList_Parent = null;
     InitializeComponent();
     currentInstance          = this;
     this.currentControlBlock = currentControlBlock;
     currentControlBlocks     = new LinkedList <ProcessControlBlock>();
     if (currentControlBlock != null && currentControlBlock.Value != null)
     {
         currentControlBlocks.AddLast(currentControlBlock);
     }
     SetPCBWindowInstance();
 }
        private void btn_ViewProcessList_Click(object sender, RoutedEventArgs e)
        {
            ProcessListWindow window = new ProcessListWindow(this, processes);

            window.Show();
        }
 private void ProcessListWindow1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     currentInstance = null;
     SetProcessListWindowInstance();
 }