Example #1
0
        public Container()
        {
            this.handle = new ContainerHandle();
            this.user = new ContainerUser(handle, shouldCreate: true);
            this.directory = new ContainerDirectory(this.handle, this.user, true);
            this.state = ContainerState.Born;

            this.processManager = new ProcessManager(this.user);
        }
        public MainWindow()
        {
            InitializeComponent();

            processManager = new ProcessManager();
            dataGridAllProcesses.ItemsSource = processManager.Processes;
            //dataGridAllProcesses.SelectedItem = processManager.CurrentProcess;

            timerUpdateProcesses.Tick += timerUpdateProcesses_Tick;
            timerUpdateProcesses.Interval = new TimeSpan(0,0,1);
            timerUpdateProcesses.Start();
        }
Example #3
0
        public MainForm()
        {
            InitializeComponent();
            SetMinimizedMetrics();

            WinApi.SetTaskmanWindow(this.Handle);
            WinApi.RegisterShellHookWindow(this.Handle);
            uMsgNotify = WinApi.RegisterWindowMessage("SHELLHOOK");

            db = new SQLiteDatabase(AppPath + "\\data.s3db");
            todo = new ToDoManager(db);
            startup = new StartUpManager(db);
            startup.onReady += new StartUpManager.AppStarted(AppsReady);
            bkg = new BackgroundSwitcher(this);
            pc = new SystemManager(AppPath);
            apps = new ProcessManager();
        }
Example #4
0
        /// <summary>
        /// Used for restore.
        /// </summary>
        private Container(string handle, ContainerState containerState)
        {
            if (handle.IsNullOrWhiteSpace())
            {
                throw new ArgumentNullException("handle");
            }
            this.handle = new ContainerHandle(handle);

            if (containerState == null)
            {
                throw new ArgumentNullException("containerState");
            }
            this.state = containerState;

            this.user = new ContainerUser(handle);
            this.directory = new ContainerDirectory(this.handle, this.user);

            this.processManager = new ProcessManager(this.user);

            if (this.state == ContainerState.Active)
            {
                this.RestoreProcesses();
            }
        }