private void LoadProcesses() { var list = new List <TibiaProc>(); var proc = Process.GetProcessesByName("client"); foreach (var process in proc) { var p = new TibiaProc(); p.Process = process; p.WindowTitle = process.MainWindowTitle; list.Add(p); } TibiaProcs = list; }
private void loadProcessButtonBase_OnClick(object sender, RoutedEventArgs e) { var processList = new List <TibiaProc>(); var proc = Process.GetProcessesByName("client"); foreach (var process in proc) { var p = new TibiaProc(); p.Process = process; p.WindowTitle = process.MainWindowTitle; processList.Add(p); } processCombo.ItemsSource = processList; processCombo.SelectedIndex = 0; }