EddiSpeechResponder.Personality.Default C# (CSharp) Method

Default() public static method

Obtain the default personality
public static Default ( ) : Personality
return Personality
        public static Personality Default()
        {
            return FromFile(DEFAULT_PATH);
        }

Usage Example

Exemplo n.º 1
0
        private void acceptButtonClick(object sender, RoutedEventArgs e)
        {
            // Update the script
            string newScriptText = string.IsNullOrWhiteSpace(scriptView.Text) ? null : scriptView.Text;

            if (_script != null)
            {
                Script newScript = new Script(scriptName,
                                              scriptDescription,
                                              _script?.Responder ?? false,
                                              newScriptText,
                                              Priority,
                                              _script.defaultValue);
                _script = newScript;
            }

            Script defaultScript = null;

            if (Personality.Default().Scripts?.TryGetValue(_script.Name, out defaultScript) ?? false)
            {
                _script = Personality.UpgradeScript(_script, defaultScript);
            }

            // Might be updating an existing script so remove it from the list before adding
            _scripts.Remove(originalName);

            _scripts.Add(_script.Name, _script);

            DialogResult = true;
            this.Close();
        }
All Usage Examples Of EddiSpeechResponder.Personality::Default