Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }