我使用SQLite数据库版本3与C#Windows应用程序..我想使用密码或任何其他加密方式加密SQLite数据库文件,以防止客户端从程序文件文件夹中打开它.
我不想要任何运行时加密方式,我只想在客户端尝试从程序文件中打开它时使数据库文件显示密码字段..谢谢
编辑
如果我从代码加密它,客户端可以在安装完成后打开它并将db文件传输到程序文件,然后再打开程序执行加密不是吗?
我正在使用Visual Studio 2010,我正在开发一个Windows应用程序,同时尝试为它自动更新程序面临严重问题.
当程序找到新版本并尝试安装它时,它可能不会因为两个原因:
1 - 应用程序存在于我的程序文件中.这样窗口出现了

2 - 应用程序已经打开" the form that performed the update process".
该问题与版本号没有任何关系.
这是关于程序的存在以及安装新版本的能力,尽管之前的版本已经打开.
我在 TabItem 中有一个 ComboBox。问题是,当我选择任何 ComoboxItem 时,会触发 TabControl_SelectionChanged 事件。我在该事件中有一些函数,一旦我更改了 ComboBox 所选项目,我不希望它被实现。
<TabControl x:Name="tb" HorizontalAlignment="Left" Height="299" Margin="10,10,0,0" VerticalAlignment="Top" Width="497" SelectionChanged="TabControl_SelectionChanged">
<TabItem x:Name="tbi1" Header="TabItem">
<Grid Background="#FFE5E5E5">
<Label x:Name="lbl" Content="Label" Margin="196,86,172,148"/>
<ComboBox HorizontalAlignment="Left" Margin="51,162,0,0" VerticalAlignment="Top" Width="120">
<ComboBoxItem Content="ComboBoxItem"/>
<ComboBoxItem Content="ComboBoxItem"/>
<ComboBoxItem Content="ComboBoxItem"/>
</ComboBox>
</Grid>
</TabItem>
<TabItem x:Name="tbi2" Header="TabItem">
<Grid Background="#FFE5E5E5"/>
</TabItem>
</TabControl>
Run Code Online (Sandbox Code Playgroud)
编辑:我也面临着将选项卡项中的任何控件悬停在选项卡项上时的问题。
我正在 VS2010 上使用 C# 开发文件锁定器/解锁器应用程序。我想要的是使用我的应用程序使用密码锁定文件,然后随时解锁。
事实上,我使用以下代码来锁定文件,但仅当应用程序仍在运行时才会锁定文件;当我关闭应用程序时,文件被解锁。
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Configuration;
using System.Windows.Forms;
namespace LockFile
{
public enum LockStatus
{
Unlocked,
Locked
}
public class LockFilePresenter
{
private ILockFileView view;
private string file2Lock = string.Empty;
private FileStream fileLockStream = null;
public LockFilePresenter(ILockFileView view)
{
this.view = view;
}
internal void LockFile()
{
if (string.IsNullOrEmpty(file2Lock) || !File.Exists(file2Lock))
{
view.ShowMessage("Please select a path to lock.");
return;
}
if (fileLockStream != null)
{
view.ShowMessage("The path is already locked."); …Run Code Online (Sandbox Code Playgroud) c# ×4
database ×1
deployment ×1
encryption ×1
events ×1
file-locking ×1
filestream ×1
sql ×1
sqlite ×1
wizard ×1
wpf ×1