Beispiel #1
0
        //private HashSet<IntPtr>

        public TaskManagerForm()
        {
            InitializeComponent();
            TaskManagerForm.processes = TaskManagerForm.GetProcesess();
            this.setProcessListToListBox();
            this.measureing                     = Measureables.CPU;
            this.max_height                     = 128;
            this.performace_graphic             = new Bitmap(250, this.max_height);
            this.performace_data                = new List <int>(25);
            this.process_Info_updater           = new System.Timers.Timer(500);
            this.process_Info_updater.Elapsed  += updateProcesses;
            this.process_Info_updater.AutoReset = true;
            this.measureChange                 += () => this.resetGraphic(this.getMeasurableName());
            this.measureChange();
            this.total_ram_label.Text = $"RAM total: {this.total_ram / (1024 * 1024)} MB";
            this.changeLabelText      = new ChangeLabelText(this.setLabelText);
            this.addToListBox         = new AlterListBox(this.addtoListBox);
            this.removeFromListBox    = new AlterListBox(this.removefromListBox);
            this.stopped_process      = new Dictionary <int, WinTask>();
            this.process_Info_updater.Start();
        }
Beispiel #2
0
 private void current_process_cpu_usage_Click(object sender, EventArgs e)
 {
     this.measureing = Measureables.CPU;
     this.measureChange();
 }
Beispiel #3
0
 private void current_process_memory_use_Click(object sender, EventArgs e)
 {
     this.measureing = Measureables.RAM;
     this.measureChange();
 }