Exemplo n.º 1
0
        private void CollectProcess(ProcessInfo process)
        {
            var ret = _collector.CollectProcess(process.ID);

            lsvLog.Invoke(new Action(() => {
                lsvLog.Items.Add(new Telerik.WinControls.UI.ListViewDataItem("",
                                                                             new string[] { DateTime.Now.ToString(), process.ProcessName, ret ? "释放成功" : "释放失败" }));
            }));
        }
Exemplo n.º 2
0
        private void Collect(object obj)
        {
            var proc    = _collector.GetProcess().OrderByDescending(x => x.WorkingSet64);
            var newList = proc.Take(30).ToList();

            for (int i = 0; i < newList.Count; i++)
            {
                _collector.CollectProcess(newList[i].ID);
            }
        }