Commit 343679dc authored by 花桃白音's avatar 花桃白音

pickup

parent a31003f7
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/cardvisa/obj/Debug
.vs
/cardvisa/bin/打包器v3.3.2/Debug
/.vs/cardvisa/v17/.suo
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)
...@@ -508,7 +509,7 @@ namespace cardvisa ...@@ -508,7 +509,7 @@ namespace cardvisa
} }
public bool CompressImage(string sourcePath, string targetPath, int quality = 75, int maxsize = 120, bool sfsc = true, int rar4x = 2) public bool CompressImage(string sourcePath, string targetPath, int quality = 75, int maxsize = 120, bool sfsc = true, int rar4x = 2)
{ {
FileInfo firstFileInfo = new FileInfo(sourcePath); FileInfo firstFileInfo = new FileInfo(sourcePath);
if (sfsc == true && firstFileInfo.Length < maxsize * 1024) if (sfsc == true && firstFileInfo.Length < maxsize * 1024)
{ {
...@@ -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))
{ {
...@@ -745,7 +747,14 @@ namespace cardvisa ...@@ -745,7 +747,14 @@ namespace cardvisa
} }
else else
{ {
StreamCopy(fsinfo.FullName, pathtemp); if (flag == "text")
{
StreamCopy(fsinfo.FullName, pathtemp.Replace(".txt"," new.txt"));
}
else
{
StreamCopy(fsinfo.FullName, pathtemp);
}
} }
} }
break; break;
...@@ -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))
{ {
......
namespace cardvisa
{
partial class MusicGame
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// MusicGame
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Name = "MusicGame";
this.Text = "MusicGame";
this.Load += new System.EventHandler(this.MusicGame_Load);
this.ResumeLayout(false);
}
#endregion
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace cardvisa
{
public partial class MusicGame : Form
{
public MusicGame()
{
InitializeComponent();
}
List<PictureBox> pictureBoxes = new List<PictureBox>();
private void MusicGame_Load(object sender, EventArgs e)
{
CreateSprite("\\res\\hakunefish.png");
Thread thd = new Thread(() => {
int count = 0;
while (count <300)
{
Thread.Sleep(25);
count = GamePlay(count);
}
});
thd.Start();
}
private void CreateSprite(string path)
{
PictureBox pictureBox = new PictureBox();
pictureBox.Location = new Point(0, 300);
pictureBox.Size = new Size(100, 100);
pictureBox.SizeMode = PictureBoxSizeMode.Zoom;
pictureBox.BackColor = Color.Transparent;
pictureBox.Image = Image.FromFile(Application.StartupPath + path);
pictureBox.Click += (object sender, EventArgs e)=>{
PictureBox pbn = sender as PictureBox;
pbn.Location = new Point(pbn.Location.X,pbn.Location.Y - 10);
};
Controls.Add(pictureBox);
pictureBoxes.Add(pictureBox);
}
private int GamePlay(int count)
{
if (InvokeRequired)
{
BeginInvoke(new Func<int,int>(GamePlay),count);
}
else
{
PictureBox pic = pictureBoxes[0];
pic.Location = new Point(pic.Location.X + 1, pic.Location.Y);
}
return count + 1;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
...@@ -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