private void OnSizeSelected(SizeSelectedEventArgs e) { SizeSelectedEventHandler selectedEventHandler = SizeSelected; if (selectedEventHandler == null) { return; } selectedEventHandler(this, e); }
private void WindowSizeSelected(object sender, SizeSelectedEventArgs e) { Trace.WriteLine(string.Format("Size Selected: x={0}, y={1}, width={2}, height={3}", e.Rectangle.X, e.Rectangle.Y, e.Rectangle.Width, e.Rectangle.Height)); CloseAllWindow(); Win32Window window = Win32Window.GetForegroundWindow(); window.Rectangle = e.Rectangle; if (!e.Maximized || !_settings.FullScreenMaximized) { window.WindowState = WindowState.Normal; } else { window.WindowState = WindowState.Maximized; } }