/// <summary> /// This, in fact, is what executes ILasm. Use SpeechMode.Silent to mute output. /// </summary> /// <param name="CommandLine"></param> /// <param name="FinalFile"></param> public static void ILasm(string FinalFile, SpeechMode mode) { if (File.Exists(System.IO.Path.Combine(Environment.CurrentDirectory, Config.ILasmExecutableName))) { CreateTemporary(FinalFile); if (!ILasmInfo.Built) { ILasmInfo.name = "halc.tmp"; ILasmInfo.BuildOptions(); } Process ILasmProc = new Process(); ILasmProc.StartInfo.Arguments = ILasmInfo.CommandLine; ILasmProc.StartInfo.FileName = Config.ILasmExecutableName; ILasmProc.StartInfo.UseShellExecute = false; ILasmProc.StartInfo.RedirectStandardOutput = true; ILasmProc.StartInfo.CreateNoWindow = true; ILasmProc.Start(); output = ILasmProc.StandardOutput; DeleteTemporary(); if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nIlasm job done."); Logger.SaveLog(); } } else { Exceptions.Exception(24); } }
/// <summary> /// This executes AL with args found in LicenseCompilerInfo /// </summary> public static void LicenseCompiler(SpeechMode mode) { if (File.Exists(Path.Combine(Environment.CurrentDirectory, Config.ALExecutableName))) { if (!LicenseCompilerInfo.Built) { LicenseCompilerInfo.BuildOptions(); } Process LCProc = new Process(); LCProc.StartInfo.Arguments = LicenseCompilerInfo.CommandLine; LCProc.StartInfo.FileName = Config.LCExecutableName; LCProc.StartInfo.UseShellExecute = false; LCProc.StartInfo.RedirectStandardOutput = true; LCProc.StartInfo.CreateNoWindow = true; LCProc.Start(); output = LCProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nLicenseCompiler job done."); Logger.SaveLog(); } } else { Exceptions.Exception(23); } }
/// <summary> /// This executes AL with args found in AssemblyLinkerInfo /// </summary> public static void AssemblyLinker(SpeechMode mode) { if (File.Exists(Path.Combine(Environment.CurrentDirectory, Config.ALExecutableName))) { if (!AssemblyLinkerInfo.Built) { AssemblyLinkerInfo.BuildOptions(); } Process ALProc = new Process(); ALProc.StartInfo.Arguments = AssemblyLinkerInfo.CommandLine; ALProc.StartInfo.FileName = Config.ALExecutableName; ALProc.StartInfo.UseShellExecute = false; ALProc.StartInfo.RedirectStandardOutput = true; ALProc.StartInfo.CreateNoWindow = true; ALProc.Start(); output = ALProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nAssemblyLinker job done."); Logger.SaveLog(); } } else { Exceptions.Exception(23); } }
}/// <summary> /// A single method to call ILasm without any interference from ILasmInfo. Use SpeechMode.Silent to mute all traces /// </summary> /// <param name="CommandLine"></param> public static void ILasmCommand(string CommandLine, SpeechMode mode) { if (File.Exists(System.IO.Path.Combine(Environment.CurrentDirectory, Config.ILasmExecutableName))) { Logger.Log("Ilasm started"); Process ILasmProc = new Process(); ILasmProc.StartInfo.Arguments = CommandLine; ILasmProc.StartInfo.FileName = Config.ILasmExecutableName; ILasmProc.StartInfo.UseShellExecute = false; ILasmProc.StartInfo.RedirectStandardOutput = true; ILasmProc.StartInfo.CreateNoWindow = true; ILasmProc.Start(); output = ILasmProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nIlasm job done."); Logger.SaveLog(); } } else { Exceptions.Exception(24); } }
public override void Load(LoadInfo info) { base.Load(info); if (info.msg.microphoneStand != null) { currentSpeechMode = (SpeechMode)info.msg.microphoneStand.microphoneMode; ioEntity.uid = info.msg.microphoneStand.IORef; } }
public void SetMode(RPCMessage msg) { if (!(msg.player != _mounted)) { SpeechMode speechMode = (SpeechMode)msg.read.Int32(); if (speechMode != currentSpeechMode) { currentSpeechMode = speechMode; SendNetworkUpdate(); } } }
/// <summary> /// This executes AssemblyLinker with specified options. No interaction with AssemblyLinkerInfo here. Use SpeechMode.Silent to mute all tracing /// </summary> /// <param name="CommandLine"></param> public static void AssemblyLinkerCommand(string CommandLine, SpeechMode mode) { if (File.Exists(Path.Combine(Environment.CurrentDirectory, Config.ALExecutableName))) { Process ALProc = new Process(); ALProc.StartInfo.Arguments = CommandLine; ALProc.StartInfo.FileName = Config.ALExecutableName; ALProc.StartInfo.UseShellExecute = false; ALProc.StartInfo.RedirectStandardOutput = true; ALProc.StartInfo.CreateNoWindow = true; ALProc.Start(); output = ALProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nAssemblyLinker job done."); Logger.SaveLog(); } } else { Exceptions.Exception(23); } }
public override void StartRawInput() { speechRecognition.RecognizeUnrestrictedGrammar(); currentMode = SpeechMode.Raw; }
public override void EndControlInput() { currentMode = SpeechMode.None; speechRecognition.EndSpeechRecognition(); }
public override void StartControlInput() { speechRecognition.RecognizeMappingGrammar(); currentMode = SpeechMode.Controlled; }
/// A single method to call ILasm without any interference from ILasmInfo. Use SpeechMode.Silent to mute all traces /// </summary> /// <param name="CommandLine"></param> public static void ILasmCommand(string CommandLine, SpeechMode mode) { if (File.Exists(System.IO.Path.Combine(Environment.CurrentDirectory, Config.ILasmExecutableName))) { Logger.Log("Ilasm started"); Process ILasmProc = new Process(); ILasmProc.StartInfo.Arguments = CommandLine; ILasmProc.StartInfo.FileName = Config.ILasmExecutableName; ILasmProc.StartInfo.UseShellExecute = false; ILasmProc.StartInfo.RedirectStandardOutput = true; ILasmProc.StartInfo.CreateNoWindow = true; ILasmProc.Start(); output = ILasmProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nIlasm job done."); Logger.SaveLog(); } } else { Exceptions.Exception(24); } }
/// <summary> /// This executes NGEN with specified options. No interaction with NGENInfo here. Use SpeechMode.Silent to mute all tracing /// </summary> /// <param name="CommandLine"></param> public static void NGENCommand(string CommandLine, SpeechMode mode) { if (File.Exists(Path.Combine(Environment.CurrentDirectory, Config.ALExecutableName))) { Process NGENProc = new Process(); NGENProc.StartInfo.Arguments = CommandLine; NGENProc.StartInfo.FileName = Config.NGENExecutableName; NGENProc.StartInfo.UseShellExecute = false; NGENProc.StartInfo.RedirectStandardOutput = true; NGENProc.StartInfo.CreateNoWindow = true; NGENProc.Start(); output = NGENProc.StandardOutput; if (mode == SpeechMode.Normal) { Logger.Log(output.ReadToEnd()); Logger.Log("\nNGEN job done."); Logger.SaveLog(); } } else { Exceptions.Exception(23); } }
/// <summary> /// Sets the mode of the activity /// </summary> /// <param name="mode">The chosen mode</param> public void SetMode(SpeechMode mode) { _mode = mode; }