Example #1
0
        private void WriteIcons()
        {
            if (!string.IsNullOrEmpty(_package.ProductIcon))
            {
                Write("Property", "ARPPRODUCTICON", "ProductIcon");
                _connection.ExecuteStream("Icon", _package.ProductIcon, "ProductIcon");
            }

            var shortcuts = _package.Files.Select(x => x.ShortcutIcon)
                            .Where(x => !string.IsNullOrEmpty(x))
                            .Select(x => x.Trim().ToLowerInvariant())
                            .Distinct();

            foreach (string shortcut in shortcuts)
            {
                _connection.ExecuteStream("Icon", shortcut, _ids[shortcut] + ".ico");
            }
        }