Esempio n. 1
0
		public static bool Export(PwExportInfo pwExportInfo, string strFormatName,
			IOConnectionInfo iocOutput)
		{
			if(strFormatName == null) throw new ArgumentNullException("strFormatName");
			// iocOutput may be null

			FileFormatProvider prov = Program.FileFormatPool.Find(strFormatName);
			if(prov == null) return false;

			NullStatusLogger slLogger = new NullStatusLogger();
			return Export(pwExportInfo, prov, iocOutput, slLogger);
		}
Esempio n. 2
0
		public static void CreateInfoFile(string strPlgxPath)
		{
			FileStream fsOut = null;
			TextWriter twLog = null;

			try
			{
				fsOut = new FileStream(strPlgxPath + ".txt", FileMode.Create,
					FileAccess.Write, FileShare.None);
				twLog = new StreamWriter(fsOut, new UTF8Encoding(false));

				NullStatusLogger sl = new NullStatusLogger();
				LoadPriv(strPlgxPath, sl, false, false, false, twLog);
			}
			catch(Exception ex)
			{
				MessageService.ShowWarning(strPlgxPath, ex);
			}
			finally
			{
				if(twLog != null) twLog.Close();
				if(fsOut != null) fsOut.Close();
			}
		}