diff --git a/Docs/ProcessManager.md b/Docs/ProcessManager.md new file mode 100644 index 0000000..256a6ee --- /dev/null +++ b/Docs/ProcessManager.md @@ -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. diff --git a/Docs/ProcessesView.png b/Docs/ProcessesView.png new file mode 100644 index 0000000..f88d4bf Binary files /dev/null and b/Docs/ProcessesView.png differ diff --git a/Docs/ScreenManager.md b/Docs/ScreenManager.md new file mode 100644 index 0000000..96e7e1d --- /dev/null +++ b/Docs/ScreenManager.md @@ -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). diff --git a/Docs/ScreensView.png b/Docs/ScreensView.png new file mode 100644 index 0000000..c93ab22 Binary files /dev/null and b/Docs/ScreensView.png differ diff --git a/Docs/ScreenshotManager.md b/Docs/ScreenshotManager.md new file mode 100644 index 0000000..c73fb34 --- /dev/null +++ b/Docs/ScreenshotManager.md @@ -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). diff --git a/Docs/ScreenshotView.png b/Docs/ScreenshotView.png new file mode 100644 index 0000000..5492b83 Binary files /dev/null and b/Docs/ScreenshotView.png differ diff --git a/Docs/WindowsView.png b/Docs/WindowsView.png new file mode 100644 index 0000000..23d79d3 Binary files /dev/null and b/Docs/WindowsView.png differ diff --git a/README.md b/README.md index 99caed3..a1e2bca 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/SystemController/SystemController.csproj b/SystemController/SystemController.csproj index c154243..cce5bfe 100644 --- a/SystemController/SystemController.csproj +++ b/SystemController/SystemController.csproj @@ -5,7 +5,7 @@ enable enable SystemController - 1.0.0.0 + 1.1.0.0 Kamil Karpiński SystemControllerLibrary Library for interact with Windows Core. diff --git a/SystemManager/SystemManager.csproj b/SystemManager/SystemManager.csproj index 644affd..558086d 100644 --- a/SystemManager/SystemManager.csproj +++ b/SystemManager/SystemManager.csproj @@ -6,7 +6,7 @@ enable true Kamil Karpiński - 1.0.0.0 + 1.1.0.0 SytemManager SystemManager Application for interact with Windows Core. diff --git a/SystemManager/Windows/MainWindow.xaml b/SystemManager/Windows/MainWindow.xaml index b40afbd..66eb61e 100644 --- a/SystemManager/Windows/MainWindow.xaml +++ b/SystemManager/Windows/MainWindow.xaml @@ -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">