Esempio n. 1
0
        public DesktopWindowCollection() : base(new ObservableCollection <DesktopWindow>())
        {
            //Make sure that the collection is synchronized with ui thread.
            this.SynchronizeWithUIThread();

            //Get existing windows
            AddRange(WindowUtility.Enumerate());

            HookUtility.AddHook(HookUtility.Event.OBJECT_CREATE, Add);
            HookUtility.AddHook(HookUtility.Event.OBJECT_DESTROY, OnWindowDestroyed);

            Poller.Update += Update;
            Update();
        }
Esempio n. 2
0
 public FormMain()
 {
     InitializeComponent();
     HookUtility.HookByProcessName(textProcessNames.Text.Split('|'));
 }