-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df83177
commit bc8cbec
Showing
9 changed files
with
154 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/app/system-apps/taskmanager/taskmanager.mini.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<cos-window [runningProcessID]="this.processId" [processAppIcon]="this.icon" [processAppName]="this.name" (click)="setTaskMangrMiniWindowToFocus(this.processId)"> | ||
<div class='card'> | ||
<div class='card-body'> | ||
<div class='table-responsive'> | ||
<table class='table' *ngIf = 'processes.length > 0' > | ||
<tbody> | ||
<tr *ngFor='let process of processes'> | ||
<td style="width: 55%;"> | ||
<figure> | ||
<img [src]="process.getIcon"> | ||
<figcaption>{{ process.getProcessName}}</figcaption> | ||
</figure> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<span class="basediv"> | ||
<span style="display: inline-block; width: 50%; | ||
padding-top:15px; height:50px; margin-left: 0;"> | ||
<figure style="padding-right: 45%;"> | ||
<img [src]="'osdrive/icons/arrow_down.png'"> | ||
<figcaption>More details</figcaption> | ||
</figure> | ||
</span> | ||
<span style="display: inline-block; height:50px; margin-top:10px; width:50%; margin-right: 0;"> | ||
<button class="btn btn-primary" style="margin-left: 45%;" > | ||
End task | ||
</button> | ||
</span> | ||
</span> | ||
</div> | ||
</cos-window> |
59 changes: 59 additions & 0 deletions
59
src/app/system-apps/taskmanager/taskmanager.mini.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Component, OnInit,OnDestroy} from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { ProcessIDService } from 'src/app/shared/system-service/process.id.service'; | ||
import { RunningProcessService } from 'src/app/shared/system-service/running.process.service'; | ||
import { BaseComponent } from 'src/app/system-base/base/base.component'; | ||
import { ComponentType } from 'src/app/system-files/component.types'; | ||
import { Process } from 'src/app/system-files/process'; | ||
|
||
@Component({ | ||
selector: 'cos-taskmanager-mini', | ||
templateUrl: './taskmanager.mini.component.html', | ||
styleUrls: ['./taskmanager.component.css'] | ||
}) | ||
export class TaskmanagerMiniComponent implements BaseComponent,OnInit,OnDestroy { | ||
|
||
private _processIdService:ProcessIDService; | ||
private _runningProcessService:RunningProcessService; | ||
private _processListChangeSub!: Subscription; | ||
|
||
processes:Process[] =[]; | ||
|
||
hasWindow = true; | ||
icon = 'osdrive/icons/taskmanger.png'; | ||
name = 'taskmanager'; | ||
processId = 0; | ||
type = ComponentType.systemComponent | ||
displayName = 'Task Manager'; | ||
|
||
|
||
constructor( processIdService:ProcessIDService,runningProcessService:RunningProcessService) { | ||
this._processIdService = processIdService; | ||
this._runningProcessService = runningProcessService; | ||
this.processId = this._processIdService.getNewProcessId() | ||
this._runningProcessService.addProcess(this.getComponentDetail()); | ||
this._processListChangeSub = this._runningProcessService.processListChangeNotify.subscribe(() =>{this.updateRunningProcess();}) | ||
} | ||
|
||
ngOnInit(): void { | ||
this.processes = this._runningProcessService.getProcesses(); | ||
|
||
} | ||
|
||
ngOnDestroy(): void { | ||
this._processListChangeSub?.unsubscribe(); | ||
} | ||
|
||
setTaskMangrMiniWindowToFocus(pid: number):void { | ||
this._runningProcessService.focusOnCurrentProcessNotify.next(pid); | ||
} | ||
|
||
updateRunningProcess():void{ | ||
this.processes = this._runningProcessService.getProcesses(); | ||
} | ||
|
||
private getComponentDetail():Process{ | ||
return new Process(this.processId, this.name, this.icon, this.hasWindow, this.type) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"osdrive":{"desktop":{"fileexplorer.url":null,"heat.url":null,"hello.url":null,"taskmanager.url":null},"download":{"anothertest.txt":null},"games":{"D3D.url":null,"Diggers.url":null,"Doom.url":null,"data":{"3d_duke.jsdos":null,"Digger.jsdos":null,"Doom.jsdos":null,"Jill_of_the_Jungle.jsdos":null,"Machine_Nation.jsdos":null,"Shadow_knight.jsdos":null},"icons":{"d3d.png":null,"diggers.png":null,"doom.png":null}},"home":{},"icons":{"arrow_up.png":null,"audio.ico":null,"cmd.ico":null,"config.ico":null,"download_folder.ico":null,"empty_folder.ico":null,"empty_recycle.ico":null,"file.ico":null,"file_explorer.ico":null,"floppy.ico":null,"folder.ico":null,"generic-program.ico":null,"image.ico":null,"js-dos-logo.png":null,"movie_folder.ico":null,"music_folder.ico":null,"my_computer.ico":null,"non_empty_folder.ico":null,"non_empty_recycle.ico":null,"picture_folder.ico":null,"taskmanger.png":null,"taskmanger_2.png":null,"unknown.ico":null,"video.ico":null,"zip_folder.ico":null},"picture":{"favicon.ico":null,"favicon1.ico":null,"heat.png":null},"simple.txt":null}} | ||
{"osdrive":{"desktop":{"fileexplorer.url":null,"heat.url":null,"hello.url":null,"taskmanager.url":null},"download":{"anothertest.txt":null},"games":{"D3D.url":null,"Diggers.url":null,"Doom.url":null,"data":{"3d_duke.jsdos":null,"Digger.jsdos":null,"Doom.jsdos":null,"Jill_of_the_Jungle.jsdos":null,"Machine_Nation.jsdos":null,"Shadow_knight.jsdos":null},"icons":{"d3d.png":null,"diggers.png":null,"doom.png":null}},"home":{},"icons":{"arrow_down.png":null,"arrow_up.png":null,"audio.ico":null,"cmd.ico":null,"config.ico":null,"download_folder.ico":null,"econo.png":null,"empty_folder.ico":null,"empty_recycle.ico":null,"file.ico":null,"file_explorer.ico":null,"floppy.ico":null,"folder.ico":null,"generic-program.ico":null,"image.ico":null,"js-dos-logo.png":null,"movie_folder.ico":null,"music_folder.ico":null,"my_computer.ico":null,"non_empty_folder.ico":null,"non_empty_recycle.ico":null,"picture_folder.ico":null,"taskmanger.png":null,"taskmanger_2.png":null,"unknown.ico":null,"video.ico":null,"zip_folder.ico":null},"picture":{"favicon.ico":null,"favicon1.ico":null,"heat.png":null},"simple.txt":null}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.