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

race&race

parent 667ee760
......@@ -2,8 +2,11 @@
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/cardvisa/obj/Debug
*.suo
cardvisa/obj/Debug
.vs
.vs/cardvisa/v17/.suo
/cardvisa/bin/打包器v3.3.2/Debug
/.vs/cardvisa/v17/.suo
/.vs/cardvisa/v17/.suo
No preview for this file type
......@@ -57,7 +57,7 @@
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
this.button2.Text = "(未实现)";
this.button2.Text = "压缩处理";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
......@@ -108,7 +108,7 @@
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(75, 23);
this.button5.TabIndex = 7;
this.button5.Text = "小彩蛋";
this.button5.Text = "MD5校验";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
......
......@@ -126,7 +126,8 @@ namespace cardvisa
}
else
{
string dir = Application.StartupPath + "\\checkin";
Director(dir,"excdb");
}
}
private void button3_Click(object sender, EventArgs e)
......@@ -134,10 +135,10 @@ namespace cardvisa
if (button3.Text == "关闭库")
{
button1.Text = "签出打包";
button2.Text = "签入";
button2.Text = "压缩处理";
button3.Text = "打开库";
button4.Text = "导出卡表";
button5.Text = "小彩蛋";
button5.Text = "MD5校验";
refreshlist();
}
else
......@@ -239,10 +240,9 @@ namespace cardvisa
}
else
{
//MusicGame mg = new MusicGame();
//mg.Show();
//richTextBox1.Text = CommonHandler.GetMD5(Application.StartupPath + "\\checkin\\c4270019.lua");
}
}
}
private void button6_Click(object sender, EventArgs e)
{
if (pictureBox1.Visible)
......@@ -326,8 +326,9 @@ namespace cardvisa
}
public void checkDirectory(string path = "checkout")
{
string dir = Application.StartupPath + "\\" + path;
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
string dir = Application.StartupPath + "\\";
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir + "checkin");
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir + "checkout");
List<string> dirs = new List<string> { "temp", "pics", "pics\\field", "script", "text", "deck", "NotAllowedFiles" };
string targetfile = Application.StartupPath + "\\" + path + "\\package.cdb";
CommonHandler.CreateCDBFiles(targetfile);
......@@ -721,13 +722,12 @@ namespace cardvisa
if (fsinfo.FullName.Contains(".cdb")) flag = "cdb";
if (fsinfo.FullName.Contains(".zip")) flag = "cdb";
}
swtodo(fsinfo, flag);
swtodo(fsinfo, flag, flag == "excdb" ? true : false);
}
}
}
public void swtodo(FileSystemInfo fsinfo, string flag)
public void swtodo(FileSystemInfo fsinfo, string flag,bool allowedfile = false)
{
bool allowedfile = false;
int icd = 0;
if (int.TryParse(fsinfo.Name.Replace(fsinfo.Extension, "").Replace("c", ""), out icd)) allowedfile = cdbh.cardlist.Contains(icd) ? true : false;
switch (flag)
......@@ -1252,7 +1252,28 @@ namespace cardvisa
死刑 = 4
}
public class CommonHandler
{
{
public static string GetMD5(string path)
{
try
{
using (FileStream fStream = new FileStream(path,System.IO.FileMode.Open))
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] retVal = md5.ComputeHash(fStream);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < retVal.Length; i++)
{
sb.Append(retVal[i].ToString("X2"));
}
return sb.ToString();
}
}
catch (Exception ex)
{
throw new Exception("md5 failed,error:" + ex.Message);
}
}
public static bool dexf(string a, int b)
{
Dictionary<string, List<int>> list = new Dictionary<string, List<int>>
......@@ -1475,8 +1496,8 @@ namespace cardvisa
"地","水","炎","风","光","暗","神"
};
List<string> cardRaceList = new List<string>{
"战士族","魔法师族","天使族","恶魔族",
"不死族","机械族","水族","炎族",
"战士族","魔法师族","天使族","恶魔族",
"不死族","机械族","水族","炎族",
"岩石族","鸟兽族","植物族","昆虫族",
"雷族","龙族","兽族","兽战士族",
"恐龙族","鱼族","海龙族","爬虫类族",
......
641db3d38506e2ab10c9daf783a68ab47b46b7c7
49beefaf86f37c1227dd0dac1dd328b325c352cb
......@@ -38,7 +38,6 @@ D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.csp
D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.csproj.CoreCompileInputs.cache
D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.exe
D:\Downloads\打包器&源码(v3.3)\cardvisa\cardvisa\obj\Debug\cardvisa.pdb
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
......
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