コード例 #1
0
        public TheJawaToolboxPlugin()
        {
            Information = new PluginInformation("The Jawa Toolbox"
                                                , "An SWG Client development toolbox"
                                                , "Timbab");

            Log.Info("Created: The Jawa Toolbox");

            ini = new UtINI(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\settings.ini");

            forms.Add(new FormObjectBrowser(this));

            panels.Add(new SubPanelContainer("Controls", new SubPanel[]
            {
                new ScenePanel(this, hotkeyManager, ini),
                new SnapshotPanel(this, hotkeyManager, ini),
                new PlayerPanel(hotkeyManager),
                new FreeCamPanel(hotkeyManager),
                new GraphicsPanel(ini),
                new MiscPanel(ini)
            }));

            hotkeyManager.CreateSettings();
            hotkeyManager.Load();
        }
コード例 #2
0
 public static string BuildPath(PluginInformation info)
 {
     var path = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), info.Name);
     if (!Directory.Exists(path))
         Directory.CreateDirectory(path);
     return path;
 }
コード例 #3
0
ファイル: PluginApi.cs プロジェクト: yonglehou/TheBorg
 public PluginApi(
     PluginInformation pluginInformation,
     IReadOnlyCollection <CommandDescription> commandDescriptions)
 {
     _pluginInformation   = pluginInformation;
     _commandDescriptions = commandDescriptions;
 }
コード例 #4
0
        internal void SetPlugin(PluginInformation info)
        {
            plugin      = info;
            PanelActive = info.State != PluginState.Ignored;

            RefreshModInfo();
        }
コード例 #5
0
 public ChangeQueueItem(PluginInformation plugin, string changeType, IEnumerable <string> lines, Action <bool> onComplete)
 {
     Plugin       = plugin;
     ChangeType   = changeType;
     LineEntries  = lines.ToList();
     OnCompletion = onComplete;
 }
コード例 #6
0
 public DisplayableForPlugins(PluginInformation pi)
 {
     plugInfo = pi;
     inFullDescStr = plugInfo.PluginInfo.Name + " v" + plugInfo.PluginInfo.Version +
         "(" + plugInfo.PluginInfo.Author + ")\n" +
         "[" + plugInfo.AssemblyFileName + "] " + plugInfo.PluginInfo.Description;
 }
コード例 #7
0
        void OnEnable()
        {
            mObject  = serializedObject;
            mVersion = serializedObject.FindProperty("Version");
            mKeepCorrectDirectory = serializedObject.FindProperty("KeepCorrectDirectory");

            mInfo = target as PluginInformation;
        }
コード例 #8
0
ファイル: Plugin.cs プロジェクト: ptklatt/Utinni
        public $projectname$Plugin()
        {
            Information = new PluginInformation("$projectname$"
                                                , "This is a $projectname$ Plugin"
                                                , "Plugin Author");

            Log.Info("Created: " + Information.Name);
        }
コード例 #9
0
        private void HandleSelectPlugin(PluginInformation plugin)
        {
            Logger.log.Info($"Mod list selected plugin {plugin.Plugin} ({plugin.State})");

            infoController.SetPlugin(plugin);
            controlsController.SetPlugin(plugin);
            if (!infoController.Activated)
            {
                PushViewControllerToNavigationController(naviController, infoController);
            }
        }
コード例 #10
0
        private void UpdatePluginTo(PluginInformation plugin, PluginState newState)
        {
            ChangedCount++;

            if (!changedStates.ContainsKey(plugin))
            {
                changedStates.Add(plugin, plugin.State);
            }
            plugin.State = newState;
            RefreshList();
        }
コード例 #11
0
ファイル: ExampleEditorPlugin.cs プロジェクト: ptklatt/Utinni
        public ExampleEditorPlugin()
        {
            // The only thing that needs to be set up is the PluginInformation and the plugin is good to go
            Information = new PluginInformation("Example Editor Plugin"
                                                , "This is an editor plugin example"
                                                , "Example Author");

            Log.Info("Created: Example Editor Plugin");

            subPanels.Add(new ExampleEditorSubPanel(this));
        }
コード例 #12
0
ファイル: HelpApi.cs プロジェクト: yonglehou/TheBorg
        private async Task <IReadOnlyCollection <HelpDetails> > GetCommandDescriptionAsync(
            PluginInformation pluginInformation,
            CancellationToken cancellationToken)
        {
            var commandDescriptions = await _httpApi.GetAsyncAs <IReadOnlyCollection <CommandDescription> >(
                new Uri(pluginInformation.Uri, "_plugin/commands"),
                cancellationToken)
                                      .ConfigureAwait(false);

            return(commandDescriptions
                   .Select(d => new HelpDetails(d.Regex, d.Help))
                   .ToList());
        }
コード例 #13
0
        public VoicepackCombinerPlugin()
        {
            Debug.WriteLine("VoicepackCombinerPlugin Constructor Called");

            m_pluginInformation = new PluginInformation(
                "Voicepack Combiner",
                "Load multiple voicepacks simultaniously",
                "Emile Vrijdags (aka Frydac)",
                null);
#if DEBUG
            _debugHelpers = new DebugHelpers(VoicepackCombiner);
#endif
        }
コード例 #14
0
ファイル: PluginManager.cs プロジェクト: ByteChkR/ext-pp
        /// <summary>
        /// Returns the plugin info by name. returns false if not containing
        /// </summary>
        /// <param name="pmd">The database that is cached</param>
        /// <param name="name">the name to be searched for</param>
        /// <param name="val">the out variable containing the plugin information(null if not found)</param>
        /// <returns>the success state of the operation</returns>
        public static bool TryGetPluginInfoByName(PluginManagerDatabase pmd, string name, out PluginInformation val)
        {
            for (int i = 0; i < pmd.Cache.Count; i++)
            {
                if (pmd.Cache[i].Name == name)
                {
                    val = pmd.Cache[i];
                    return(true);
                }
            }


            val = new PluginInformation();
            return(false);
        }
コード例 #15
0
ファイル: PluginManager.cs プロジェクト: ByteChkR/ext-pp
        /// <summary>
        /// Returns the plugin info by prefix. returns false if not containing
        /// </summary>
        /// <param name="pmd">The database that is cached</param>
        /// <param name="prefix">The prefix to be searched for</param>
        /// <param name="val">the out variable containing the plugin information(null if not found)</param>
        /// <returns>the success state of the operation</returns>
        public static bool TryGetPluginInfoByPrefix(PluginManagerDatabase pmd, string prefix, out PluginInformation val)
        {
            for (int i = 0; i < pmd.Cache.Count; i++)
            {
                if (pmd.Cache[i].Prefixes.Contains(prefix))
                {
                    val = pmd.Cache[i];
                    return(true);
                }
            }


            val = new PluginInformation();
            return(false);
        }
コード例 #16
0
        /// <summary>
        /// Returns the plugin info by name. returns false if not containing
        /// </summary>
        /// <param name="name"></param>
        /// <param name="val"></param>
        /// <returns></returns>
        public bool GetPluginInfoByName(string name, out PluginInformation val)
        {
            for (int i = 0; i < info.Cache.Count; i++)
            {
                if (info.Cache[i].Name == name)
                {
                    val = info.Cache[i];
                    return(true);
                }
            }


            val = new PluginInformation();
            return(false);
        }
コード例 #17
0
        /// <summary>
        /// Returns the plugin info by prefix. returns false if not containing
        /// </summary>
        /// <param name="prefix"></param>
        /// <param name="val"></param>
        /// <returns></returns>
        public bool GetPluginInfoByPrefix(string prefix, out PluginInformation val)
        {
            for (int i = 0; i < info.Cache.Count; i++)
            {
                if (info.Cache[i].Prefixes.Contains(prefix))
                {
                    val = info.Cache[i];
                    return(true);
                }
            }


            val = new PluginInformation();
            return(false);
        }
コード例 #18
0
 public Checker()
 {
     info = new PluginInformation()
     {
         Name        = "IL Protector",
         Description = "Version Checker for IL Protector",
         Publisher   = "li0nsar3c00l",
         Version     = new Version(1, 0, 0, 0),
         Intervall   = new TimeSpan(0, 1, 0)
     };
     siteInfo = new PluginSiteInformation()
     {
         BaseUrl      = "http://www.vgrsoft.com/Products/ILProtector",
         InstallerUrl = "http://www.vgrsoft.com/Download/ilprotector_install.zip"
     };
 }
コード例 #19
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly = typeof(JokesPluginBootstrapper).Assembly;

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("Jokes"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides jokes"),
                                           r.Uri));
                r.RegisterHttpApi(new JokesApi(r.ConfigApi, r.HttpApi, r.MessageApi));
                r.RegisterHttpApiCommands();
            });
        }
コード例 #20
0
 public Checker()
 {
     info = new PluginInformation()
     {
         Name        = "Agile.NET",
         Description = "Version Checker for Agile.NET",
         Publisher   = "li0nsar3c00l",
         Version     = new Version(1, 0, 0, 0),
         Intervall   = new TimeSpan(0, 1, 0)
     };
     siteInfo = new PluginSiteInformation()
     {
         BaseUrl      = "http://secureteam.net",
         InstallerUrl = "http://secureteam.net/AgileDotNetInstaller.exe"
     };
 }
コード例 #21
0
 public Checker()
 {
     info = new PluginInformation()
     {
         Name = "IL Protector",
         Description = "Version Checker for IL Protector",
         Publisher = "li0nsar3c00l",
         Version = new Version(1, 0, 0, 0),
         Intervall = new TimeSpan(0, 1, 0)
     };
     siteInfo = new PluginSiteInformation()
     {
         BaseUrl = "http://www.vgrsoft.com/Products/ILProtector",
         InstallerUrl = "http://www.vgrsoft.com/Download/ilprotector_install.zip"
     };
 }
コード例 #22
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly = typeof(HelpPluginBootstrapper).Assembly;

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("Help"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides help for the Borg"),
                                           r.Uri));
                r.RegisterHttpApi(new HelpApi(r.HttpApi, r.MessageApi, r.PluginApi));
                r.RegisterHttpApiCommands();
            });
        }
コード例 #23
0
 public Checker()
 {
     info = new PluginInformation()
     {
         Name = "Agile.NET",
         Description = "Version Checker for Agile.NET",
         Publisher = "li0nsar3c00l",
         Version = new Version(1, 0, 0, 0),
         Intervall = new TimeSpan(0, 1, 0)
     };
     siteInfo = new PluginSiteInformation()
     {
         BaseUrl = "http://secureteam.net",
         InstallerUrl = "http://secureteam.net/AgileDotNetInstaller.exe"
     };
 }
コード例 #24
0
 public Checker()
 {
     info = new PluginInformation()
     {
         Name        = "Crypto Obfuscator",
         Description = "Version Checker for Crypto OBfuscator",
         Publisher   = "li0nsar3c00l",
         Version     = new Version(1, 0, 0, 0),
         Intervall   = new TimeSpan(0, 1, 0)
     };
     siteInfo = new PluginSiteInformation()
     {
         BaseUrl      = "http://www.ssware.com/cryptoobfuscator/obfuscator-net.htm",
         InstallerUrl = "http://www.ssware.com/cgi-bin/vrd.cgi?u=cryptoobfuscator/cryptoobfuscator.exe"
     };
 }
コード例 #25
0
        public void Start(Action <Action <IPluginRegistration> > pluginRegistra)
        {
            pluginRegistra(r =>
            {
                var assembly            = typeof(GitHubPluginBootstrapper).Assembly;
                var gitHubClientFactory = new GitHubClientFactory(r.ConfigApi);
                var gitHubService       = new GitHubService(gitHubClientFactory);

                r.SetPluginInformation(PluginInformation.With(
                                           PluginId.From(assembly),
                                           PluginTitle.With("GitHub"),
                                           PluginVersion.From(assembly),
                                           PluginDescription.With("Provides GitHub support for the Borg"),
                                           r.Uri));
                r.RegisterHttpApi(new GitHubApi(r.MessageApi, gitHubService));
                r.RegisterHttpApiCommands();
            });
        }
コード例 #26
0
        private Action <bool> GetDisableConfirmCallback(PluginInformation plugin, IEnumerable <PluginMetadata> deps, StateTransitionTransaction transaction, Action afterConfirm = null)
        {
            IEnumerator <(PluginInformation plugin, string type, IEnumerable <string> lines, Action <bool> completion)> StateMachine()
            {
                // this is first called *after* the initial confirmation
                // here, we want to go throught the deps and try enabling or request a confirmation for it

                foreach (var dep in deps)
                {
                    var depInfo = GetPluginInformation(dep);

                    if (transaction.Disable(dep, out var depDeps))
                    {
                        UpdatePluginTo(depInfo, PluginState.Disabled);
                    }
                    else
                    {
                        if (depDeps == null)
                        {
                            Logger.log.Warn($"{dep.Name} is already enabled; how did we get here?");
                        }
                        else
                        {
                            yield return(depInfo, DisableType, BuildMetadataLines(depDeps),
                                         GetDisableConfirmCallback(depInfo, depDeps, transaction));
                        }
                    }
                }

                // once we've processed everything, we're done, we can enable our thing now
                transaction.Disable(plugin.Plugin, true);
                UpdatePluginTo(plugin, PluginState.Disabled);

                afterConfirm?.Invoke();
            }

            return(CreateConfirmationStateMachineExecutor(StateMachine()));
        }
コード例 #27
0
ファイル: SettingsForm.cs プロジェクト: totpero/aimp_dotnet
 public DisplayableForPlugins(PluginInformation pi)
 {
     plugInfo = pi;
 }
コード例 #28
0
 public PropertiesViewModel(PluginInformation pluginInformation)
 {
     PluginInformation = pluginInformation;
 }
コード例 #29
0
 public void SetPlugin(PluginInformation plugin)
 {
     this.plugin = plugin;
     NotifyPluginChanged();
 }
コード例 #30
0
 public static string BuildSaveName(PluginInformation info, DateTime date, string optional)
 {
     return string.Format("{0} {1} Installer{2}", date.ToString("yyyy-MM-dd"), info.Name, string.IsNullOrWhiteSpace(optional) ? ".exe" : optional);
 }
コード例 #31
0
 public static string BuildSavePath(PluginInformation info, DateTime date, string optional = null)
 {
     return Path.Combine(BuildPath(info), BuildSaveName(info, date, optional));
 }
コード例 #32
0
 public ProjectPropertiesWindow(PluginInformation pluginInformation)
 {
     InitializeComponent();
     DataContext = new PropertiesViewModel(pluginInformation);
 }
コード例 #33
0
 public IPluginRegistration SetPluginInformation(PluginInformation pluginInformation)
 {
     PluginInformation = pluginInformation;
     return(this);
 }
コード例 #34
0
 public CustomAchievementImagesBase()
 {
     m_pluginInformation = new PluginInformation("Custom Achievement Images",
     "Dynamic replacement of achievement overlay images.", "ultimawep", null);
     m_guid = new Guid("1B6638F0-B1D0-4BC0-AC9F-5793F0291735");
 }
コード例 #35
0
 public DisplayableForPlugins(PluginInformation pi)
 {
     plugInfo = pi;
 }
コード例 #36
0
 public MyPluginBase()
 {
     m_pluginInformation = new PluginInformation("Web Overlay",
     "Enables a web based overlay similar to ingame", "ultimawep", null);
     m_guid = new Guid("97134778-B5FF-4AA2-8668-F17FA4080E66");
 }
コード例 #37
0
 public void QueueChange(PluginInformation plugin, string type, IEnumerable <string> lines, Action <bool> completion)
 {
     siraLog.Debug($"Change queued: {plugin.Plugin.Name} {type} {string.Join(",", lines)}");
     changeQueue.Enqueue(new ChangeQueueItem(plugin, type, lines, completion));
     TryProcessNextChange();
 }