Exemplo n.º 1
0
 void userControl_OnProgramHidden(ProgramChildWindow sender, string processName)
 {
     TaskManager.Instance.ModificarMemoriaCPU(-sender.MemoryUsage, -sender.CPUUsage);
     TaskManager.Instance.CerrarProceso(processName);
 }
Exemplo n.º 2
0
        void taskManager_OnLoadUserControl(ProgramChildWindow userControl)
        {
            if (!userControl.IsEnabled)
            {
                TaskManager.Instance.Ejecutar(userControl.ProcessName);
                userControl.IsEnabled = true;
            }
            if (userControl.Parent == null)
            {
                Panel.SetZIndex(userControl, Singleton.ZIndex);
                if (OnProgramOpened != null)
                    OnProgramOpened(userControl);
                userControl.MouseLeftButtonDown += userControl_MouseLeftButtonDown;
                userControl.GotFocus += userControl_GotFocus;
                userControl.HeaderDragDelta += userControl_HeaderDragDelta;
                userControl.OnProgramHidden += userControl_OnProgramHidden;

            }
            else {
                //TaskManager.Instance.ModificarMemoriaCPU(userControl.MemoryUsage, userControl.CPUUsage);
                userControl.Show();

            }
        }