Exemplo n.º 1
0
 static void GenerateiOSDefault(CBIconInfo icons)
 {
     // for iOS
     CBImageInfo info = new CBImageInfo();
     info.DeviceType = DeviceType.iOS;
     info.Width = 57;
     info.Height = 57;
     info.FileName = "icon.png";
     icons.IconDefines.Add(info);
     // for iPhone Retina
     info = new CBImageInfo();
     info.DeviceType = DeviceType.iOS;
     info.Width = 114;
     info.Height = 114;
     info.FileName = "*****@*****.**";
     icons.IconDefines.Add(info);
     // for iPad
     info = new CBImageInfo();
     info.DeviceType = DeviceType.iOS;
     info.Width = 72;
     info.Height = 72;
     info.FileName = "icon-72.png";
     icons.IconDefines.Add(info);
     // for new iPad
     info = new CBImageInfo();
     info.DeviceType = DeviceType.iOS;
     info.Width = 144;
     info.Height = 144;
     info.FileName = "*****@*****.**";
     icons.IconDefines.Add(info);
 }
Exemplo n.º 2
0
        private static string GetIconName(CBImageFile image, CBImageInfo info)
        {
            string fullName = image.DirectoryName + "\\" +
                              info.DeviceType.ToString() + "\\" + info.FileName;

            return(fullName);
        }
Exemplo n.º 3
0
        private static void GenerateAndroidDefault(CBIconInfo icons)
        {
            CBImageInfo info = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width = 36;
            info.Height = 36;
            info.FileName = "drawable-ldpi\\icon.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width = 48;
            info.Height = 48;
            info.FileName = "drawable-mdpi\\icon.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width = 72;
            info.Height = 72;
            info.FileName = "drawable-hdpi\\icon.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width = 135;
            info.Height = 135;
            info.FileName = "SamsungMarket.png";
            icons.IconDefines.Add(info);
        }
Exemplo n.º 4
0
        public static void SaveIcon(CBImageFile image, CBImageInfo info)
        {
            Bitmap newImage = CBImageManager.ResizeImage(image.SourceImage, info.Width, info.Height);
            string fileName = GetIconName(image, info);

            newImage.Save(fileName, ImageFormat.Png);
        }
        private string GetIconName(CBImageInfo info)
        {
            string fullName = m_RootDirectory + "\\" +
                              info.DeviceType.ToString() + "\\" + info.FileName;

            return(fullName);
        }
Exemplo n.º 6
0
        static void GenerateiOSDefault(CBIconInfo icons)
        {
            // for iOS
            CBImageInfo info = new CBImageInfo();

            info.DeviceType = DeviceType.iOS;
            info.Width      = 57;
            info.Height     = 57;
            info.FileName   = "icon.png";
            icons.IconDefines.Add(info);
            // for iPhone Retina
            info            = new CBImageInfo();
            info.DeviceType = DeviceType.iOS;
            info.Width      = 114;
            info.Height     = 114;
            info.FileName   = "*****@*****.**";
            icons.IconDefines.Add(info);
            // for iPad
            info            = new CBImageInfo();
            info.DeviceType = DeviceType.iOS;
            info.Width      = 72;
            info.Height     = 72;
            info.FileName   = "icon-72.png";
            icons.IconDefines.Add(info);
            // for new iPad
            info            = new CBImageInfo();
            info.DeviceType = DeviceType.iOS;
            info.Width      = 144;
            info.Height     = 144;
            info.FileName   = "*****@*****.**";
            icons.IconDefines.Add(info);
        }
Exemplo n.º 7
0
        private static void GenerateWP7Default(CBIconInfo icons)
        {
            CBImageInfo info = new CBImageInfo();

            info.DeviceType = DeviceType.WP7;
            info.Width      = 62;
            info.Height     = 62;
            info.FileName   = "ApplicationIcon.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width      = 173;
            info.Height     = 173;
            info.FileName   = "ApplicationTile.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width      = 99;
            info.Height     = 99;
            info.FileName   = "Market99.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width      = 200;
            info.Height     = 200;
            info.FileName   = "Market200.png";
            icons.IconDefines.Add(info);
        }
Exemplo n.º 8
0
        private static void GenerateAndroidDefault(CBIconInfo icons)
        {
            CBImageInfo info = new CBImageInfo();

            info.DeviceType = DeviceType.Android;
            info.Width      = 36;
            info.Height     = 36;
            info.FileName   = "drawable-ldpi\\icon.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width      = 48;
            info.Height     = 48;
            info.FileName   = "drawable-mdpi\\icon.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width      = 72;
            info.Height     = 72;
            info.FileName   = "drawable-hdpi\\icon.png";
            icons.IconDefines.Add(info);

            info            = new CBImageInfo();
            info.DeviceType = DeviceType.Android;
            info.Width      = 135;
            info.Height     = 135;
            info.FileName   = "SamsungMarket.png";
            icons.IconDefines.Add(info);
        }
Exemplo n.º 9
0
 private static string GetIconName(CBImageFile image, CBImageInfo info)
 {
     string fullName = image.DirectoryName + "\\" +
         info.DeviceType.ToString() + "\\" + info.FileName;
     return fullName;
 }
Exemplo n.º 10
0
 public static void SaveIcon(CBImageFile image, CBImageInfo info)
 {
     Bitmap newImage = CBImageManager.ResizeImage(image.SourceImage, info.Width, info.Height);
     string fileName = GetIconName(image, info);
     newImage.Save(fileName, ImageFormat.Png);
 }
Exemplo n.º 11
0
        private static void GenerateWP7Default(CBIconInfo icons)
        {
            CBImageInfo info = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width = 62;
            info.Height = 62;
            info.FileName = "ApplicationIcon.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width = 173;
            info.Height = 173;
            info.FileName = "ApplicationTile.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width = 99;
            info.Height = 99;
            info.FileName = "Market99.png";
            icons.IconDefines.Add(info);

            info = new CBImageInfo();
            info.DeviceType = DeviceType.WP7;
            info.Width = 200;
            info.Height = 200;
            info.FileName = "Market200.png";
            icons.IconDefines.Add(info);
        }
Exemplo n.º 12
0
 private string GetIconName(CBImageInfo info)
 {
     string fullName = m_RootDirectory + "\\" +
         info.DeviceType.ToString() + "\\" + info.FileName;
     return fullName;
 }