示例#1
0
        public System.Windows.Forms.Control Show_Info(sFile file)
        {
            if (file.name.EndsWith(".acl"))
            {
                PaletteBase palette = new RawPalette(file.path, file.id, true, 0, -1, file.name);
                pluginHost.Set_Palette(palette);
                return(new PaletteControl(pluginHost));
            }

            if (file.name.EndsWith(".acg"))
            {
                ColorFormat depth = (pluginHost.Get_Palette().Loaded ? pluginHost.Get_Palette().Depth : ColorFormat.colors256);
                ImageBase   image = new RawImage(file.path, file.id, TileForm.Horizontal, depth, true, 0, -1, file.name);
                pluginHost.Set_Image(image);
                return(new ImageControl(pluginHost, false));
            }

            if (file.name.EndsWith(".asc"))
            {
                MapBase map = new Naruto_ASC(file);
                pluginHost.Set_Map(map);
                return(new ImageControl(pluginHost, true));
            }

            return(new System.Windows.Forms.Control());
        }
示例#2
0
        public System.Windows.Forms.Control Show_Info(sFile file)
        {
            if (file.name.EndsWith(".acl"))
            {
                PaletteBase palette = new RawPalette(file.path, file.id, true, 0, -1, file.name);
                pluginHost.Set_Palette(palette);
                return new PaletteControl(pluginHost);
            }

            if (file.name.EndsWith(".acg"))
            {
                ColorFormat depth = (pluginHost.Get_Palette().Loaded ? pluginHost.Get_Palette().Depth : ColorFormat.colors256);
                ImageBase image = new RawImage(file.path, file.id, TileForm.Horizontal, depth, true, 0, -1, file.name);
                pluginHost.Set_Image(image);
                return new ImageControl(pluginHost, false);
            }

            if (file.name.EndsWith(".asc"))
            {
                MapBase map = new Naruto_ASC(file);
                pluginHost.Set_Map(map);
                return new ImageControl(pluginHost, true);
            }

            return new System.Windows.Forms.Control();
        }