Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chkam05 committed Jan 31, 2024
1 parent 0c1c3f8 commit cd24484
Show file tree
Hide file tree
Showing 11 changed files with 291 additions and 3 deletions.
95 changes: 95 additions & 0 deletions Docs/ProcessManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# ProcessesManager

A class for listening running processes and windows attached to them.

## Methods

### *List of ProcessInfo* GetProcesses(out *List of Exception* exceptions):

Returns a list of running processes, and as parameter, list of thrown exceptions when process could not be read.

Parameters:
- out *List of Exception* **exceptions** - List of thrown exceptions when process could not be read.

### *bool* IsProcessAlive(*ProcessInfo* processInfo, out *Process?* process)

Returns information about whether the process is alive, and as a parameter, the underlying Process object.

Parameters:
- *ProcessInfo* **processInfo** - Process information container (available in *SystemController.Processes.Data.ProcessInfo*).
- out *Process?* **process** - Underlying Process object.

### *ProcessActionResult* KillProcess(*ProcessInfo* processInfo, *bool* force = false)

Method for kill process.

Parameters:
- *ProcessInfo* **processInfo** - Process information container (available in *SystemController.Processes.Data.ProcessInfo*).
- *bool* **force** - True: Kill the process, False: invoke classic shutdown.

### *List of WindowInfo* GetWindows(*ProcessInfo* processInfo)

Returns a list of windows, attached to process.

Parameters:
- *ProcessInfo* **processInfo** - Process information container (available in *SystemController.Processes.Data.ProcessInfo*).

### *bool* IsWindowAlive(*WindowInfo* windowInfo, out *IntPtr* windowHandle, out *Process?* process)

Returns information about whether the window exists, and as a parameter, the underlying Process object and Window handle.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).
- out *IntPtr* **windowHandle** - Window handle (memory address).
- out *Process?* **process** - Underlying Process object.

### *WindowActionResult* CloseWindow(*WindowInfo* windowInfo)

Close window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).

### *WindowActionResult* FocusWindow(*WindowInfo* windowInfo)

Bring window to front.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).

### *WindowActionResult* MaximizeWindow(*WindowInfo* windowInfo)

Maximize window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).

### *WindowActionResult* MinimizeWindow(*WindowInfo* windowInfo)

Minimize window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).

### *WindowActionResult* RestoreWindow(*WindowInfo* windowInfo)

Restore minimized window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).

### *WindowActionResult* ResizeWindow(*WindowInfo* windowInfo, *SIZE* newSize)

Resize window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).
- *SIZE* **newSize** - New window size.

### *WindowActionResult* MoveWindow(*WindowInfo* windowInfo, *POINT* newPosition)

Move window.

Parameters:
- *WindowInfo* **windowInfo** - Window information container (available in *SystemController.Processes.Data.WindowInfo*).
- *POINT* **newPosition** - New window position.
Binary file added Docs/ProcessesView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions Docs/ScreenManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ScreenManager

A class for getting list of screens attached to computer.

## Methods

### *Array of ScreenInfo* GetAllScreens()

Get array of screen information objects.

### *ScreenInfo* GetMainScreen()

Get main screen information object.

### *int* GetScreenCount()

Get number of screens attached to computer.

### *Dictionary if ScreenInfo, Rectangle* GetSelectedRegions(*Rectangle* selection)

Get dictionary of ScreenInfo and Rectangle, corresponding to the selection of an area in specific screens.

Parameters:
- *Rectangle* **selection** - Selected area as Rectangle (X, Y, Width, Height).
Binary file added Docs/ScreensView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 147 additions & 0 deletions Docs/ScreenshotManager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# ScreenManager

A class for making screen shots.

## Methods

### *Bitmap* CaptureAllScreens()

Make screenshot from all screens attached to computer.

### *BitmapImage* CaptureAllScreensAsBitmapImage()

Make screenshot from all screens attached to computer as WPF BitmapImage.

### *void* CaptureAllScreensToClipboard()

Make screenshot from all screens attached to computer and copy to clipboard.

### *void* CaptureAllScreensToFile(*string* filePath, *ImageFormat?* imageFormat = null)

Make screenshot from all screens attached to computer and save to file.

Parameters:
- *string* **filePath** - Path to file, where screenshot will be saved.
- *ImageFormat?* **imageFormat** - Image format (default Png).

### *Bitmap* CaptureArea(*Rectangle* selectedArea)

Make screenshot from specified area.

Parameters:
- *Rectangle* **selectedArea** - Selected area as Rectangle (X, Y, Width, Height).

### *Bitmap* CaptureArea(*int* x, *int* y, *int* width, *int* height)

Make screenshot from specified area.

Parameters:
- *int* **x** - Area start position X.
- *int* **y** - Area start position Y.
- *int* **width** - Area width.
- *int* **height** - Area height.

### *BitmapImage* CaptureAreaAsBitmapImage(*Rectangle* selectedArea)

Make screenshot from specified area as WPF BitmapImage.

Parameters:
- *Rectangle* **selectedArea** - Selected area as Rectangle (X, Y, Width, Height).

### *BitmapImage* CaptureAreaAsBitmapImage(*int* x, *int* y, *int* width, *int* height)

Make screenshot from specified area as WPF BitmapImage.

Parameters:
- *int* **x** - Area start position X.
- *int* **y** - Area start position Y.
- *int* **width** - Area width.
- *int* **height** - Area height.

### *void* CaptureAreaToClipboard(*Rectangle* selectedArea)

Make screenshot from specified area and copy to clipboard.

Parameters:
- *Rectangle* **selectedArea** - Selected area as Rectangle (X, Y, Width, Height).

### *void* CaptureAreaToClipboard(*int* x, *int* y, *int* width, *int* height)

Make screenshot from specified area and copy to clipboard.

Parameters:
- *int* **x** - Area start position X.
- *int* **y** - Area start position Y.
- *int* **width** - Area width.
- *int* **height** - Area height.

### *void* CaptureAreaToFile(*Rectangle* selectedArea, *string* filePath, *ImageFormat?* imageFormat = null)

Make screenshot from specified area and save to file.

Parameters:
- *Rectangle* **selectedArea** - Selected area as Rectangle (X, Y, Width, Height).
- *string* **filePath** - Path to file, where screenshot will be saved.
- *ImageFormat?* **imageFormat** - Image format (default Png).

### *void* CaptureAreaToFile(*int* x, *int* y, *int* width, *int* height, *string* filePath, *ImageFormat?* imageFormat = null)

Make screenshot from specified area and save to file.

Parameters:
- *int* **x** - Area start position X.
- *int* **y** - Area start position Y.
- *int* **width** - Area width.
- *int* **height** - Area height.
- *string* **filePath** - Path to file, where screenshot will be saved.
- *ImageFormat?* **imageFormat** - Image format (default Png).

### *Bitmap* CaptureMainScreen()

Make screenshot from main screen attached to computer.

### *BitmapImage* CaptureMainScreenAsBitmapImage()

Make screenshot from main screen attached to computer as WPF BitmapImage.

### *void* CaptureMainScreenToClipboard()

Make screenshot from main screen attached to computer and save to clipboard.

### *void* CaptureMainScreenToFile(string filePath, ImageFormat? imageFormat = null)

Make screenshot from main screen attached to computer and save to file.

Parameters:
- *string* **filePath** - Path to file, where screenshot will be saved.
- *ImageFormat?* **imageFormat** - Image format (default Png).

### *Bitmap* CaptureScreen(*ScreenInfo* screenInfo)

Make screenshot from selected screen attached to computer.

Parameters:
- *ScreenInfo* **screenInfo** - Selected screen info object (available in *SystemController.Screens.Data.ScreenInfo*).

### *BitmapImage* CaptureScreenAsBitmapImage(*ScreenInfo* screenInfo)

Make screenshot from selected screen attached to computer as WPF BitmapImage.

Parameters:
- *ScreenInfo* **screenInfo** - Selected screen info object (available in *SystemController.Screens.Data.ScreenInfo*).

### *void* CaptureScreenToClipboard(*ScreenInfo* screenInfo)

Make screenshot from selected screen attached to computer and save to clipboard.

Parameters:
- *ScreenInfo* **screenInfo** - Selected screen info object (available in *SystemController.Screens.Data.ScreenInfo*).

### *void* CaptureScreenToFile(*ScreenInfo* screenInfo, *string* filePath, *ImageFormat?* imageFormat = null)

Make screenshot from selected screen attached to computer and save to file.

Parameters:
- *ScreenInfo* **screenInfo** - Selected screen info object (available in *SystemController.Screens.Data.ScreenInfo*).
- *string* **filePath** - Path to file, where screenshot will be saved.
- *ImageFormat?* **imageFormat** - Image format (default Png).
Binary file added Docs/ScreenshotView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/WindowsView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,30 @@ Library for interaction with Windows Core.
- [KeyboardReader](Docs/KeyboardReader.md)
- [MouseKeyboardController](Docs/MouseKeyboardController.md)
- [MouseReader](Docs/MouseReader.md)
- **Processes**
- [ProcessManager](Docs/ProcessManager.md)
- **Screens**
- [ScreenManager](Docs/ScreenManager.md)
- [ScreenshotManager](Docs/ScreenshotManager.md)

## SystemManager

Macros View

![SystemManager application view](Docs/SystemManager.png)

Processes View

![SystemManager processes view](Docs/ProcessesView.png)

Windows View

![SystemManager windows view](Docs/WindowsView.png)

Screens View

![SystemManager screens view](Docs/ScreensView.png)

Screenshots View

![SystemManager screenshots view](Docs/ScreenshotView.png)
2 changes: 1 addition & 1 deletion SystemController/SystemController.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Title>SystemController</Title>
<Version>1.0.0.0</Version>
<Version>1.1.0.0</Version>
<Authors>Kamil Karpiński</Authors>
<Product>SystemControllerLibrary</Product>
<Description>Library for interact with Windows Core.</Description>
Expand Down
2 changes: 1 addition & 1 deletion SystemManager/SystemManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<Authors>Kamil Karpiński</Authors>
<Version>1.0.0.0</Version>
<Version>1.1.0.0</Version>
<Title>SytemManager</Title>
<Product>SystemManager</Product>
<Description>Application for interact with Windows Core.</Description>
Expand Down
2 changes: 1 addition & 1 deletion SystemManager/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
MouseOverTitleBarButtonForeground="{Binding ThemeForegroundBrush, Source={StaticResource AppearanceConfig}, Mode=OneWay}"
PressedTitleBarButtonBackground="{Binding AccentPressedBrush, Source={StaticResource AppearanceConfig}, Mode=OneWay}"
PressedTitleBarButtonForeground="{Binding ThemeForegroundBrush, Source={StaticResource AppearanceConfig}, Mode=OneWay}"
Title="MainWindow"
Title="System Manager"
Width="800"
Loaded="WindowLoaded"
Closing="WindowExClosing">
Expand Down

0 comments on commit cd24484

Please sign in to comment.