日期:2014-05-17  浏览次数:20856 次

[求指导, 怎样打包字体,客户机器安装程序的时候一起把字体安装]


  如题: 求指导, 怎样打包字体,客户机器安装程序的时候一起把字体安装


------解决方案--------------------
http://bbs.csdn.net/topics/30416101
http://blog.sina.com.cn/s/blog_46d6b24901014o8l.html
------解决方案--------------------
http://msdn.microsoft.com/zh-cn/library/System.Configuration.Install.Installer(v=vs.100).aspx



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);