小编Cal*_*fer的帖子

多个窗口,但任务栏上还有多个项目

我正在设置一个有三个不同窗口的程序.我只是在用..

Window1 win1 = new Window1(); win1.show();

...为每个额外的窗户.问题是每个窗口都会在任务栏上打开一个新选项卡.无论如何我仍然可以在任务栏上只有一个相关项目的三个窗口吗?

如果可能的话,我不想让它们成为所有儿童形式,并且必须坐在另一个盒子里面.

谢谢

wpf taskbar

11
推荐指数
2
解决办法
2448
查看次数

在没有拉伸XNA游戏的情况下全屏显示

我有一个我正在研究的2D游戏,它的宽高比为4:3.当我在宽屏显示器上将其切换到全屏模式时,它会拉伸.我尝试使用两个视口给游戏不应该伸展的黑色背景,但这使得游戏的大小与以前相同.我无法让它填满本应举行整个游戏的视口.

如果没有拉伸而没有我需要修改游戏中的每个位置和绘制语句,我怎么能让它全屏?我用于视口的代码如下.

            // set the viewport to the whole screen
            GraphicsDevice.Viewport = new Viewport
            {
                X = 0,
                Y = 0,
                Width = GraphicsDevice.PresentationParameters.BackBufferWidth,
                Height = GraphicsDevice.PresentationParameters.BackBufferHeight,
                MinDepth = 0,
                MaxDepth = 1
            };

            // clear whole screen to black
            GraphicsDevice.Clear(Color.Black);

            // figure out the largest area that fits in this resolution at the desired aspect ratio
            int width = GraphicsDevice.PresentationParameters.BackBufferWidth;
            int height = (int)(width / targetAspectRatio + .5f);
            if (height > GraphicsDevice.PresentationParameters.BackBufferHeight)
            {
                height = GraphicsDevice.PresentationParameters.BackBufferHeight;
                width = (int)(height …
Run Code Online (Sandbox Code Playgroud)

c# xna

6
推荐指数
1
解决办法
9070
查看次数

如何在 Laravel 应用程序中获取客户端 ID?

我已经设置了一个带有客户端身份验证的 Laravel 应用程序。我将我的客户端 ID 和客户端密码发送给它,它给了我一个令牌。我可以登录我的 Laravel 应用程序,但我不知道如何获取已授权客户端的 ID。

我已经看到了用于auth()->user()->Token()->getAttribute('client_id')获取客户端 ID 的提示,但是由于我只使用客户端,因此没有用户,并且我收到有关尝试在空对象上调用 Token() 的错误。Auth::id()也一无所获。我用 获取了标头中的令牌Request::header('Authorization'),但它与数据库中的任何内容都不匹配。

laravel laravel-passport

5
推荐指数
1
解决办法
3502
查看次数

标签 统计

c# ×1

laravel ×1

laravel-passport ×1

taskbar ×1

wpf ×1

xna ×1