private void CloseApp(Application app)
 {
     AppView.Children.Clear();
     AppTaskbar.RemoveTaskBarItem(app.AppProcess.ProcessID);
     if (app.IsSystemApp)
     {
         app.AppWindowLogic.WindowState = None;
     }
     else
     {
         _appM.EndAppProcess(app.AppProcess.ProcessID);
     }
 }
        /// <summary>
        /// Register Callbacks on Processs Start, Resume, TaskBar Items and Desktop Icon Clicks/Request
        /// </summary>
        private void RegisterEvents()
        {
            _appM.OnProcessStarted += AppM_OnProcessStarted;
            _appM.OnAppClearUp     += (app) => AppTaskbar.RemoveTaskBarItem(app.AppProcess.ProcessID);
            _appM.OnProcessResume  += _appM_OnProcessResume;


            AppTaskbar.TaskBarItemOpened += (pid) => _appM.ResumeProcess(pid);
            AppTaskbar.TaskBarItemClosed += CloseApp;

            memory.OnAppLaunchRequest  += (app) => _appM.ResumeProcess(0);
            process.OnAppLaunchRequest += (app) => _appM.ResumeProcess(1);
            disk.OnAppLaunchRequest    += (app) => _appM.ResumeProcess(2);

            tick.OnAppLaunchRequest += (app) => _appM.AddProcess(Applications.TicTacToeApp);
        }