日期:2014-05-20 浏览次数:20858 次
using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration.Install; namespace POManage { [RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { InitializeComponent(); } public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); } public override void Commit(System.Collections.IDictionary savedState) { base.Commit(savedState); //弹出窗口,让用户配置连接数据库的连接字符串 //从状态上下文获得程序安装的路径,tar的来源详见下面步骤 string targetdir = this.Context.Parameters["tar"].ToString(); DataManagement dmf = new DataManagement(targetdir); dmf.ShowDialog(); } } }