Пример #1
0
        private static KeyValuePair <string, string> ProcessNotInModFile(string source, ModConfiguration mod)
        {
            //      When selecting file items, no issue if within mod prefix.
            //If within Artemis copy, test if dependent mods and only dependent mods are active: no issue.
            //Otherwise auto copy selected file into current mod.
            string retVal = source;

            string alternatePrefix = null;

            if (mod != null && !string.IsNullOrEmpty(source))
            {
                alternatePrefix = ModManagement.IsInModPathOrDependencyPath(source, mod);

                if (alternatePrefix != null)
                {
                    retVal = source;

                    //Need a way to pass back temporary alternate prefix for this.

                    //Need what InstalledPath of matching Mod to get prefix.
                }
                else
                {
                    //If not among dependent list, copy file in as below.
                    retVal = DoFileDialog(source, mod.InstalledPath);
                }
            }
            return(new KeyValuePair <string, string>(retVal, alternatePrefix));
        }