Ejemplo n.º 1
0
 /// <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);
     }
 }
Ejemplo n.º 2
0
 /// <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);
     }
 }
Ejemplo n.º 3
0
 /// <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);
     }
 }
Ejemplo n.º 4
0
        }/// <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);
            }
        }
Ejemplo n.º 5
0
 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;
     }
 }
Ejemplo n.º 6
0
 public void SetMode(RPCMessage msg)
 {
     if (!(msg.player != _mounted))
     {
         SpeechMode speechMode = (SpeechMode)msg.read.Int32();
         if (speechMode != currentSpeechMode)
         {
             currentSpeechMode = speechMode;
             SendNetworkUpdate();
         }
     }
 }
Ejemplo n.º 7
0
 /// <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);
     }
 }
Ejemplo n.º 8
0
 public override void StartRawInput()
 {
     speechRecognition.RecognizeUnrestrictedGrammar();
     currentMode = SpeechMode.Raw;
 }
Ejemplo n.º 9
0
 public override void EndControlInput()
 {
     currentMode = SpeechMode.None;
     speechRecognition.EndSpeechRecognition();
 }
Ejemplo n.º 10
0
 public override void StartControlInput()
 {
     speechRecognition.RecognizeMappingGrammar();
     currentMode = SpeechMode.Controlled;
 }
Ejemplo n.º 11
0
 /// <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);
     }
 }
Ejemplo n.º 12
0
 public override void StartRawInput()
 {
     speechRecognition.RecognizeUnrestrictedGrammar();
     currentMode = SpeechMode.Raw;
 }
Ejemplo n.º 13
0
 public override void EndControlInput()
 {
     currentMode = SpeechMode.None;
     speechRecognition.EndSpeechRecognition();
 }
Ejemplo n.º 14
0
 public override void StartControlInput()
 {
     speechRecognition.RecognizeMappingGrammar();
     currentMode = SpeechMode.Controlled;
 }
Ejemplo n.º 15
0
 /// 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);
     }
 }
Ejemplo n.º 16
0
 /// <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);
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Sets the mode of the activity
 /// </summary>
 /// <param name="mode">The chosen mode</param>
 public void SetMode(SpeechMode mode)
 {
     _mode = mode;
 }