//private void startOnBoot()//run program as soon as system boots up again --> need to do
        //{
        //    RegistryKey rk = Registry.CurrentUser.OpenSubKey
        //    ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

        //    if (_systemBoot)
        //        rk.SetValue("Guest Control", Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName));
        //    else
        //        rk.DeleteValue("Guest Control", false);
        //}

        #region UI Button Events
        private void onActivateButtonClick(object sender, EventArgs a)//need to do
        {
            //start the actual Guest Control
            InternalProcessControl IPC = new InternalProcessControl();

            IPC.setThreadStatus(InternalProcessControl.ThreadStatus.start);
            IPC.startProcessControl();

            //Inform User GC is now running
            ActivateTextResult.Text       = "Guest Control is now running!";
            ActivateTextResult.Foreground = new SolidColorBrush(Colors.Green);
            ActivateTextResult.Visibility = Visibility.Visible;
        }
 private void ControlPanel_Closed(object sender, SessionEndedEventArgs e)//if the user begins a system shutdown/restart, frees memory and ends threads
 {
     Unprotect();
     IPC.setThreadStatus(InternalProcessControl.ThreadStatus.terminate);
     CPLThreadRunning = false;
 }