Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using System.Diagnostics;
- using System.ComponentModel;
- using System.IO;
- using Microsoft.Win32;
- namespace iWoW_Premium
- {
- /// <summary>
- /// Interaktionslogik fΓΌr MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- comboBoxProcesses.Items.Clear();
- String s = "Select a process";
- int i = comboBoxProcesses.Items.Add(s);
- comboBoxProcesses.SelectedIndex = i;
- }
- private void comboBoxProcesses_DropDownOpened(object sender, EventArgs e)
- {
- comboBoxProcesses.Items.Clear();
- foreach (Process p in Process.GetProcesses())
- {
- ComboBoxItem cbi = new ComboBoxItem();
- cbi.Content = p.ProcessName + " : " + p.Id;
- cbi.Tag = p.Id;
- comboBoxProcesses.Items.Add(cbi);
- }
- if (comboBoxProcesses.HasItems)
- {
- SortDescription sd = new SortDescription("Content", ListSortDirection.Ascending);
- comboBoxProcesses.Items.SortDescriptions.Add(sd);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement