Commit cb24746b authored by 花桃白音's avatar 花桃白音

png to jpg,txt add new

parent e135e464
No preview for this file type
...@@ -25,6 +25,7 @@ using System.Threading; ...@@ -25,6 +25,7 @@ using System.Threading;
using System.Web; using System.Web;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml.Linq; using System.Xml.Linq;
using System.Xml.XPath;
using cardvisa.Properties; using cardvisa.Properties;
using NLua; using NLua;
...@@ -238,8 +239,8 @@ namespace cardvisa ...@@ -238,8 +239,8 @@ namespace cardvisa
} }
else else
{ {
MusicGame mg = new MusicGame(); //MusicGame mg = new MusicGame();
mg.Show(); //mg.Show();
} }
} }
private void button6_Click(object sender, EventArgs e) private void button6_Click(object sender, EventArgs e)
...@@ -709,7 +710,7 @@ namespace cardvisa ...@@ -709,7 +710,7 @@ namespace cardvisa
else else
{ {
if (fsinfo.FullName.Contains(".lua") && mode == "ascdb") flag = "script"; if (fsinfo.FullName.Contains(".lua") && mode == "ascdb") flag = "script";
if (fsinfo.FullName.Contains(".jpg") && fsinfo.FullName.Contains("thumbnail") != true) flag = "pics"; if ((fsinfo.FullName.Contains(".jpg") || fsinfo.FullName.Contains(".png")) && fsinfo.FullName.Contains("thumbnail") != true) flag = "pics";
if (fsinfo.FullName.Contains(".txt")) flag = "text"; if (fsinfo.FullName.Contains(".txt")) flag = "text";
if (fsinfo.FullName.Contains(".zip")) flag = "zip"; if (fsinfo.FullName.Contains(".zip")) flag = "zip";
} }
...@@ -736,6 +737,7 @@ namespace cardvisa ...@@ -736,6 +737,7 @@ namespace cardvisa
case "pics": case "pics":
//需要直接复制过去 //需要直接复制过去
string pathtemp = Application.StartupPath + "\\checkout\\" + (allowedfile ? (fsinfo.FullName.Contains("field") ? "pics\\field\\" : flag + "\\") : fsinfo.FullName.Contains(".txt") ? "text\\" : "NotAllowedFiles\\") + fsinfo.Name; string pathtemp = Application.StartupPath + "\\checkout\\" + (allowedfile ? (fsinfo.FullName.Contains("field") ? "pics\\field\\" : flag + "\\") : fsinfo.FullName.Contains(".txt") ? "text\\" : "NotAllowedFiles\\") + fsinfo.Name;
pathtemp = pathtemp.Replace(".png", ".jpg");
DateTime dt = File.GetLastWriteTime(pathtemp); DateTime dt = File.GetLastWriteTime(pathtemp);
if (!File.Exists(pathtemp) || (fsinfo.LastWriteTime > dt)) if (!File.Exists(pathtemp) || (fsinfo.LastWriteTime > dt))
{ {
...@@ -744,10 +746,17 @@ namespace cardvisa ...@@ -744,10 +746,17 @@ namespace cardvisa
CompressImage(fsinfo.FullName, pathtemp); CompressImage(fsinfo.FullName, pathtemp);
} }
else else
{
if (flag == "text")
{
StreamCopy(fsinfo.FullName, pathtemp.Replace(".txt"," new.txt"));
}
else
{ {
StreamCopy(fsinfo.FullName, pathtemp); StreamCopy(fsinfo.FullName, pathtemp);
} }
} }
}
break; break;
case "cdb": case "cdb":
case "zip": case "zip":
...@@ -783,6 +792,7 @@ namespace cardvisa ...@@ -783,6 +792,7 @@ namespace cardvisa
int.TryParse(entry.Name.Replace(Path.GetExtension(entry.Name), "").Replace("c", ""), out icd); int.TryParse(entry.Name.Replace(Path.GetExtension(entry.Name), "").Replace("c", ""), out icd);
allowedfile = cdbh.cardlist.Contains(icd) ? true : false; allowedfile = cdbh.cardlist.Contains(icd) ? true : false;
string tgpath = Application.StartupPath + "\\checkout\\" + (allowedfile ? (entry.FullName.Contains("field") ? "pics\\field\\" : flag2 + "\\") : entry.FullName.Contains(".txt") ? "text\\" : "NotAllowedFiles\\") + entry.Name; string tgpath = Application.StartupPath + "\\checkout\\" + (allowedfile ? (entry.FullName.Contains("field") ? "pics\\field\\" : flag2 + "\\") : entry.FullName.Contains(".txt") ? "text\\" : "NotAllowedFiles\\") + entry.Name;
tgpath = tgpath.Replace(".png",".jpg");
DateTime dtt = File.GetLastWriteTime(tgpath); DateTime dtt = File.GetLastWriteTime(tgpath);
if (!File.Exists(tgpath) || (entry.LastWriteTime.DateTime > dtt)) if (!File.Exists(tgpath) || (entry.LastWriteTime.DateTime > dtt))
{ {
......
...@@ -129,20 +129,11 @@ ...@@ -129,20 +129,11 @@
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="LuaTask.cs" /> <Compile Include="LuaTask.cs" />
<Compile Include="MusicGame.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MusicGame.Designer.cs">
<DependentUpon>MusicGame.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx"> <EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MusicGame.resx">
<DependentUpon>MusicGame.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
......
339baa043802f6ee0f602f013438094fa701c137 641db3d38506e2ab10c9daf783a68ab47b46b7c7
...@@ -39,3 +39,16 @@ D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.csp ...@@ -39,3 +39,16 @@ D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.csp
D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.exe D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.exe
D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.pdb D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.pdb
E:\project\visa\cardvisa\cardvisa\obj\Debug\cardvisa.MusicGame.resources E:\project\visa\cardvisa\cardvisa\obj\Debug\cardvisa.MusicGame.resources
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.csproj.AssemblyReference.cache
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.exe
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.pdb
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.Form1.resources
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.Properties.Resources.resources
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.csproj.GenerateResource.cache
C:\Users\Administrator\source\repos\cardvisa\cardvisa\obj\Debug\cardvisa.csproj.CoreCompileInputs.cache
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\lua54.dll
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\liblua54.dylib
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\liblua54.so
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\cardvisa.exe.config
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\cardvisa.exe
C:\Users\Administrator\source\repos\cardvisa\cardvisa\bin\Debug\cardvisa.pdb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment