Exemple #1
0
        private void Label_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            ListPBox.Items.Clear();
            foreach (Process item in Process.GetProcesses())
            {
                string fui_path = Extensions.GetMainModuleFileName(item);
                string name_    = item.ProcessName;

                if (fui_path == "NULL")
                {
                    continue;
                }
                string[] ignoring =
                { "svchost",                 "system",  "Taskmgr",
                  "NVDisplay.Container", "audiodg", "csrss" };
                bool b = false;
                foreach (var n in ignoring)
                {
                    if (name_.ToLower() == n.ToLower())
                    {
                        b = true;
                        break;
                    }
                }
                if (b)
                {
                    continue;
                }

                UIline l = new UIline()
                {
                    Text     = name_,
                    Id       = item.Id,
                    Fullpath = fui_path
                };
                ListPBox.Items.Add(l);

                ListPBox.Items.Add(new Border()
                {
                    Height = 5, Visibility = Visibility.Hidden
                });
            }
        }
        public void Update()
        {
            ListPBox.Items.Clear();

            for (int i = 0; i < ListPorcceses.list_P.porc.Count; i++)
            {
                string item_1 = ListPorcceses.list_P.porc[i];
                string item_2 = ListPorcceses.list_P.porc_path[i];
                UIline l      = new UIline()
                {
                    Text     = item_1,
                    Id       = -1,
                    Fullpath = item_2,
                    Mode     = true
                };
                ListPBox.Items.Add(l);
                ListPBox.Items.Add(new Border()
                {
                    Height = 5, Visibility = Visibility.Hidden
                });
            }
        }