protected virtual void OnWindowCreated() { WindowCreated?.Invoke(this, EventArgs.Empty); // If we still have default values, let's set these based on SDL refresh rate (if we can) if (gamePlatform.MainWindow is GameWindowSDL) { if (TargetElapsedTime == defaultTimeSpan) { ((GameWindowSDL)gamePlatform.MainWindow).GetDisplayInformation(out int width, out int height, out int refresh_rate); TargetElapsedTime = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / refresh_rate); } if (WindowMinimumUpdateRate.MinimumElapsedTime == defaultTimeSpan) { WindowMinimumUpdateRate.MinimumElapsedTime = TargetElapsedTime; } } else if (TargetElapsedTime == defaultTimeSpan) { TargetElapsedTime = TimeSpan.FromTicks(TimeSpan.TicksPerSecond / 60); // target elapsed time is by default 60Hz } }
public TextureSceneView createTextureSceneView(String name, Vector3 translation, Vector3 lookAt, int width, int height) { OrbitCameraController orbitCamera = new OrbitCameraController(translation, lookAt, Vector3.Zero, Vector3.Zero, 0, 1000); orbitCamera.AllowRotation = AllowRotation; orbitCamera.AllowZoom = AllowZoom; TextureSceneView window = new TextureSceneView(this, orbitCamera, name, background, 0, width, height); if (WindowCreated != null) { WindowCreated.Invoke(window); } if (camerasCreated) { window.createSceneView(currentScene); } textureWindows.Add(window); return(window); }
public WindowBase() { DataContext = this; WindowCreated?.Invoke(this, EventArgs.Empty); }
protected virtual void OnWindowCreated() { WindowCreated?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Raises the WindowCreated event. /// </summary> /// <param name="window">The window that was created.</param> protected void OnWindowCreated(IUltravioletWindow window) => WindowCreated?.Invoke(window);
///<summary>Invokes registered user-defined handler methods after the native window is created.</summary> internal void OnWindowCreated() { WindowCreated?.Invoke(this, null); }
private static void WindowCreatedEvent(ShellHook ShellObject, IntPtr hWnd) { WindowCreated?.Invoke(ShellObject, hWnd); }
private void HandleWindowAdd(WindowsWindow window, bool firstCreate) { WindowCreated?.Invoke(window, firstCreate); }
/// <summary> /// Raises the WindowCreated event. /// </summary> /// <param name="window">The window that was created.</param> private void OnWindowCreated(IUltravioletWindow window) => WindowCreated?.Invoke(window);
private void RaiseWindowCreatedEvent(Window window) { WindowCreated?.Invoke(this, new WindowEventArgs(window)); }
public void OnWindowCreated(WindowCreated windowCreated) { creator = windowCreated.Creator; Debug.Log("Creator = " + creator.name); }
private void WindowCreatedEvent(ShellEventHook shellObject, IntPtr hWnd) { WindowCreated?.Invoke(shellObject, hWnd); }
public void OnWindowCreated(WindowCreatedEventArgs e) { EventDispatcher.Dispatch(() => WindowCreated?.Invoke(this, e)); }