首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

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

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


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


[解决办法]
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);


   }
   // Override the 'Commit' method.
   public override void Commit(IDictionary savedState)
   {
      base.Commit(savedState);
   }
   // Override the 'Rollback' method.
   public override void Rollback(IDictionary savedState)
   {
      base.Rollback(savedState);
   }
   public static void Main()
   {
      Console.WriteLine("Usage : installutil.exe Installer.exe ");
   }
}

热点排行