Commit 2abe825f authored by JoyJ's avatar JoyJ

More code formats; Now use label as tooltip.

parent bc0829bf
......@@ -51,15 +51,15 @@ void InitForm()
this.tooltipDic = new SortedList<string, string>();
this.InitializeComponent();
//设置字体,大小
string fontname = MyConfig.readString(MyConfig.TAG_FONT_NAME);
float fontsize = MyConfig.readFloat(MyConfig.TAG_FONT_SIZE, this.fctb.Font.Size);
string fontname = MyConfig.ReadString(MyConfig.TAG_FONT_NAME);
float fontsize = MyConfig.ReadFloat(MyConfig.TAG_FONT_SIZE, this.fctb.Font.Size);
this.fctb.Font = new Font(fontname, fontsize);
if (MyConfig.readBoolean(MyConfig.TAG_IME))
if (MyConfig.ReadBoolean(MyConfig.TAG_IME))
{
this.fctb.ImeMode = ImeMode.On;
}
if (MyConfig.readBoolean(MyConfig.TAG_WORDWRAP))
if (MyConfig.ReadBoolean(MyConfig.TAG_WORDWRAP))
{
this.fctb.WordWrap = true;
}
......@@ -68,7 +68,7 @@ void InitForm()
this.fctb.WordWrap = false;
}
if (MyConfig.readBoolean(MyConfig.TAG_TAB2SPACES))
if (MyConfig.ReadBoolean(MyConfig.TAG_TAB2SPACES))
{
this.tabisspaces = true;
}
......@@ -370,7 +370,7 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
MyMsg.Show(
LanguageHelper.GetMsg(LMSG.About) + "\t" + Application.ProductName + "\n"
+ LanguageHelper.GetMsg(LMSG.Version) + "\t1.1.0.0\n"
+ LanguageHelper.GetMsg(LMSG.Author) + "\t菜菜");
+ LanguageHelper.GetMsg(LMSG.Author) + "\tNanahira & JoyJ");
}
void Menuitem_openClick(object sender, EventArgs e)
......
......@@ -16,7 +16,7 @@ public class ConfHelper
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static string getValue(string line)
public static string GetValue(string line)
{
int t = line.IndexOf('=');
if (t > 0)
......@@ -31,7 +31,7 @@ public static string getValue(string line)
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getValue1(string word)
public static string GetValue1(string word)
{
int i = word.IndexOf(SEP_LINE);
if (i > 0)
......@@ -46,7 +46,7 @@ public static string getValue1(string word)
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getValue2(string word)
public static string GetValue2(string word)
{
int i = word.IndexOf(SEP_LINE);
if (i > 0)
......@@ -61,16 +61,16 @@ public static string getValue2(string word)
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static string getMultLineValue(string line)
public static string GetMultLineValue(string line)
{
return getRegex(getValue(line));
return GetRegex(GetValue(line));
}
/// <summary>
/// 替换特殊符
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getRegex(string word)
public static string GetRegex(string word)
{
StringBuilder sb = new StringBuilder(word);
sb.Replace("\\r", "\r");
......@@ -84,9 +84,9 @@ public static string getRegex(string word)
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static bool getBooleanValue(string line)
public static bool GetBooleanValue(string line)
{
if (getValue(line).ToLower() == "true")
if (GetValue(line).ToLower() == "true")
{
return true;
}
......@@ -101,12 +101,12 @@ public static bool getBooleanValue(string line)
/// <param name="line"></param>
/// <param name="defalut">失败的值</param>
/// <returns></returns>
public static int getIntegerValue(string line, int defalut)
public static int GetIntegerValue(string line, int defalut)
{
int i;
try
{
i = int.Parse(getValue(line));
i = int.Parse(GetValue(line));
return i;
}
catch{}
......
......@@ -14,7 +14,7 @@ namespace DataEditorX.Common
/// </summary>
public static class MyBitmap
{
public static Bitmap readImage(string file)
public static Bitmap ReadImage(string file)
{
if (!File.Exists(file))
{
......
......@@ -110,7 +110,7 @@ public static string CheckDir(string dir,string defalut)
/// <param name="tag">前面</param>
/// <param name="lang"></param>
/// <returns></returns>
public static string getFileName(string tag,string lang)
public static string GetFileName(string tag,string lang)
{
return tag + "_" + lang + ".txt";
}
......@@ -120,7 +120,7 @@ public static string getFileName(string tag,string lang)
/// <param name="tag"></param>
/// <param name="file"></param>
/// <returns></returns>
public static string getFullFileName(string tag, string file)
public static string GetFullFileName(string tag, string file)
{
string name = Path.GetFileNameWithoutExtension(file);
if (!name.StartsWith(tag + "_"))
......
......@@ -68,23 +68,23 @@ public override string ToString()
#region Private fields
// List of files to store
private readonly List<ZipFileEntry> Files = new List<ZipFileEntry>();
private readonly List<ZipFileEntry> files = new List<ZipFileEntry>();
// Filename of storage file
private string FileName;
private string fileName;
// Stream object of storage file
private Stream ZipFileStream;
private Stream zipFileStream;
// General comment
private string Comment = "";
private string comment = "";
// Central dir image
private byte[] CentralDirImage = null;
private byte[] centralDirImage = null;
// Existing files in zip
private ushort ExistingFiles = 0;
private ushort existingFiles = 0;
// File access for Open method
private FileAccess Access;
private FileAccess access;
// Static CRC32 Table
private static readonly uint[] CrcTable = null;
private static readonly uint[] _crcTable = null;
// Default filename encoder
private static readonly Encoding DefaultEncoding = Encoding.GetEncoding(437);
private static readonly Encoding _defaultEncoding = Encoding.GetEncoding(437);
#endregion
#region Public methods
......@@ -92,8 +92,8 @@ public override string ToString()
static ZipStorer()
{
// Generate CRC32 table
CrcTable = new uint[256];
for (int i = 0; i < CrcTable.Length; i++)
_crcTable = new uint[256];
for (int i = 0; i < _crcTable.Length; i++)
{
uint c = (uint)i;
for (int j = 0; j < 8; j++)
......@@ -107,7 +107,7 @@ static ZipStorer()
c >>= 1;
}
}
CrcTable[i] = c;
_crcTable[i] = c;
}
}
/// <summary>
......@@ -121,8 +121,8 @@ public static ZipStorer Create(string _filename, string _comment)
Stream stream = new FileStream(_filename, FileMode.Create, FileAccess.ReadWrite);
ZipStorer zip = Create(stream, _comment);
zip.Comment = _comment;
zip.FileName = _filename;
zip.comment = _comment;
zip.fileName = _filename;
return zip;
}
......@@ -136,9 +136,9 @@ public static ZipStorer Create(Stream _stream, string _comment)
{
ZipStorer zip = new ZipStorer
{
Comment = _comment,
ZipFileStream = _stream,
Access = FileAccess.Write
comment = _comment,
zipFileStream = _stream,
access = FileAccess.Write
};
return zip;
......@@ -154,7 +154,7 @@ public static ZipStorer Open(string _filename, FileAccess _access)
Stream stream = (Stream)new FileStream(_filename, FileMode.Open, _access == FileAccess.Read ? FileAccess.Read : FileAccess.ReadWrite);
ZipStorer zip = Open(stream, _access);
zip.FileName = _filename;
zip.fileName = _filename;
return zip;
}
......@@ -174,8 +174,8 @@ public static ZipStorer Open(Stream _stream, FileAccess _access)
ZipStorer zip = new ZipStorer
{
//zip.FileName = _filename;
ZipFileStream = _stream,
Access = _access
zipFileStream = _stream,
access = _access
};
if (zip.ReadFileInfo())
......@@ -195,7 +195,7 @@ public static ZipStorer Open(Stream _stream, FileAccess _access)
public void AddFile(string _pathname, string _filenameInZip, string _comment)
{
Compression _method=Compression.Deflate;
if (this.Access == FileAccess.Read)
if (this.access == FileAccess.Read)
{
throw new InvalidOperationException("Writing is not alowed");
}
......@@ -213,7 +213,7 @@ public void AddFile(string _pathname, string _filenameInZip, string _comment)
/// <param name="_comment">Comment for stored file</param>
public void AddFile(Compression _method, string _pathname, string _filenameInZip, string _comment)
{
if (this.Access == FileAccess.Read)
if (this.access == FileAccess.Read)
{
throw new InvalidOperationException("Writing is not alowed");
}
......@@ -232,17 +232,17 @@ public void AddFile(Compression _method, string _pathname, string _filenameInZip
/// <param name="_comment">Comment for stored file</param>
public void AddStream(Compression _method, string _filenameInZip, Stream _source, DateTime _modTime, string _comment)
{
if (this.Access == FileAccess.Read)
if (this.access == FileAccess.Read)
{
throw new InvalidOperationException("Writing is not alowed");
}
if (this.Files.Count==0)
if (this.files.Count==0)
{
}
else
{
ZipFileEntry last = this.Files[this.Files.Count-1];
ZipFileEntry last = this.files[this.files.Count-1];
_ = last.HeaderOffset + last.HeaderSize;
}
......@@ -256,13 +256,13 @@ public void AddStream(Compression _method, string _filenameInZip, Stream _source
// Even though we write the header now, it will have to be rewritten, since we don't know compressed size or crc.
Crc32 = 0, // to be updated later
HeaderOffset = (uint)this.ZipFileStream.Position, // offset within file of the start of this local record
HeaderOffset = (uint)this.zipFileStream.Position, // offset within file of the start of this local record
ModifyTime = _modTime
};
// Write local header
this.WriteLocalHeader(ref zfe);
zfe.FileOffset = (uint)this.ZipFileStream.Position;
zfe.FileOffset = (uint)this.zipFileStream.Position;
// Write file to zip (store)
this.Store(ref zfe, _source);
......@@ -270,7 +270,7 @@ public void AddStream(Compression _method, string _filenameInZip, Stream _source
this.UpdateCrcAndSizes(ref zfe);
this.Files.Add(zfe);
this.files.Add(zfe);
}
/// <summary>
/// Updates central directory (if pertinent) and close the Zip storage
......@@ -278,26 +278,26 @@ public void AddStream(Compression _method, string _filenameInZip, Stream _source
/// <remarks>This is a required step, unless automatic dispose is used</remarks>
public void Close()
{
if (this.Access != FileAccess.Read)
if (this.access != FileAccess.Read)
{
uint centralOffset = (uint)this.ZipFileStream.Position;
uint centralOffset = (uint)this.zipFileStream.Position;
uint centralSize = 0;
if (this.CentralDirImage != null)
if (this.centralDirImage != null)
{
this.ZipFileStream.Write(this.CentralDirImage, 0, this.CentralDirImage.Length);
this.zipFileStream.Write(this.centralDirImage, 0, this.centralDirImage.Length);
}
for (int i = 0; i < this.Files.Count; i++)
for (int i = 0; i < this.files.Count; i++)
{
long pos = this.ZipFileStream.Position;
this.WriteCentralDirRecord(this.Files[i]);
centralSize += (uint)(this.ZipFileStream.Position - pos);
long pos = this.zipFileStream.Position;
this.WriteCentralDirRecord(this.files[i]);
centralSize += (uint)(this.zipFileStream.Position - pos);
}
if (this.CentralDirImage != null)
if (this.centralDirImage != null)
{
this.WriteEndRecord(centralSize + (uint)this.CentralDirImage.Length, centralOffset);
this.WriteEndRecord(centralSize + (uint)this.centralDirImage.Length, centralOffset);
}
else
{
......@@ -305,11 +305,11 @@ public void Close()
}
}
if (this.ZipFileStream != null)
if (this.zipFileStream != null)
{
this.ZipFileStream.Flush();
this.ZipFileStream.Dispose();
this.ZipFileStream = null;
this.zipFileStream.Flush();
this.zipFileStream.Dispose();
this.zipFileStream = null;
}
}
/// <summary>
......@@ -318,39 +318,39 @@ public void Close()
/// <returns>List of all entries in directory</returns>
public List<ZipFileEntry> ReadCentralDir()
{
if (this.CentralDirImage == null)
if (this.centralDirImage == null)
{
throw new InvalidOperationException("Central directory currently does not exist");
}
List<ZipFileEntry> result = new List<ZipFileEntry>();
for (int pointer = 0; pointer < this.CentralDirImage.Length; )
for (int pointer = 0; pointer < this.centralDirImage.Length; )
{
uint signature = BitConverter.ToUInt32(this.CentralDirImage, pointer);
uint signature = BitConverter.ToUInt32(this.centralDirImage, pointer);
if (signature != 0x02014b50)
{
break;
}
bool encodeUTF8 = (BitConverter.ToUInt16(this.CentralDirImage, pointer + 8) & 0x0800) != 0;
ushort method = BitConverter.ToUInt16(this.CentralDirImage, pointer + 10);
uint modifyTime = BitConverter.ToUInt32(this.CentralDirImage, pointer + 12);
uint crc32 = BitConverter.ToUInt32(this.CentralDirImage, pointer + 16);
uint comprSize = BitConverter.ToUInt32(this.CentralDirImage, pointer + 20);
uint fileSize = BitConverter.ToUInt32(this.CentralDirImage, pointer + 24);
ushort filenameSize = BitConverter.ToUInt16(this.CentralDirImage, pointer + 28);
ushort extraSize = BitConverter.ToUInt16(this.CentralDirImage, pointer + 30);
ushort commentSize = BitConverter.ToUInt16(this.CentralDirImage, pointer + 32);
uint headerOffset = BitConverter.ToUInt32(this.CentralDirImage, pointer + 42);
bool encodeUTF8 = (BitConverter.ToUInt16(this.centralDirImage, pointer + 8) & 0x0800) != 0;
ushort method = BitConverter.ToUInt16(this.centralDirImage, pointer + 10);
uint modifyTime = BitConverter.ToUInt32(this.centralDirImage, pointer + 12);
uint crc32 = BitConverter.ToUInt32(this.centralDirImage, pointer + 16);
uint comprSize = BitConverter.ToUInt32(this.centralDirImage, pointer + 20);
uint fileSize = BitConverter.ToUInt32(this.centralDirImage, pointer + 24);
ushort filenameSize = BitConverter.ToUInt16(this.centralDirImage, pointer + 28);
ushort extraSize = BitConverter.ToUInt16(this.centralDirImage, pointer + 30);
ushort commentSize = BitConverter.ToUInt16(this.centralDirImage, pointer + 32);
uint headerOffset = BitConverter.ToUInt32(this.centralDirImage, pointer + 42);
uint headerSize = (uint)( 46 + filenameSize + extraSize + commentSize);
Encoding encoder = encodeUTF8 ? Encoding.UTF8 : DefaultEncoding;
Encoding encoder = encodeUTF8 ? Encoding.UTF8 : _defaultEncoding;
ZipFileEntry zfe = new ZipFileEntry
{
Method = (Compression)method,
FilenameInZip = encoder.GetString(this.CentralDirImage, pointer + 46, filenameSize),
FilenameInZip = encoder.GetString(this.centralDirImage, pointer + 46, filenameSize),
FileOffset = this.GetFileOffset(headerOffset),
FileSize = fileSize,
CompressedSize = comprSize,
......@@ -361,7 +361,7 @@ public List<ZipFileEntry> ReadCentralDir()
};
if (commentSize > 0)
{
zfe.Comment = encoder.GetString(this.CentralDirImage, pointer + 46 + filenameSize + extraSize, commentSize);
zfe.Comment = encoder.GetString(this.centralDirImage, pointer + 46 + filenameSize + extraSize, commentSize);
}
result.Add(zfe);
......@@ -420,8 +420,8 @@ public bool ExtractFile(ZipFileEntry _zfe, Stream _stream)
// check signature
byte[] signature = new byte[4];
this.ZipFileStream.Seek(_zfe.HeaderOffset, SeekOrigin.Begin);
this.ZipFileStream.Read(signature, 0, 4);
this.zipFileStream.Seek(_zfe.HeaderOffset, SeekOrigin.Begin);
this.zipFileStream.Read(signature, 0, 4);
if (BitConverter.ToUInt32(signature, 0) != 0x04034b50)
{
return false;
......@@ -431,11 +431,11 @@ public bool ExtractFile(ZipFileEntry _zfe, Stream _stream)
Stream inStream;
if (_zfe.Method == Compression.Store)
{
inStream = this.ZipFileStream;
inStream = this.zipFileStream;
}
else if (_zfe.Method == Compression.Deflate)
{
inStream = new DeflateStream(this.ZipFileStream, CompressionMode.Decompress, true);
inStream = new DeflateStream(this.zipFileStream, CompressionMode.Decompress, true);
}
else
{
......@@ -444,7 +444,7 @@ public bool ExtractFile(ZipFileEntry _zfe, Stream _stream)
// Buffered copy
byte[] buffer = new byte[16384];
this.ZipFileStream.Seek(_zfe.FileOffset, SeekOrigin.Begin);
this.zipFileStream.Seek(_zfe.FileOffset, SeekOrigin.Begin);
uint bytesPending = _zfe.FileSize;
while (bytesPending > 0)
{
......@@ -470,7 +470,7 @@ public bool ExtractFile(ZipFileEntry _zfe, Stream _stream)
/// <remarks>This method only works for storage of type FileStream</remarks>
public static bool RemoveEntries(ref ZipStorer _zip, List<ZipFileEntry> _zfes)
{
if (!(_zip.ZipFileStream is FileStream))
if (!(_zip.zipFileStream is FileStream))
{
throw new InvalidOperationException("RemoveEntries is allowed just over streams of type FileStream");
}
......@@ -500,10 +500,10 @@ public static bool RemoveEntries(ref ZipStorer _zip, List<ZipFileEntry> _zfes)
_zip.Close();
tempZip.Close();
File.Delete(_zip.FileName);
File.Move(tempZipName, _zip.FileName);
File.Delete(_zip.fileName);
File.Move(tempZipName, _zip.fileName);
_zip = ZipStorer.Open(_zip.FileName, _zip.Access);
_zip = ZipStorer.Open(_zip.fileName, _zip.access);
}
catch
{
......@@ -531,10 +531,10 @@ private uint GetFileOffset(uint _headerOffset)
{
byte[] buffer = new byte[2];
this.ZipFileStream.Seek(_headerOffset + 26, SeekOrigin.Begin);
this.ZipFileStream.Read(buffer, 0, 2);
this.zipFileStream.Seek(_headerOffset + 26, SeekOrigin.Begin);
this.zipFileStream.Read(buffer, 0, 2);
ushort filenameSize = BitConverter.ToUInt16(buffer, 0);
this.ZipFileStream.Read(buffer, 0, 2);
this.zipFileStream.Read(buffer, 0, 2);
ushort extraSize = BitConverter.ToUInt16(buffer, 0);
return (uint)(30 + filenameSize + extraSize + _headerOffset);
......@@ -557,20 +557,20 @@ extra field (variable size)
*/
private void WriteLocalHeader(ref ZipFileEntry _zfe)
{
long pos = this.ZipFileStream.Position;
Encoding encoder = _zfe.EncodeUTF8 ? Encoding.UTF8 : DefaultEncoding;
long pos = this.zipFileStream.Position;
Encoding encoder = _zfe.EncodeUTF8 ? Encoding.UTF8 : _defaultEncoding;
byte[] encodedFilename = encoder.GetBytes(_zfe.FilenameInZip);
this.ZipFileStream.Write(new byte[] { 80, 75, 3, 4, 20, 0}, 0, 6); // No extra header
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); // filename and comment encoding
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.ZipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); // zipping date and time
this.ZipFileStream.Write(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 12); // unused CRC, un/compressed size, updated later
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)encodedFilename.Length), 0, 2); // filename length
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // extra length
this.zipFileStream.Write(new byte[] { 80, 75, 3, 4, 20, 0}, 0, 6); // No extra header
this.zipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); // filename and comment encoding
this.zipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.zipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); // zipping date and time
this.zipFileStream.Write(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 12); // unused CRC, un/compressed size, updated later
this.zipFileStream.Write(BitConverter.GetBytes((ushort)encodedFilename.Length), 0, 2); // filename length
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // extra length
this.ZipFileStream.Write(encodedFilename, 0, encodedFilename.Length);
_zfe.HeaderSize = (uint)(this.ZipFileStream.Position - pos);
this.zipFileStream.Write(encodedFilename, 0, encodedFilename.Length);
_zfe.HeaderSize = (uint)(this.zipFileStream.Position - pos);
}
/* Central directory's File header:
central file header signature 4 bytes (0x02014b50)
......@@ -597,29 +597,29 @@ file comment (variable size)
*/
private void WriteCentralDirRecord(ZipFileEntry _zfe)
{
Encoding encoder = _zfe.EncodeUTF8 ? Encoding.UTF8 : DefaultEncoding;
Encoding encoder = _zfe.EncodeUTF8 ? Encoding.UTF8 : _defaultEncoding;
byte[] encodedFilename = encoder.GetBytes(_zfe.FilenameInZip);
byte[] encodedComment = encoder.GetBytes(_zfe.Comment);
this.ZipFileStream.Write(new byte[] { 80, 75, 1, 2, 23, 0xB, 20, 0 }, 0, 8);
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); // filename and comment encoding
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.ZipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); // zipping date and time
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.Crc32), 0, 4); // file CRC
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.CompressedSize), 0, 4); // compressed file size
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.FileSize), 0, 4); // uncompressed file size
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)encodedFilename.Length), 0, 2); // Filename in zip
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // extra length
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)encodedComment.Length), 0, 2);
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // disk=0
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // file type: binary
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // Internal file attributes
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)0x8100), 0, 2); // External file attributes (normal/readable)
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.HeaderOffset), 0, 4); // Offset of header
this.ZipFileStream.Write(encodedFilename, 0, encodedFilename.Length);
this.ZipFileStream.Write(encodedComment, 0, encodedComment.Length);
this.zipFileStream.Write(new byte[] { 80, 75, 1, 2, 23, 0xB, 20, 0 }, 0, 8);
this.zipFileStream.Write(BitConverter.GetBytes((ushort)(_zfe.EncodeUTF8 ? 0x0800 : 0)), 0, 2); // filename and comment encoding
this.zipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.zipFileStream.Write(BitConverter.GetBytes(this.DateTimeToDosTime(_zfe.ModifyTime)), 0, 4); // zipping date and time
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.Crc32), 0, 4); // file CRC
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.CompressedSize), 0, 4); // compressed file size
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.FileSize), 0, 4); // uncompressed file size
this.zipFileStream.Write(BitConverter.GetBytes((ushort)encodedFilename.Length), 0, 2); // Filename in zip
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // extra length
this.zipFileStream.Write(BitConverter.GetBytes((ushort)encodedComment.Length), 0, 2);
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // disk=0
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // file type: binary
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0), 0, 2); // Internal file attributes
this.zipFileStream.Write(BitConverter.GetBytes((ushort)0x8100), 0, 2); // External file attributes (normal/readable)
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.HeaderOffset), 0, 4); // Offset of header
this.zipFileStream.Write(encodedFilename, 0, encodedFilename.Length);
this.zipFileStream.Write(encodedComment, 0, encodedComment.Length);
}
/* End of central dir record:
end of central dir signature 4 bytes (0x06054b50)
......@@ -639,16 +639,16 @@ zipfile comment (variable size)
*/
private void WriteEndRecord(uint _size, uint _offset)
{
Encoding encoder = this.EncodeUTF8 ? Encoding.UTF8 : DefaultEncoding;
byte[] encodedComment = encoder.GetBytes(this.Comment);
this.ZipFileStream.Write(new byte[] { 80, 75, 5, 6, 0, 0, 0, 0 }, 0, 8);
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)this.Files.Count+ this.ExistingFiles), 0, 2);
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)this.Files.Count+ this.ExistingFiles), 0, 2);
this.ZipFileStream.Write(BitConverter.GetBytes(_size), 0, 4);
this.ZipFileStream.Write(BitConverter.GetBytes(_offset), 0, 4);
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)encodedComment.Length), 0, 2);
this.ZipFileStream.Write(encodedComment, 0, encodedComment.Length);
Encoding encoder = this.EncodeUTF8 ? Encoding.UTF8 : _defaultEncoding;
byte[] encodedComment = encoder.GetBytes(this.comment);
this.zipFileStream.Write(new byte[] { 80, 75, 5, 6, 0, 0, 0, 0 }, 0, 8);
this.zipFileStream.Write(BitConverter.GetBytes((ushort)this.files.Count+ this.existingFiles), 0, 2);
this.zipFileStream.Write(BitConverter.GetBytes((ushort)this.files.Count+ this.existingFiles), 0, 2);
this.zipFileStream.Write(BitConverter.GetBytes(_size), 0, 4);
this.zipFileStream.Write(BitConverter.GetBytes(_offset), 0, 4);
this.zipFileStream.Write(BitConverter.GetBytes((ushort)encodedComment.Length), 0, 2);
this.zipFileStream.Write(encodedComment, 0, encodedComment.Length);
}
// Copies all source file into storage file
private void Store(ref ZipFileEntry _zfe, Stream _source)
......@@ -658,16 +658,16 @@ private void Store(ref ZipFileEntry _zfe, Stream _source)
uint totalRead = 0;
Stream outStream;
long posStart = this.ZipFileStream.Position;
long posStart = this.zipFileStream.Position;
long sourceStart = _source.Position;
if (_zfe.Method == Compression.Store)
{
outStream = this.ZipFileStream;
outStream = this.zipFileStream;
}
else
{
outStream = new DeflateStream(this.ZipFileStream, CompressionMode.Compress, true);
outStream = new DeflateStream(this.zipFileStream, CompressionMode.Compress, true);
}
_zfe.Crc32 = 0 ^ 0xffffffff;
......@@ -682,7 +682,7 @@ private void Store(ref ZipFileEntry _zfe, Stream _source)
for (uint i = 0; i < bytesRead; i++)
{
_zfe.Crc32 = ZipStorer.CrcTable[(_zfe.Crc32 ^ buffer[i]) & 0xFF] ^ (_zfe.Crc32 >> 8);
_zfe.Crc32 = ZipStorer._crcTable[(_zfe.Crc32 ^ buffer[i]) & 0xFF] ^ (_zfe.Crc32 >> 8);
}
}
} while (bytesRead == buffer.Length);
......@@ -695,15 +695,15 @@ private void Store(ref ZipFileEntry _zfe, Stream _source)
_zfe.Crc32 ^= 0xffffffff;
_zfe.FileSize = totalRead;
_zfe.CompressedSize = (uint)(this.ZipFileStream.Position - posStart);
_zfe.CompressedSize = (uint)(this.zipFileStream.Position - posStart);
// Verify for real compression
if (_zfe.Method == Compression.Deflate && !this.ForceDeflating && _source.CanSeek && _zfe.CompressedSize > _zfe.FileSize)
{
// Start operation again with Store algorithm
_zfe.Method = Compression.Store;
this.ZipFileStream.Position = posStart;
this.ZipFileStream.SetLength(posStart);
this.zipFileStream.Position = posStart;
this.zipFileStream.SetLength(posStart);
_source.Position = sourceStart;
this.Store(ref _zfe, _source);
}
......@@ -749,17 +749,17 @@ private DateTime DosTimeToDateTime(uint _dt)
*/
private void UpdateCrcAndSizes(ref ZipFileEntry _zfe)
{
long lastPos = this.ZipFileStream.Position; // remember position
long lastPos = this.zipFileStream.Position; // remember position
this.ZipFileStream.Position = _zfe.HeaderOffset + 8;
this.ZipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.zipFileStream.Position = _zfe.HeaderOffset + 8;
this.zipFileStream.Write(BitConverter.GetBytes((ushort)_zfe.Method), 0, 2); // zipping method
this.ZipFileStream.Position = _zfe.HeaderOffset + 14;
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.Crc32), 0, 4); // Update CRC
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.CompressedSize), 0, 4); // Compressed size
this.ZipFileStream.Write(BitConverter.GetBytes(_zfe.FileSize), 0, 4); // Uncompressed size
this.zipFileStream.Position = _zfe.HeaderOffset + 14;
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.Crc32), 0, 4); // Update CRC
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.CompressedSize), 0, 4); // Compressed size
this.zipFileStream.Write(BitConverter.GetBytes(_zfe.FileSize), 0, 4); // Uncompressed size
this.ZipFileStream.Position = lastPos; // restore position
this.zipFileStream.Position = lastPos; // restore position
}
// Replaces backslashes with slashes to store in zip header
private string NormalizedFilename(string _filename)
......@@ -777,22 +777,22 @@ private string NormalizedFilename(string _filename)
// Reads the end-of-central-directory record
private bool ReadFileInfo()
{
if (this.ZipFileStream.Length < 22)
if (this.zipFileStream.Length < 22)
{
return false;
}
try
{
this.ZipFileStream.Seek(-17, SeekOrigin.End);
BinaryReader br = new BinaryReader(this.ZipFileStream);
this.zipFileStream.Seek(-17, SeekOrigin.End);
BinaryReader br = new BinaryReader(this.zipFileStream);
do
{
this.ZipFileStream.Seek(-5, SeekOrigin.Current);
this.zipFileStream.Seek(-5, SeekOrigin.Current);
uint sig = br.ReadUInt32();
if (sig == 0x06054b50)
{
this.ZipFileStream.Seek(6, SeekOrigin.Current);
this.zipFileStream.Seek(6, SeekOrigin.Current);
ushort entries = br.ReadUInt16();
int centralSize = br.ReadInt32();
......@@ -800,22 +800,22 @@ private bool ReadFileInfo()
ushort commentSize = br.ReadUInt16();
// check if comment field is the very last data in file
if (this.ZipFileStream.Position + commentSize != this.ZipFileStream.Length)
if (this.zipFileStream.Position + commentSize != this.zipFileStream.Length)
{
return false;
}
// Copy entire central directory to a memory buffer
this.ExistingFiles = entries;
this.CentralDirImage = new byte[centralSize];
this.ZipFileStream.Seek(centralDirOffset, SeekOrigin.Begin);
this.ZipFileStream.Read(this.CentralDirImage, 0, centralSize);
this.existingFiles = entries;
this.centralDirImage = new byte[centralSize];
this.zipFileStream.Seek(centralDirOffset, SeekOrigin.Begin);
this.zipFileStream.Read(this.centralDirImage, 0, centralSize);
// Leave the pointer at the begining of central dir, to append new files
this.ZipFileStream.Seek(centralDirOffset, SeekOrigin.Begin);
this.zipFileStream.Seek(centralDirOffset, SeekOrigin.Begin);
return true;
}
} while (this.ZipFileStream.Position > 0);
} while (this.zipFileStream.Position > 0);
}
catch { }
......
......@@ -36,7 +36,7 @@ static string reReturn(string content)
text = text.Replace("\r", "\n");
return text;
}
public static string subString(string content, string tag)
public static string SubString(string content, string tag)
{
Regex reg = new Regex(string.Format(@"{0}{1}\n([\S\s]*?)\n{2}", TAG_START, tag, TAG_END), RegexOptions.Multiline);
Match mac = reg.Match(reReturn(content));
......@@ -57,7 +57,7 @@ public static string subString(string content, string tag)
/// <returns></returns>
public static Dictionary<long, string> Read(string content, string tag)
{
return Read(subString(content,tag));
return Read(SubString(content,tag));
}
/// <summary>
/// 从文件读取内容,按行读取
......
......@@ -23,20 +23,20 @@ public class ImageSet
//初始化
void Init()
{
this.normalArea = MyConfig.readArea(MyConfig.TAG_IMAGE_OTHER);
this.normalArea = MyConfig.ReadArea(MyConfig.TAG_IMAGE_OTHER);
this.xyzArea = MyConfig.readArea(MyConfig.TAG_IMAGE_XYZ);
this.xyzArea = MyConfig.ReadArea(MyConfig.TAG_IMAGE_XYZ);
this.pendulumArea = MyConfig.readArea(MyConfig.TAG_IMAGE_PENDULUM);
this.pendulumArea = MyConfig.ReadArea(MyConfig.TAG_IMAGE_PENDULUM);
int[] ints = MyConfig.readIntegers(MyConfig.TAG_IMAGE_SIZE, 4);
int[] ints = MyConfig.ReadIntegers(MyConfig.TAG_IMAGE_SIZE, 4);
this.w = ints[0];
this.h = ints[1];
this.W = ints[2];
this.H = ints[3];
this.quilty = MyConfig.readInteger(MyConfig.TAG_IMAGE_QUILTY, 95);
this.quilty = MyConfig.ReadInteger(MyConfig.TAG_IMAGE_QUILTY, 95);
}
/// <summary>
/// jpeg质量
......
......@@ -181,7 +181,7 @@ public class MyConfig : XMLReader
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static string readString(string key)
public static string ReadString(string key)
{
return GetAppConfig(key);
}
......@@ -191,9 +191,9 @@ public static string readString(string key)
/// <param name="key"></param>
/// <param name="def"></param>
/// <returns></returns>
public static int readInteger(string key, int def)
public static int ReadInteger(string key, int def)
{
if (int.TryParse(readString(key), out int i))
if (int.TryParse(ReadString(key), out int i))
{
return i;
}
......@@ -206,9 +206,9 @@ public static int readInteger(string key, int def)
/// <param name="key"></param>
/// <param name="def"></param>
/// <returns></returns>
public static float readFloat(string key, float def)
public static float ReadFloat(string key, float def)
{
if (float.TryParse(readString(key), out float i))
if (float.TryParse(ReadString(key), out float i))
{
return i;
}
......@@ -221,9 +221,9 @@ public static float readFloat(string key, float def)
/// <param name="key"></param>
/// <param name="length"></param>
/// <returns></returns>
public static int[] readIntegers(string key, int length)
public static int[] ReadIntegers(string key, int length)
{
string temp = readString(key);
string temp = ReadString(key);
int[] ints = new int[length];
string[] ws = string.IsNullOrEmpty(temp) ? null : temp.Split(',');
......@@ -241,9 +241,9 @@ public static int[] readIntegers(string key, int length)
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static Area readArea(string key)
public static Area ReadArea(string key)
{
int[] ints = readIntegers(key, 4);
int[] ints = ReadIntegers(key, 4);
Area a = new Area();
if (ints != null)
{
......@@ -259,9 +259,9 @@ public static Area readArea(string key)
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static bool readBoolean(string key,bool def=false)
public static bool ReadBoolean(string key,bool def=false)
{
string val= readString(key);
string val= ReadString(key);
if("true".Equals(val, StringComparison.OrdinalIgnoreCase)){
return true;
}
......@@ -280,7 +280,7 @@ public static bool readBoolean(string key,bool def=false)
/// <returns></returns>
public static string GetLanguageFile(string path)
{
if (readBoolean(TAG_CHECK_SYSLANG) && Directory.Exists(path))
if (ReadBoolean(TAG_CHECK_SYSLANG) && Directory.Exists(path))
{
Save(TAG_CHECK_SYSLANG, "false");
string[] words = CultureInfo.InstalledUICulture.EnglishName.Split(' ');
......@@ -288,7 +288,7 @@ public static string GetLanguageFile(string path)
string[] files = Directory.GetFiles(path);
foreach (string file in files)
{
string name = MyPath.getFullFileName(MyConfig.TAG_LANGUAGE, file);
string name = MyPath.GetFullFileName(MyConfig.TAG_LANGUAGE, file);
if (string.IsNullOrEmpty(name))
{
continue;
......@@ -301,7 +301,7 @@ public static string GetLanguageFile(string path)
}
}
}
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_LANGUAGE, GetAppConfig(TAG_LANGUAGE)));
return MyPath.Combine(path, MyPath.GetFileName(MyConfig.TAG_LANGUAGE, GetAppConfig(TAG_LANGUAGE)));
}
/// <summary>
/// 卡片信息配置文件名
......@@ -310,7 +310,7 @@ public static string GetLanguageFile(string path)
/// <returns></returns>
public static string GetCardInfoFile(string path)
{
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_CARDINFO, GetAppConfig(TAG_LANGUAGE)));
return MyPath.Combine(path, MyPath.GetFileName(MyConfig.TAG_CARDINFO, GetAppConfig(TAG_LANGUAGE)));
}
/// <summary>
/// 发送消息打开文件
......
......@@ -10,18 +10,21 @@
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Text;
namespace FastColoredTextBoxNS
{
public class FastColoredTextBoxEx : FastColoredTextBox
{
Point lastMouseCoord;
{
private Label lbTooltip;
Point lastMouseCoord;
public FastColoredTextBoxEx() : base()
{
this.SyntaxHighlighter = new MySyntaxHighlighter();
this.InitializeComponent();
this.ToolTipDelay = 1;
this.TextChangedDelayed += this.FctbTextChangedDelayed;
}
public new event EventHandler<ToolTipNeededEventArgs> ToolTipNeeded;
protected override void OnMouseMove(MouseEventArgs e)
......@@ -61,13 +64,16 @@ protected override void OnToolTip()
if (ea.ToolTipText != null)
{
//show tooltip
this.ToolTip.ToolTipTitle = ea.ToolTipTitle;
this.ToolTip.ToolTipIcon = ea.ToolTipIcon;
lbTooltip.Text = $"{ea.ToolTipTitle}\r\n\r\n{ea.ToolTipText}";
lbTooltip.Location = new Point(this.Size.Width - 500, this.lastMouseCoord.Y + this.CharHeight);
//this.ToolTip.ToolTipTitle = ea.ToolTipTitle;
//this.ToolTip.ToolTipIcon = ea.ToolTipIcon;
//ToolTip.SetToolTip(this, ea.ToolTipText);
this.ToolTip.Show(ea.ToolTipText, this, new Point(this.lastMouseCoord.X, this.lastMouseCoord.Y + this.CharHeight));
}
}
//this.ToolTip.Show(ea.ToolTipText, this, new Point(this.lastMouseCoord.X, this.lastMouseCoord.Y + this.CharHeight));
}
}
//高亮当前词
void FctbTextChangedDelayed(object sender, TextChangedEventArgs e)
{
......@@ -101,5 +107,36 @@ void FctbTextChangedDelayed(object sender, TextChangedEventArgs e)
lastNonEmptyLine = i;
}
}
}
private void InitializeComponent()
{
this.lbTooltip = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
//
// lbTooltip
//
this.lbTooltip.AutoSize = true;
this.lbTooltip.BackColor = System.Drawing.SystemColors.Desktop;
this.lbTooltip.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTooltip.ForeColor = System.Drawing.SystemColors.Control;
this.lbTooltip.Location = new System.Drawing.Point(221, 117);
this.lbTooltip.MaximumSize = new System.Drawing.Size(480, 0);
this.lbTooltip.Name = "lbTooltip";
this.lbTooltip.Size = new System.Drawing.Size(0, 28);
this.lbTooltip.TabIndex = 1;
//
// FastColoredTextBoxEx
//
this.AutoScrollMinSize = new System.Drawing.Size(27, 14);
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.lbTooltip);
this.Name = "FastColoredTextBoxEx";
this.Size = new System.Drawing.Size(584, 327);
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
}
}
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -76,9 +76,11 @@ void AddHistorys(string[] lines)
}
public void AddHistory(string file)
{
List<string> tmplist = new List<string>();
//添加到开始
tmplist.Add(file);
List<string> tmplist = new List<string>
{
//添加到开始
file
};
//添加旧记录
tmplist.AddRange(this.cdbhistory.ToArray());
tmplist.AddRange(this.luahistory.ToArray());
......
......@@ -29,12 +29,10 @@ public CardEdit(IDataForm dataform)
//添加
public class AddCommand: IBackableCommand
{
private string _undoSQL;
readonly CardEdit cardedit;
private string undoSQL;
readonly IDataForm dataform;
public AddCommand(CardEdit cardedit)
{
this.cardedit = cardedit;
this.dataform = cardedit.dataform;
}
......@@ -64,7 +62,7 @@ public bool Excute(params object[] args)
DataBase.GetInsertSQL(c, true)) >= 2)
{
MyMsg.Show(LMSG.AddSucceed);
this._undoSQL = DataBase.GetDeleteSQL(c);
this.undoSQL = DataBase.GetDeleteSQL(c);
this.dataform.Search(true);
this.dataform.SetCard(c);
return true;
......@@ -74,7 +72,7 @@ public bool Excute(params object[] args)
}
public void Undo()
{
DataBase.Command(this.dataform.GetOpenFile(), this._undoSQL);
DataBase.Command(this.dataform.GetOpenFile(), this.undoSQL);
}
public object Clone()
......@@ -88,16 +86,14 @@ public object Clone()
//修改
public class ModCommand: IBackableCommand
{
private string _undoSQL;
private string undoSQL;
private bool modifiled = false;
private long oldid;
private long newid;
private bool delold;
readonly CardEdit cardedit;
readonly IDataForm dataform;
public ModCommand(CardEdit cardedit)
{
this.cardedit = cardedit;
this.dataform = cardedit.dataform;
}
......@@ -138,12 +134,12 @@ public bool Excute(params object[] args)
}
else
{//删除成功,添加还原sql
this._undoSQL = DataBase.GetDeleteSQL(c) + DataBase.GetInsertSQL(oldCard, false);
this.undoSQL = DataBase.GetDeleteSQL(c) + DataBase.GetInsertSQL(oldCard, false);
}
}
else
{
this._undoSQL = DataBase.GetDeleteSQL(c);//还原就是删除
this.undoSQL = DataBase.GetDeleteSQL(c);//还原就是删除
}
//如果删除旧卡片,则把资源修改名字,否则复制资源
if (modfiles)
......@@ -166,7 +162,7 @@ public bool Excute(params object[] args)
else
{//更新数据
sql = DataBase.GetUpdateSQL(c);
this._undoSQL = DataBase.GetUpdateSQL(oldCard);
this.undoSQL = DataBase.GetUpdateSQL(oldCard);
}
if (DataBase.Command(this.dataform.GetOpenFile(), sql) > 0)
{
......@@ -185,7 +181,7 @@ public bool Excute(params object[] args)
public void Undo()
{
DataBase.Command(this.dataform.GetOpenFile(), this._undoSQL);
DataBase.Command(this.dataform.GetOpenFile(), this.undoSQL);
if (this.modifiled)
{
if (this.delold)
......@@ -210,12 +206,10 @@ public object Clone()
//删除
public class DelCommand : IBackableCommand
{
private string _undoSQL;
readonly CardEdit cardedit;
private string undoSQL;
readonly IDataForm dataform;
public DelCommand(CardEdit cardedit)
{
this.cardedit = cardedit;
this.dataform = cardedit.dataform;
}
......@@ -255,7 +249,7 @@ public bool Excute(params object[] args)
{
MyMsg.Show(LMSG.DeleteSucceed);
this.dataform.Search(true);
this._undoSQL = undo;
this.undoSQL = undo;
return true;
}
else
......@@ -267,7 +261,7 @@ public bool Excute(params object[] args)
}
public void Undo()
{
DataBase.Command(this.dataform.GetOpenFile(), this._undoSQL);
DataBase.Command(this.dataform.GetOpenFile(), this.undoSQL);
}
public object Clone()
......@@ -354,9 +348,9 @@ public bool OpenScript(bool openinthis, string addrequire)
public class CopyCommand : IBackableCommand
{
bool copied = false;
Card[] NewCards;
Card[] newCards;
bool replace;
Card[] OldCards;
Card[] oldCards;
readonly CardEdit cardedit;
readonly IDataForm dataform;
public CopyCommand(CardEdit cardedit)
......@@ -406,15 +400,15 @@ public bool Excute(params object[] args)
}
DataBase.CopyDB(this.dataform.GetOpenFile(), !replace, cards);
this.copied = true;
this.NewCards = cards;
this.newCards = cards;
this.replace = replace;
this.OldCards = oldcards;
this.oldCards = oldcards;
return true;
}
public void Undo()
{
DataBase.DeleteDB(this.dataform.GetOpenFile(), this.NewCards);
DataBase.CopyDB(this.dataform.GetOpenFile(), !this.replace, this.OldCards);
DataBase.DeleteDB(this.dataform.GetOpenFile(), this.newCards);
DataBase.CopyDB(this.dataform.GetOpenFile(), !this.replace, this.oldCards);
}
public object Clone()
......@@ -422,12 +416,12 @@ public object Clone()
CopyCommand replica = new CopyCommand(this.cardedit)
{
copied = this.copied,
NewCards = (Card[])this.NewCards.Clone(),
newCards = (Card[])this.newCards.Clone(),
replace = this.replace
};
if (this.OldCards != null)
if (this.oldCards != null)
{
replica.OldCards = (Card[])this.OldCards.Clone();
replica.oldCards = (Card[])this.oldCards.Clone();
}
return replica;
......
......@@ -30,7 +30,7 @@ public static class CardLink
public const int Up = 0x80;
public const int UpRight = 0x100;
public static bool isLink(int marks, int mark){
public static bool IsLink(int marks, int mark){
return (marks & mark) == mark;
}
}
......
......@@ -17,10 +17,10 @@ public class CardPack
{
public CardPack(long id)
{
this.card_id=id;
this.CardId=id;
}
public long card_id{
public long CardId{
get;
private set;
}
......@@ -29,7 +29,7 @@ public CardPack(long id)
public string rarity;
public string date;
public string getMseRarity(){
public string GetMseRarity(){
if(this.rarity==null)
{
return "common";
......
......@@ -63,7 +63,7 @@ public class MSEConfig
#endregion
public MSEConfig(string path)
{
this.init(path);
this.Init(path);
}
public void SetConfig(string config, string path)
{
......@@ -75,7 +75,7 @@ public void SetConfig(string config, string path)
this.regx_monster = "(\\s\\S*?)";
this.regx_pendulum = "(\\s\\S*?)";
//设置文件名
this.configName = MyPath.getFullFileName(MSEConfig.TAG, config);
this.configName = MyPath.GetFullFileName(MSEConfig.TAG, config);
this.replaces = new SortedList<string, string>();
......@@ -91,56 +91,56 @@ public void SetConfig(string config, string path)
if (line.StartsWith(TAG_CN2TW))
{
this.Iscn2tw = ConfHelper.getBooleanValue(line);
this.Iscn2tw = ConfHelper.GetBooleanValue(line);
}
else if (line.StartsWith(TAG_SPELL))
{
this.str_spell = ConfHelper.getValue(line);
this.str_spell = ConfHelper.GetValue(line);
}
else if (line.StartsWith(TAG_HEAD))
{
this.head = ConfHelper.getMultLineValue(line);
this.head = ConfHelper.GetMultLineValue(line);
}
else if (line.StartsWith(TAG_END))
{
this.end = ConfHelper.getMultLineValue(line);
this.end = ConfHelper.GetMultLineValue(line);
}
else if (line.StartsWith(TAG_TEXT))
{
this.temp_text = ConfHelper.getMultLineValue(line);
this.temp_text = ConfHelper.GetMultLineValue(line);
}
else if (line.StartsWith(TAG_TRAP))
{
this.str_trap = ConfHelper.getValue(line);
this.str_trap = ConfHelper.GetValue(line);
}
else if (line.StartsWith(TAG_REG_PENDULUM))
{
this.regx_pendulum = ConfHelper.getValue(line);
this.regx_pendulum = ConfHelper.GetValue(line);
}
else if (line.StartsWith(TAG_REG_MONSTER))
{
this.regx_monster = ConfHelper.getValue(line);
this.regx_monster = ConfHelper.GetValue(line);
}
else if (line.StartsWith(TAG_MAXCOUNT))
{
this.maxcount = ConfHelper.getIntegerValue(line, 0);
this.maxcount = ConfHelper.GetIntegerValue(line, 0);
}
else if (line.StartsWith(TAG_WIDTH)){
this.width =ConfHelper.getIntegerValue(line,0);
this.width =ConfHelper.GetIntegerValue(line,0);
}
else if (line.StartsWith(TAG_HEIGHT)){
this.height =ConfHelper.getIntegerValue(line,0);
this.height =ConfHelper.GetIntegerValue(line,0);
}
else if (line.StartsWith(TAG_PEND_WIDTH)){
this.pwidth =ConfHelper.getIntegerValue(line,0);
this.pwidth =ConfHelper.GetIntegerValue(line,0);
}
else if (line.StartsWith(TAG_PEND_HEIGHT)){
this.pheight =ConfHelper.getIntegerValue(line,0);
this.pheight =ConfHelper.GetIntegerValue(line,0);
}
else if(line.StartsWith(TAG_NO_TEN)){
this.no10 = ConfHelper.getBooleanValue(line);
this.no10 = ConfHelper.GetBooleanValue(line);
}else if(line.StartsWith(TAG_NO_START_CARDS)){
string val = ConfHelper.getValue(line);
string val = ConfHelper.GetValue(line);
string[] cs = val.Split(',');
this.noStartCards =new long[cs.Length];
int i=0;
......@@ -152,16 +152,16 @@ public void SetConfig(string config, string path)
else if (line.StartsWith(TAG_IMAGE))
{
//如果路径不合法,则为后面的路径
this.imagepath = MyPath.CheckDir(ConfHelper.getValue(line), MyPath.Combine(path, PATH_IMAGE));
this.imagepath = MyPath.CheckDir(ConfHelper.GetValue(line), MyPath.Combine(path, PATH_IMAGE));
//图片缓存目录
this.imagecache = MyPath.Combine(this.imagepath, "cache");
MyPath.CreateDir(this.imagecache);
}
else if (line.StartsWith(TAG_REPALCE))
{//特数字替换
string word = ConfHelper.getValue(line);
string p = ConfHelper.getRegex(ConfHelper.getValue1(word));
string r = ConfHelper.getRegex(ConfHelper.getValue2(word));
string word = ConfHelper.GetValue(line);
string p = ConfHelper.GetRegex(ConfHelper.GetValue1(word));
string r = ConfHelper.GetRegex(ConfHelper.GetValue2(word));
if (!string.IsNullOrEmpty(p))
{
this.replaces.Add(p, r);
......@@ -175,20 +175,20 @@ public void SetConfig(string config, string path)
{//类型
ConfHelper.DicAdd(this.typeDic, line);
}else if(line.StartsWith(TAG_REIMAGE)){
this.reimage = ConfHelper.getBooleanValue(line);
this.reimage = ConfHelper.GetBooleanValue(line);
}
}
}
public void init(string path)
public void Init(string path)
{
this.Iscn2tw = false;
//读取配置
string tmp = MyPath.Combine(path, MyPath.getFileName(MSEConfig.TAG, MyConfig.readString(MyConfig.TAG_MSE)));
string tmp = MyPath.Combine(path, MyPath.GetFileName(MSEConfig.TAG, MyConfig.ReadString(MyConfig.TAG_MSE)));
if (!File.Exists(tmp))
{
tmp = MyPath.Combine(path, MyPath.getFileName(MSEConfig.TAG, FILE_CONFIG_NAME));
tmp = MyPath.Combine(path, MyPath.GetFileName(MSEConfig.TAG, FILE_CONFIG_NAME));
if(!File.Exists(tmp))
{
return;//如果默认的也不存在
......
......@@ -447,32 +447,32 @@ string getMonster(Card c, string img,CardPack cardpack=null,bool rarity=true)
if(cardpack!=null){
sb.AppendLine(this.GetLine(TAG_NUMBER, cardpack.pack_id));
if(rarity){
sb.AppendLine(this.GetLine(TAG_RARITY, cardpack.getMseRarity()));
sb.AppendLine(this.GetLine(TAG_RARITY, cardpack.GetMseRarity()));
}
}
if(c.IsType(CardType.TYPE_LINK)){
if(CardLink.isLink(c.def, CardLink.DownLeft)){
if(CardLink.IsLink(c.def, CardLink.DownLeft)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_DL, "yes"));
}
if(CardLink.isLink(c.def, CardLink.Down)){
if(CardLink.IsLink(c.def, CardLink.Down)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_Down, "yes"));
}
if(CardLink.isLink(c.def, CardLink.DownRight)){
if(CardLink.IsLink(c.def, CardLink.DownRight)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_DR, "yes"));
}
if(CardLink.isLink(c.def, CardLink.UpLeft)){
if(CardLink.IsLink(c.def, CardLink.UpLeft)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_UL, "yes"));
}
if(CardLink.isLink(c.def, CardLink.Up)){
if(CardLink.IsLink(c.def, CardLink.Up)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_Up, "yes"));
}
if(CardLink.isLink(c.def, CardLink.UpRight)){
if(CardLink.IsLink(c.def, CardLink.UpRight)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_UR, "yes"));
}
if(CardLink.isLink(c.def, CardLink.Left)){
if(CardLink.IsLink(c.def, CardLink.Left)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_Left, "yes"));
}
if(CardLink.isLink(c.def, CardLink.Right)){
if(CardLink.IsLink(c.def, CardLink.Right)){
sb.AppendLine(this.GetLine(TAG_Link_Marker_Right, "yes"));
}
sb.AppendLine(this.GetLine(TAG_Link_Number, ""+ this.getLinkNumber(c.def)));
......@@ -520,7 +520,7 @@ string getSpellTrap(Card c, string img, bool isSpell,CardPack cardpack=null,bool
if(cardpack!=null){
sb.AppendLine(this.GetLine(TAG_NUMBER, cardpack.pack_id));
if(rarity){
sb.AppendLine(this.GetLine(TAG_RARITY, cardpack.getMseRarity()));
sb.AppendLine(this.GetLine(TAG_RARITY, cardpack.GetMseRarity()));
}
}
sb.AppendLine(" " + TAG_TEXT + ":");
......@@ -888,7 +888,7 @@ public Card[] ReadCards(string set, bool repalceOld)
string file = MyPath.Combine(this.cfg.imagecache, md5);
if(!File.Exists(file)){
//生成缓存
Bitmap bmp=MyBitmap.readImage(img);
Bitmap bmp=MyBitmap.ReadImage(img);
//缩放
if(isPendulum){
bmp=MyBitmap.Zoom(bmp, this.cfg.pwidth, this.cfg.pheight);
......
......@@ -48,7 +48,7 @@ public override string ToString()
}
public class CardJson{
public static void test(){
public static void Test(){
string json = File.ReadAllText(@"F:\TCGEditor_v1.2\t.tcgb");
CardSet cardset = JsonConvert.DeserializeObject<CardSet>(json);
if(cardset.cards!=null){
......
......@@ -136,7 +136,7 @@ public void ToImg(string img, string saveimg1)
#region 检查更新
public static void CheckVersion(bool showNew)
{
string newver = CheckUpdate.GetNewVersion(MyConfig.readString(MyConfig.TAG_UPDATE_URL));
string newver = CheckUpdate.GetNewVersion(MyConfig.ReadString(MyConfig.TAG_UPDATE_URL));
if (newver == CheckUpdate.DEFALUT)
{ //检查失败
if (!showNew)
......@@ -284,8 +284,8 @@ public void SaveMSEs(string file, Card[] cards,bool isUpdate)
return;
}
string pack_db=MyPath.GetRealPath(MyConfig.readString("pack_db"));
bool rarity=MyConfig.readBoolean("mse_auto_rarity", false);
string pack_db=MyPath.GetRealPath(MyConfig.ReadString("pack_db"));
bool rarity=MyConfig.ReadBoolean("mse_auto_rarity", false);
#if DEBUG
MessageBox.Show("db = "+pack_db+",auto rarity="+rarity);
#endif
......
......@@ -101,7 +101,7 @@ public DataEditForm(string datapath)
}
public DataEditForm()
{//默认启动
string dir = MyConfig.readString(MyConfig.TAG_DATA);
string dir = MyConfig.ReadString(MyConfig.TAG_DATA);
if (string.IsNullOrEmpty(dir))
{
Application.Exit();
......@@ -171,13 +171,13 @@ void DataEditFormLoad(object sender, EventArgs e)
this.oldCard = new Card(0);
this.SetCard(this.oldCard);
//删除资源
this.menuitem_operacardsfile.Checked = MyConfig.readBoolean(MyConfig.TAG_DELETE_WITH);
this.menuitem_operacardsfile.Checked = MyConfig.ReadBoolean(MyConfig.TAG_DELETE_WITH);
//用CodeEditor打开脚本
this.menuitem_openfileinthis.Checked = MyConfig.readBoolean(MyConfig.TAG_OPEN_IN_THIS);
this.menuitem_openfileinthis.Checked = MyConfig.ReadBoolean(MyConfig.TAG_OPEN_IN_THIS);
//自动检查更新
this.menuitem_autocheckupdate.Checked = MyConfig.readBoolean(MyConfig.TAG_AUTO_CHECK_UPDATE);
this.menuitem_autocheckupdate.Checked = MyConfig.ReadBoolean(MyConfig.TAG_AUTO_CHECK_UPDATE);
//add require automatically
this.Addrequire = MyConfig.readString(MyConfig.TAG_ADD_REQUIRE);
this.Addrequire = MyConfig.ReadString(MyConfig.TAG_ADD_REQUIRE);
this.menuitem_addrequire.Checked = (this.Addrequire.Length > 0);
if (this.nowCdbFile != null && File.Exists(this.nowCdbFile))
{
......@@ -295,7 +295,7 @@ void InitPath(string datapath)
this.confcover = MyPath.Combine(datapath, "cover.jpg");
if (File.Exists(this.confcover))
{
this.cover = MyBitmap.readImage(this.confcover);
this.cover = MyBitmap.ReadImage(this.confcover);
}
else
{
......@@ -567,7 +567,7 @@ long GetSelect(ComboBox cb)
}
List<long> keys = (List<long>)cb.Tag;
int index = cb.SelectedIndex;
if (index >= keys.Count)
if (index >= keys.Count || index < 0)
{
return 0;
}
......@@ -1155,7 +1155,7 @@ void Menuitem_aboutClick(object sender, EventArgs e)
MyMsg.Show(
LanguageHelper.GetMsg(LMSG.About) + "\t" + Application.ProductName + "\n"
+ LanguageHelper.GetMsg(LMSG.Version) + "\t" + Application.ProductVersion + "\n"
+ LanguageHelper.GetMsg(LMSG.Author) + "\t菜菜");
+ LanguageHelper.GetMsg(LMSG.Author) + "\tNanahira & JoyJ");
}
void Menuitem_checkupdateClick(object sender, EventArgs e)
......@@ -1197,7 +1197,7 @@ void Menuitem_cancelTaskClick(object sender, EventArgs e)
}
void Menuitem_githubClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(MyConfig.readString(MyConfig.TAG_SOURCE_URL));
System.Diagnostics.Process.Start(MyConfig.ReadString(MyConfig.TAG_SOURCE_URL));
}
#endregion
......@@ -1630,12 +1630,12 @@ public void SetImage(long id)
string msepic = MseMaker.GetCardImagePath(this.tasker.MSEImagePath, this.oldCard);
if(File.Exists(msepic))
{
this.pl_image.BackgroundImage = MyBitmap.readImage(msepic);
this.pl_image.BackgroundImage = MyBitmap.ReadImage(msepic);
}
}
else if (File.Exists(pic))
{
this.pl_image.BackgroundImage = MyBitmap.readImage(pic);
this.pl_image.BackgroundImage = MyBitmap.ReadImage(pic);
}
else
{
......@@ -1779,7 +1779,7 @@ void AddMenuItemFormMSE()
string[] files = Directory.GetFiles(this.datapath);
foreach (string file in files)
{
string name = MyPath.getFullFileName(MSEConfig.TAG, file);
string name = MyPath.GetFullFileName(MSEConfig.TAG, file);
//是否是MSE配置文件
if (string.IsNullOrEmpty(name))
{
......@@ -1999,7 +1999,7 @@ void GetLanguageItem()
string[] files = Directory.GetFiles(this.datapath);
foreach (string file in files)
{
string name = MyPath.getFullFileName(MyConfig.TAG_LANGUAGE, file);
string name = MyPath.GetFullFileName(MyConfig.TAG_LANGUAGE, file);
if (string.IsNullOrEmpty(name))
{
continue;
......@@ -2011,7 +2011,7 @@ void GetLanguageItem()
ToolTipText = file
};
tsmi.Click += this.SetLanguage_Click;
if (MyConfig.readString(MyConfig.TAG_LANGUAGE).Equals(name, StringComparison.OrdinalIgnoreCase))
if (MyConfig.ReadString(MyConfig.TAG_LANGUAGE).Equals(name, StringComparison.OrdinalIgnoreCase))
{
tsmi.Checked = true;
}
......@@ -2043,7 +2043,7 @@ void Menuitem_exportMSEimageClick(object sender, EventArgs e)
return;
}
string msepath=MyPath.GetRealPath(MyConfig.readString(MyConfig.TAG_MSE_PATH));
string msepath=MyPath.GetRealPath(MyConfig.ReadString(MyConfig.TAG_MSE_PATH));
if(!File.Exists(msepath)){
MyMsg.Error(LMSG.exportMseImagesErr);
this.menuitem_exportMSEimage.Checked=false;
......@@ -2065,7 +2065,7 @@ void Menuitem_exportMSEimageClick(object sender, EventArgs e)
if (dlg.ShowDialog() == DialogResult.OK)
{
string mseset=dlg.FileName;
string exportpath=MyPath.GetRealPath(MyConfig.readString(MyConfig.TAG_MSE_EXPORT));
string exportpath=MyPath.GetRealPath(MyConfig.ReadString(MyConfig.TAG_MSE_EXPORT));
MseMaker.ExportSet(msepath, mseset, exportpath, delegate{
this.menuitem_exportMSEimage.Checked=false;
});
......@@ -2123,7 +2123,7 @@ void Menuitem_autoreturnClick(object sender, EventArgs e)
if (DataBase.Create(dlg.FileName))
{
//
int len = MyConfig.readInteger(MyConfig.TAG_AUTO_LEN, 30);
int len = MyConfig.ReadInteger(MyConfig.TAG_AUTO_LEN, 30);
for (int i = 0; i < count; i++)
{
if(cards[i].desc!=null){
......@@ -2160,7 +2160,7 @@ void Menuitem_replaceClick(object sender, EventArgs e)
if (DataBase.Create(dlg.FileName))
{
//
_ = MyConfig.readInteger(MyConfig.TAG_AUTO_LEN, 30);
_ = MyConfig.ReadInteger(MyConfig.TAG_AUTO_LEN, 30);
for (int i = 0; i < count; i++)
{
if (cards[i].desc != null)
......
......@@ -200,6 +200,9 @@
<EmbeddedResource Include="CodeEditForm.resx">
<DependentUpon>CodeEditForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\FastColoredTextBoxEx.resx">
<DependentUpon>FastColoredTextBoxEx.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DataEditForm.resx">
<DependentUpon>DataEditForm.cs</DependentUpon>
</EmbeddedResource>
......@@ -232,8 +235,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Core\TCGEditor" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -56,7 +56,7 @@ public void SetDataPath(string datapath)
this.tCards = null;
//数据目录
this.datapath = datapath;
if (MyConfig.readBoolean(MyConfig.TAG_ASYNC))
if (MyConfig.ReadBoolean(MyConfig.TAG_ASYNC))
{
//后台加载数据
this.bgWorker1.RunWorkerAsync();
......@@ -548,7 +548,7 @@ private void bgWorker1_RunWorkerCompleted(object sender, System.ComponentModel.R
private void MainForm_Load(object sender, EventArgs e)
{
//检查更新
if (!MyConfig.readBoolean(MyConfig.TAG_AUTO_CHECK_UPDATE))
if (!MyConfig.ReadBoolean(MyConfig.TAG_AUTO_CHECK_UPDATE))
{
return;
}
......
......@@ -6,21 +6,21 @@ MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_coun
LOCATION_DECK =0x01 --卡组
LOCATION_HAND =0x02 --手牌
LOCATION_MZONE =0x04 --怪兽区
LOCATION_SZONE =0x08 --魔陷区
LOCATION_SZONE =0x08 --魔陷区(0~4)+场地区(5)
LOCATION_GRAVE =0x10 --墓地
LOCATION_REMOVED =0x20 --除外区
LOCATION_EXTRA =0x40 --额外
LOCATION_OVERLAY =0x80 --超量素材
LOCATION_ONFIELD =0x0c --场上(怪兽+魔陷
LOCATION_ONFIELD =0x0c --场上(LOCATION_MZONE+LOCATION_SZONE
--Locations (for redirect) 若在重定向类效果中指定LOCATION_DECK则为弹回卡组顶部
LOCATION_DECKBOT =0x10001 --弹回卡组底部
LOCATION_DECKSHF =0x20001 --弹回卡组并洗牌
--Locations (for SetRange)
--Locations of spell cards
LOCATION_FZONE =0x100 --场地区
LOCATION_PZONE =0x200 --灵摆区
--Positions 表示形式
POS_FACEUP_ATTACK =0x1 --表侧攻击
POS_FACEDOWN_ATTACK =0x2 --里侧攻击
POS_FACEDOWN_ATTACK =0x2 --(reserved)
POS_FACEUP_DEFENSE =0x4 --表侧守备
POS_FACEDOWN_DEFENSE =0x8 --里侧守备
POS_FACEUP =0x5 --正面表示
......@@ -61,7 +61,7 @@ ATTRIBUTE_FIRE =0x04 --炎
ATTRIBUTE_WIND =0x08 --风
ATTRIBUTE_LIGHT =0x10 --光
ATTRIBUTE_DARK =0x20 --暗
ATTRIBUTE_DEVINE =0x40 --神
ATTRIBUTE_DIVINE =0x40 --神
--Races 种族
RACE_ALL =0x1ffffff --全种族
RACE_WARRIOR =0x1 --战士
......@@ -85,7 +85,7 @@ RACE_FISH =0x20000 --鱼
RACE_SEASERPENT =0x40000 --海龙
RACE_REPTILE =0x80000 --爬虫类
RACE_PSYCHO =0x100000 --念动力
RACE_DEVINE =0x200000 --幻神兽
RACE_DIVINE =0x200000 --幻神兽
RACE_CREATORGOD =0x400000 --创造神
RACE_WYRM =0x800000 --幻龙
RACE_CYBERSE =0x1000000 --电子界
......@@ -156,7 +156,7 @@ STATUS_EFFECT_REPLACED =0x80000 --效果被替代(红莲霸权)
STATUS_FUTURE_FUSION =0x100000 --未来融合特殊召唤(不触发融合素材效果)
STATUS_ATTACK_CANCELED =0x200000 --若其為攻擊者,則攻擊中止
STATUS_INITIALIZING =0x400000 --初始化..
STATUS_ACTIVATED =0x800000 --魔法陷阱卡发动過
STATUS_ACTIVATED =0x800000 --N/A
STATUS_JUST_POS =0x1000000 --已改變表示形式(用於STATUS_CONTINUOUS_POS判定)
STATUS_CONTINUOUS_POS =0x2000000 --改變後再次設定成其他表示形式
STATUS_FORBIDDEN =0x4000000 --不能play
......@@ -174,14 +174,14 @@ ASSUME_RACE =6
ASSUME_ATTACK =7
ASSUME_DEFENSE =8
--Link Marker
LINK_MARKER_BOTTOM_LEFT =0x001
LINK_MARKER_BOTTOM =0x002
LINK_MARKER_BOTTOM_RIGHT =0x004
LINK_MARKER_LEFT =0x008
LINK_MARKER_RIGHT =0x020
LINK_MARKER_TOP_LEFT =0x040
LINK_MARKER_TOP =0x080
LINK_MARKER_TOP_RIGHT =0x100
LINK_MARKER_BOTTOM_LEFT =0x001 -- ↙
LINK_MARKER_BOTTOM =0x002 -- ↓
LINK_MARKER_BOTTOM_RIGHT =0x004 -- ↘
LINK_MARKER_LEFT =0x008 -- ←
LINK_MARKER_RIGHT =0x020 -- →
LINK_MARKER_TOP_LEFT =0x040 -- ↖
LINK_MARKER_TOP =0x080 -- ↑
LINK_MARKER_TOP_RIGHT =0x100 -- ↗
--Counter --指示物
COUNTER_WITHOUT_PERMIT =0x1000 --可以放置在非特定對象的指示物
COUNTER_NEED_ENABLE =0x2000 --在卡片本身放置上述指示物的標記(卡片守衛)
......@@ -215,6 +215,14 @@ CHAININFO_CHAIN_ID =0x800 --连锁ID
CHAININFO_TYPE =0x1000 --连锁类型
CHAININFO_EXTTYPE =0x2000 --连锁额外类型
CHAININFO_TRIGGERING_POSITION =0x4000 --连锁发生时的表示形式
CHAININFO_TRIGGERING_CODE =0x8000 --连锁发生时的密码
CHAININFO_TRIGGERING_CODE2 =0x10000 --连锁发生时的其他密码
CHAININFO_TRIGGERING_LEVEL =0x40000 --连锁发生时的等级
CHAININFO_TRIGGERING_RANK =0x80000 --连锁发生时的阶级
CHAININFO_TRIGGERING_ATTRIBUTE =0x100000 --连锁发生时的属性
CHAININFO_TRIGGERING_RACE =0x200000 --连锁发生时的种族
CHAININFO_TRIGGERING_ATTACK =0x400000 --连锁发生时的攻击力
CHAININFO_TRIGGERING_DEFENSE =0x800000 --连锁发生时的守备力
--========== Reset ========== --重置条件(注意:重置条件可以多个相加)
RESET_SELF_TURN =0x10000000 --自己回合的階段重置
RESET_OPPO_TURN =0x20000000 --对方回合的階段重置
......@@ -238,7 +246,7 @@ RESET_OVERLAY =0x04000000 --超量叠放重置
RESET_MSCHANGE =0x08000000 --从怪兽区到魔法区,或者从魔法区到怪兽区(move_to_field()、寶玉獸)
----组合时点
RESETS_STANDARD =0x1fe0000 --RESET_TOFIELD+RESET_LEAVE+RESET_TODECK+RESET_TOHAND+RESET_TEMP_REMOVE+RESET_REMOVE+RESET_TOGRAVE+RESET_TURN_SET
RESETS_STANDARD_DISABLE =0x1ff0000 --0x1fe0000+RESET_DISABLE
RESETS_REDIRECT =0xc7e0000 --RESETS_STANDARD+RESET_OVERLAY+RESET_MSCHANGE-RESET_TOFIELD-RESET_LEAVE (EFFECT_LEAVE_FIELD_REDIRECT)
--========== Types ========== --效果类型(定义效果触发类型,和codes一起使用)
EFFECT_TYPE_SINGLE =0x0001 --自己状态变化时触发
EFFECT_TYPE_FIELD =0x0002 --场上所有卡状态变化时触发
......@@ -254,18 +262,19 @@ EFFECT_TYPE_QUICK_F =0x0400 --诱发即时必发效果(熊猫龙等)
EFFECT_TYPE_CONTINUOUS =0x0800 --由事件觸發的輔助用效果/永續效果
EFFECT_TYPE_XMATERIAL =0x1000 --作为超量素材时超量怪兽获得的效果(十二兽)
EFFECT_TYPE_GRANT =0x2000 --使其他卡片获得效果(天气模样)
EFFECT_TYPE_TARGET =0x4000 --影响持续取的对象的效果(基本只用于魔陷)
--========== Flags ========== --效果的特殊性质
EFFECT_FLAG_INITIAL =0x0001 --可以发动的
EFFECT_FLAG_FUNC_VALUE =0x0002 --此效果的Value属性是函数
EFFECT_FLAG_COUNT_LIMIT =0x0004 --发动次数限制
EFFECT_FLAG_FIELD_ONLY =0x0008 --此效果是注册给全局环境的
EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果
EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(禁止令 大宇宙 王宫的铁壁
EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(大宇宙
EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range不会因为控制权的改变而改变
EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫
EFFECT_FLAG_SET_AVAILABLE =0x0100 --影响场上里侧的卡/裡側狀態可發動
EFFECT_FLAG_CANNOT_NEGATE =0x0200 --含有"此效果不會被無效"的敘述
EFFECT_FLAG_CANNOT_DISABLE =0x0400 --不会被无效
EFFECT_FLAG_CANNOT_DISABLE =0x0400 --效果不会被无效
EFFECT_FLAG_PLAYER_TARGET =0x0800 --以玩家为对象
EFFECT_FLAG_BOTH_SIDE =0x1000 --双方都能使用(部分场地,弹压)
EFFECT_FLAG_COPY_INHERIT =0x2000 --若由复制的效果產生則继承其Reset属性
......@@ -279,16 +288,16 @@ EFFECT_FLAG_SPSUM_PARAM =0x100000 --指定召喚/规则特殊召唤的位置和
EFFECT_FLAG_REPEAT =0x200000 --神之化身的攻击力重复计算
EFFECT_FLAG_NO_TURN_RESET =0x400000 --发条等“这张卡在场上只能发动一次”的效果
EFFECT_FLAG_EVENT_PLAYER =0x800000 --视为对方玩家的效果(动作?)
EFFECT_FLAG_OWNER_RELATE =0x1000000 --持續成為對象
EFFECT_FLAG_AVAILABLE_BD =0x2000000 --战斗破坏确定时效果也适用(纳祭之魔 地狱战士)
EFFECT_FLAG_OWNER_RELATE =0x1000000 --与效果owner关联的效果
EFFECT_FLAG_CANNOT_INACTIVATE =0x2000000 --發動不會被無效
EFFECT_FLAG_CLIENT_HINT =0x4000000 --客户端提示
EFFECT_FLAG_CHAIN_UNIQUE =0x8000000 --同一组连锁只能发动一次
EFFECT_FLAG_NAGA =0x10000000 --N/A
EFFECT_FLAG_CONTINUOUS_TARGET =0x8000000 --建立持續對象的永續魔法、永續陷阱、早埋系以外的裝備魔法卡
EFFECT_FLAG_LIMIT_ZONE =0x10000000 --限制魔法·陷阱卡发动时可以放置的区域
EFFECT_FLAG_COF =0x20000000 --N/A
EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用(卡通王國)
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用
EFFECT_FLAG2_NAGA =0x0001 --特殊情况时发动不会被无效(神卡纳迦的特殊处理)
EFFECT_FLAG2_NAGA =0x0001 --N/A
EFFECT_FLAG2_COF =0x0002 --通常魔法卡在MP1以外发动(邪恶的仪式的特殊处理)
--========== Codes ========== --对永续性效果表示效果类型(EFFECT开头),对诱发型效果表示触发效果的事件/时点(EVENT开头)
EFFECT_IMMUNE_EFFECT =1 --效果免疫
......@@ -319,7 +328,7 @@ EFFECT_CANNOT_DISABLE_SPSUMMON =27 --特殊召唤不会无效
EFFECT_SET_SUMMON_COUNT_LIMIT =28 --限制每回合放置怪兽次数
EFFECT_EXTRA_SUMMON_COUNT =29 --增加召唤(通常召唤)次数
EFFECT_SPSUMMON_CONDITION =30 --特殊召唤条件
EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸
EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸(Card.EnableReviveLimit())
EFFECT_SUMMON_PROC =32 --召唤规则效果
EFFECT_LIMIT_SUMMON_PROC =33 --召唤规则限制
EFFECT_SPSUMMON_PROC =34 --特殊召唤规则
......@@ -389,8 +398,8 @@ EFFECT_SET_BASE_DEFENSE =107 --设置原本防御力
EFFECT_REVERSE_UPDATE =108 --倒置改变攻击力、防御力(天邪鬼)
EFFECT_SWAP_AD =109 --交换攻防(超級漏洞人)
EFFECT_SWAP_BASE_AD =110 --交换原本攻防
EFFECT_SWAP_ATTACK_FINAL =111 --設定最終攻擊力(用於交換攻防)
EFFECT_SWAP_DEFENSE_FINAL =112 --設定最終防禦力(用於交換攻防)
EFFECT_SWAP_ATTACK_FINAL =111 --N/A
EFFECT_SWAP_DEFENSE_FINAL =112 --N/A
EFFECT_ADD_CODE =113 --增加卡名
EFFECT_CHANGE_CODE =114 --改变卡名
EFFECT_ADD_TYPE =115 --增加卡片种类(types)
......@@ -442,7 +451,7 @@ EFFECT_MUST_ATTACK =191 --必须攻击
EFFECT_FIRST_ATTACK =192 --必须第一个攻击
EFFECT_ATTACK_ALL =193 --可以攻击所有怪兽
EFFECT_EXTRA_ATTACK =194 --增加攻击次数
EFFECT_MUST_BE_ATTACKED =195 --必须攻击此卡
EFFECT_MUST_BE_ATTACKED =195 --N/A
EFFECT_ONLY_BE_ATTACKED =196 --只能攻击此卡
EFFECT_ATTACK_DISABLED =197 --攻击已被無效(Duel.NegateAttack()成功的標記)
EFFECT_NO_BATTLE_DAMAGE =200 --不会给对方造成战斗伤害
......@@ -451,6 +460,9 @@ EFFECT_REFLECT_BATTLE_DAMAGE =202 --反弹战斗伤害
EFFECT_PIERCE =203 --贯穿伤害
EFFECT_BATTLE_DESTROY_REDIRECT =204 --战斗破坏时重新指定去向
EFFECT_BATTLE_DAMAGE_TO_EFFECT =205 --战斗伤害视为效果伤害
EFFECT_BOTH_BATTLE_DAMAGE =206 --战斗伤害由双方承受
EFFECT_ALSO_BATTLE_DAMAGE =207 --对自己的战斗伤害让对方也承受
EFFECT_CHANGE_BATTLE_DAMAGE =208 --改变战斗伤害
EFFECT_TOSS_COIN_REPLACE =220 --重新抛硬币
EFFECT_TOSS_DICE_REPLACE =221 --重新掷骰子
EFFECT_FUSION_MATERIAL =230 --指定融合素材的條件
......@@ -497,8 +509,8 @@ EFFECT_SYNCHRO_CHECK =310 --基因组斗士
EFFECT_QP_ACT_IN_NTPHAND =311 --对方回合从自己手卡发动(失乐的圣女)
EFFECT_MUST_BE_SMATERIAL =312 --必须作为同调素材(波动龙 声子龙)
EFFECT_TO_GRAVE_REDIRECT_CB =313 --重新指定去向(寶玉獸)
EFFECT_CHANGE_LEVEL_FINAL =314 --設定最終等級(銀河女王之光)
EFFECT_CHANGE_RANK_FINAL =315 --設定最終階級
EFFECT_CHANGE_LEVEL_FINAL =314 --N/A
EFFECT_CHANGE_RANK_FINAL =315 --N/A
EFFECT_MUST_BE_FMATERIAL =316 --必须作为融合素材
EFFECT_MUST_BE_XMATERIAL =317 --必须作为超量素材
EFFECT_MUST_BE_LMATERIAL =318 --必须作为连接素材
......@@ -509,13 +521,13 @@ EFFECT_CANNOT_SELECT_BATTLE_TARGET =332 --對手不能選擇為攻擊對象
EFFECT_CANNOT_SELECT_EFFECT_TARGET =333 --對手不能選擇為效果對象
EFFECT_ADD_SETCODE =334 --视为「XX」字段的效果
EFFECT_NO_EFFECT_DAMAGE =335 --玩家已受到"效果傷害變成0"的效果影響
EFFECT_UNSUMMONABLE_CARD =336 --不能通常召唤的怪獸
EFFECT_UNSUMMONABLE_CARD =336 --N/A
EFFECT_DISABLE_CHAIN_FIELD =337 --N/A
EFFECT_DISCARD_COST_CHANGE =338 --反制陷阱捨棄手牌的代價改變(解放之阿里阿德涅)
EFFECT_HAND_SYNCHRO =339 --用手牌的怪獸當作同步素材
EFFECT_ADD_FUSION_CODE =340 --作为融合素材时可以当作某一卡名(融合识别)
EFFECT_ADD_FUSION_SETCODE =341 --作为融合素材时可以当作某一字段(魔玩具改造)
EFFECT_RISE_TO_FULL_HEIGHT =342 --仁王立
EFFECT_RISE_TO_FULL_HEIGHT =342 --N/A
EFFECT_ONLY_ATTACK_MONSTER =343 --只能攻擊X
EFFECT_MUST_ATTACK_MONSTER =344 --若攻擊則必須攻擊X
EFFECT_PATRICIAN_OF_DARKNESS =345 --由對手選擇攻擊對象(黑暗貴族)
......@@ -531,9 +543,15 @@ EFFECT_ADD_LINK_CODE =354 --用作连接素材时的卡名
EFFECT_ADD_LINK_SETCODE =355 --reserve
EFFECT_ADD_LINK_ATTRIBUTE =356 --用作连接素材时的属性
EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族
EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材
EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon
EFFECT_MATERIAL_LIMIT =361 --
EFFECT_SET_BATTLE_ATTACK =362 --战斗的伤害计算用设置的攻击力进行
EFFECT_SET_BATTLE_DEFENSE =363 --战斗的伤害计算用设置的守备力进行
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP =1000 --游戏开始时
EVENT_STARTUP =1000 --N/A
EVENT_FLIP =1001 --翻转时
EVENT_FREE_CHAIN =1002 --自由时点(强脱等,还有昴星团等诱发即时效果)
EVENT_DESTROY =1010 --確定被破壞的卡片移動前
......@@ -545,7 +563,7 @@ EVENT_LEAVE_FIELD =1015 --离场时
EVENT_CHANGE_POS =1016 --表示形式变更时
EVENT_RELEASE =1017 --解放时
EVENT_DISCARD =1018 --丢弃手牌时
EVENT_LEAVE_FIELD_P =1019 --永久离场时
EVENT_LEAVE_FIELD_P =1019 --離場的卡片移動前
EVENT_CHAIN_SOLVING =1020 --连锁处理开始时(EVENT_CHAIN_ACTIVATING之後)
EVENT_CHAIN_ACTIVATING =1021 --连锁处理准备中
EVENT_CHAIN_SOLVED =1022 --连锁处理结束时
......@@ -556,7 +574,7 @@ EVENT_CHAIN_END =1026 --连锁串结束时
EVENT_CHAINING =1027 --效果发动时
EVENT_BECOME_TARGET =1028 --成为效果对象时
EVENT_DESTROYED =1029 --被破坏时
EVENT_MOVE =1030 --
EVENT_MOVE =1030 --移動卡片(急兔馬)
EVENT_ADJUST =1040 --adjust_all()调整後(御前试合)
EVENT_SUMMON_SUCCESS =1100 --通常召唤成功时
EVENT_FLIP_SUMMON_SUCCESS =1101 --翻转召唤成功时
......@@ -572,6 +590,9 @@ EVENT_DRAW =1110 --抽卡时
EVENT_DAMAGE =1111 --造成战斗/效果伤害时
EVENT_RECOVER =1112 --回复生命值时
EVENT_PREDRAW =1113 --抽卡阶段通常抽卡前
EVENT_SUMMON_NEGATED =1114 --召唤被无效时
EVENT_FLIP_SUMMON_NEGATED =1115 --反转召唤被无效时
EVENT_SPSUMMON_NEGATED =1116 --特殊召唤被无效时
EVENT_CONTROL_CHANGED =1120 --控制权变更
EVENT_EQUIP =1121 --装备卡装备时
EVENT_ATTACK_ANNOUNCE =1130 --攻击宣言时
......@@ -614,7 +635,7 @@ CATEGORY_HANDES =0x80 --捨棄手牌效果
CATEGORY_SUMMON =0x100 --含召唤的效果
CATEGORY_SPECIAL_SUMMON =0x200 --含特殊召唤的效果
CATEGORY_TOKEN =0x400 --含衍生物效果
CATEGORY_FLIP =0x800 --含翻转效果
CATEGORY_GRAVE_ACTION =0x800 --包含涉及墓地的部分的效果(屋敷わらし)
CATEGORY_POSITION =0x1000 --改变表示形式效果
CATEGORY_CONTROL =0x2000 --改变控制权效果
CATEGORY_DISABLE =0x4000 --使效果无效效果
......@@ -629,12 +650,12 @@ CATEGORY_DEFCHANGE =0x400000 --改变防御效果
CATEGORY_COUNTER =0x800000 --指示物效果
CATEGORY_COIN =0x1000000 --硬币效果
CATEGORY_DICE =0x2000000 --骰子效果
CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果
CATEGORY_LEAVE_GRAVE =0x4000000 --涉及墓地的效果(王家長眠之谷)
CATEGORY_LVCHANGE =0x8000000 --改变等级效果
CATEGORY_NEGATE =0x10000000 --使发动无效效果
CATEGORY_ANNOUNCE =0x20000000 --發動時宣言卡名的效果
CATEGORY_FUSION_SUMMON =0x40000000 --融合召唤效果(暴走魔法阵)
CATEGORY_TOEXTRA =0x80000000 --
CATEGORY_TOEXTRA =0x80000000 --回额外卡组效果
--Hint
HINT_EVENT =1
HINT_MESSAGE =2
......@@ -646,6 +667,7 @@ HINT_ATTRIB =7
HINT_CODE =8
HINT_NUMBER =9
HINT_CARD =10
HINT_ZONE =11
--Card Hint
CHINT_TURN =1
CHINT_CARD =2
......@@ -667,6 +689,9 @@ OPCODE_ISSETCARD =0x40000101
OPCODE_ISTYPE =0x40000102
OPCODE_ISRACE =0x40000103
OPCODE_ISATTRIBUTE =0x40000104
--
DOUBLE_DAMAGE =0x80000000
HALF_DAMAGE =0x80000001
--Hint Message --提示消息,显示在窗口的上面
HINTMSG_RELEASE =500 --请选择要解放的卡
HINTMSG_DISCARD =501 --请选择要丢弃的手牌
......@@ -679,9 +704,9 @@ HINTMSG_TODECK =507 --请选择要返回卡组的卡
HINTMSG_SUMMON =508 --请选择要召唤的卡
HINTMSG_SPSUMMON =509 --请选择要特殊召唤的卡
HINTMSG_SET =510 --请选择要盖放的卡
HINTMSG_FMATERIAL =511 --请选择融合召唤的素材
HINTMSG_SMATERIAL =512 --请选择同调召唤的素材
HINTMSG_XMATERIAL =513 --请选择超量召唤的素材
HINTMSG_FMATERIAL =511 --请选择要作为融合素材的卡
HINTMSG_SMATERIAL =512 --请选择要作为同调素材的卡
HINTMSG_XMATERIAL =513 --请选择要作为超量素材的卡
HINTMSG_FACEUP =514 --请选择表侧表示的卡
HINTMSG_FACEDOWN =515 --请选择里侧表示的卡
HINTMSG_ATTACK =516 --请选择攻击表示的怪兽
......@@ -701,7 +726,7 @@ HINTMSG_SELF =529 --请选择自己的卡
HINTMSG_OPPO =530 --请选择对方的卡
HINTMSG_TRIBUTE =531 --请选择上级召唤用需要解放的怪兽
HINTMSG_DEATTACHFROM =532 --请选择要取除超量素材的怪兽
HINTMSG_LMATERIAL =533 --请选择连接召唤的素材
HINTMSG_LMATERIAL =533 --请选择要作为连接素材的卡
HINTMSG_ATTACKTARGET =549 --请选择攻击的对象
HINTMSG_EFFECT =550 --请选择要发动的效果
HINTMSG_TARGET =551 --请选择效果的对象
......@@ -721,6 +746,9 @@ HINTMSG_RESOLVECARD =568 --请选择要处理效果的卡
HINTMSG_ZONE =569 --请选择[%ls]的位置
HINTMSG_DISABLEZONE =570 --请选择要变成不能使用的卡片区域
HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD =574 --请选择要操作的卡
--Select --请选择
SELECT_HEADS =60 --正面
SELECT_TAILS =61 --反面
......@@ -752,9 +780,9 @@ TIMING_TOGRAVE =0x800000 --进墓地时点
TIMING_BATTLE_PHASE =0x1000000 --战斗阶段时点
TIMING_EQUIP =0x2000000 --装备时点
TIMING_BATTLE_STEP_END =0x4000000 --戰鬥步驟結束時
TIMING_BATTLED =0x8000000 --伤害计算后时点
----组合时点
TIMINGS_CHECK_MONSTER =0x1c0 -- 怪兽正面上场
TIMINGS_CHECK_MONSTER_E =0x1e0 -- 怪兽正面上场 + EP
--Global flag --特殊标记
GLOBALFLAG_DECK_REVERSE_CHECK =0x1 --卡组翻转标记
GLOBALFLAG_BRAINWASHING_CHECK =0x2 --洗脑解除标记
......@@ -789,9 +817,6 @@ ACTIVITY_FLIPSUMMON =4 --
ACTIVITY_ATTACK =5 --
ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter
ACTIVITY_CHAIN =7 -- only available in custom counter
--announce type(宣言类型,CATEGORY_ANNOUNCE的OperationInfo的target_param)
ANNOUNCE_CARD =0x7 --宣言卡片
ANNOUNCE_CARD_FILTER =0x8 --宣言符合条件的卡片
--cards with double names
CARD_MARINE_DOLPHIN =78734254 --海洋海豚
CARD_TWINKLE_MOSS =13857930 --光輝苔蘚
......@@ -9,9 +9,9 @@
!system 5 特殊召唤成功
!system 6 反转召唤成功
!system 7 发动
!system 10 除指示物
!system 11 支付LP
!system 12 除本身的素材
!system 10 除指示物
!system 11 支付基本分
!system 12 除本身的素材
!system 20 抽卡阶段中
!system 21 准备阶段中
!system 22 主要阶段中
......@@ -36,27 +36,30 @@
!system 64 二重状态
!system 65 使用效果
!system 66 持续公开
!system 67 原本持有者为对方
!system 70 怪兽卡
!system 71 魔法卡
!system 72 陷阱卡
!system 80 进入战斗阶段
!system 81 进入结束阶段
!system 90 是否不解放怪通常召唤?
!system 90 是否不解放怪通常召唤?
!system 91 是否使用额外的召唤机会?
!system 92 是否要解放对方怪兽进行上级召唤?
!system 93 是否要继续选择素材?
!system 94 是否现在使用这张卡的效果?
!system 95 是否使用[%ls]的效果?
!system 96 是否使用[%ls]的效果代替破坏?
!system 97 是否把[%ls]在魔法与陷阱区域盖放
!system 97 是否把[%ls]在魔法与陷阱区域放置
!system 98 是否要解放对方怪兽?
!system 100 先攻
!system 101 后攻
!system 102 我方
!system 103 对方
!system 200 是否在[%ls]发动[%ls]的效果?
!system 201 此时没有可以发动的效果
!system 202 是否要确认场上的情况?
!system 203 是否要进行连锁?
!system 204除%d个[%ls]
!system 204除%d个[%ls]
!system 205 请选择排列顺序
!system 206 请选择连锁顺序
!system 207 翻开卡组上方%d张卡:
......@@ -88,9 +91,9 @@
!system 508 请选择要召唤的卡
!system 509 请选择要特殊召唤的卡
!system 510 请选择要盖放的卡
!system 511 请选择融合召唤的素材
!system 512 请选择同调召唤的素材
!system 513 请选择超量召唤的素材
!system 511 请选择要作为融合素材的卡
!system 512 请选择要作为同调素材的卡
!system 513 请选择要作为超量素材的卡
!system 514 请选择表侧表示的卡
!system 515 请选择里侧表示的卡
!system 516 请选择攻击表示的怪兽
......@@ -104,13 +107,13 @@
!system 524 请选择里侧攻击表示的怪兽
!system 525 请选择里侧守备表示的怪兽
!system 526 请选择给对方确认的卡
!system 527 请选择要盖放到场上的卡
!system 527 请选择要放置到场上的卡
!system 528 请选择要改变表示形式的怪兽
!system 529 请选择自己的卡
!system 530 请选择对方的卡
!system 531 请选择上级召唤用需要解放的怪兽
!system 532 请选择要取除超量素材的怪兽
!system 533 请选择连接召唤的素材
!system 533 请选择要作为连接素材的卡
!system 534 请选择要保留在场上的卡
!system 549 请选择攻击的对象
!system 550 请选择要发动的效果
......@@ -132,6 +135,9 @@
!system 569 请选择[%ls]的位置
!system 570 请选择要变成不能使用的卡片区域
!system 571 请选择要移动到的位置
!system 572 请选择要放置指示物的卡
!system 573 请选择要无效的卡
!system 574 请选择要操作的卡
!system 1000 卡组
!system 1001 手卡
!system 1002 怪兽区
......@@ -168,7 +174,7 @@
!system 1036 恐龙
!system 1037
!system 1038 海龙
!system 1039 爬虫
!system 1039 爬虫
!system 1040 念动力
!system 1041 幻神兽
!system 1042 创造神
......@@ -202,6 +208,7 @@
!system 1075 特殊召唤
!system 1076 连接
!system 1080 (N/A)
!system 1081 额外怪兽区
#GUI
!system 1100 魔陷破坏
!system 1101 怪兽破坏
......@@ -283,7 +290,7 @@
!system 1228 ↓额外选项(无特殊要求请勿修改)
!system 1229 不检查卡组
!system 1230 不洗切卡组
!system 1231 初始LP
!system 1231 初始基本分
!system 1232 初始手卡数:
!system 1233 每回合抽卡:
!system 1234 主机名称:
......@@ -309,29 +316,39 @@
!system 1261 大师规则2
!system 1262 大师规则3
!system 1263 新大师规则
!system 1264 大师规则2020
!system 1269 数字灵摆图片
!system 1270 卡片信息
!system 1271 消息记录
!system 1272 清除记录
!system 1273 系统设定
!system 1274 自动选择怪兽卡片位置
!system 1275 ↑随机选择位置
!system 1276 自动排列连锁顺序
!system 1276 自动发动并排序必发效果
!system 1277 没有可连锁的卡时延迟回应
!system 1278 自动选择魔陷卡片位置
!system 1279 开启音效
!system 1280 开启音乐
!system 1281 按场景切换音乐
!system 1290 禁用聊天功能
!system 1282 窗口大小
!system 1283
!system 1284
!system 1285
!system 1286 特大
!system 1287 只有连锁1也显示连锁动画
!system 1288 语言(重启后生效)
!system 1289 默认
!system 1290 忽略对方发言
!system 1291 忽略观战者发言
!system 1292 忽略时点
!system 1293 显示时点
!system 1294 可用时点
!system 1295 取消操作
!system 1296 完成选择
!system 1297 切洗手卡
!system 1297 洗切手卡
!system 1298 辅助功能
!system 1299 加快动画效果
!system 1300 禁限卡表
!system 1300 卡组分类
!system 1301 卡组列表:
!system 1302 保存
!system 1303 另存
......@@ -358,6 +375,7 @@
!system 1325 关键字:
!system 1326 效果
!system 1327 搜索
!system 1328 管理
!system 1329 系列:
!system 1330 主卡组:
!system 1331 额外卡组:
......@@ -386,6 +404,7 @@
!system 1356 是否要放弃对卡组的修改?
!system 1357 不提示保留对卡组的修改
!system 1358 键入关键字后自动进行搜索
!system 1359 是否确定投降?
!system 1360 上一步
!system 1361 删除录像
!system 1362 重命名
......@@ -394,6 +413,7 @@
!system 1365 重命名失败,可能存在同名文件
!system 1366 自动保存录像
!system 1367 录像已自动保存为%ls.yrp
!system 1369 提取卡组
!system 1370 星数↑
!system 1371 攻击↑
!system 1372 守备↑
......@@ -404,9 +424,12 @@
!system 1380 人机模式
!system 1381 残局模式
!system 1382 人机信息:
!system 1383 使用旧规则(大师规则3)
!system 1384 电脑锁定出剪刀
!system 1385 列表为空,可能未安装合适的人机
!system 1386 使用正则表达式搜索卡片
!system 1387 卡组代码
!system 1388 Ctrl+A全选,Ctrl+C复制,Ctrl+V粘贴
!system 1389 卡组代码无效。
!system 1390 等待行动中...
!system 1391 等待行动中....
!system 1392 等待行动中.....
......@@ -431,7 +454,38 @@
!system 1418 额外卡组数量应不超过15张,当前卡组数量为%d张。
!system 1419 副卡组数量应不超过15张,当前卡组数量为%d张。
!system 1420 有额外卡组卡片存在于主卡组,可能是额外卡组数量超过15张。
!system 1421 宣言的卡不符合条件,或无法被主机识别。
!system 1421 操作无效,请重试。
!system 1422 宣言的卡不符合条件,或无法被主机识别。
!system 1423 宣言的属性不符合条件。
!system 1424 宣言的种族不符合条件
!system 1425 宣言的数字不符合条件。
!system 1426 选择的选项不符合条件
!system 1427 选择的卡片不符合条件。
!system 1428 选择的连锁不符合条件。
!system 1429 选择的位置不符合条件。
!system 1430 选择的表示形式不符合条件。
!system 1431 选择的指示物不符合条件。
!system 1450 卡包展示
!system 1451 人机卡组
!system 1452 未分类卡组
!system 1453 --------
!system 1460 卡组管理
!system 1461 新建分类
!system 1462 重命名分类
!system 1463 删除分类
!system 1464 新建卡组
!system 1465 重命名卡组
!system 1466 删除卡组
!system 1467 移动到分类
!system 1468 复制到分类
!system 1469 请输入分类名:
!system 1470 确实要删除此分类和分类下全部卡组吗?
!system 1471 请输入卡组名:
!system 1472 请选择要移动到的分类:
!system 1473 请选择要复制到的分类:
!system 1474 已存在同名分类
!system 1475 已存在同名卡组
!system 1476 删除失败
!system 1500 决斗结束。
!system 1501 录像结束。
!system 1502 连接已断开。
......@@ -450,13 +504,13 @@
!system 1609 [%ls]的效果发动
!system 1610 [%ls](%ls,%d)成为对象
!system 1611 我方抽了%d张卡
!system 1612抽了%d张卡
!system 1612抽了%d张卡
!system 1613 我方受到%d伤害
!system 1614 对方受到%d伤害
!system 1615 我方回复%dLP
!system 1616 对方回复%dLP
!system 1615 我方回复%d基本分
!system 1616 对方回复%d基本分
!system 1617 [%ls]放置了%d个[%ls]
!system 1618 [%ls]除了%d个[%ls]
!system 1618 [%ls]除了%d个[%ls]
!system 1619 [%ls]攻击[%ls]
!system 1620 [%ls]直接攻击
!system 1621 攻击被无效
......@@ -467,7 +521,7 @@
!system 1700 可以用鼠标右键%ls
#victory reason
!victory 0x0 投降
!victory 0x1 LP变成0
!victory 0x1 基本分变成0
!victory 0x2 没有卡可抽
!victory 0x3 超时
!victory 0x4 失去连接
......@@ -487,7 +541,8 @@
!victory 0x1d 「方程式运动员胜利团队」效果胜利
!victory 0x1e 「飞行象」效果胜利
!victory 0x1f 「守护神 艾克佐迪亚」效果胜利
!victory 0x20 由于「%ls」的效果获得比赛胜利
!victory 0x20 「真艾克佐迪亚」效果胜利
!victory 0xffff 由于「%ls」的效果获得比赛胜利
#counters
!counter 0x1 魔力指示物
!counter 0x1002 楔指示物
......@@ -562,6 +617,14 @@
!counter 0x104d 信号指示物
!counter 0x4e 指示物(魂之灵摆)
!counter 0x104f 蛊指示物
!counter 0x50 指示物(娱乐伙伴 掉头跑骑兵)
!counter 0x51 指示物(蜂军巢)
!counter 0x52 指示物(防火龙·暗流体)
!counter 0x53 指示物(炽天蝶)
!counter 0x54 指示物(星遗物引导的前路)
!counter 0x55 指示物(隐居者的大釜)
!counter 0x56 炎星指示物
!counter 0x57 幻魔指示物
#setnames, using tab for comment
!setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス
......@@ -574,8 +637,8 @@
!setname 0x7 古代的机械 アンティーク・ギア
!setname 0x8 英雄 HERO
!setname 0x3008 元素英雄 EHERO
#setname 0x5008 幻影英雄 V・HERO
#setname 0x6008 邪心英雄 E-HERO
!setname 0x5008 幻影英雄 VHERO
!setname 0x6008 邪心英雄 E-HERO
!setname 0xa008 假面英雄 MHERO
!setname 0xc008 命运英雄 D-HERO
!setname 0x9 新宇 ネオス
......@@ -672,7 +735,7 @@
#setname 0x4d N/A
#setname 0x4e 进化 エヴォル
!setname 0x304e 进化虫 エヴォルド
!setname 0x604e 进化龙 エヴォルダ
!setname 0x604e 进化龙 エヴォルダ
!setname 0x504e 进化帝 エヴォルカイザー
#setname 0x4f 爆裂 バスター
!setname 0x104f /爆裂体 /バスター
......@@ -721,7 +784,7 @@
!setname 0x73 超量 エクシーズ
!setname 0x1073 混沌超量 CX(カオスエクシーズ)
!setname 0x2073 超量龙 エクシーズ・ドラゴン
!setname 0x74 水精鱗
!setname 0x74 水精鳞 水精
!setname 0x75 深渊 アビス
!setname 0x76 纹章兽 紋章獣
!setname 0x77 海皇
......@@ -739,6 +802,7 @@
!setname 0x7e 异热同心武器 ZW(ゼアル・ウェポン)
!setname 0x7f 霍普 ホープ
!setname 0x107f 希望皇 霍普 希望皇ホープ
!setname 0x207f 未来皇 霍普 未来皇ホープ
!setname 0x80 尘妖 ダストン
!setname 0x81 炎王
!setname 0x1081 炎王兽 炎王獣
......@@ -766,7 +830,7 @@
!setname 0x4093 电子暗黑 サイバー・ダーク/サイバーダーク
!setname 0x94 电子科技 サイバネティック
!setname 0x95 升阶魔法 RUM
!setname 0x96 电子鱼人 フィッシュボーグ
!setname 0x96 电子鱼人|非「电子」 フィッシュボーグ
!setname 0x97 古遗物 アーティファクト
!setname 0x98 魔术师 魔術師
!setname 0x99 异色眼 オッドアイズ
......@@ -795,7 +859,7 @@
!setname 0xa9 毛绒动物 ファーニマル
!setname 0xaa 机壳 クリフォート
!setname 0x10aa 隐藏的机壳 アポクリフォート
!setname 0xab 文具电子人 ブンボーグ
!setname 0xab 文具电子人|非「电子」 ブンボーグ
!setname 0xac 哥布林 ゴブリン
!setname 0xad 魔玩具 デストーイ
!setname 0xae 契约书 契約書
......@@ -914,7 +978,7 @@
!setname 0x10a 珀耳修斯 パーシアス
!setname 0x10b 廷达魔三角 ティンダングル
!setname 0x10c 机界骑士 ジャックナイツ
!setname 0x10d 魔导兽 魔導獣
!setname 0x10d 魔导兽|非「魔导」 魔導獣
!setname 0x10e 进化药 進化薬
!setname 0x10f 枪管 ヴァレル
!setname 0x110 眼纳祭神 アイズ・サクリファイス
......@@ -932,15 +996,50 @@
!setname 0x11b 自奏圣乐 オルフェゴール
!setname 0x11c 雷龙 サンダー·ドラゴン
!setname 0x11d 禁忌的 禁じられた
!setname 0x11e 危险! Danger!
!setname 0x11e 未界域
!setname 0x11f 奈芙提斯 ネフティス
!setname 0x120 调皮宝贝 プランキッズ
!setname 0x121 魔妖
!setname 0x122 女武神 Valkyrie
!setname 0x123 蔷薇龙 ローズ・ドラゴン
!setname 0x122 女武神 ワルキューレ
!setname 0x123 蔷薇 ローズ
!setname 0x1123 蔷薇龙 ローズ・ドラゴン
!setname 0x124 机械天使 機械天使
!setname 0x125 笑容 スマイル
!setname 0x126 时间怪盗 Time Thief
!setname 0x126 时间潜行者 クロノダイバー
!setname 0x127 无限起动 無限起動
!setname 0x128 魔女术 ウィッチクラフト
!setname 0x129 咒眼 呪眼
!setname 0x12a 恩底弥翁 エンディミオン
!setname 0x12b 海晶少女 マリンセス
!setname 0x12c 天威
!setname 0x12d 斯摩夫 シムルグ
!setname 0x12e 占卜魔女 占い魔女
!setname 0x12f 蜂军 BF(ビー・フォース)
!setname 0x130 破械
!setname 0x1130 破械神
!setname 0x131 梦镜 Dream Mirror
!setname 0x132 斩机 斬機
!setname 0x133 半龙女仆 ドラゴンメイド
!setname 0x134 王战 ジェネレイド
!setname 0x135 @火灵天星 @イグニスター
!setname 0x136 “艾” Ai(アイ)
!setname 0x137 战华 戦華
!setname 0x138 巨石遗物 メガリス
!setname 0x139 守护神官 守護神官
!setname 0x13a 拟声 オノマト
!setname 0x13b 叛逆 リベリオン
!setname 0x13c 代码破坏者 コードブレイカー
!setname 0x13d 星义 ネメシス
!setname 0x13e 巴巴罗斯 バルバロス
!setname 0x13f 巡掠海魔 Plunder Patroll
!setname 0x140 魔救 アダマシア
!setname 0x141 六花
#setname 0x142 黄金国 エルド
!setname 0x1142 黄金国巫妖 エルドリッチ
!setname 0x2142 黄金国永生药 エルドリクシル
!setname 0x143 黄金乡 黄金郷
!setname 0x144 幻魔
!setname 0x145 教导 ドラグマ
!setname 0x146 童话动物 メルフィー
!setname 0x147 波波 ポータン
!setname 0x148 罗兰 ローラン
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