Beispiel #1
0
        public HackerWindow()
        {
            Program.HackerWindow = this;
            processP = Program.ProcessProvider;
            serviceP = Program.ServiceProvider;
            networkP = Program.NetworkProvider;

            InitializeComponent();

            // Force the handle to be created
            { var handle = this.Handle; }
            Program.HackerWindowHandle = this.Handle;

            if (OSVersion.HasExtendedTaskbar)
            {
                // We need to call this here or we dont recieve the TaskbarButtonCreated WindowMessage
                Windows7Taskbar.AllowWindowMessagesThroughUipi();
                Windows7Taskbar.AppId = "ProcessHacker";
                Windows7Taskbar.ProcessAppId = "ProcessHacker";

                thumbButtonManager = new ThumbButtonManager(this);
                thumbButtonManager.TaskbarButtonCreated += new EventHandler(thumbButtonManager_TaskbarButtonCreated);
            }

            this.AddEscapeToClose();

            Logging.Logged += this.QueueMessage;
            Settings.Refresh();
            this.LoadWindowSettings();
            this.LoadOtherSettings();
            this.LoadControls();
            this.LoadNotificationIcons();

            Program.AppInstance = new ApplicationInstance();

            Program.AppInstance.MainMenu = new MainMenuManager(mainMenu.MenuItems);
            Program.AppInstance.MainMenu.Hacker = new MenuItemManager(hackerMenuItem.MenuItems);
            Program.AppInstance.MainMenu.View = new MenuItemManager(viewMenuItem.MenuItems);
            Program.AppInstance.MainMenu.Tools = new MenuItemManager(toolsMenuItem.MenuItems);
            Program.AppInstance.MainMenu.Help = new MenuItemManager(helpMenu.MenuItems);

            this.LoadPlugins();

            if ((!Properties.Settings.Default.StartHidden && !Program.StartHidden) ||
                Program.StartVisible)
            {
                this.Visible = true;
            }

            if (tabControl.SelectedTab == tabProcesses)
                treeProcesses.Tree.Select();

            this.LoadOther();
            this.LoadStructs();

            vistaMenu.DelaySetImageCalls = false;
            vistaMenu.PerformPendingSetImageCalls();
            serviceP.RunOnceAsync();
            serviceP.Enabled = true;

            _dontCalculate = false;
        }
Beispiel #2
0
 public HackerWindow()
 {
     Program.HackerWindow = this;
     processP = Program.ProcessProvider;
     serviceP = Program.ServiceProvider;
     networkP = Program.NetworkProvider;
     InitializeComponent();
     { var handle = this.Handle; }
     Program.HackerWindowHandle = this.Handle;
     if (OSVersion.HasExtendedTaskbar)
     {
         Windows7Taskbar.AllowWindowMessagesThroughUipi();
         Windows7Taskbar.AppId = "ProcessHacker";
         Windows7Taskbar.ProcessAppId = "ProcessHacker";
         thumbButtonManager = new ThumbButtonManager(this);
         thumbButtonManager.TaskbarButtonCreated += new EventHandler(thumbButtonManager_TaskbarButtonCreated);
     }
     this.AddEscapeToClose();
     Logging.Logged += this.QueueMessage;
     Settings.Refresh();
     this.LoadWindowSettings();
     this.LoadOtherSettings();
     this.LoadControls();
     this.LoadNotificationIcons();
     if ((!Properties.Settings.Default.StartHidden && !Program.StartHidden) ||
         Program.StartVisible)
     {
         this.Visible = true;
     }
     if (tabControl.SelectedTab == tabProcesses)
         treeProcesses.Tree.Select();
     this.LoadOther();
     this.LoadStructs();
     vistaMenu.DelaySetImageCalls = false;
     vistaMenu.PerformPendingSetImageCalls();
     serviceP.RunOnceAsync();
     serviceP.Enabled = true;
     _dontCalculate = false;
 }