Example #1
0
        public DFAEventSourceConfigPanel(DFAEventSource source)
        {
            InitializeComponent();
            this.source = source;
            this.config = source.Config;
            //traceWindow = source.TraceWindow;

            SetupControlProperties();

            source.ffxivPluginNetworkReceivedDelegate -= MessageReceived;
            source.ffxivPluginNetworkReceivedDelegate += MessageReceived;
        }
Example #2
0
        public static DFAEventSourceConfig LoadConfig(IPluginConfig pluginConfig)
        {
            /**
             * Now Renameing Key "DFA" to "qitana.DFA" started v2.1.1
             * In future release,  Load "DFA" section will remove.
             */

            var     result = new DFAEventSourceConfig();
            JObject obj    = null;

            if (pluginConfig.EventSourceConfigs.ContainsKey("qitana.DFA"))
            {
                obj = pluginConfig.EventSourceConfigs["qitana.DFA"];
            }
            else if (pluginConfig.EventSourceConfigs.ContainsKey("DFA"))
            {
                obj = pluginConfig.EventSourceConfigs["DFA"];
            }

            if (obj != null)
            {
                if (obj.TryGetValue("StructuresURL", out JToken structuresURL))
                {
                    result.StructuresURL = structuresURL.ToString();
                }

                if (obj.TryGetValue("TextToSpeech", out JToken textToSpeech))
                {
                    result.TextToSpeech = textToSpeech.ToString();
                }

                if (obj.TryGetValue("Structures", out JToken structures))
                {
                    result.Structures = structures.ToObject <List <Structure> >();
                }
            }

            return(result);
        }
 public override void LoadConfig(IPluginConfig config)
 {
     Config = DFAEventSourceConfig.LoadConfig(config);
 }