Ejemplo n.º 1
0
		/// <summary>
		/// If there are markers and their data waiting (pending) to be output then flush
		/// them out before removing this object.
		/// </summary>
		/// <param name="convObj">used for the ProcessSFMData method</param>
		/// <param name="xmlOutput">output file</param>
		public void FlushPendingSfmData(Converter convObj, System.Xml.XmlTextWriter xmlOutput)
		{
			foreach(PendingSfmData pendingObj in m_pendingSfms)
			{
#if TracingOutput
				System.Diagnostics.Debug.WriteLine("sfm Data: " + pendingObj.Marker + " line#:" + pendingObj.LineNumber.ToString());
#endif
				convObj.ProcessSFMandData(pendingObj.Marker, pendingObj.Data, pendingObj.LineNumber, xmlOutput);
			}
		}
Ejemplo n.º 2
0
		public static void Main(string [] args)
		{
			if (args.Length < 3 || args.Length > 6)
				throw new System.Exception("Usage: ConvertSFM.exe <input-file> <mapping-file> <output-file> [vern regional national]");	//  <log-file>");

			// parameters 4,5,6 are changes to the map file
			// 4: Vern     "code:key"  Ex; "en:encoding KEY"
			// 5: Regional "code:key"  Ex; "fr:encoding KEY"
			// 6: National "code:key"  Ex; "tg:encoding KEY"
			Sfm2Xml.Converter conv = new Sfm2Xml.Converter();
			string arg3 = args.Length==4 ? args[3] : "";
			string arg4 = args.Length==5 ? args[4] : "";
			string arg5 = args.Length==6 ? args[5] : "";

			conv.Convert(args[0], args[1], args[2], arg3, arg4, arg5);
		}
Ejemplo n.º 3
0
        public static void Main(string [] args)
        {
            if (args.Length < 3 || args.Length > 6)
            {
                throw new System.Exception("Usage: ConvertSFM.exe <input-file> <mapping-file> <output-file> [vern regional national]");                 //  <log-file>");
            }
            // parameters 4,5,6 are changes to the map file
            // 4: Vern     "code:key"  Ex; "en:encoding KEY"
            // 5: Regional "code:key"  Ex; "fr:encoding KEY"
            // 6: National "code:key"  Ex; "tg:encoding KEY"
            Sfm2Xml.Converter conv = new Sfm2Xml.Converter();
            string            arg3 = args.Length == 4 ? args[3] : "";
            string            arg4 = args.Length == 5 ? args[4] : "";
            string            arg5 = args.Length == 6 ? args[5] : "";

            conv.Convert(args[0], args[1], args[2], arg3, arg4, arg5);
        }
Ejemplo n.º 4
0
		private void btnCheck_Click(object sender, System.EventArgs e)
		{
			m_CheckedDictFileName = tbDictFileName.Text;
			m_CheckedMapFileName = tbMapFileName.Text;

			try
			{
				Converter conv = new Converter();
				conv.Convert(m_CheckedDictFileName, m_CheckedMapFileName, m_Phase1Output);
				ProcessPhase1Errors(true);
				btnImport.Enabled = true;
			}
			catch
			{
			}
		}