withSIX.Play.Core.Options.Entries.ExternalApp.CheckPreRequisites C# (CSharp) Method

CheckPreRequisites() private method

private CheckPreRequisites ( bool mp ) : bool
mp bool
return bool
        bool CheckPreRequisites(bool mp) {
            if (StartupType == StartupType.Disabled)
                return false;

            if (mp) {
                if (StartupType == StartupType.Multiplayer)
                    return false;
            } else {
                if (StartupType == StartupType.Singleplayer)
                    return false;
            }

            var path = Path;
            if (!Directory.Exists(path) && File.Exists(path)) {
                var fileName = System.IO.Path.GetFileName(path);
                if (!string.IsNullOrWhiteSpace(fileName)) {
                    var processes = Tools.ProcessManager.Management.FindProcess(fileName);
                    if (processes.Any())
                        return false;
                }
            }
            return true;
        }
    }