Esempio n. 1
0
    public static void LoadSetTypes()
    {
        Array values = Enum.GetValues(typeof(Enums.eSetType));

        string[] names  = Enum.GetNames(typeof(Enums.eSetType));
        int      length = values.Length;

        I9Gfx.SetTypes = new ExtendedBitmap(length * 30, 30);
        for (int index = 0; index <= length - 1; ++index)
        {
            int x = index * 30;
            using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names[index] + ".png"))
            {
                Size size = extendedBitmap.Size;
                int  num1 = size.Height > 30 ? 1 : 0;
                size = extendedBitmap.Size;
                int num2 = size.Width > 30 ? 1 : 0;
                if ((num1 | num2) != 0)
                {
                    I9Gfx.SetTypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 30, 30);
                }
                else
                {
                    I9Gfx.SetTypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
                }
            }
        }
    }
Esempio n. 2
0
 public static void LoadClasses()
 {
     I9Gfx.Classes = new ExtendedBitmap(DatabaseAPI.Database.EnhancementClasses.Length * 30, 30);
     using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Overlay\\Class.png"))
     {
         for (int index = 0; index <= DatabaseAPI.Database.EnhancementClasses.Length - 1; index++)
         {
             int x = index * 30;
             using (ExtendedBitmap extendedBitmap2 = new ExtendedBitmap(string.Concat(new object[]
             {
                 I9Gfx.ImagePath(),
                 "Classes\\",
                 DatabaseAPI.Database.EnhancementClasses[index].ID,
                 ".png"
             })))
             {
                 I9Gfx.Classes.Graphics.DrawImageUnscaled(extendedBitmap.Bitmap, x, 0);
                 if (extendedBitmap2.Size.Height > 30 | extendedBitmap2.Size.Width > 30)
                 {
                     I9Gfx.Classes.Graphics.DrawImage(extendedBitmap2.Bitmap, x, 0, 30, 30);
                 }
                 else
                 {
                     I9Gfx.Classes.Graphics.DrawImage(extendedBitmap2.Bitmap, x, 0);
                 }
             }
         }
     }
     GC.Collect();
 }
Esempio n. 3
0
    public static void LoadEnhTypes()
    {
        Array values3 = Enum.GetValues(typeof(Enums.eType));

        string[] names3 = Enum.GetNames(typeof(Enums.eType));
        names3[3]      = "HamiO";
        I9Gfx.EnhTypes = new ExtendedBitmap(values3.Length * 30, 30);
        for (int index = 0; index < values3.Length; index++)
        {
            int x = index * 30;
            using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names3[index] + ".png"))
            {
                if (extendedBitmap.Size.Height > 30 | extendedBitmap.Size.Width > 30)
                {
                    I9Gfx.EnhTypes.Graphics.DrawImage(extendedBitmap.Bitmap, x, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhTypes.Graphics.DrawImage(extendedBitmap.Bitmap, x, 0);
                }
            }
        }
        values3         = Enum.GetValues(typeof(Enums.eEnhGrade));
        names3          = Enum.GetNames(typeof(Enums.eEnhGrade));
        I9Gfx.EnhGrades = new ExtendedBitmap(values3.Length * 30, 30);
        for (int index2 = 0; index2 < values3.Length; index2++)
        {
            int x2 = index2 * 30;
            using (ExtendedBitmap extendedBitmap2 = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names3[index2] + ".png"))
            {
                if (extendedBitmap2.Size.Height > 30 | extendedBitmap2.Size.Width > 30)
                {
                    I9Gfx.EnhGrades.Graphics.DrawImage(extendedBitmap2.Bitmap, x2, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhGrades.Graphics.DrawImage(extendedBitmap2.Bitmap, x2, 0);
                }
            }
        }
        values3           = Enum.GetValues(typeof(Enums.eSubtype));
        names3            = Enum.GetNames(typeof(Enums.eSubtype));
        I9Gfx.EnhSpecials = new ExtendedBitmap(values3.Length * 30, 30);
        for (int index3 = 0; index3 < values3.Length; index3++)
        {
            int x3 = index3 * 30;
            using (ExtendedBitmap extendedBitmap3 = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names3[index3] + ".png"))
            {
                if (extendedBitmap3.Size.Height > 30 | extendedBitmap3.Size.Width > 30)
                {
                    I9Gfx.EnhSpecials.Graphics.DrawImage(extendedBitmap3.Bitmap, x3, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhSpecials.Graphics.DrawImage(extendedBitmap3.Bitmap, x3, 0);
                }
            }
        }
    }
Esempio n. 4
0
 public static void LoadBorders()
 {
     I9Gfx.Borders = new ExtendedBitmap(DatabaseAPI.Database.Origins.Count * 30, 180);
     for (int index1 = 0; index1 <= DatabaseAPI.Database.Origins.Count - 1; ++index1)
     {
         int x = index1 * 30;
         for (int index2 = 0; index2 <= 5; ++index2)
         {
             using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Overlay\\" + DatabaseAPI.Database.Origins[index1].Grades[index2] + ".png"))
             {
                 if (extendedBitmap.Size.Height > 30 | extendedBitmap.Size.Width > 30)
                 {
                     I9Gfx.Borders.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 30 * index2, 30, 30);
                 }
                 else
                 {
                     I9Gfx.Borders.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 30 * index2);
                 }
             }
         }
     }
 }
Esempio n. 5
0
 public static void LoadArchetypeImages()
 {
     I9Gfx.Archetypes = new ExtendedBitmap(DatabaseAPI.Database.Classes.Length * 16, 16);
     for (int index = 0; index <= DatabaseAPI.Database.Classes.Length - 1; ++index)
     {
         int    x   = index * 16;
         string str = I9Gfx.GetOriginsPath() + DatabaseAPI.Database.Classes[index].ClassName + ".png";
         if (!File.Exists(str))
         {
             str = I9Gfx.ImagePath() + "Unknown.png";
         }
         using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(str))
         {
             if (extendedBitmap.Size.Height > 16 | extendedBitmap.Size.Width > 16)
             {
                 I9Gfx.Archetypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 16, 16);
             }
             else
             {
                 I9Gfx.Archetypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
             }
         }
     }
 }
Esempio n. 6
0
 public static void LoadClasses()
 {
     I9Gfx.Classes = new ExtendedBitmap(DatabaseAPI.Database.EnhancementClasses.Length * 30, 30);
     using (ExtendedBitmap extendedBitmap1 = new ExtendedBitmap(I9Gfx.ImagePath() + "Overlay\\Class.png"))
     {
         for (int index = 0; index <= DatabaseAPI.Database.EnhancementClasses.Length - 1; ++index)
         {
             int x = index * 30;
             using (ExtendedBitmap extendedBitmap2 = new ExtendedBitmap(I9Gfx.ImagePath() + "Classes\\" + DatabaseAPI.Database.EnhancementClasses[index].ID + ".png"))
             {
                 I9Gfx.Classes.Graphics.DrawImageUnscaled((Image)extendedBitmap1.Bitmap, x, 0);
                 if (extendedBitmap2.Size.Height > 30 | extendedBitmap2.Size.Width > 30)
                 {
                     I9Gfx.Classes.Graphics.DrawImage((Image)extendedBitmap2.Bitmap, x, 0, 30, 30);
                 }
                 else
                 {
                     I9Gfx.Classes.Graphics.DrawImage((Image)extendedBitmap2.Bitmap, x, 0);
                 }
             }
         }
     }
     GC.Collect();
 }
Esempio n. 7
0
 public static void LoadPowersetImages()
 {
     I9Gfx.Powersets = new ExtendedBitmap(DatabaseAPI.Database.Powersets.Length * 16, 16);
     for (int index = 0; index <= DatabaseAPI.Database.Powersets.Length - 1; index++)
     {
         int    x   = index * 16;
         string str = I9Gfx.GetPowersetsPath() + DatabaseAPI.Database.Powersets[index].ImageName;
         if (!File.Exists(str))
         {
             str = I9Gfx.ImagePath() + "Unknown.png";
         }
         using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(str))
         {
             if (extendedBitmap.Size.Height > 16 | extendedBitmap.Size.Width > 16)
             {
                 I9Gfx.Powersets.Graphics.DrawImage(extendedBitmap.Bitmap, x, 0, 16, 16);
             }
             else
             {
                 I9Gfx.Powersets.Graphics.DrawImage(extendedBitmap.Bitmap, x, 0);
             }
         }
     }
 }
Esempio n. 8
0
 public static string GetOriginsPath()
 {
     return(I9Gfx.ImagePath() + "OriginAT\\");
 }
Esempio n. 9
0
 public static string GetEnhancementsPath()
 {
     return(I9Gfx.ImagePath() + "Enhancements\\");
 }
Esempio n. 10
0
 public static string GetPowersetsPath()
 {
     return(I9Gfx.ImagePath() + "Powersets\\");
 }
Esempio n. 11
0
 public static string GetRecipeName()
 {
     return(I9Gfx.ImagePath() + "Overlay\\Recipe.png");
 }
Esempio n. 12
0
    public static void LoadEnhTypes()
    {
        Array values1 = Enum.GetValues(typeof(Enums.eType));

        string[] names1 = Enum.GetNames(typeof(Enums.eType));
        names1[3]      = "HamiO";
        I9Gfx.EnhTypes = new ExtendedBitmap(values1.Length * 30, 30);
        for (int index = 0; index < values1.Length; ++index)
        {
            int x = index * 30;
            using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names1[index] + ".png"))
            {
                Size size = extendedBitmap.Size;
                int  num1 = size.Height > 30 ? 1 : 0;
                size = extendedBitmap.Size;
                int num2 = size.Width > 30 ? 1 : 0;
                if ((num1 | num2) != 0)
                {
                    I9Gfx.EnhTypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhTypes.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
                }
            }
        }
        Array values2 = Enum.GetValues(typeof(Enums.eEnhGrade));

        string[] names2 = Enum.GetNames(typeof(Enums.eEnhGrade));
        I9Gfx.EnhGrades = new ExtendedBitmap(values2.Length * 30, 30);
        for (int index = 0; index < values2.Length; ++index)
        {
            int x = index * 30;
            using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names2[index] + ".png"))
            {
                Size size = extendedBitmap.Size;
                int  num1 = size.Height > 30 ? 1 : 0;
                size = extendedBitmap.Size;
                int num2 = size.Width > 30 ? 1 : 0;
                if ((num1 | num2) != 0)
                {
                    I9Gfx.EnhGrades.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhGrades.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
                }
            }
        }
        Array values3 = Enum.GetValues(typeof(Enums.eSubtype));

        string[] names3 = Enum.GetNames(typeof(Enums.eSubtype));
        I9Gfx.EnhSpecials = new ExtendedBitmap(values3.Length * 30, 30);
        for (int index = 0; index < values3.Length; ++index)
        {
            int x = index * 30;
            using (ExtendedBitmap extendedBitmap = new ExtendedBitmap(I9Gfx.ImagePath() + "Sets\\" + names3[index] + ".png"))
            {
                Size size = extendedBitmap.Size;
                int  num1 = size.Height > 30 ? 1 : 0;
                size = extendedBitmap.Size;
                int num2 = size.Width > 30 ? 1 : 0;
                if ((num1 | num2) != 0)
                {
                    I9Gfx.EnhSpecials.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0, 30, 30);
                }
                else
                {
                    I9Gfx.EnhSpecials.Graphics.DrawImage((Image)extendedBitmap.Bitmap, x, 0);
                }
            }
        }
    }