Пример #1
0
        public void ConfigureVoice(string title)
        {
            string             voicename = Globals.GetString(ActionSay.globalvarspeechvoice, "Default");
            string             volume    = Globals.GetString(ActionSay.globalvarspeechvolume, "Default");
            string             rate      = Globals.GetString(ActionSay.globalvarspeechrate, "Default");
            ConditionVariables effects   = new ConditionVariables(PersistentVariables.GetString(ActionSay.globalvarspeecheffects, ""), ConditionVariables.FromMode.MultiEntryComma);

            ExtendedAudioForms.SpeechConfigure cfg = new ExtendedAudioForms.SpeechConfigure();
            cfg.Init(AudioQueueSpeech, SpeechSynthesizer,
                     "Select voice synthesizer defaults", title, this.Icon,
                     null, false, false, AudioExtensions.AudioQueue.Priority.Normal, "", "",
                     voicename,
                     volume,
                     rate,
                     effects);

            if (cfg.ShowDialog(discoveryform) == DialogResult.OK)
            {
                SetPeristentGlobal(ActionSay.globalvarspeechvoice, cfg.VoiceName);
                SetPeristentGlobal(ActionSay.globalvarspeechvolume, cfg.Volume);
                SetPeristentGlobal(ActionSay.globalvarspeechrate, cfg.Rate);
                SetPeristentGlobal(ActionSay.globalvarspeecheffects, cfg.Effects.ToString());

                EDDConfig.Instance.DefaultVoiceDevice = AudioQueueSpeech.Driver.GetAudioEndpoint();
            }
        }
Пример #2
0
        public bool RemoveRootNode(IFrameworkItem frameworkItem)
        {
            var localItemPrincipals = frameworkItem as VulcanEngine.IR.Ast.Table.AstPrincipalNode;

            if (localItemPrincipals != null)
            {
                return(Principals.Remove(localItemPrincipals));
            }
            var localItemSchemas = frameworkItem as VulcanEngine.IR.Ast.Table.AstSchemaNode;

            if (localItemSchemas != null)
            {
                return(Schemas.Remove(localItemSchemas));
            }
            var localItemTemplates = frameworkItem as VulcanEngine.IR.Ast.AstTemplateNode;

            if (localItemTemplates != null)
            {
                return(Templates.Remove(localItemTemplates));
            }
            var localItemPersistentVariables = frameworkItem as VulcanEngine.IR.Ast.PersistentVariables.AstPersistentVariableNode;

            if (localItemPersistentVariables != null)
            {
                return(PersistentVariables.Remove(localItemPersistentVariables));
            }
            var localItemPackages = frameworkItem as VulcanEngine.IR.Ast.Task.AstPackageBaseNode;

            if (localItemPackages != null)
            {
                return(Packages.Remove(localItemPackages));
            }
            var localItemConnections = frameworkItem as VulcanEngine.IR.Ast.Connection.AstConnectionNode;

            if (localItemConnections != null)
            {
                return(Connections.Remove(localItemConnections));
            }
            var localItemDimensions = frameworkItem as VulcanEngine.IR.Ast.Dimension.AstDimensionNode;

            if (localItemDimensions != null)
            {
                return(Dimensions.Remove(localItemDimensions));
            }
            var localItemFacts = frameworkItem as VulcanEngine.IR.Ast.Fact.AstFactNode;

            if (localItemFacts != null)
            {
                return(Facts.Remove(localItemFacts));
            }
            var localItemTables = frameworkItem as VulcanEngine.IR.Ast.Table.AstTableBaseNode;

            if (localItemTables != null)
            {
                return(Tables.Remove(localItemTables));
            }
            return(false);
        }
Пример #3
0
 void Awake()
 {
     if (i == null)
     {
         i = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #4
0
        public void CloseDown()
        {
            SQLiteConnectionUser.PutSettingString("UserGlobalActionVars", PersistentVariables.ToString());

            audioqueuespeech.StopAll();
            audioqueuewave.StopAll();
            audioqueuespeech.Dispose();     // in order..
            audiodriverspeech.Dispose();
            audioqueuewave.Dispose();
            audiodriverwave.Dispose();

            inputdevicesactions.Stop();
            inputdevices.Clear();
        }
Пример #5
0
        public void CloseDown()
        {
            SQLiteConnectionUser.PutSettingString("UserGlobalActionVars", PersistentVariables.ToString());

            audioqueuespeech.StopAll();
            audioqueuewave.StopAll();
            audioqueuespeech.Dispose();     // in order..
            audiodriverspeech.Dispose();
            audioqueuewave.Dispose();
            audiodriverwave.Dispose();

            inputdevicesactions.Stop();
            inputdevices.Clear();

            voicerecon.Close();

            System.Diagnostics.Debug.WriteLine(Environment.TickCount % 10000 + " AC Closedown complete");
        }
Пример #6
0
        public void ConfigureWave(string title)
        {
            string             volume  = Globals.GetString(ActionPlay.globalvarplayvolume, "60");
            ConditionVariables effects = new ConditionVariables(PersistentVariables.GetString(ActionPlay.globalvarplayeffects, ""), ConditionVariables.FromMode.MultiEntryComma);

            ExtendedAudioForms.WaveConfigureDialog dlg = new ExtendedAudioForms.WaveConfigureDialog();
            dlg.Init(AudioQueueWave, true,
                     "Select Default device, volume and effects", title, this.Icon,
                     "",
                     false, AudioExtensions.AudioQueue.Priority.Normal, "", "",
                     volume, effects);

            if (dlg.ShowDialog(discoveryform) == DialogResult.OK)
            {
                ConditionVariables cond = new ConditionVariables(dlg.Effects);// add on any effects variables (and may add in some previous variables, since we did not purge)

                SetPeristentGlobal(ActionPlay.globalvarplayvolume, dlg.Volume);
                SetPeristentGlobal(ActionPlay.globalvarplayeffects, dlg.Effects.ToString());

                EDDConfig.Instance.DefaultWaveDevice = AudioQueueWave.Driver.GetAudioEndpoint();
            }
        }
Пример #7
0
 public void CloseDown()
 {
     actionrunasync.WaitTillFinished(10000);
     SQLiteConnectionUser.PutSettingString("UserGlobalActionVars", PersistentVariables.ToString());
 }