public FormsWindow(Settings settings) : this(new NativeMessageForm()) { var form = panel as Form; if (settings.StartInFullscreen) { IsFullscreen = settings.StartInFullscreen; form.FormBorderStyle = FormBorderStyle.None; form.TopMost = true; form.StartPosition = FormStartPosition.Manual; form.DesktopLocation = new SystemPoint(0, 0); } else { form.FormBorderStyle = FormBorderStyle.Sizable; form.StartPosition = FormStartPosition.CenterScreen; } form.ClientSize = new SystemSize((int)settings.Resolution.Width, (int)settings.Resolution.Height); form.MinimumSize = new SystemSize(1, 1); form.Text = StackTraceExtensions.GetEntryName(); BackgroundColor = Color.Black; Icon appIcon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); if (appIcon != null) { form.Icon = appIcon; } form.SizeChanged += OnSizeChanged; form.Show(); }
public GLFW3Window(Settings settings) { if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole) { Glfw.SetErrorCallback(ErrorCallback); } if (!Glfw.Init()) { throw new UnableToInitializeGLFW(); } if (GetGlfwMajorVersion() < 3) { throw new UnableToInitializeShadersForGLFW(); } this.settings = settings; CreateWindow(settings.Resolution, settings.StartInFullscreen); new GLFW3Time(); Title = StackTraceExtensions.GetEntryName(); BackgroundColor = Color.Black; hwnd = GetForegroundWindow(); Icon appIcon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); if (appIcon != null && hwnd != IntPtr.Zero) { SetIcon(appIcon); } }
public XnaWindow(Game game) { this.game = game; game.Window.Title = StackTraceExtensions.GetEntryName(); game.Window.AllowUserResizing = true; game.IsMouseVisible = true; game.Window.ClientSizeChanged += OnViewportSizeChanged; }
public XnaWindow(Game game) { this.game = game; Title = StackTraceExtensions.GetEntryName(); game.Window.AllowUserResizing = true; game.IsMouseVisible = true; game.Window.ClientSizeChanged += OnViewportSizeChanged; game.Window.OrientationChanged += (sender, args) => OnOrientationChanged(GetOrientation(game.Window.CurrentOrientation)); game.Exiting += (sender, args) => { IsClosing = true; }; BackgroundColor = Color.Black; }
public FormsWindow() { form = new Form { Text = StackTraceExtensions.GetEntryName(), Size = new Size(800, 600), FormBorderStyle = FormBorderStyle.Sizable, StartPosition = FormStartPosition.CenterScreen }; Icon appIcon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); if (appIcon != null) { form.Icon = appIcon; } form.SizeChanged += OnSizeChanged; form.Show(); closeAfterOneFrameIfInIntegrationTest = !StackTraceExtensions.ContainsNoTestOrIsVisualTest(); }
public void Main() { // Because this method is named "Main" we will get the namespace name instead! Assert.AreEqual("DeltaEngine.Tests.Extensions", StackTraceExtensions.GetEntryName()); }
public void GetEntryName() { Assert.AreEqual("GetEntryName", StackTraceExtensions.GetEntryName()); }