Skip to content

Commit

Permalink
Signed-off-by: ccawley2011
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 committed Jun 4, 2016
1 parent 635e540 commit c2e71ee
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions Plugins/Common/Common/Common.csproj
Expand Up @@ -81,6 +81,7 @@
<DependentUpon>BasicControl.cs</DependentUpon>
</Compile>
<Compile Include="Imagen\BMP.cs" />
<Compile Include="Imagen\GIF.cs" />
<Compile Include="Imagen\JPG.cs" />
<Compile Include="Imagen\PNG.cs" />
<Compile Include="Imagen\TGA.cs" />
Expand Down
49 changes: 49 additions & 0 deletions Plugins/Common/Common/Imagen/GIF.cs
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2011 pleoNeX
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Programador: pleoNeX
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ekona;
using System.Windows.Forms;
using System.Drawing;
using System.IO;

namespace Common
{
class GIF
{
string archivo;
IPluginHost pluginHost;

public GIF(IPluginHost pluginHost, string archivo)
{
this.pluginHost = pluginHost;
this.archivo = archivo;
}


public Control Show_Info()
{
return new BasicControl(archivo, pluginHost);
}

}
}
4 changes: 3 additions & 1 deletion Plugins/Common/Common/Main.cs
Expand Up @@ -34,7 +34,7 @@ public Format Get_Format(sFile file, byte[] magic)
{
string ext = new String(Encoding.ASCII.GetChars(magic));

if (file.name.ToUpper().EndsWith(".TGA") || file.name.ToUpper().EndsWith(".JPG") || file.name.ToUpper().EndsWith(".PNG"))
if (file.name.ToUpper().EndsWith(".TGA") || file.name.ToUpper().EndsWith(".GIF") || file.name.ToUpper().EndsWith(".JPG") || file.name.ToUpper().EndsWith(".PNG"))
return Format.FullImage;
else if (file.name.ToUpper().EndsWith(".BMP") && magic[0] == 'B' && magic[1] == 'M')
return Format.FullImage;
Expand Down Expand Up @@ -62,6 +62,8 @@ public Control Show_Info(sFile file)
return new TGA(pluginHost, file.path).Show_Info();
else if (file.name.ToUpper().EndsWith(".JPG"))
return new JPG(pluginHost, file.path).Show_Info();
else if (file.name.ToUpper().EndsWith(".GIF"))
return new GIF(pluginHost, file.path).Show_Info();
else if (file.name.ToUpper().EndsWith(".PNG"))
return new PNG(pluginHost, file.path).Show_Info();
else if (file.name.ToUpper().EndsWith(".WAV") || ext == "RIFF")
Expand Down
5 changes: 3 additions & 2 deletions Plugins/TXT/TXT/TXT.cs
Expand Up @@ -43,13 +43,14 @@ public Format Get_Format(sFile file, byte[] magic)
if ((file.name.EndsWith("LZ.TXT") || file.name.EndsWith("LZ.XML")) && magic[0] == 0x10)
return Format.Unknown;

if (file.name.EndsWith(".TXT") || file.name.EndsWith(".XML")
if (file.name.EndsWith(".TXT") || file.name.EndsWith(".XML") || file.name.EndsWith(".DTD")
|| file.name.EndsWith(".INI") || file.name.EndsWith(".H") || file.name.EndsWith(".XSADL")
|| file.name.EndsWith(".BAT") || file.name.EndsWith(".SARC") || file.name.EndsWith(".SBDL")
|| file.name.EndsWith(".C") || file.name.EndsWith("MAKEFILE") || file.name.EndsWith(".BSF")
|| file.name.EndsWith(".LUA") || file.name.EndsWith(".CSV") || file.name.EndsWith(".SMAP")
|| file.name.EndsWith("BUILDTIME") || file.name.EndsWith(".LUA~") || file.name.EndsWith(".INI.TEMPLATE")
|| file.name.EndsWith("LUA.BAK") || file.name.EndsWith(".NAIX") || file.name.EndsWith(".NBSD"))
|| file.name.EndsWith("LUA.BAK") || file.name.EndsWith(".NAIX") || file.name.EndsWith(".NBSD")
|| file.name.EndsWith(".HTML") || file.name.EndsWith(".CSS") || file.name.EndsWith(".JS"))
return Format.Text;

if (file.name.EndsWith(".SADL") && ext.ToUpper() != "SADL")
Expand Down

0 comments on commit c2e71ee

Please sign in to comment.