日期:2014-05-17 浏览次数:20841 次
如题: 求指导, 怎样打包字体,客户机器安装程序的时候一起把字体安装
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
// Set 'RunInstaller' attribute to true.
[RunInstaller(true)]
public class MyInstallerClass: Installer
{
public MyInstallerClass() :base()
{
// Attach the 'Committed' event.
this.Committed += new InstallEventHandler(MyInstaller_Committed);
// Attach the 'Committing' event.
this.Committing += new InstallEventHandler(MyInstaller_Committing);
}
// Event handler for 'Committing' event.
private void MyInstaller_Committing(object sender, InstallEventArgs e)
{
Console.WriteLine("");
Console.WriteLine("Committing Event occured.");
Console.WriteLine("");
}
// Event handler for 'Committed' event.
private void MyInstaller_Committed(object sender, InstallEventArgs e)
{
Console.WriteLine("");
Console.WriteLine("Committed Event occured.");
Console.WriteLine("");
}
// Override the 'Install' method.
public override void Install(IDictionary savedState)
{
base.Install(savedState);