| 1 | using System; |
| 2 | using System.Collections.Generic; |
| 3 | using System.Linq; |
| 4 | using System.Text; |
| 5 | using System.Threading.Tasks; |
| 6 | |
| 7 | namespace Core.Models.AppObserver |
| 8 | { |
| 9 | ///<summary> |
| 10 | /// |
| 11 | ///</summary> |
| 12 | public class WindowInfo |
| 13 | { |
| 14 | ///<summary> |
| 15 | /// |
| 16 | ///</summary> |
| 17 | public string ClassName { get; } |
| 18 | ///<summary> |
| 19 | /// |
| 20 | ///</summary> |
| 21 | public string Title { get; } |
| 22 | ///<summary> |
| 23 | /// |
| 24 | ///</summary> |
| 25 | public IntPtr Handle { get; } |
| 26 | ///<summary> |
| 27 | /// |
| 28 | ///</summary> |
| 29 | public int Width { get; } |
| 30 | ///<summary> |
| 31 | /// |
| 32 | ///</summary> |
| 33 | public int Height { get; } |
| 34 | public int X { get; } |
| 35 | public int Y { get; } |
| 36 | |
| 37 | public WindowInfo(string className_, string title_, IntPtr handle_, int width_, int height_, int x_, int y_) |
| 38 | { |
| 39 | ClassName = className_; |
| 40 | Title = title_; |
| 41 | Handle = handle_; |
| 42 | Width = width_; |
| 43 | Height = height_; |
| 44 | X = x_; |
| 45 | Y = y_; |
| 46 | } |
| 47 | |
| 48 | public override string ToString() |
| 49 | { |
| 50 | return $"ClassName:{ClassName},Title:{Title},Handle:{Handle},Width:{Width},Height:{Height},X:{X},Y:{Y}"; |
| 51 | } |
| 52 | public static WindowInfo Empty = new WindowInfo(string.Empty, string.Empty, IntPtr.Zero, 0, 0, 0, 0); |
| 53 | } |
| 54 | } |