Exemple #1
0
        private void RunSpecificScriptOnPacket(object sender, RoutedEventArgs e)
        {
            var scriptView = new ScriptSelectView("Scripts");

            scriptView.ShowDialog();
            var toLoad = scriptView.GetSelectedScripts();

            var provider = new ScriptingProvider();

            provider.LoadScripts(toLoad);

            var items = PacketListView.SelectedItems;

            foreach (var item in items)
            {
                var packet = item as PacketEntry;

                try
                {
                    Scripting_RunOnPacket(packet, provider);
                }
                catch (Exception exc)
                {
                    new ExtendedErrorView(
                        $"Scripting exception thrown for {packet.Message} - {packet.Name}.", exc.ToString(), "Error").ShowDialog();
                    return;
                }
            }
        }
Exemple #2
0
        private void Scripting_SelectScripts(object sender, RoutedEventArgs e)
        {
            var scriptView = new ScriptSelectView("Scripts");

            scriptView.ShowDialog();
            var toLoad = scriptView.GetSelectedScripts();

            ScriptProvider = new ScriptingProvider();
            ScriptProvider.LoadScripts(toLoad);

            _selectedScripts = toLoad;
        }