using System;
using System.IO;
using Microsoft.ApplicationBlocks.ApplicationUpdater.Interfaces;

namespace PostProcessor
{
	/// <summary>
	/// Processor 的摘要说明。
	/// </summary>
	public class Processor:IPostProcessor
	{
		public Processor()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		/// <summary>
		/// 实现IPostprocessor.Run接口方法
		/// 更改下载程序配置信息
		/// </summary>
		public void Run(){
			string p=Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
			DirectoryInfo dir=new DirectoryInfo(p);
			Config.ConfigFile config=new Config.ConfigFile(Path.Combine(p,@"HISClinic.exe.config"));
			config.ChangeAppConfigPathOnly("HISClinic",dir.Parent.FullName);
			//throw new Exception(dir.FullName);
		}
		public  void Dispose(){}
	}
}
