Example #1
0
        public Window1(MainWindow _LALAL)
        {
            InitializeComponent();
            try
            {
                Items_PRS items_PRS = _LALAL.DG.SelectedItem as Items_PRS;

                ProcessModuleCollection PMC = null;
                foreach (Process PS in Process.GetProcesses())
                {
                    if (PS.ProcessName.Contains(items_PRS.ProcessName))
                    {
                        PMC = PS.Modules;
                        break;
                    }
                }
                DG_W.ItemsSource    = PMC;
                _LALAL._CheckPermit = true;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
                _LALAL._CheckPermit = false;
            }
        }
Example #2
0
 private void DG_MouseUp(object sender, MouseButtonEventArgs e)
 {
     try
     {
         _Kill.IsEnabled = true;
         Items_PRS items_PRS = DG.SelectedItem as Items_PRS;
         _PrcsId = items_PRS.ProcessId;
     }
     catch
     {
         _Kill.IsEnabled = false;
     }
 }