小编Paw*_*jda的帖子

如何强制用户在WinForms中的用户管理员帐户

我有简单的WinForms应用程序,其中修改Windows注册表.问题是在Vista/Windows 7中我需要强制用户切换到管理员.

我不想强制用户以管理员身份运行表单启动应用程序.当有必要写入注册表时,我希望他这样做.

最好的情况是,当用户需要"切换"到管理员以便没有必要以管理员身份运行时,可以直接获得出现在许多设置中的相同消息.

我如何在.Net中实现这一目标?

.net c# windows windows-7 winforms

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

有关XNA性能的书籍,文章,博客文章?

您是否知道有关如何编写代码以保持XNA良好性能的书籍,文章和博客?
我知道XNA中有原则,严格规则要做什么,要避免什么,哪些解决方案更好.

c# performance xna

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

IsEnabled时更改按钮图像

我想在按钮时更改按钮图像IsEnabled == False.

下面是我的例子,绑定很好,当我改变它们False/True仍然无法正常工作.

<Button x:Name="btnBackward" Grid.Column="0" Grid.Row="2" Command="{Binding UserWorkflowManager.NavigateBackward}" IsEnabled="{Binding UserWorkflowManager.NavigateBackwardEnable}" Grid.RowSpan="2">
    <Button.Template>
        <ControlTemplate>
            <Image Name="_image" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform">
                <Image.Style>
                    <Style TargetType="Image">
                        <Setter Property="Source" Value="/UserWorkflow.View;component/Images/LDC500_butX_PreviousPane_norm.bmp" />
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ElementName=btnBackward, Path=IsEnabled}" Value="False">
                                    <Setter Property="Source" Value="/UserWorkflow.View;component/Images/LDC500_butX_PreviousPane_dis.bmp"/>
                                </DataTrigger>
                            </Style.Triggers>
                    </Style>
                </Image.Style>
            </Image>
        </ControlTemplate>
    </Button.Template>
</Button>
Run Code Online (Sandbox Code Playgroud)

wpf image button isenabled

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

如何将实时视频从WP7相机流式传输到XNA应用程序?

我如何将视频(现场)从我的WP7相机流式传输到我的XNA项目?
只需简单显示相机的捕捉.

c# xna windows-phone-7

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

在XNA WP7中平滑淡出/转换2个纹理

我有2个纹理800x480(前景/背景),它们是XNA Windows Phone 7应用程序中的.png文件.我想淡出/转换前景以显示背景.我的表现存在很大问题.我的想法只是将Alpha频道设置为一个,Texture2D所以我创建了这样一个代码:

GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;

private Texture2D _background, _foreground;
private BlendState _blendState;
private uint[] _pixelsForeground;
private uint[] _pixelsBackground;

public Game1()
{
    graphics = new GraphicsDeviceManager(this);
    Content.RootDirectory = "Content";

    TargetElapsedTime = TimeSpan.FromTicks(333333);

    graphics.IsFullScreen = true;
    graphics.SupportedOrientations = DisplayOrientation.Portrait;
    graphics.PreferredBackBufferHeight = 840;
    graphics.PreferredBackBufferWidth = 480;
}

protected override void LoadContent()
{
    spriteBatch = new SpriteBatch(GraphicsDevice);

    _background = this.Content.Load<Texture2D>(@"background");
    _foreground = this.Content.Load<Texture2D>(@"foreground");

    _pixelsForeground = new uint[_foreground.Width * _foreground.Height];
    _pixelsBackground = new uint[_foreground.Width * _foreground.Height];

    _background.GetData(_pixelsBackground);
    _foreground.GetData(_pixelsForeground); …
Run Code Online (Sandbox Code Playgroud)

c# xna windows-phone-7

0
推荐指数
1
解决办法
1974
查看次数

标签 统计

c# ×4

xna ×3

windows-phone-7 ×2

.net ×1

button ×1

image ×1

isenabled ×1

performance ×1

windows ×1

windows-7 ×1

winforms ×1

wpf ×1