/// <summary> /// check if this screen has same properties (os) than the provided one /// </summary> /// <param name="screenInfo">compare with</param> /// <returns>check if has same properties (primary,monitor aera,physical aera,x,y)</returns> /// <summary> /// <returns>differences decription</returns> public ObjectPropertiesDiff Compare(ScreenInfo screenInfo) { var diffs = new ObjectPropertiesDiff(); diffs.Merge(nameof(WorkArea), WorkArea.Compare(screenInfo.WorkArea)); diffs.Merge(nameof(MonitorArea), MonitorArea.Compare(screenInfo.MonitorArea)); diffs.Check(this, nameof(Width), Width, screenInfo.Width); diffs.Check(this, nameof(Height), Height, screenInfo.Height); diffs.Check(this, nameof(IsPrimary), IsPrimary, screenInfo.IsPrimary); diffs.Check(this, nameof(X), X, screenInfo.X); diffs.Check(this, nameof(Y), Y, screenInfo.Y); return(diffs); }
/// <summary> /// check if this aera has same properties (os) than the provided one /// </summary> /// <param name="Area">compare with</param> /// <returns>differences decription</returns> public ObjectPropertiesDiff Compare(Area area) { var diff = new ObjectPropertiesDiff(); diff.Check(this, nameof(Left), Left, area.Left); diff.Check(this, nameof(Top), Top, area.Top); diff.Check(this, nameof(Right), Right, area.Right); diff.Check(this, nameof(Bottom), Bottom, area.Bottom); diff.Check(this, nameof(Width), Width, area.Width); diff.Check(this, nameof(Height), Height, area.Height); return(diff); }