BLL.ComputerBootMenu.GetComputerNonProxyPath C# (CSharp) Method

GetComputerNonProxyPath() public static method

public static GetComputerNonProxyPath ( Models computer, bool isActiveOrCustom ) : string
computer Models
isActiveOrCustom bool
return string
        public static string GetComputerNonProxyPath(Models.Computer computer, bool isActiveOrCustom)
        {
            var mode = Settings.PxeMode;
            var pxeComputerMac = Utility.MacToPxeMac(computer.Mac);
            string path;

            var fileName = isActiveOrCustom ? pxeComputerMac : "default";

            if (mode.Contains("ipxe"))
                path = Settings.TftpPath + "pxelinux.cfg" + Path.DirectorySeparatorChar +
                       fileName + ".ipxe";
            else if (mode.Contains("grub"))
            {

                if (isActiveOrCustom)
                {
                    path = Settings.TftpPath + "pxelinux.cfg" + Path.DirectorySeparatorChar +
                      pxeComputerMac + ".cfg";
                }
                else
                {
                    path = Settings.TftpPath + "grub" + Path.DirectorySeparatorChar
                      + "grub.cfg";
                }

            }
            else
                path = Settings.TftpPath + "pxelinux.cfg" + Path.DirectorySeparatorChar +
                       fileName;

            return path;
        }