private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args) { // TODO: Move this into a Resize menu item SizeF scale = new SizeF( (float)Data.ScreenRectInfo.Size.Width / args.OldSize.Width, (float)Data.ScreenRectInfo.Size.Height / args.OldSize.Height); foreach (var rectInfo in Data.RectInfos) { rectInfo.X = (int)(rectInfo.X * scale.Width); rectInfo.Y = (int)(rectInfo.Y * scale.Height); rectInfo.Width = (int)(rectInfo.Width * scale.Width); rectInfo.Height = (int)(rectInfo.Height * scale.Height); } // NOTE: Buffer and data MUST already be marked as dirty elsewhere. }
private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args) { SetPinboardSize(); }