/// <summary> /// The on resize. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected override void OnSizeChanged(object sender, SizeChangedEventArgs sizeChangedEventArgs) { if (_browserWindowHandle != IntPtr.Zero) { var nativeMethods = NativeGuiFactory.GetNativeGui(this._hostConfig.Platform); nativeMethods.ResizeWindow(_browserWindowHandle, sizeChangedEventArgs.Width, sizeChangedEventArgs.Height); } }
public NativeWindow(ChromelyConfiguration hostConfig) { _hostConfig = hostConfig; Handle = IntPtr.Zero; _nativeGui = NativeGuiFactory.GetNativeGui(hostConfig.Platform); _nativeGui.Created += OnCreated; _nativeGui.Moving += OnMoving; _nativeGui.SizeChanged += OnSizeChanged; _nativeGui.Close += OnClose; }
public static void MessageBox(ChromelyPlatform chromelyPlatform, string message, MessageType messageType = MessageType.Error) { var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform); nativeGui.MessageBox(message, messageType); }
public static void Resize(ChromelyPlatform chromelyPlatform, IntPtr window, int width, int height) { var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform); nativeGui.ResizeWindow(window, width, height); }
public static void Quit(ChromelyPlatform chromelyPlatform) { var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform); nativeGui.Quit(); }