示例#1
0
 /// <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);
     }
 }
示例#2
0
        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;
        }
示例#3
0
        public static void MessageBox(ChromelyPlatform chromelyPlatform, string message, MessageType messageType = MessageType.Error)
        {
            var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform);

            nativeGui.MessageBox(message, messageType);
        }
示例#4
0
        public static void Resize(ChromelyPlatform chromelyPlatform, IntPtr window, int width, int height)
        {
            var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform);

            nativeGui.ResizeWindow(window, width, height);
        }
示例#5
0
        public static void Quit(ChromelyPlatform chromelyPlatform)
        {
            var nativeGui = NativeGuiFactory.GetNativeGui(chromelyPlatform);

            nativeGui.Quit();
        }