1. 增加文档注释

2. 增加日志自动清理功能
3. 删除SDK测试工程
This commit is contained in:
hzhuangxin01 2019-02-21 10:44:52 +08:00
parent 3aace68789
commit 59defae499
86 changed files with 1249 additions and 7333 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/GeneratorCode/bin/Debug
/TmatrixCodeGenerator/
/GeneratorCode/bin/Release
/Help

View File

@ -1,4 +1,17 @@
using System;
// ***********************************************************************
// Assembly : GeneratorCode
// Author : 黄昕 <hzhuangxin01@corp.netease.com>
// Created : 02-15-2019
//
// Last Modified By : 黄昕 <hzhuangxin01@corp.netease.com>
// Last Modified On : 02-20-2019
// ***********************************************************************
// <copyright file="NConfig.cs" company="NetEase">
// Copyright © 2019
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@ -9,21 +22,42 @@ using JetBrains.Annotations;
namespace GeneratorCode.Configure
{
/// <summary>
/// Class NConfig.
/// </summary>
public static class NConfig
{
/// <summary>
/// Delegate ConfigChangedHandle
/// </summary>
public delegate void ConfigChangedHandle();
/// <summary>
/// The CFG file name
/// </summary>
private static readonly string _cfgFileName = @".\config.ini";
/// <summary>
/// The CFG data
/// </summary>
private static IniData _cfgData;
/// <summary>
/// Occurs when [on configuration changed].
/// </summary>
public static event ConfigChangedHandle OnConfigChanged;
/// <summary>
/// Configurations the changed.
/// </summary>
private static void ConfigChanged()
{
OnConfigChanged?.Invoke();
}
/// <summary>
/// Loads the CFG from file.
/// </summary>
private static void LoadCfgFromFile()
{
try
@ -46,6 +80,9 @@ namespace GeneratorCode.Configure
}
}
/// <summary>
/// Initializes the configure.
/// </summary>
public static void InitConfigure()
{
var cfgTask = new List<string>();
@ -95,6 +132,14 @@ namespace GeneratorCode.Configure
LoadCfgFromFile();
}
/// <summary>
/// Gets the CFG value.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="secName">Name of the sec.</param>
/// <param name="keyName">Name of the key.</param>
/// <param name="defValue">The definition value.</param>
/// <returns>T.</returns>
public static T GetCfgValue<T>([NotNull] string secName, [NotNull] string keyName, T defValue = default(T))
{
var ret = defValue;

View File

@ -47,6 +47,8 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />

View File

@ -1,84 +1,279 @@
using System;
// ***********************************************************************
// Assembly : GeneratorCode
// Author : 黄昕 <hzhuangxin01@corp.netease.com>
// Created : 02-15-2019
//
// Last Modified By : 黄昕 <hzhuangxin01@corp.netease.com>
// Last Modified On : 02-20-2019
// ***********************************************************************
// <copyright file="NLog.cs" company="NetEase">
// Copyright © 2019
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.IO.Compression;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading;
using GeneratorCode.Configure;
using JetBrains.Annotations;
using Timer = System.Timers.Timer;
namespace GeneratorCode.Logs
{
/// <summary>
/// Enum NLogLevel
/// </summary>
public enum NLogLevel
{
/// <summary>
/// The fatal
/// </summary>
Fatal = 0,
/// <summary>
/// The crash
/// </summary>
Crash,
/// <summary>
/// The error
/// </summary>
Error,
/// <summary>
/// The warring
/// </summary>
Warring,
/// <summary>
/// The information
/// </summary>
Info,
/// <summary>
/// The debug
/// </summary>
Debug,
/// <summary>
/// The maximum level
/// </summary>
MaxLevel
}
/// <summary>
/// Enum CacheOptMode
/// </summary>
public enum CacheOptMode
{
/// <summary>
/// The drop
/// </summary>
Drop = 0,
/// <summary>
/// The replease
/// </summary>
Replease
}
/// <summary>
/// Class NLogConfig.
/// </summary>
public class NLogConfig
{
/// <summary>
/// Delegate LogCfgChangedHandle
/// </summary>
public delegate void LogCfgChangedHandle();
/// <summary>
/// The CFG lock
/// </summary>
private readonly object _cfgLock = new object();
/// <summary>
/// Initializes a new instance of the <see cref="NLogConfig"/> class.
/// </summary>
public NLogConfig()
{
LogConfig();
NConfig.OnConfigChanged += () => { LogCfgChanged(); };
}
/// <summary>
/// Gets or sets a value indicating whether [log enable].
/// </summary>
/// <value><c>true</c> if [log enable]; otherwise, <c>false</c>.</value>
public bool LogEnable { get; set; }
/// <summary>
/// Gets or sets the log level.
/// </summary>
/// <value>The log level.</value>
public NLogLevel LogLevel { get; set; }
/// <summary>
/// Gets or sets the default level.
/// </summary>
/// <value>The default level.</value>
public NLogLevel DefaultLevel { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [asynchronous mode].
/// </summary>
/// <value><c>true</c> if [asynchronous mode]; otherwise, <c>false</c>.</value>
public bool AsyncMode { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [force new line].
/// </summary>
/// <value><c>true</c> if [force new line]; otherwise, <c>false</c>.</value>
public bool ForceNewLine { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [automatic cleanup].
/// </summary>
/// <value><c>true</c> if [automatic cleanup]; otherwise, <c>false</c>.</value>
public bool AutoCleanup { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show date].
/// </summary>
/// <value><c>true</c> if [show date]; otherwise, <c>false</c>.</value>
public bool ShowDate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show time].
/// </summary>
/// <value><c>true</c> if [show time]; otherwise, <c>false</c>.</value>
public bool ShowTime { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show m sec].
/// </summary>
/// <value><c>true</c> if [show m sec]; otherwise, <c>false</c>.</value>
public bool ShowMSec { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show level].
/// </summary>
/// <value><c>true</c> if [show level]; otherwise, <c>false</c>.</value>
public bool ShowLevel { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show code file].
/// </summary>
/// <value><c>true</c> if [show code file]; otherwise, <c>false</c>.</value>
public bool ShowCodeFile { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show function].
/// </summary>
/// <value><c>true</c> if [show function]; otherwise, <c>false</c>.</value>
public bool ShowFunction { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [show code line].
/// </summary>
/// <value><c>true</c> if [show code line]; otherwise, <c>false</c>.</value>
public bool ShowCodeLine { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [en console].
/// </summary>
/// <value><c>true</c> if [en console]; otherwise, <c>false</c>.</value>
public bool EnConsole { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [en trace].
/// </summary>
/// <value><c>true</c> if [en trace]; otherwise, <c>false</c>.</value>
public bool EnTrace { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [en debug].
/// </summary>
/// <value><c>true</c> if [en debug]; otherwise, <c>false</c>.</value>
public bool EnDebug { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [en file].
/// </summary>
/// <value><c>true</c> if [en file]; otherwise, <c>false</c>.</value>
public bool EnFile { get; set; }
/// <summary>
/// Gets or sets the maximum items cache.
/// </summary>
/// <value>The maximum items cache.</value>
public int MaxItemsCache { get; set; }
/// <summary>
/// Gets or sets the cache mode.
/// </summary>
/// <value>The cache mode.</value>
public CacheOptMode CacheMode { get; set; }
/// <summary>
/// Gets or sets the sleep time.
/// </summary>
/// <value>The sleep time.</value>
public int SleepTime { get; set; }
/// <summary>
/// Gets or sets the number out items.
/// </summary>
/// <value>The number out items.</value>
public int NumOutItems { get; set; }
/// <summary>
/// Gets or sets the dir path.
/// </summary>
/// <value>The dir path.</value>
public string DirPath { get; set; }
/// <summary>
/// Gets or sets the file name pre.
/// </summary>
/// <value>The file name pre.</value>
public string FileNamePre { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [en split log].
/// </summary>
/// <value><c>true</c> if [en split log]; otherwise, <c>false</c>.</value>
public bool EnSplitLog { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [split by data].
/// </summary>
/// <value><c>true</c> if [split by data]; otherwise, <c>false</c>.</value>
public bool SplitByData { get; set; }
/// <summary>
/// Gets or sets the size of the split by.
/// </summary>
/// <value>The size of the split by.</value>
public int SplitBySize { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [roolback file].
/// </summary>
/// <value><c>true</c> if [roolback file]; otherwise, <c>false</c>.</value>
public bool RoolbackFile { get; set; }
/// <summary>
/// Gets or sets the maximum file number.
/// </summary>
/// <value>The maximum file number.</value>
public int MaxFileNum { get; set; }
/// <summary>
/// Gets or sets the keep days.
/// </summary>
/// <value>The keep days.</value>
public int KeepDays { get; set; }
/// <summary>
/// Gets or sets the backup days.
/// </summary>
/// <value>The backup days.</value>
public int BackupDays { get; set; }
/// <summary>
/// Occurs when [on log CFG changed].
/// </summary>
public static event LogCfgChangedHandle OnLogCfgChanged;
/// <summary>
/// Logs the CFG changed.
/// </summary>
protected static void LogCfgChanged()
{
OnLogCfgChanged?.Invoke();
}
/// <summary>
/// Logs the configuration.
/// </summary>
public void LogConfig()
{
lock (_cfgLock)
@ -88,6 +283,7 @@ namespace GeneratorCode.Logs
DefaultLevel = (NLogLevel) NConfig.GetCfgValue("LogGlobal", "DefaultLogLevel", (int) NLogLevel.Info);
AsyncMode = NConfig.GetCfgValue("LogGlobal", "AsyncMode", false);
ForceNewLine = NConfig.GetCfgValue("LogGlobal", "AutoForceNewLine", false);
AutoCleanup = NConfig.GetCfgValue("LogGlobal", "AutoCleanup", true);
ShowDate = NConfig.GetCfgValue("LogFormat", "ShowDate", true);
ShowTime = NConfig.GetCfgValue("LogFormat", "ShowTime", true);
@ -124,6 +320,9 @@ namespace GeneratorCode.Logs
if (!Directory.Exists(DirPath)) Directory.CreateDirectory(DirPath);
if (!DirPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
DirPath += Path.DirectorySeparatorChar;
FileNamePre = NConfig.GetCfgValue("FileLogSetting", "FileNamePrefix", "");
EnSplitLog = NConfig.GetCfgValue("FileLogSetting", "AutoSplitFile", true);
@ -135,12 +334,30 @@ namespace GeneratorCode.Logs
MaxFileNum = NConfig.GetCfgValue("SplitFiles", "MaxFileNameNum", 10);
}
}
if (AutoCleanup)
{
KeepDays = NConfig.GetCfgValue("CleanUpLog", "KeepSaveDays", 30);
BackupDays = NConfig.GetCfgValue("CleanUpLog", "ZipBeforDays", 1);
}
}
}
}
/// <summary>
/// Class NLogItem.
/// </summary>
public class NLogItem
{
/// <summary>
/// Initializes a new instance of the <see cref="NLogItem"/> class.
/// </summary>
/// <param name="level">The level.</param>
/// <param name="logContent">Content of the log.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
/// <param name="dt">The dt.</param>
public NLogItem(NLogLevel level = NLogLevel.Debug,
[NotNull] string logContent = "",
[NotNull] string fileName = "",
@ -160,23 +377,71 @@ namespace GeneratorCode.Logs
CodeLine = lineNo;
}
/// <summary>
/// Gets or sets the log stamp.
/// </summary>
/// <value>The log stamp.</value>
public DateTime LogStamp { get; set; }
/// <summary>
/// Gets or sets the log level.
/// </summary>
/// <value>The log level.</value>
public NLogLevel LogLevel { get; set; }
/// <summary>
/// Gets or sets the content of the log.
/// </summary>
/// <value>The content of the log.</value>
public string LogContent { get; set; }
/// <summary>
/// Gets or sets the code file.
/// </summary>
/// <value>The code file.</value>
public string CodeFile { get; set; }
/// <summary>
/// Gets or sets the code line.
/// </summary>
/// <value>The code line.</value>
public int CodeLine { get; set; }
/// <summary>
/// Gets or sets the code function.
/// </summary>
/// <value>The code function.</value>
public string CodeFunction { get; set; }
}
/// <summary>
/// Class NLog.
/// </summary>
public static class NLog
{
/// <summary>
/// The log CFG
/// </summary>
private static NLogConfig _logCfg;
private static readonly ConcurrentQueue<NLogItem> _logItemCollection = new ConcurrentQueue<NLogItem>();
private static readonly object _logOutputLock = new object();
/// <summary>
/// The log output lock
/// </summary>
private static readonly object LogOutputLock = new object();
/// <summary>
/// The log item collection
/// </summary>
private static readonly ConcurrentQueue<NLogItem> LogItemCollection = new ConcurrentQueue<NLogItem>();
/// <summary>
/// The log file name
/// </summary>
private static string _logFileName = "";
/// <summary>
/// The log file number
/// </summary>
private static uint _logFileNum;
/// <summary>
/// The log sw
/// </summary>
private static StreamWriter _logSw;
/// <summary>
/// Creates the log file head.
/// </summary>
private static void CreateLogFileHead()
{
_logSw?.WriteLine("FileName: " + _logFileName);
@ -188,6 +453,9 @@ namespace GeneratorCode.Logs
_logSw?.Flush();
}
/// <summary>
/// Configurations the initialize.
/// </summary>
private static void ConfigInit()
{
if (_logCfg.EnFile)
@ -216,6 +484,9 @@ namespace GeneratorCode.Logs
}
}
/// <summary>
/// ns the log finish.
/// </summary>
public static void NLog_Finish()
{
if (_logCfg.EnFile)
@ -225,6 +496,9 @@ namespace GeneratorCode.Logs
}
}
/// <summary>
/// ns the log initialize.
/// </summary>
public static void NLog_Init()
{
_logCfg = new NLogConfig();
@ -242,26 +516,26 @@ namespace GeneratorCode.Logs
var asynWork = new Thread(() =>
{
uint cnt = 0;
uint cnt = 1;
while (true)
while (cnt++ > 0)
{
var lastDt = DateTime.Now;
var tolOut = Math.Min(_logCfg.NumOutItems, _logItemCollection.Count);
var tolOut = Math.Min(_logCfg.NumOutItems, LogItemCollection.Count);
foreach (var val in Enumerable.Range(1, tolOut))
if (_logItemCollection.TryDequeue(out var logItem))
for (var i = 0; i < tolOut; i++)
if (LogItemCollection.TryDequeue(out var logItem))
LogOutput(logItem);
Thread.Sleep(_logCfg.SleepTime);
// 每秒执行一次维护工作
if (++cnt % (1000 / _logCfg.SleepTime) != 0) continue;
_logSw?.Flush();
if (cnt % (1000 / _logCfg.SleepTime) != 0) continue;
if (_logCfg.EnSplitLog)
{
_logSw?.Flush();
var isNeedSplit = false;
if (_logCfg.SplitByData && lastDt.Day != DateTime.Now.Day)
@ -297,7 +571,7 @@ namespace GeneratorCode.Logs
_logFileName += ".log";
parttn += ".log";
foreach (var f in Directory.GetFiles(_logCfg.DirPath, parttn,
foreach (var f in Directory.EnumerateFiles(_logCfg.DirPath, parttn,
SearchOption.TopDirectoryOnly))
{
File.Delete(f);
@ -316,9 +590,84 @@ namespace GeneratorCode.Logs
};
asynWork.Start();
var tm = new Timer(1000) { AutoReset = true };
tm.Elapsed += (obj, args) =>
{
if (!_logCfg.AutoCleanup) return;
var backFileName = string.Format("{0}[{1:yyyy-MM-dd_HH-mm}]_{2}.zip",
_logCfg.DirPath,
DateTime.Now,
Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule.FileName));
const string regexRule =
@"\[(?<year>[1,2][0-9][0-9][0-9])-(?<month>[0,1][0-2])-(?<day>[0-3][0-9]).(?<hour>[0-2][0-9])-(?<min>[0-5][0-9])\]";
var regex = new Regex(regexRule);
var backList = new List<string>();
foreach (var f in Directory.EnumerateFiles(_logCfg.DirPath, "*.zip",
SearchOption.TopDirectoryOnly))
{
if (regex.IsMatch(f))
{
var match = regex.Match(f);
var dt = DateTime.ParseExact(match.Value,
"[yyyy-MM-dd_HH-mm]",
CultureInfo.CurrentCulture);
var diff = (DateTime.Now - dt).Days;
if (diff > _logCfg.KeepDays) File.Delete(f);
}
}
foreach (var f in Directory.EnumerateFiles(_logCfg.DirPath, "*.log",
SearchOption.TopDirectoryOnly))
{
if (regex.IsMatch(f))
{
var match = regex.Match(f);
var dt = DateTime.ParseExact(match.Value,
"[yyyy-MM-dd_HH-mm]",
CultureInfo.CurrentCulture);
var diff = (DateTime.Now - dt).Days;
if (diff > _logCfg.KeepDays)
File.Delete(f);
else if (diff > _logCfg.BackupDays) backList.Add(f);
else
backList.Add(f);
}
}
foreach (var f in backList)
{
if (f == _logFileName) continue;
using (var fs = new FileStream(backFileName, FileMode.OpenOrCreate))
{
using (var archive = new ZipArchive(fs, ZipArchiveMode.Update))
{
archive.CreateEntryFromFile(f, Path.GetFileName(f));
File.Delete(f);
}
}
}
};
tm.Start();
}
private static string LogLevelToString([NotNull] NLogLevel logLevel)
/// <summary>
/// Logs the level to string.
/// </summary>
/// <param name="logLevel">The log level.</param>
/// <returns>System.String.</returns>
private static string LogLevelToString(NLogLevel logLevel)
{
string[] level = { "F", "C", "E", "I", "W", "D" };
@ -327,6 +676,16 @@ namespace GeneratorCode.Logs
return "U";
}
/// <summary>
/// Logs the format.
/// </summary>
/// <param name="logLevel">The log level.</param>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
/// <param name="dt">The dt.</param>
/// <returns>System.String.</returns>
private static string LogFormat(NLogLevel logLevel, string logMsg, string fileName, string funName, int lineNo,
DateTime dt)
{
@ -365,6 +724,10 @@ namespace GeneratorCode.Logs
return msg;
}
/// <summary>
/// Logs the output.
/// </summary>
/// <param name="logItem">The log item.</param>
private static void LogOutput(NLogItem logItem)
{
var msg = LogFormat(logItem.LogLevel,
@ -376,7 +739,7 @@ namespace GeneratorCode.Logs
if (_logCfg.ForceNewLine) msg += Environment.NewLine;
lock (_logOutputLock)
lock (LogOutputLock)
{
if (_logCfg.EnConsole) Console.Write(msg);
@ -392,24 +755,13 @@ namespace GeneratorCode.Logs
}
}
private static void LogOutput2(string logMsg)
{
lock (_logOutputLock)
{
if (_logCfg.EnConsole) Console.Write(logMsg);
if (_logCfg.EnDebug | _logCfg.EnTrace)
{
if (_logCfg.EnTrace)
Trace.Write(logMsg);
else
System.Diagnostics.Debug.WriteLine(logMsg);
}
if (_logCfg.EnFile) _logSw?.Write(logMsg);
}
}
/// <summary>
/// Logs the out.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void LogOut([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -419,16 +771,15 @@ namespace GeneratorCode.Logs
if (_logCfg.AsyncMode)
{
if (_logItemCollection.Count >= _logCfg.MaxItemsCache)
if (LogItemCollection.Count >= _logCfg.MaxItemsCache)
{
if (_logCfg.CacheMode == CacheOptMode.Drop) return;
NLogItem val;
_logItemCollection.TryDequeue(out val);
LogItemCollection.TryDequeue(out _);
}
var logItem = new NLogItem(_logCfg.DefaultLevel, logMsg, fileName, funName, lineNo, DateTime.Now);
_logItemCollection.Enqueue(logItem);
LogItemCollection.Enqueue(logItem);
}
else
{
@ -437,26 +788,33 @@ namespace GeneratorCode.Logs
}
}
public static void LogOut(NLogLevel logLevel = NLogLevel.Info,
/// <summary>
/// Logs the out.
/// </summary>
/// <param name="logLevel">The log level.</param>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
private static void LogOut(NLogLevel logLevel = NLogLevel.Info,
[NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
[CallerLineNumber] int lineNo = 0)
string fileName = "",
string funName = "",
int lineNo = 0)
{
if (logLevel >= _logCfg.LogLevel || !_logCfg.LogEnable) return;
if (_logCfg.AsyncMode)
{
if (_logItemCollection.Count >= _logCfg.MaxItemsCache)
if (LogItemCollection.Count >= _logCfg.MaxItemsCache)
{
if (_logCfg.CacheMode == CacheOptMode.Drop) return;
NLogItem val;
_logItemCollection.TryDequeue(out val);
LogItemCollection.TryDequeue(out _);
}
var logItem = new NLogItem(NLogLevel.Debug, logMsg, fileName, funName, lineNo, DateTime.Now);
_logItemCollection.Enqueue(logItem);
LogItemCollection.Enqueue(logItem);
}
else
{
@ -467,6 +825,13 @@ namespace GeneratorCode.Logs
#region LogOutputMethod
/// <summary>
/// Debugs the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Debug([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -475,6 +840,13 @@ namespace GeneratorCode.Logs
LogOut(NLogLevel.Debug, logMsg, fileName, funName, lineNo);
}
/// <summary>
/// Warrings the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Warring([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -483,6 +855,13 @@ namespace GeneratorCode.Logs
LogOut(NLogLevel.Warring, logMsg, fileName, funName, lineNo);
}
/// <summary>
/// Informations the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Info([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -491,6 +870,13 @@ namespace GeneratorCode.Logs
LogOut(NLogLevel.Info, logMsg, fileName, funName, lineNo);
}
/// <summary>
/// Errors the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Error([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -499,6 +885,13 @@ namespace GeneratorCode.Logs
LogOut(NLogLevel.Error, logMsg, fileName, funName, lineNo);
}
/// <summary>
/// Crashes the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Crash([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",
@ -507,6 +900,13 @@ namespace GeneratorCode.Logs
LogOut(NLogLevel.Crash, logMsg, fileName, funName, lineNo);
}
/// <summary>
/// Fatals the specified log MSG.
/// </summary>
/// <param name="logMsg">The log MSG.</param>
/// <param name="fileName">Name of the file.</param>
/// <param name="funName">Name of the fun.</param>
/// <param name="lineNo">The line no.</param>
public static void Fatal([NotNull] string logMsg = "",
[CallerFilePath] string fileName = "",
[CallerMemberName] string funName = "",

View File

@ -1,4 +1,18 @@
using System;
// ***********************************************************************
// Assembly : GeneratorCode
// Author : 黄昕 <hzhuangxin01@corp.netease.com>
// Created : 02-14-2019
//
// Last Modified By : 黄昕 <hzhuangxin01@corp.netease.com>
// Last Modified On : 02-20-2019
// ***********************************************************************
// <copyright file="MainCode.cs" company="NetEase">
// Copyright © 2019
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
@ -11,8 +25,14 @@ using TmatrixLibrary;
namespace GeneratorCode
{
/// <summary>
/// Class GeneratorParams.
/// </summary>
public class GeneratorParams
{
/// <summary>
/// Initializes a new instance of the <see cref="GeneratorParams"/> class.
/// </summary>
public GeneratorParams()
{
dpi = new[] { 0, 0, 0, 0 };
@ -25,57 +45,134 @@ namespace GeneratorCode
sessionId = "4BD5D923-47EA-4DEF-A1CD-9B85B515B191";
}
/// <summary>
/// Gets or sets the dpi.
/// </summary>
/// <value>The dpi.</value>
public int[] dpi { get; set; }
/// <summary>
/// Gets or sets the type of the point.
/// </summary>
/// <value>The type of the point.</value>
public int[] point_type { get; set; }
/// <summary>
/// Gets or sets the type of the image.
/// </summary>
/// <value>The type of the image.</value>
public bool[] image_type { get; set; }
/// <summary>
/// Gets or sets the key.
/// </summary>
/// <value>The key.</value>
public string key { get; set; }
/// <summary>
/// Gets or sets the file path.
/// </summary>
/// <value>The file path.</value>
public string filePath { get; set; }
/// <summary>
/// Gets or sets the start page identifier.
/// </summary>
/// <value>The start page identifier.</value>
public int StartPageID { get; set; }
/// <summary>
/// Gets or sets the session identifier.
/// </summary>
/// <value>The session identifier.</value>
public string sessionId { get; set; }
}
/// <summary>
/// Class GenerCodeRet.
/// </summary>
public class GenerCodeRet
{
/// <summary>
/// Initializes a new instance of the <see cref="GenerCodeRet"/> class.
/// </summary>
/// <param name="sId">The s identifier.</param>
/// <param name="prg">The PRG.</param>
public GenerCodeRet(string sId, int prg)
{
sessionId = sId;
progress = prg;
}
/// <summary>
/// Gets or sets the session identifier.
/// </summary>
/// <value>The session identifier.</value>
public string sessionId { get; set; }
/// <summary>
/// Gets or sets the progress.
/// </summary>
/// <value>The progress.</value>
public int progress { get; set; }
}
/// <summary>
/// Class MainConfig.
/// </summary>
public class MainConfig
{
/// <summary>
/// Delegate MainCfgChangedHandle
/// </summary>
public delegate void MainCfgChangedHandle();
/// <summary>
/// The CFG lock
/// </summary>
private readonly object _cfgLock = new object();
/// <summary>
/// Initializes a new instance of the <see cref="MainConfig"/> class.
/// </summary>
public MainConfig()
{
LoadConfig();
OnMainCfgChanged += MainCfgChanged;
}
/// <summary>
/// Gets or sets a value indicating whether [base64 MSG content].
/// </summary>
/// <value><c>true</c> if [base64 MSG content]; otherwise, <c>false</c>.</value>
public bool Base64MsgContent { get; set; }
/// <summary>
/// Gets or sets the server port.
/// </summary>
/// <value>The server port.</value>
public int ServerPort { get; set; }
/// <summary>
/// Gets or sets the server addr.
/// </summary>
/// <value>The server addr.</value>
public string ServerAddr { get; set; }
/// <summary>
/// Occurs when [on main CFG changed].
/// </summary>
public static event MainCfgChangedHandle OnMainCfgChanged;
/// <summary>
/// Mains the CFG changed.
/// </summary>
protected static void MainCfgChanged()
{
OnMainCfgChanged?.Invoke();
}
/// <summary>
/// Loads the configuration.
/// </summary>
public void LoadConfig()
{
lock (_cfgLock)
@ -87,18 +184,36 @@ namespace GeneratorCode
}
}
/// <summary>
/// Class MessageProcess.
/// </summary>
public class MessageProcess
{
/// <summary>
/// The UDP
/// </summary>
private readonly UdpClient _udp = new UdpClient();
/// <summary>
/// Initializes a new instance of the <see cref="MessageProcess"/> class.
/// </summary>
/// <param name="cfg">The CFG.</param>
public MessageProcess(MainConfig cfg)
{
var svrAddr = IPAddress.Parse(cfg.ServerAddr);
_server = new IPEndPoint(svrAddr, cfg.ServerPort);
}
/// <summary>
/// Gets the server.
/// </summary>
/// <value>The server.</value>
private IPEndPoint _server { get; }
/// <summary>
/// Sends the message.
/// </summary>
/// <param name="msg">The MSG.</param>
public void SendMessage([NotNull] string msg)
{
if (msg.Length > 0)
@ -110,8 +225,15 @@ namespace GeneratorCode
}
}
/// <summary>
/// Class RspMessage.
/// </summary>
public class RspMessage
{
/// <summary>
/// Initializes a new instance of the <see cref="RspMessage"/> class.
/// </summary>
/// <param name="sId">The s identifier.</param>
public RspMessage(string sId)
{
err = 0;
@ -119,6 +241,11 @@ namespace GeneratorCode
data = new GenerCodeRet(sId, 0);
}
/// <summary>
/// Initializes a new instance of the <see cref="RspMessage"/> class.
/// </summary>
/// <param name="sId">The s identifier.</param>
/// <param name="prg">The PRG.</param>
public RspMessage(string sId, int prg)
{
err = 0;
@ -126,12 +253,32 @@ namespace GeneratorCode
data = new GenerCodeRet(sId, prg);
}
/// <summary>
/// Gets or sets the error.
/// </summary>
/// <value>The error.</value>
public int err { get; set; }
/// <summary>
/// Gets or sets the MSG.
/// </summary>
/// <value>The MSG.</value>
public string msg { get; set; }
/// <summary>
/// Gets or sets the data.
/// </summary>
/// <value>The data.</value>
public GenerCodeRet data { get; set; }
/// <summary>
/// Formats the RSP message.
/// </summary>
/// <param name="errCode">The error code.</param>
/// <param name="readme">The readme.</param>
/// <param name="prg">The PRG.</param>
/// <param name="enBase64">if set to <c>true</c> [en base64].</param>
/// <returns>System.String.</returns>
public string FormatRspMessage(int errCode, string readme, int prg, bool enBase64 = true)
{
var rsp = new RspMessage(data.sessionId, prg);
@ -146,8 +293,16 @@ namespace GeneratorCode
}
}
/// <summary>
/// Class MainCode.
/// </summary>
internal class MainCode
{
/// <summary>
/// Defines the entry point of the application.
/// </summary>
/// <param name="args">The arguments.</param>
/// <returns>System.Int32.</returns>
private static int Main(string[] args)
{
NConfig.InitConfigure();
@ -218,8 +373,13 @@ namespace GeneratorCode
rspMsg = new RspMessage("");
var msg = rspMsg.FormatRspMessage(10, e.Message, 0, mainCfg.Base64MsgContent);
msgProcess.SendMessage(msg);
NLog.Crash(string.Format("[{0}]: ", inParams == null ? inParams.sessionId : "UnInit") + e.Message);
return -(int) ErrCode.ERR_JSON_DECODE;
if (inParams != null)
{
NLog.Crash(string.Format("[{0}]: ", inParams.sessionId) + e.Message);
}
return -(int) ErrCode.ErrJsonDecode;
}
rspMsg = new RspMessage(inParams.sessionId);
@ -236,11 +396,11 @@ namespace GeneratorCode
var jsInput = JsonConvert.SerializeObject(inParams);
NLog.Debug("Input:" + jsInput + Environment.NewLine);
if (!File.Exists(inParams.filePath))
{
NLog.Error("File Not Exists: " + inParams.filePath + Environment.NewLine);
return -(int) ErrCode.ERR_FILE_NOTEXISTS;
return -(int) ErrCode.ErrFileNotexists;
}
try
@ -252,7 +412,7 @@ namespace GeneratorCode
var msg = rspMsg.FormatRspMessage(7, e.Message, 0, mainCfg.Base64MsgContent);
msgProcess.SendMessage(msg);
NLog.Crash(e.ToString());
return -(int) ErrCode.ERR_EXCEPT_THROW;
return -(int) ErrCode.ErrExceptThrow;
}
try
@ -286,18 +446,33 @@ namespace GeneratorCode
var msg = rspMsg.FormatRspMessage(8, e.Message, tmObj.GetProgerss(), mainCfg.Base64MsgContent);
msgProcess.SendMessage(msg);
NLog.Crash(e.ToString());
return -(int) ErrCode.ERR_EXCEPT_THROW;
return -(int) ErrCode.ErrExceptThrow;
}
return 0;
}
/// <summary>
/// Enum ErrCode
/// </summary>
private enum ErrCode
{
ERR_INPUT_PARAMS = 1,
ERR_FILE_NOTEXISTS,
ERR_EXCEPT_THROW,
ERR_JSON_DECODE
/// <summary>
/// The error input parameters
/// </summary>
ErrInputParams = 1,
/// <summary>
/// The error file notexists
/// </summary>
ErrFileNotexists,
/// <summary>
/// The error except throw
/// </summary>
ErrExceptThrow,
/// <summary>
/// The error json decode
/// </summary>
ErrJsonDecode
}
}
}

View File

@ -1,44 +1,131 @@
// ***********************************************************************
// Assembly : GeneratorCode
// Author : 黄昕 <hzhuangxin01@corp.netease.com>
// Created : 02-14-2019
//
// Last Modified By : 黄昕 <hzhuangxin01@corp.netease.com>
// Last Modified On : 02-19-2019
// ***********************************************************************
// <copyright file="OIDPublishImageGenerator.cs" company="NetEase">
// Copyright © 2019
// </copyright>
// <summary></summary>
// ***********************************************************************
using System.Runtime.InteropServices;
namespace OIDModule.Generator
{
/// <summary>
/// Enum OIDBeginBuildState
/// </summary>
internal enum OIDBeginBuildState
{
/// <summary>
/// The e bb state ok
/// </summary>
eBBState_OK,
/// <summary>
/// The e bb state image file not exist
/// </summary>
eBBState_ImageFileNotExist,
/// <summary>
/// The e bb state fail to open image file
/// </summary>
eBBState_FailToOpenImageFile,
/// <summary>
/// The e bb state unknown
/// </summary>
eBBState_Unknown
}
/// <summary>
/// Enum OIDPrintPointType
/// </summary>
internal enum OIDPrintPointType
{
/// <summary>
/// The e oid print point type 2X2
/// </summary>
eOID_PrintPointType_2x2,
/// <summary>
/// The e oid print point type 3X3
/// </summary>
eOID_PrintPointType_3x3,
/// <summary>
/// The e oid print point type 4X4
/// </summary>
eOID_PrintPointType_4x4
}
/// <summary>
/// Enum OIDPublishImageDPIType
/// </summary>
internal enum OIDPublishImageDPIType
{
/// <summary>
/// The e oid publish image dpi 600
/// </summary>
eOID_PublishImageDPI_600,
/// <summary>
/// The e oid publish image dpi 1200
/// </summary>
eOID_PublishImageDPI_1200
}
/// <summary>
/// Enum OIDPublishImageType
/// </summary>
internal enum OIDPublishImageType
{
/// <summary>
/// The e oid pit publish image
/// </summary>
eOID_PIT_Publish_Image,
/// <summary>
/// The e oid pit vertor image
/// </summary>
eOID_PIT_Vertor_Image,
/// <summary>
/// The e oid pit bg vertor image
/// </summary>
eOID_PIT_BG_Vertor_Image,
/// <summary>
/// The e oid pit publish bg image
/// </summary>
eOID_PIT_Publish_BG_Image
}
/// <summary>
/// Enum OIDPublishObjectType
/// </summary>
internal enum OIDPublishObjectType
{
/// <summary>
/// The e oid ot element code
/// </summary>
eOID_OT_ElementCode,
/// <summary>
/// The e oid ot position code
/// </summary>
eOID_OT_PositionCode
}
/// <summary>
/// Class OIDPublishImageGenerator.
/// </summary>
internal class OIDPublishImageGenerator
{
/// <summary>
/// Adds the object information.
/// </summary>
/// <param name="nPageIndex">Index of the n page.</param>
/// <param name="uiObjectIndex">Index of the UI object.</param>
/// <param name="arPointX">The ar point x.</param>
/// <param name="arPointY">The ar point y.</param>
/// <param name="nPointsCount">The n points count.</param>
/// <param name="nZOrder">The n z order.</param>
/// <param name="nObjectType">Type of the n object.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool AddObjectInfo(int nPageIndex, ulong uiObjectIndex, uint[] arPointX, uint[] arPointY,
int nPointsCount, int nZOrder, int nObjectType)
{
@ -46,16 +133,40 @@ namespace OIDModule.Generator
nObjectType);
}
/// <summary>
/// Begins the build publish image.
/// </summary>
/// <param name="szBGImage">The sz bg image.</param>
/// <param name="bExportPDFImage">if set to <c>true</c> [b export PDF image].</param>
/// <param name="nExportPDFImageDPI">The n export PDF image dpi.</param>
/// <returns>System.Int32.</returns>
public int BeginBuildPublishImage(char[] szBGImage, bool bExportPDFImage, int nExportPDFImageDPI)
{
return OID_PIG_BeginBuildPublishImage(szBGImage, bExportPDFImage, nExportPDFImageDPI);
}
/// <summary>
/// Begins the build publish image by information.
/// </summary>
/// <param name="dbCMWidth">Width of the database cm.</param>
/// <param name="dbCMHeight">Height of the database cm.</param>
/// <returns>System.Int32.</returns>
public int BeginBuildPublishImageByInfo(double dbCMWidth, double dbCMHeight)
{
return OID_PIG_BeginBuildPublishImageByInfo(dbCMWidth, dbCMHeight);
}
/// <summary>
/// Builds the publish image.
/// </summary>
/// <param name="szOutputFolderPath">The sz output folder path.</param>
/// <param name="bPrintIdleCode">if set to <c>true</c> [b print idle code].</param>
/// <param name="bSplitBigImage">if set to <c>true</c> [b split big image].</param>
/// <param name="bMergeSplittedImages">if set to <c>true</c> [b merge splitted images].</param>
/// <param name="nPublishImageDPIType">Type of the n publish image dpi.</param>
/// <param name="nPrintPointType">Type of the n print point.</param>
/// <param name="nPublishImageType">Type of the n publish image.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool BuildPublishImage(char[] szOutputFolderPath, bool bPrintIdleCode, bool bSplitBigImage,
bool bMergeSplittedImages, int nPublishImageDPIType, int nPrintPointType, int nPublishImageType)
{
@ -63,66 +174,147 @@ namespace OIDModule.Generator
nPublishImageDPIType, nPrintPointType, nPublishImageType);
}
/// <summary>
/// Ends the build publish image.
/// </summary>
public void EndBuildPublishImage()
{
OID_PIG_EndBuildPublishImage();
}
/// <summary>
/// Initializes this instance.
/// </summary>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool Initialize()
{
return OID_PIG_Initialize();
}
/// <summary>
/// Oids the pig add object information.
/// </summary>
/// <param name="nPageIndex">Index of the n page.</param>
/// <param name="uiObjectIndex">Index of the UI object.</param>
/// <param name="arPointX">The ar point x.</param>
/// <param name="arPointY">The ar point y.</param>
/// <param name="nPointsCount">The n points count.</param>
/// <param name="nZOrder">The n z order.</param>
/// <param name="nObjectType">Type of the n object.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern bool OID_PIG_AddObjectInfo(int nPageIndex, ulong uiObjectIndex, uint[] arPointX,
uint[] arPointY, int nPointsCount, int nZOrder, int nObjectType);
/// <summary>
/// Oids the pig begin build publish image.
/// </summary>
/// <param name="szBGImage">The sz bg image.</param>
/// <param name="bExportPDFImage">if set to <c>true</c> [b export PDF image].</param>
/// <param name="nExportPDFImageDPI">The n export PDF image dpi.</param>
/// <returns>System.Int32.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll",
CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
private static extern int OID_PIG_BeginBuildPublishImage(char[] szBGImage, bool bExportPDFImage,
int nExportPDFImageDPI);
/// <summary>
/// Oids the pig begin build publish image by information.
/// </summary>
/// <param name="dbCMWidth">Width of the database cm.</param>
/// <param name="dbCMHeight">Height of the database cm.</param>
/// <returns>System.Int32.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll",
CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
private static extern int OID_PIG_BeginBuildPublishImageByInfo(double dbCMWidth, double dbCMHeight);
/// <summary>
/// Oids the pig build publish image.
/// </summary>
/// <param name="szOutputFolderPath">The sz output folder path.</param>
/// <param name="bPrintIdleCode">if set to <c>true</c> [b print idle code].</param>
/// <param name="bSplitBigImage">if set to <c>true</c> [b split big image].</param>
/// <param name="bMergeSplittedImages">if set to <c>true</c> [b merge splitted images].</param>
/// <param name="nPublishImageDPIType">Type of the n publish image dpi.</param>
/// <param name="nPrintPointType">Type of the n print point.</param>
/// <param name="nPublishImageType">Type of the n publish image.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll",
CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
private static extern bool OID_PIG_BuildPublishImage(char[] szOutputFolderPath, bool bPrintIdleCode,
bool bSplitBigImage, bool bMergeSplittedImages, int nPublishImageDPIType, int nPrintPointType,
int nPublishImageType);
/// <summary>
/// Oids the pig end build publish image.
/// </summary>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern void OID_PIG_EndBuildPublishImage();
/// <summary>
/// Oids the pig initialize.
/// </summary>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern bool OID_PIG_Initialize();
/// <summary>
/// Oids the pig set publish pages.
/// </summary>
/// <param name="arPageNumbers">The ar page numbers.</param>
/// <param name="nPageCount">The n page count.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern bool OID_PIG_SetPublishPages(int[] arPageNumbers, int nPageCount);
/// <summary>
/// Oids the pig set start position.
/// </summary>
/// <param name="nPageIndex">Index of the n page.</param>
/// <param name="nXStart">The n x start.</param>
/// <param name="nYStart">The n y start.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern bool OID_PIG_SetStartPosition(int nPageIndex, int nXStart, int nYStart);
/// <summary>
/// Oids the pig uninitialize.
/// </summary>
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention =
CallingConvention.StdCall)]
private static extern void OID_PIG_Uninitialize();
/// <summary>
/// Sets the publish pages.
/// </summary>
/// <param name="arPageNumbers">The ar page numbers.</param>
/// <param name="nPageCount">The n page count.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool SetPublishPages(int[] arPageNumbers, int nPageCount)
{
return OID_PIG_SetPublishPages(arPageNumbers, nPageCount);
}
/// <summary>
/// Sets the start position.
/// </summary>
/// <param name="nPageIndex">Index of the n page.</param>
/// <param name="nXStart">The n x start.</param>
/// <param name="nYStart">The n y start.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool SetStartPosition(int nPageIndex, int nXStart, int nYStart)
{
return OID_PIG_SetStartPosition(nPageIndex, nXStart, nYStart);
}
/// <summary>
/// Uninitializes this instance.
/// </summary>
public void Uninitialize()
{
OID_PIG_Uninitialize();

View File

@ -1,3 +1,16 @@
// ***********************************************************************
// Assembly : GeneratorCode
// Author : 黄昕 <hzhuangxin01@corp.netease.com>
// Created : 02-14-2019
//
// Last Modified By : 黄昕 <hzhuangxin01@corp.netease.com>
// Last Modified On : 02-19-2019
// ***********************************************************************
// <copyright file="TmatrixClass.cs" company="NetEase">
// Copyright © 2019
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Drawing;
@ -7,43 +20,139 @@ using OIDModule.Generator;
namespace TmatrixLibrary
{
/// <summary>
/// Class TmatrixClass.
/// </summary>
public class TmatrixClass
{
/// <summary>
/// Delegate ProgressChangedEvent
/// </summary>
/// <param name="step">The step.</param>
public delegate void ProgressChangedEvent(int step);
/// <summary>
/// The default dpi
/// </summary>
private readonly int Default_DPI = 300;
/// <summary>
/// The g bid
/// </summary>
private int gBID;
/// <summary>
/// The gb key validate
/// </summary>
private bool gbKeyValidate;
/// <summary>
/// The g current page index
/// </summary>
private int gCurPageIndex;
/// <summary>
/// The g current page identifier
/// </summary>
private int gCurrentPageID;
/// <summary>
/// The g oid
/// </summary>
private int gOID;
/// <summary>
/// The g page number
/// </summary>
private int gPageNum;
/// <summary>
/// The g pi d1
/// </summary>
private int gPID1;
/// <summary>
/// The g pi d2
/// </summary>
private int gPID2;
/// <summary>
/// The g point type
/// </summary>
private string gPointType = "";
/// <summary>
/// The gs bid
/// </summary>
private string gsBID;
/// <summary>
/// The gs expiration
/// </summary>
private string gsExpiration;
/// <summary>
/// The g sid
/// </summary>
private int gSID;
/// <summary>
/// The gs oid
/// </summary>
private string gsOID;
/// <summary>
/// The gs pi d1
/// </summary>
private string gsPID1;
/// <summary>
/// The gs pi d2
/// </summary>
private string gsPID2;
/// <summary>
/// The gs point dpi
/// </summary>
private readonly string[] gsPointDPI = new string[4];
/// <summary>
/// The gs point type
/// </summary>
private readonly string[] gsPointType = new string[4];
/// <summary>
/// The gs sid
/// </summary>
private string gsSID;
/// <summary>
/// The gs size
/// </summary>
private string gsSize;
/// <summary>
/// The g step
/// </summary>
private int gStep;
/// <summary>
/// The g total page identifier
/// </summary>
private int gTotalPageID;
/// <summary>
/// The g tpdfbgi name
/// </summary>
private readonly string[] gTPDFBGIName = new string[0x100];
/// <summary>
/// The g TPDF name
/// </summary>
private readonly string[] gTPDFName = new string[0x100];
/// <summary>
/// The g tpdfvi name
/// </summary>
private readonly string[] gTPDFVIName = new string[0x100];
/// <summary>
/// The g tpdfwovi name
/// </summary>
private readonly string[] gTPDFWOVIName = new string[0x100];
/// <summary>
/// The oid pi generator
/// </summary>
private readonly OIDPublishImageGenerator oidPIGenerator = new OIDPublishImageGenerator();
/// <summary>
/// Gets the progerss.
/// </summary>
/// <returns>System.Int32.</returns>
public int GetProgerss()
{
return gStep;
}
/// <summary>
/// Sets the progress.
/// </summary>
/// <param name="step">The step.</param>
public void SetProgress(int step)
{
if (gStep != step)
@ -53,8 +162,15 @@ namespace TmatrixLibrary
}
}
/// <summary>
/// Occurs when [progress change].
/// </summary>
public event ProgressChangedEvent ProgressChange;
/// <summary>
/// Called when [progress changed].
/// </summary>
/// <param name="step">The step.</param>
protected virtual void OnProgressChanged(int step)
{
if (ProgressChange != null)
@ -63,11 +179,20 @@ namespace TmatrixLibrary
ProgressChange(-1);
}
/// <summary>
/// Determines whether [is key validate].
/// </summary>
/// <returns><c>true</c> if [is key validate]; otherwise, <c>false</c>.</returns>
private bool IsKeyValidate()
{
return gbKeyValidate;
}
/// <summary>
/// Checks the expiration validate.
/// </summary>
/// <param name="dstr">The DSTR.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
private bool CheckExpirationValidate(string dstr)
{
var strArray = dstr.Substring(1, dstr.Length - 1).Split('/');
@ -81,6 +206,11 @@ namespace TmatrixLibrary
return year <= num ? year != num || (month <= num2 ? month != num2 || day <= num3 : false) : false;
}
/// <summary>
/// Checks the state of the oid build.
/// </summary>
/// <param name="eBeginBuildState">State of the e begin build.</param>
/// <returns>System.String.</returns>
private string CheckOidBuildState(OIDBeginBuildState eBeginBuildState)
{
switch (eBeginBuildState)
@ -101,11 +231,21 @@ namespace TmatrixLibrary
return "";
}
/// <summary>
/// Called when [progress percent].
/// </summary>
/// <param name="msg">The MSG.</param>
/// <returns>System.String.</returns>
public string OnProgressPercent(string msg)
{
return msg;
}
/// <summary>
/// Decodes the license tmatrix key.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <returns>System.String.</returns>
public string DecodeLicense_TmatrixKey(string KeyStr)
{
var chArray = new char[80];
@ -132,6 +272,18 @@ namespace TmatrixLibrary
return str;
}
/// <summary>
/// Generates the tmatrix big area code oi d4.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="sPath">The s path.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bPublishImageType">Type of the b publish image.</param>
/// <param name="PointDPI">The point dpi.</param>
/// <param name="dWidth">Width of the d.</param>
/// <param name="dHeight">Height of the d.</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixBigAreaCode_OID4(string KeyStr, string sPath, int StartPageID, int[] PointType,
bool[] bPublishImageType, int[] PointDPI, double dWidth, double dHeight)
{
@ -329,6 +481,17 @@ namespace TmatrixLibrary
return "0Generate code completely" + str6;
}
/// <summary>
/// Generates the tmatrix code.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCode(string KeyStr, string PDFFileName, int StartPageID, int PointType,
bool bGenerateBGWithVImage, bool bGenerateVImage, bool bGenerateBGWithoutVImage)
{
@ -601,6 +764,18 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Generates the tmatrix code.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCode(string KeyStr, string PDFFileName, int StartPageID, int PointType,
bool bGenerateBGWithVImage, bool bGenerateVImage, bool bGenerateBGWithoutVImage, bool bGenerateBGWithImage)
{
@ -923,6 +1098,16 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Generates the tmatrix code oi d4.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bPublishImageType">Type of the b publish image.</param>
/// <param name="PointDPI">The point dpi.</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCode_OID4(string KeyStr, string PDFFileName, int StartPageID, int[] PointType,
bool[] bPublishImageType, int[] PointDPI)
{
@ -1272,6 +1457,22 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Generates the tmatrix code by area.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
/// <param name="Tx">The tx.</param>
/// <param name="Ty">The ty.</param>
/// <param name="Tw">The tw.</param>
/// <param name="Th">The th.</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCodeByArea(string KeyStr, string PDFFileName, int StartPageID, int PointType,
bool bGenerateBGWithVImage, bool bGenerateVImage, bool bGenerateBGWithoutVImage, bool bGenerateBGWithImage,
uint[][] Tx, uint[][] Ty, uint[][] Tw, uint[][] Th)
@ -1591,6 +1792,23 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Generates the tmatrix code by area oi d4.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="PointDPI">The point dpi.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
/// <param name="Tx">The tx.</param>
/// <param name="Ty">The ty.</param>
/// <param name="Tw">The tw.</param>
/// <param name="Th">The th.</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCodeByArea_OID4(string KeyStr, string PDFFileName, int StartPageID,
int[] PointType, int[] PointDPI, bool bGenerateBGWithVImage, bool bGenerateVImage,
bool bGenerateBGWithoutVImage, bool bGenerateBGWithImage, uint[][] Tx, uint[][] Ty, uint[][] Tw,
@ -1927,6 +2145,15 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Generates the tmatrix code for t form.
/// </summary>
/// <param name="KeyStr">The key string.</param>
/// <param name="PDFFileName">Name of the PDF file.</param>
/// <param name="StartPageID">The start page identifier.</param>
/// <param name="PointType">Type of the point.</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
/// <returns>System.String.</returns>
public string GenerateTmatrixCodeForTForm(string KeyStr, string PDFFileName, int StartPageID, int PointType,
bool bGenerateBGWithImage)
{
@ -2087,12 +2314,29 @@ namespace TmatrixLibrary
return "0Generate code completely";
}
/// <summary>
/// Gets the PDF page number.
/// </summary>
/// <param name="PDFName">Name of the PDF.</param>
/// <returns>System.Int32.</returns>
public int GetPDFPageNumber(string PDFName)
{
var obj = new PdfReader(PDFName);
return obj.NumberOfPages;
}
/// <summary>
/// Renames the big area tmatrix PDF oi d4.
/// </summary>
/// <param name="SP">The sp.</param>
/// <param name="SID">The sid.</param>
/// <param name="OID">The oid.</param>
/// <param name="BID">The bid.</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateImage">if set to <c>true</c> [b generate image].</param>
/// <param name="w">The w.</param>
/// <param name="h">The h.</param>
/// <returns>System.String.</returns>
private string RenameBigAreaTmatrixPDF_OID4(int SP, string SID, string OID, string BID, bool bGenerateVImage,
bool bGenerateImage, double w, double h)
{
@ -2155,6 +2399,11 @@ namespace TmatrixLibrary
return "";
}
/// <summary>
/// Renames the tmatrix PDF.
/// </summary>
/// <param name="SP">The sp.</param>
/// <param name="BID">The bid.</param>
private void RenameTmatrixPDF(int SP, string BID)
{
for (var i = 0; i < gPageNum; i++)
@ -2282,6 +2531,14 @@ namespace TmatrixLibrary
}
}
/// <summary>
/// Renames the tmatrix PDF.
/// </summary>
/// <param name="SP">The sp.</param>
/// <param name="BID">The bid.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
private void RenameTmatrixPDF(int SP, string BID, bool bGenerateBGWithVImage, bool bGenerateVImage,
bool bGenerateBGWithoutVImage)
{
@ -2552,6 +2809,15 @@ namespace TmatrixLibrary
}
}
/// <summary>
/// Renames the tmatrix PDF.
/// </summary>
/// <param name="SP">The sp.</param>
/// <param name="BID">The bid.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
private void RenameTmatrixPDF(int SP, string BID, bool bGenerateBGWithVImage, bool bGenerateVImage,
bool bGenerateBGWithoutVImage, bool bGenerateBGWithImage)
{
@ -2905,6 +3171,17 @@ namespace TmatrixLibrary
}
}
/// <summary>
/// Renames the tmatrix PDF oi d4.
/// </summary>
/// <param name="SP">The sp.</param>
/// <param name="SID">The sid.</param>
/// <param name="OID">The oid.</param>
/// <param name="BID">The bid.</param>
/// <param name="bGenerateBGWithVImage">if set to <c>true</c> [b generate bg with v image].</param>
/// <param name="bGenerateVImage">if set to <c>true</c> [b generate v image].</param>
/// <param name="bGenerateBGWithoutVImage">if set to <c>true</c> [b generate bg without v image].</param>
/// <param name="bGenerateBGWithImage">if set to <c>true</c> [b generate bg with image].</param>
private void RenameTmatrixPDF_OID4(int SP, string SID, string OID, string BID, bool bGenerateBGWithVImage,
bool bGenerateVImage, bool bGenerateBGWithoutVImage, bool bGenerateBGWithImage)
{
@ -3443,11 +3720,20 @@ namespace TmatrixLibrary
}
}
/// <summary>
/// Tmatrixes the initialize.
/// </summary>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public bool TmatrixInitialize()
{
return oidPIGenerator.Initialize();
}
/// <summary>
/// Tmatrixes the key check.
/// </summary>
/// <param name="sKey">The s key.</param>
/// <returns>System.String.</returns>
public string TmatrixKeyCheck(string sKey)
{
gbKeyValidate = false;
@ -3471,6 +3757,12 @@ namespace TmatrixLibrary
return "0";
}
/// <summary>
/// Tmatrixes the key check.
/// </summary>
/// <param name="sKey">The s key.</param>
/// <param name="type">The type.</param>
/// <returns>System.String.</returns>
public string TmatrixKeyCheck(string sKey, int type)
{
gbKeyValidate = false;
@ -3494,6 +3786,11 @@ namespace TmatrixLibrary
return "0";
}
/// <summary>
/// Tmatrixes the key check oi d4.
/// </summary>
/// <param name="sKey">The s key.</param>
/// <returns>System.String.</returns>
public string TmatrixKeyCheck_OID4(string sKey)
{
gbKeyValidate = false;
@ -3524,6 +3821,12 @@ namespace TmatrixLibrary
return "0";
}
/// <summary>
/// Tmatrixes the key check oi d4.
/// </summary>
/// <param name="sKey">The s key.</param>
/// <param name="type">The type.</param>
/// <returns>System.String.</returns>
public string TmatrixKeyCheck_OID4(string sKey, int type)
{
gbKeyValidate = false;
@ -3557,6 +3860,9 @@ namespace TmatrixLibrary
return "0";
}
/// <summary>
/// Tmatrixes the uninitialize.
/// </summary>
public void TmatrixUninitialize()
{
oidPIGenerator.Uninitialize();

View File

@ -22,9 +22,11 @@ LogLevel = 255
; 默认日志打印等级
DefaultLogLevel = 4
; 使用异步日志输出模式默认false
AsyncMode = false
AsyncMode = true
; 是否在每条日志后加入换行
AutoForceNewLine = false
; 是否自动清理日志
AutoCleanup = true
; 日志输出格式控制
[LogFormat]
@ -85,4 +87,11 @@ SplitBySize = 4
; 是否启动日志文件名自动回滚功能
FileNameRollback = true
; 日志文件名回滚最大文件数
MaxFileNameNum = 10
MaxFileNameNum = 10
; 自动清理配置
[CleanUpLog]
; 日志保留天数
KeepSaveDays = 30
; 自动备份压缩几天前的日志
ZipBeforDays = 1

View File

@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TmatrixSDK_OID4", "TmatrixCodeGenerator\TmatrixSDK_OID4.csproj", "{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneratorCode", "GeneratorCode\GeneratorCode.csproj", "{0C720C54-D779-4204-B529-81360C796B32}"
EndProject
Global
@ -13,10 +11,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}.Release|Any CPU.Build.0 = Release|Any CPU
{0C720C54-D779-4204-B529-81360C796B32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C720C54-D779-4204-B529-81360C796B32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C720C54-D779-4204-B529-81360C796B32}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -0,0 +1,60 @@
<GhostDoc>
<IgnoreFilePatterns>
<IgnoreFilePattern>*.min.js</IgnoreFilePattern>
<IgnoreFilePattern>jquery*.js</IgnoreFilePattern>
</IgnoreFilePatterns>
<SpellChecker>
<IncludeExtensions>
</IncludeExtensions>
<IgnoreExtensions>
</IgnoreExtensions>
<IgnoreFiles>
</IgnoreFiles>
</SpellChecker>
<HelpConfigurations selected="HelpFile">
<HelpConfiguration name="HelpFile">
<OutputPath>.\Help</OutputPath>
<CleanupOutputPath>true</CleanupOutputPath>
<HelpFileName>TmatrixCodeGenerator</HelpFileName>
<HelpFileNamingMethod>MemberName</HelpFileNamingMethod>
<ImageFolderPath />
<Theme>FlatGray</Theme>
<HtmlFormats>
<HtmlHelp>false</HtmlHelp>
<MSHelpViewer>false</MSHelpViewer>
<MSHelp2>false</MSHelp2>
<Website>true</Website>
</HtmlFormats>
<IncludeScopes>
<Public>true</Public>
<Internal>false</Internal>
<Protected>false</Protected>
<Private>false</Private>
<Inherited>true</Inherited>
<InheritedFromReferences>true</InheritedFromReferences>
<EnableTags>false</EnableTags>
<TagList />
<AutoGeneratedDocs />
<DocsThatRequireEditing />
</IncludeScopes>
<SyntaxLanguages>
<CSharp>true</CSharp>
<VisualBasic>true</VisualBasic>
<CPlusPlus>true</CPlusPlus>
</SyntaxLanguages>
<ResolveCrefLinks>true</ResolveCrefLinks>
<HeaderText />
<FooterText />
<ConceptualContent>
<ContentLayout />
<MediaContent />
</ConceptualContent>
<SelectedProjects>
<SelectedProject>GeneratorCode</SelectedProject>
</SelectedProjects>
</HelpConfiguration>
</HelpConfigurations>
<GeneralProperties>
<SearchInheritedCommentsOnlyWithinProject>False</SearchInheritedCommentsOnlyWithinProject>
</GeneralProperties>
</GhostDoc>

View File

@ -1,390 +0,0 @@
namespace TmatrixCodeGenerator
{
partial class GenerateCode_Form
{
/// <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.Exit_button = new System.Windows.Forms.Button();
this.Generate_button = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.BGWithImage_DPI_comboBox = new System.Windows.Forms.ComboBox();
this.BGWithImage_Type_comboBox = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.BGWOVImage_DPI_comboBox = new System.Windows.Forms.ComboBox();
this.BGWOVImage_Type_comboBox = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.VImage_DPI_comboBox = new System.Windows.Forms.ComboBox();
this.VImage_Type_comboBox = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.BGWithVImage_DPI_comboBox = new System.Windows.Forms.ComboBox();
this.BGWithVImage_Type_comboBox = new System.Windows.Forms.ComboBox();
this.BGWithImage_checkBox = new System.Windows.Forms.CheckBox();
this.BGWOVImage_checkBox = new System.Windows.Forms.CheckBox();
this.VImage_checkBox = new System.Windows.Forms.CheckBox();
this.BGWithVImage_checkBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// Exit_button
//
this.Exit_button.Location = new System.Drawing.Point(540, 203);
this.Exit_button.Name = "Exit_button";
this.Exit_button.Size = new System.Drawing.Size(86, 33);
this.Exit_button.TabIndex = 6;
this.Exit_button.Text = "Exit";
this.Exit_button.UseVisualStyleBackColor = true;
this.Exit_button.Click += new System.EventHandler(this.Exit_button_Click);
//
// Generate_button
//
this.Generate_button.Location = new System.Drawing.Point(448, 203);
this.Generate_button.Name = "Generate_button";
this.Generate_button.Size = new System.Drawing.Size(86, 33);
this.Generate_button.TabIndex = 5;
this.Generate_button.Text = "Generate";
this.Generate_button.UseVisualStyleBackColor = true;
this.Generate_button.Click += new System.EventHandler(this.Generate_button_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.BGWithImage_DPI_comboBox);
this.groupBox1.Controls.Add(this.BGWithImage_Type_comboBox);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.BGWOVImage_DPI_comboBox);
this.groupBox1.Controls.Add(this.BGWOVImage_Type_comboBox);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.VImage_DPI_comboBox);
this.groupBox1.Controls.Add(this.VImage_Type_comboBox);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.BGWithVImage_DPI_comboBox);
this.groupBox1.Controls.Add(this.BGWithVImage_Type_comboBox);
this.groupBox1.Controls.Add(this.BGWithImage_checkBox);
this.groupBox1.Controls.Add(this.BGWOVImage_checkBox);
this.groupBox1.Controls.Add(this.VImage_checkBox);
this.groupBox1.Controls.Add(this.BGWithVImage_checkBox);
this.groupBox1.Location = new System.Drawing.Point(25, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(601, 180);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Code File Type";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(469, 140);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(31, 17);
this.label7.TabIndex = 19;
this.label7.Text = "DPI:";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(339, 140);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(39, 17);
this.label8.TabIndex = 18;
this.label8.Text = "Type:";
//
// BGWithImage_DPI_comboBox
//
this.BGWithImage_DPI_comboBox.Enabled = false;
this.BGWithImage_DPI_comboBox.FormattingEnabled = true;
this.BGWithImage_DPI_comboBox.Items.AddRange(new object[] {
"600",
"1200"});
this.BGWithImage_DPI_comboBox.Location = new System.Drawing.Point(511, 137);
this.BGWithImage_DPI_comboBox.Name = "BGWithImage_DPI_comboBox";
this.BGWithImage_DPI_comboBox.Size = new System.Drawing.Size(68, 25);
this.BGWithImage_DPI_comboBox.TabIndex = 17;
this.BGWithImage_DPI_comboBox.Text = "1200";
this.BGWithImage_DPI_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWithImage_DPI_comboBox_SelectedIndexChanged);
//
// BGWithImage_Type_comboBox
//
this.BGWithImage_Type_comboBox.Enabled = false;
this.BGWithImage_Type_comboBox.FormattingEnabled = true;
this.BGWithImage_Type_comboBox.Items.AddRange(new object[] {
"2x2",
"3x3",
"4x4"});
this.BGWithImage_Type_comboBox.Location = new System.Drawing.Point(394, 137);
this.BGWithImage_Type_comboBox.Name = "BGWithImage_Type_comboBox";
this.BGWithImage_Type_comboBox.Size = new System.Drawing.Size(55, 25);
this.BGWithImage_Type_comboBox.TabIndex = 16;
this.BGWithImage_Type_comboBox.Text = "3x3";
this.BGWithImage_Type_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWithImage_Type_comboBox_SelectedIndexChanged);
this.BGWithImage_Type_comboBox.TextChanged += new System.EventHandler(this.BGWithImage_Type_comboBox_TextChanged);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(469, 105);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(31, 17);
this.label5.TabIndex = 15;
this.label5.Text = "DPI:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(339, 105);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(39, 17);
this.label6.TabIndex = 14;
this.label6.Text = "Type:";
//
// BGWOVImage_DPI_comboBox
//
this.BGWOVImage_DPI_comboBox.Enabled = false;
this.BGWOVImage_DPI_comboBox.FormattingEnabled = true;
this.BGWOVImage_DPI_comboBox.Items.AddRange(new object[] {
"600",
"1200"});
this.BGWOVImage_DPI_comboBox.Location = new System.Drawing.Point(511, 102);
this.BGWOVImage_DPI_comboBox.Name = "BGWOVImage_DPI_comboBox";
this.BGWOVImage_DPI_comboBox.Size = new System.Drawing.Size(68, 25);
this.BGWOVImage_DPI_comboBox.TabIndex = 13;
this.BGWOVImage_DPI_comboBox.Text = "1200";
this.BGWOVImage_DPI_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWOVImage_DPI_comboBox_SelectedIndexChanged);
//
// BGWOVImage_Type_comboBox
//
this.BGWOVImage_Type_comboBox.Enabled = false;
this.BGWOVImage_Type_comboBox.FormattingEnabled = true;
this.BGWOVImage_Type_comboBox.Items.AddRange(new object[] {
"2x2",
"3x3",
"4x4"});
this.BGWOVImage_Type_comboBox.Location = new System.Drawing.Point(394, 102);
this.BGWOVImage_Type_comboBox.Name = "BGWOVImage_Type_comboBox";
this.BGWOVImage_Type_comboBox.Size = new System.Drawing.Size(55, 25);
this.BGWOVImage_Type_comboBox.TabIndex = 12;
this.BGWOVImage_Type_comboBox.Text = "3x3";
this.BGWOVImage_Type_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWOVImage_Type_comboBox_SelectedIndexChanged);
this.BGWOVImage_Type_comboBox.TextChanged += new System.EventHandler(this.BGWOVImage_Type_comboBox_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(469, 70);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(31, 17);
this.label3.TabIndex = 11;
this.label3.Text = "DPI:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(339, 70);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(39, 17);
this.label4.TabIndex = 10;
this.label4.Text = "Type:";
//
// VImage_DPI_comboBox
//
this.VImage_DPI_comboBox.Enabled = false;
this.VImage_DPI_comboBox.FormattingEnabled = true;
this.VImage_DPI_comboBox.Items.AddRange(new object[] {
"600",
"1200"});
this.VImage_DPI_comboBox.Location = new System.Drawing.Point(511, 67);
this.VImage_DPI_comboBox.Name = "VImage_DPI_comboBox";
this.VImage_DPI_comboBox.Size = new System.Drawing.Size(68, 25);
this.VImage_DPI_comboBox.TabIndex = 9;
this.VImage_DPI_comboBox.Text = "1200";
this.VImage_DPI_comboBox.SelectedIndexChanged += new System.EventHandler(this.VImage_DPI_comboBox_SelectedIndexChanged);
//
// VImage_Type_comboBox
//
this.VImage_Type_comboBox.Enabled = false;
this.VImage_Type_comboBox.FormattingEnabled = true;
this.VImage_Type_comboBox.Items.AddRange(new object[] {
"2x2",
"3x3",
"4x4"});
this.VImage_Type_comboBox.Location = new System.Drawing.Point(394, 67);
this.VImage_Type_comboBox.Name = "VImage_Type_comboBox";
this.VImage_Type_comboBox.Size = new System.Drawing.Size(55, 25);
this.VImage_Type_comboBox.TabIndex = 8;
this.VImage_Type_comboBox.Text = "3x3";
this.VImage_Type_comboBox.SelectedIndexChanged += new System.EventHandler(this.VImage_Type_comboBox_SelectedIndexChanged);
this.VImage_Type_comboBox.TextChanged += new System.EventHandler(this.VImage_Type_comboBox_TextChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(469, 35);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(31, 17);
this.label2.TabIndex = 7;
this.label2.Text = "DPI:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(339, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(39, 17);
this.label1.TabIndex = 6;
this.label1.Text = "Type:";
//
// BGWithVImage_DPI_comboBox
//
this.BGWithVImage_DPI_comboBox.FormattingEnabled = true;
this.BGWithVImage_DPI_comboBox.Items.AddRange(new object[] {
"600",
"1200"});
this.BGWithVImage_DPI_comboBox.Location = new System.Drawing.Point(511, 32);
this.BGWithVImage_DPI_comboBox.Name = "BGWithVImage_DPI_comboBox";
this.BGWithVImage_DPI_comboBox.Size = new System.Drawing.Size(68, 25);
this.BGWithVImage_DPI_comboBox.TabIndex = 5;
this.BGWithVImage_DPI_comboBox.Text = "1200";
this.BGWithVImage_DPI_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWithVImage_DPI_comboBox_SelectedIndexChanged);
//
// BGWithVImage_Type_comboBox
//
this.BGWithVImage_Type_comboBox.FormattingEnabled = true;
this.BGWithVImage_Type_comboBox.Items.AddRange(new object[] {
"2x2",
"3x3",
"4x4"});
this.BGWithVImage_Type_comboBox.Location = new System.Drawing.Point(394, 32);
this.BGWithVImage_Type_comboBox.Name = "BGWithVImage_Type_comboBox";
this.BGWithVImage_Type_comboBox.Size = new System.Drawing.Size(55, 25);
this.BGWithVImage_Type_comboBox.TabIndex = 4;
this.BGWithVImage_Type_comboBox.Text = "3x3";
this.BGWithVImage_Type_comboBox.SelectedIndexChanged += new System.EventHandler(this.BGWithVImage_Type_comboBox_SelectedIndexChanged);
this.BGWithVImage_Type_comboBox.TextChanged += new System.EventHandler(this.BGWithVImage_Type_comboBox_TextChanged);
//
// BGWithImage_checkBox
//
this.BGWithImage_checkBox.AutoSize = true;
this.BGWithImage_checkBox.Location = new System.Drawing.Point(20, 140);
this.BGWithImage_checkBox.Name = "BGWithImage_checkBox";
this.BGWithImage_checkBox.Size = new System.Drawing.Size(166, 21);
this.BGWithImage_checkBox.TabIndex = 3;
this.BGWithImage_checkBox.Text = "Background with Image";
this.BGWithImage_checkBox.UseVisualStyleBackColor = true;
this.BGWithImage_checkBox.CheckedChanged += new System.EventHandler(this.BGWithImage_checkBox_CheckedChanged);
//
// BGWOVImage_checkBox
//
this.BGWOVImage_checkBox.AutoSize = true;
this.BGWOVImage_checkBox.Location = new System.Drawing.Point(20, 105);
this.BGWOVImage_checkBox.Name = "BGWOVImage_checkBox";
this.BGWOVImage_checkBox.Size = new System.Drawing.Size(227, 21);
this.BGWOVImage_checkBox.TabIndex = 2;
this.BGWOVImage_checkBox.Text = "Background without Vector Image";
this.BGWOVImage_checkBox.UseVisualStyleBackColor = true;
this.BGWOVImage_checkBox.CheckedChanged += new System.EventHandler(this.BGWOVImage_checkBox_CheckedChanged);
//
// VImage_checkBox
//
this.VImage_checkBox.AutoSize = true;
this.VImage_checkBox.Location = new System.Drawing.Point(20, 70);
this.VImage_checkBox.Name = "VImage_checkBox";
this.VImage_checkBox.Size = new System.Drawing.Size(106, 21);
this.VImage_checkBox.TabIndex = 1;
this.VImage_checkBox.Text = "Vector Image";
this.VImage_checkBox.UseVisualStyleBackColor = true;
this.VImage_checkBox.CheckedChanged += new System.EventHandler(this.VImage_checkBox_CheckedChanged);
//
// BGWithVImage_checkBox
//
this.BGWithVImage_checkBox.AutoSize = true;
this.BGWithVImage_checkBox.Checked = true;
this.BGWithVImage_checkBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.BGWithVImage_checkBox.Location = new System.Drawing.Point(20, 35);
this.BGWithVImage_checkBox.Name = "BGWithVImage_checkBox";
this.BGWithVImage_checkBox.Size = new System.Drawing.Size(208, 21);
this.BGWithVImage_checkBox.TabIndex = 0;
this.BGWithVImage_checkBox.Text = "Background with Vector Image";
this.BGWithVImage_checkBox.UseVisualStyleBackColor = true;
this.BGWithVImage_checkBox.CheckedChanged += new System.EventHandler(this.BGWithVImage_checkBox_CheckedChanged);
//
// GenerateCode_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(650, 248);
this.Controls.Add(this.Exit_button);
this.Controls.Add(this.Generate_button);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ForeColor = System.Drawing.Color.Navy;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "GenerateCode_Form";
this.Text = "Generate Code Configure";
this.Load += new System.EventHandler(this.GenerateCode_Form_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button Exit_button;
private System.Windows.Forms.Button Generate_button;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox BGWOVImage_checkBox;
private System.Windows.Forms.CheckBox VImage_checkBox;
private System.Windows.Forms.CheckBox BGWithVImage_checkBox;
private System.Windows.Forms.CheckBox BGWithImage_checkBox;
private System.Windows.Forms.ComboBox BGWithVImage_Type_comboBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox BGWithImage_DPI_comboBox;
private System.Windows.Forms.ComboBox BGWithImage_Type_comboBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox BGWOVImage_DPI_comboBox;
private System.Windows.Forms.ComboBox BGWOVImage_Type_comboBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox VImage_DPI_comboBox;
private System.Windows.Forms.ComboBox VImage_Type_comboBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox BGWithVImage_DPI_comboBox;
}
}

View File

@ -1,332 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TmatrixCodeGenerator
{
public partial class GenerateCode_Form : Form
{
string[] gsPreDataType = new string[4];
public GenerateCode_Form()
{
InitializeComponent();
}
private void Generate_button_Click(object sender, EventArgs e)
{
if (BGWithVImage_checkBox.Checked) GlobalClass.gbGenerateBGWithVImage = true;
else GlobalClass.gbGenerateBGWithVImage = false;
if (VImage_checkBox.Checked) GlobalClass.gbGenerateVImage = true;
else GlobalClass.gbGenerateVImage = false;
if (BGWOVImage_checkBox.Checked) GlobalClass.gbGenerateBGWithoutVImage = true;
else GlobalClass.gbGenerateBGWithoutVImage = false;
if (BGWithImage_checkBox.Checked) GlobalClass.gbGenerateBGWithImage = true;
else GlobalClass.gbGenerateBGWithImage = false;
GlobalClass.gbGenPageSet = true;
Close();
}
private void GenerateCode_Form_Load(object sender, EventArgs e)
{
GlobalClass.gbGenPageSet = false;
int i;
for (i = 0; i < 4; i++)
{
GlobalClass.gPointType[i] = 1;
GlobalClass.gPointDPI[i] = 1;
}
}
private void Exit_button_Click(object sender, EventArgs e)
{
GlobalClass.gbGenPageSet = false;
Close();
}
private void BGWithVImage_checkBox_CheckedChanged(object sender, EventArgs e)
{
if (BGWithVImage_checkBox.Checked == true)
{
BGWithVImage_Type_comboBox.Enabled = true;
BGWithVImage_DPI_comboBox.Enabled = true;
}
else
{
BGWithVImage_Type_comboBox.Enabled = false;
BGWithVImage_DPI_comboBox.Enabled = false;
}
}
private void VImage_checkBox_CheckedChanged(object sender, EventArgs e)
{
if (VImage_checkBox.Checked == true)
{
VImage_Type_comboBox.Enabled = true;
VImage_DPI_comboBox.Enabled = true;
}
else
{
VImage_Type_comboBox.Enabled = false;
VImage_DPI_comboBox.Enabled = false;
}
}
private void BGWOVImage_checkBox_CheckedChanged(object sender, EventArgs e)
{
if (BGWOVImage_checkBox.Checked == true)
{
BGWOVImage_Type_comboBox.Enabled = true;
BGWOVImage_DPI_comboBox.Enabled = true;
}
else
{
BGWOVImage_Type_comboBox.Enabled = false;
BGWOVImage_DPI_comboBox.Enabled = false;
}
}
private void BGWithImage_checkBox_CheckedChanged(object sender, EventArgs e)
{
if (BGWithImage_checkBox.Checked == true)
{
BGWithImage_Type_comboBox.Enabled = true;
BGWithImage_DPI_comboBox.Enabled = true;
}
else
{
BGWithImage_Type_comboBox.Enabled = false;
BGWithImage_DPI_comboBox.Enabled = false;
}
}
private void BGWithVImage_Type_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWithVImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[0] = 0;
break;
case "3x3":
GlobalClass.gPointType[0] = 1;
break;
case "4x4":
GlobalClass.gPointType[0] = 2;
break;
default:
break;
}
}
private void VImage_Type_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (VImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[1] = 0;
break;
case "3x3":
GlobalClass.gPointType[1] = 1;
break;
case "4x4":
GlobalClass.gPointType[1] = 2;
break;
default:
break;
}
}
private void BGWOVImage_Type_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWOVImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[2] = 0;
break;
case "3x3":
GlobalClass.gPointType[2] = 1;
break;
case "4x4":
GlobalClass.gPointType[2] = 2;
break;
default:
break;
}
}
private void BGWithImage_Type_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWithImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[3] = 0;
break;
case "3x3":
GlobalClass.gPointType[3] = 1;
break;
case "4x4":
GlobalClass.gPointType[3] = 2;
break;
default:
break;
}
}
private void BGWithVImage_DPI_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWithVImage_DPI_comboBox.Text)
{
case "600":
GlobalClass.gPointDPI[0] = 0;
gsPreDataType[0] = BGWithVImage_Type_comboBox.Text;
BGWithVImage_Type_comboBox.Text = "2x2";
BGWithVImage_Type_comboBox.Enabled = false;
break;
case "1200":
GlobalClass.gPointDPI[0] = 1;
BGWithVImage_Type_comboBox.Enabled = true;
BGWithVImage_Type_comboBox.Text = gsPreDataType[0];
break;
default:
break;
}
}
private void VImage_DPI_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (VImage_DPI_comboBox.Text)
{
case "600":
GlobalClass.gPointDPI[1] = 0;
gsPreDataType[1] = VImage_Type_comboBox.Text;
VImage_Type_comboBox.Text = "2x2";
VImage_Type_comboBox.Enabled = false;
break;
case "1200":
GlobalClass.gPointDPI[1] = 1;
VImage_Type_comboBox.Enabled = true;
VImage_Type_comboBox.Text = gsPreDataType[1];
break;
default:
break;
}
}
private void BGWOVImage_DPI_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWOVImage_DPI_comboBox.Text)
{
case "600":
GlobalClass.gPointDPI[2] = 0;
gsPreDataType[2] = BGWOVImage_Type_comboBox.Text;
BGWOVImage_Type_comboBox.Text = "2x2";
BGWOVImage_Type_comboBox.Enabled = false;
break;
case "1200":
GlobalClass.gPointDPI[2] = 1;
BGWOVImage_Type_comboBox.Enabled = true;
BGWOVImage_Type_comboBox.Text = gsPreDataType[2];
break;
default:
break;
}
}
private void BGWithImage_DPI_comboBox_SelectedIndexChanged(object sender, EventArgs e)
{
switch (BGWithImage_DPI_comboBox.Text)
{
case "600":
GlobalClass.gPointDPI[3] = 0;
gsPreDataType[3] = BGWithImage_Type_comboBox.Text;
BGWithImage_Type_comboBox.Text = "2x2";
BGWithImage_Type_comboBox.Enabled = false;
break;
case "1200":
GlobalClass.gPointDPI[3] = 1;
BGWithImage_Type_comboBox.Enabled = true;
BGWithImage_Type_comboBox.Text = gsPreDataType[3];
break;
default:
break;
}
}
private void BGWithVImage_Type_comboBox_TextChanged(object sender, EventArgs e)
{
switch (BGWithVImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[0] = 0;
break;
case "3x3":
GlobalClass.gPointType[0] = 1;
break;
case "4x4":
GlobalClass.gPointType[0] = 2;
break;
default:
break;
}
}
private void VImage_Type_comboBox_TextChanged(object sender, EventArgs e)
{
switch (VImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[1] = 0;
break;
case "3x3":
GlobalClass.gPointType[1] = 1;
break;
case "4x4":
GlobalClass.gPointType[1] = 2;
break;
default:
break;
}
}
private void BGWOVImage_Type_comboBox_TextChanged(object sender, EventArgs e)
{
switch (BGWOVImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[2] = 0;
break;
case "3x3":
GlobalClass.gPointType[2] = 1;
break;
case "4x4":
GlobalClass.gPointType[2] = 2;
break;
default:
break;
}
}
private void BGWithImage_Type_comboBox_TextChanged(object sender, EventArgs e)
{
switch (BGWithImage_Type_comboBox.Text)
{
case "2x2":
GlobalClass.gPointType[3] = 0;
break;
case "3x3":
GlobalClass.gPointType[3] = 1;
break;
case "4x4":
GlobalClass.gPointType[3] = 2;
break;
default:
break;
}
}
}
}

View File

@ -1,120 +0,0 @@
<?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>

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TmatrixCodeGenerator
{
class GlobalClass
{
public static bool gbGenerateBGWithVImage = false;
public static bool gbGenerateVImage = false;
public static bool gbGenerateBGWithoutVImage = false;
public static bool gbGenerateBGWithImage = false;
public static bool gbGenPageSet = false;
public static int[] gPointType = new int[4];
public static int[] gPointDPI = new int[4];
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View File

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace TmatrixCodeGenerator
{
static class Program
{
/// <summary>
/// 應用程式的主要進入點。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Tmatrix_Form());
}
}
}

View File

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 組件的一般資訊是由下列的屬性集控制。
// 變更這些屬性的值即可修改組件的相關
// 資訊。
[assembly: AssemblyTitle("TmatrixCodeGenerator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TmatrixCodeGenerator")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 將 ComVisible 設定為 false 會使得這個組件中的類型
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
// 的類型,請在該類型上將 ComVisible 屬性設定為 true。
[assembly: ComVisible(false)]
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
[assembly: Guid("c8cbd32e-39a9-4fa7-a4f1-04003a5be8c2")]
// 組件的版本資訊是由下列四項值構成:
//
// 主要版本
// 次要版本
// 組建編號
// 修訂編號
//
// 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號
// 指定為預設值:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,93 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeGenerator.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeGenerator.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Printer1 {
get {
object obj = ResourceManager.GetObject("Printer1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Printer2 {
get {
object obj = ResourceManager.GetObject("Printer2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Printer3 {
get {
object obj = ResourceManager.GetObject("Printer3", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -1,130 +0,0 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Printer1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Printer1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Printer2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Printer2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Printer3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Printer3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodeGenerator.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@ -1,101 +0,0 @@
namespace OIDModule.Generator
{
using System;
using System.Runtime.InteropServices;
internal enum OIDBeginBuildState
{
eBBState_OK,
eBBState_ImageFileNotExist,
eBBState_FailToOpenImageFile,
eBBState_Unknown
}
internal enum OIDPrintPointType
{
eOID_PrintPointType_2x2,
eOID_PrintPointType_3x3,
eOID_PrintPointType_4x4
}
internal enum OIDPublishImageDPIType
{
eOID_PublishImageDPI_600,
eOID_PublishImageDPI_1200
}
internal enum OIDPublishImageType
{
eOID_PIT_Publish_Image,
eOID_PIT_Vertor_Image,
eOID_PIT_BG_Vertor_Image,
eOID_PIT_Publish_BG_Image
}
internal enum OIDPublishObjectType
{
eOID_OT_ElementCode,
eOID_OT_PositionCode
}
internal class OIDPublishImageGenerator
{
public bool AddObjectInfo(int nPageIndex, ulong uiObjectIndex, uint[] arPointX, uint[] arPointY, int nPointsCount, int nZOrder, int nObjectType)
{
return OID_PIG_AddObjectInfo(nPageIndex, uiObjectIndex, arPointX, arPointY, nPointsCount, nZOrder, nObjectType);
}
public int BeginBuildPublishImage(char[] szBGImage, bool bExportPDFImage, int nExportPDFImageDPI)
{
return OID_PIG_BeginBuildPublishImage(szBGImage, bExportPDFImage, nExportPDFImageDPI);
}
public int BeginBuildPublishImageByInfo(double dbCMWidth, double dbCMHeight)
{
return OID_PIG_BeginBuildPublishImageByInfo(dbCMWidth, dbCMHeight);
}
public bool BuildPublishImage(char[] szOutputFolderPath, bool bPrintIdleCode, bool bSplitBigImage, bool bMergeSplittedImages, int nPublishImageDPIType, int nPrintPointType, int nPublishImageType)
{
return OID_PIG_BuildPublishImage(szOutputFolderPath, bPrintIdleCode, bSplitBigImage, bMergeSplittedImages, nPublishImageDPIType, nPrintPointType, nPublishImageType);
}
public void EndBuildPublishImage()
{
OID_PIG_EndBuildPublishImage();
}
public bool Initialize()
{
return OID_PIG_Initialize();
}
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern bool OID_PIG_AddObjectInfo(int nPageIndex, ulong uiObjectIndex, uint[] arPointX, uint[] arPointY, int nPointsCount, int nZOrder, int nObjectType);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Unicode)]
private static extern int OID_PIG_BeginBuildPublishImage(char[] szBGImage, bool bExportPDFImage, int nExportPDFImageDPI);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Unicode)]
private static extern int OID_PIG_BeginBuildPublishImageByInfo(double dbCMWidth, double dbCMHeight);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Unicode)]
private static extern bool OID_PIG_BuildPublishImage(char[] szOutputFolderPath, bool bPrintIdleCode, bool bSplitBigImage, bool bMergeSplittedImages, int nPublishImageDPIType, int nPrintPointType, int nPublishImageType);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern void OID_PIG_EndBuildPublishImage();
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern bool OID_PIG_Initialize();
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern bool OID_PIG_SetPublishPages(int[] arPageNumbers, int nPageCount);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern bool OID_PIG_SetStartPosition(int nPageIndex, int nXStart, int nYStart);
[DllImport(@".\OIDPublishImageGenerator\OIDPublishImageGenerator.dll", CallingConvention=CallingConvention.StdCall)]
private static extern void OID_PIG_Uninitialize();
public bool SetPublishPages(int[] arPageNumbers, int nPageCount)
{
return OID_PIG_SetPublishPages(arPageNumbers, nPageCount);
}
public bool SetStartPosition(int nPageIndex, int nXStart, int nYStart)
{
return OID_PIG_SetStartPosition(nPageIndex, nXStart, nYStart);
}
public void Uninitialize()
{
OID_PIG_Uninitialize();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,174 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{657EF1B5-592E-4D99-B2D6-E2A1BDAD6DEA}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodeGenerator</RootNamespace>
<AssemblyName>CodeGenerator</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>TmatrixCodeGenerator.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="adodb, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Common\adodb.dll</HintPath>
</Reference>
<Reference Include="AxInterop.AcroPDFLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\FinalDLL\AxInterop.AcroPDFLib.dll</HintPath>
</Reference>
<Reference Include="DocumentTools">
<HintPath>bin\FinalDLL\DocumentTools.dll</HintPath>
</Reference>
<Reference Include="DrawToolsLib">
<HintPath>bin\FinalDLL\DrawToolsLib.dll</HintPath>
</Reference>
<Reference Include="itextsharp">
<HintPath>bin\FinalDLL\itextsharp.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GenerateCode_Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GenerateCode_Form.designer.cs">
<DependentUpon>GenerateCode_Form.cs</DependentUpon>
</Compile>
<Compile Include="GlobalClass.cs" />
<Compile Include="TmatrixLibrary\OIDPublishImageGenerator_SDK.cs" />
<Compile Include="TmatrixLibrary\TmatrixClass_SDK.cs" />
<Compile Include="Tmatrix_Form.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Tmatrix_Form.Designer.cs">
<DependentUpon>Tmatrix_Form.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="GenerateCode_Form.resx">
<DependentUpon>GenerateCode_Form.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Tmatrix_Form.resx">
<DependentUpon>Tmatrix_Form.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<COMReference Include="Acrobat">
<Guid>{E64169B3-3592-47D2-816E-602C5C13F328}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="AcroPDFLib">
<Guid>{05BFD3F1-6319-4F30-B752-C7A22889BCC4}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="AFORMAUTLib">
<Guid>{7CD06992-50AA-11D1-B8F0-00A0C9259304}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<Content Include="Printer1.png" />
<Content Include="Printer2.png" />
<Content Include="Printer3.png" />
<Content Include="TmatrixCodeGenerator.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@ -1,591 +0,0 @@
namespace TmatrixCodeGenerator
{
partial class Tmatrix_Form
{
/// <summary>
/// 設計工具所需的變數。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清除任何使用中的資源。
/// </summary>
/// <param name="disposing">如果應該處置 Managed 資源則為 true否則為 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form
/// <summary>
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器
/// 修改這個方法的內容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Tmatrix_Form));
this.SelectTmatrixKey_button = new System.Windows.Forms.Button();
this.SelectPDF_button = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.SID_textBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.OID_textBox = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.Expiration_textBox = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.PID2_textBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.PID1_textBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.BID_textBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.PDF_groupBox = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.GeneratePartialCode_button = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.H3_textBox = new System.Windows.Forms.TextBox();
this.H2_textBox = new System.Windows.Forms.TextBox();
this.H1_textBox = new System.Windows.Forms.TextBox();
this.W3_textBox = new System.Windows.Forms.TextBox();
this.W2_textBox = new System.Windows.Forms.TextBox();
this.W1_textBox = new System.Windows.Forms.TextBox();
this.Y3_textBox = new System.Windows.Forms.TextBox();
this.Y2_textBox = new System.Windows.Forms.TextBox();
this.Y1_textBox = new System.Windows.Forms.TextBox();
this.X3_textBox = new System.Windows.Forms.TextBox();
this.X2_textBox = new System.Windows.Forms.TextBox();
this.X1_textBox = new System.Windows.Forms.TextBox();
this.GenerateTmatrixCode_button = new System.Windows.Forms.Button();
this.FName_textBox = new System.Windows.Forms.TextBox();
this.SPID_textBox = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.Exit_button = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.groupBox1.SuspendLayout();
this.PDF_groupBox.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// SelectTmatrixKey_button
//
this.SelectTmatrixKey_button.Location = new System.Drawing.Point(10, 41);
this.SelectTmatrixKey_button.Name = "SelectTmatrixKey_button";
this.SelectTmatrixKey_button.Size = new System.Drawing.Size(174, 37);
this.SelectTmatrixKey_button.TabIndex = 3;
this.SelectTmatrixKey_button.Text = "Select Configure File";
this.SelectTmatrixKey_button.UseVisualStyleBackColor = true;
this.SelectTmatrixKey_button.Click += new System.EventHandler(this.SelectTmatrixKey_button_Click);
//
// SelectPDF_button
//
this.SelectPDF_button.Location = new System.Drawing.Point(17, 41);
this.SelectPDF_button.Name = "SelectPDF_button";
this.SelectPDF_button.Size = new System.Drawing.Size(146, 37);
this.SelectPDF_button.TabIndex = 4;
this.SelectPDF_button.Text = "Select PDF File";
this.SelectPDF_button.UseVisualStyleBackColor = true;
this.SelectPDF_button.Click += new System.EventHandler(this.SelectPDF_button_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.SID_textBox);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.OID_textBox);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.Expiration_textBox);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.PID2_textBox);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.PID1_textBox);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.BID_textBox);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.SelectTmatrixKey_button);
this.groupBox1.Location = new System.Drawing.Point(18, 17);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(683, 158);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Configure";
//
// SID_textBox
//
this.SID_textBox.ForeColor = System.Drawing.Color.Navy;
this.SID_textBox.Location = new System.Drawing.Point(293, 47);
this.SID_textBox.Name = "SID_textBox";
this.SID_textBox.ReadOnly = true;
this.SID_textBox.Size = new System.Drawing.Size(55, 25);
this.SID_textBox.TabIndex = 19;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(186, 49);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(85, 20);
this.label7.TabIndex = 18;
this.label7.Text = "Section ID :";
//
// OID_textBox
//
this.OID_textBox.ForeColor = System.Drawing.Color.Navy;
this.OID_textBox.Location = new System.Drawing.Point(450, 47);
this.OID_textBox.Name = "OID_textBox";
this.OID_textBox.ReadOnly = true;
this.OID_textBox.Size = new System.Drawing.Size(55, 25);
this.OID_textBox.TabIndex = 17;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(356, 49);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(79, 20);
this.label14.TabIndex = 16;
this.label14.Text = "Owner ID :";
//
// Expiration_textBox
//
this.Expiration_textBox.ForeColor = System.Drawing.Color.Navy;
this.Expiration_textBox.Location = new System.Drawing.Point(453, 100);
this.Expiration_textBox.Name = "Expiration_textBox";
this.Expiration_textBox.ReadOnly = true;
this.Expiration_textBox.Size = new System.Drawing.Size(135, 25);
this.Expiration_textBox.TabIndex = 11;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(349, 102);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(84, 20);
this.label4.TabIndex = 10;
this.label4.Text = "Expiration :";
//
// PID2_textBox
//
this.PID2_textBox.ForeColor = System.Drawing.Color.Navy;
this.PID2_textBox.Location = new System.Drawing.Point(264, 100);
this.PID2_textBox.Name = "PID2_textBox";
this.PID2_textBox.ReadOnly = true;
this.PID2_textBox.Size = new System.Drawing.Size(69, 25);
this.PID2_textBox.TabIndex = 9;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(229, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(26, 20);
this.label3.TabIndex = 8;
this.label3.Text = "To";
//
// PID1_textBox
//
this.PID1_textBox.ForeColor = System.Drawing.Color.Navy;
this.PID1_textBox.Location = new System.Drawing.Point(155, 100);
this.PID1_textBox.Name = "PID1_textBox";
this.PID1_textBox.ReadOnly = true;
this.PID1_textBox.Size = new System.Drawing.Size(69, 25);
this.PID1_textBox.TabIndex = 7;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(20, 102);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(107, 20);
this.label2.TabIndex = 6;
this.label2.Text = "Page ID : From";
//
// BID_textBox
//
this.BID_textBox.ForeColor = System.Drawing.Color.Navy;
this.BID_textBox.Location = new System.Drawing.Point(598, 48);
this.BID_textBox.Name = "BID_textBox";
this.BID_textBox.ReadOnly = true;
this.BID_textBox.Size = new System.Drawing.Size(70, 25);
this.BID_textBox.TabIndex = 5;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(508, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 20);
this.label1.TabIndex = 4;
this.label1.Text = "Book ID :";
//
// PDF_groupBox
//
this.PDF_groupBox.Controls.Add(this.groupBox2);
this.PDF_groupBox.Controls.Add(this.GenerateTmatrixCode_button);
this.PDF_groupBox.Controls.Add(this.FName_textBox);
this.PDF_groupBox.Controls.Add(this.SPID_textBox);
this.PDF_groupBox.Controls.Add(this.label5);
this.PDF_groupBox.Controls.Add(this.SelectPDF_button);
this.PDF_groupBox.Enabled = false;
this.PDF_groupBox.Location = new System.Drawing.Point(18, 189);
this.PDF_groupBox.Name = "PDF_groupBox";
this.PDF_groupBox.Size = new System.Drawing.Size(683, 111);
this.PDF_groupBox.TabIndex = 6;
this.PDF_groupBox.TabStop = false;
this.PDF_groupBox.Text = "Select PDF to Generate Code";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.GeneratePartialCode_button);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.H3_textBox);
this.groupBox2.Controls.Add(this.H2_textBox);
this.groupBox2.Controls.Add(this.H1_textBox);
this.groupBox2.Controls.Add(this.W3_textBox);
this.groupBox2.Controls.Add(this.W2_textBox);
this.groupBox2.Controls.Add(this.W1_textBox);
this.groupBox2.Controls.Add(this.Y3_textBox);
this.groupBox2.Controls.Add(this.Y2_textBox);
this.groupBox2.Controls.Add(this.Y1_textBox);
this.groupBox2.Controls.Add(this.X3_textBox);
this.groupBox2.Controls.Add(this.X2_textBox);
this.groupBox2.Controls.Add(this.X1_textBox);
this.groupBox2.Location = new System.Drawing.Point(17, 85);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(602, 10);
this.groupBox2.TabIndex = 13;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Partial Area Code";
this.groupBox2.Visible = false;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(3, 134);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(26, 20);
this.label13.TabIndex = 21;
this.label13.Text = "P3";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(3, 100);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(26, 20);
this.label12.TabIndex = 20;
this.label12.Text = "P2";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(3, 65);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(26, 20);
this.label11.TabIndex = 19;
this.label11.Text = "P1";
//
// GeneratePartialCode_button
//
this.GeneratePartialCode_button.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.GeneratePartialCode_button.Location = new System.Drawing.Point(395, 88);
this.GeneratePartialCode_button.Name = "GeneratePartialCode_button";
this.GeneratePartialCode_button.Size = new System.Drawing.Size(187, 72);
this.GeneratePartialCode_button.TabIndex = 18;
this.GeneratePartialCode_button.Text = "Generate Partial Code";
this.GeneratePartialCode_button.UseVisualStyleBackColor = true;
this.GeneratePartialCode_button.Click += new System.EventHandler(this.GeneratePartialCode_button_Click);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(306, 30);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(55, 20);
this.label10.TabIndex = 15;
this.label10.Text = "Height";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(222, 31);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(50, 20);
this.label9.TabIndex = 14;
this.label9.Text = "Width";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(126, 30);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(57, 20);
this.label8.TabIndex = 13;
this.label8.Text = "Y (Top)";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(34, 30);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(57, 20);
this.label6.TabIndex = 12;
this.label6.Text = "X (Left)";
//
// H3_textBox
//
this.H3_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.H3_textBox.Location = new System.Drawing.Point(306, 131);
this.H3_textBox.Name = "H3_textBox";
this.H3_textBox.Size = new System.Drawing.Size(69, 25);
this.H3_textBox.TabIndex = 11;
this.H3_textBox.Text = "1500";
//
// H2_textBox
//
this.H2_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.H2_textBox.Location = new System.Drawing.Point(306, 96);
this.H2_textBox.Name = "H2_textBox";
this.H2_textBox.Size = new System.Drawing.Size(69, 25);
this.H2_textBox.TabIndex = 10;
this.H2_textBox.Text = "1500";
//
// H1_textBox
//
this.H1_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.H1_textBox.Location = new System.Drawing.Point(306, 61);
this.H1_textBox.Name = "H1_textBox";
this.H1_textBox.Size = new System.Drawing.Size(69, 25);
this.H1_textBox.TabIndex = 9;
this.H1_textBox.Text = "1500";
//
// W3_textBox
//
this.W3_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.W3_textBox.Location = new System.Drawing.Point(217, 132);
this.W3_textBox.Name = "W3_textBox";
this.W3_textBox.Size = new System.Drawing.Size(69, 25);
this.W3_textBox.TabIndex = 8;
this.W3_textBox.Text = "1500";
//
// W2_textBox
//
this.W2_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.W2_textBox.Location = new System.Drawing.Point(217, 97);
this.W2_textBox.Name = "W2_textBox";
this.W2_textBox.Size = new System.Drawing.Size(69, 25);
this.W2_textBox.TabIndex = 7;
this.W2_textBox.Text = "1500";
//
// W1_textBox
//
this.W1_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.W1_textBox.Location = new System.Drawing.Point(217, 62);
this.W1_textBox.Name = "W1_textBox";
this.W1_textBox.Size = new System.Drawing.Size(69, 25);
this.W1_textBox.TabIndex = 6;
this.W1_textBox.Text = "1500";
//
// Y3_textBox
//
this.Y3_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.Y3_textBox.Location = new System.Drawing.Point(126, 132);
this.Y3_textBox.Name = "Y3_textBox";
this.Y3_textBox.Size = new System.Drawing.Size(69, 25);
this.Y3_textBox.TabIndex = 5;
this.Y3_textBox.Text = "3000";
//
// Y2_textBox
//
this.Y2_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.Y2_textBox.Location = new System.Drawing.Point(126, 97);
this.Y2_textBox.Name = "Y2_textBox";
this.Y2_textBox.Size = new System.Drawing.Size(69, 25);
this.Y2_textBox.TabIndex = 4;
this.Y2_textBox.Text = "1500";
//
// Y1_textBox
//
this.Y1_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.Y1_textBox.Location = new System.Drawing.Point(126, 62);
this.Y1_textBox.Name = "Y1_textBox";
this.Y1_textBox.Size = new System.Drawing.Size(69, 25);
this.Y1_textBox.TabIndex = 3;
this.Y1_textBox.Text = "0";
//
// X3_textBox
//
this.X3_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.X3_textBox.Location = new System.Drawing.Point(33, 132);
this.X3_textBox.Name = "X3_textBox";
this.X3_textBox.Size = new System.Drawing.Size(69, 25);
this.X3_textBox.TabIndex = 2;
this.X3_textBox.Text = "3000";
//
// X2_textBox
//
this.X2_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.X2_textBox.Location = new System.Drawing.Point(33, 97);
this.X2_textBox.Name = "X2_textBox";
this.X2_textBox.Size = new System.Drawing.Size(69, 25);
this.X2_textBox.TabIndex = 1;
this.X2_textBox.Text = "1500";
//
// X1_textBox
//
this.X1_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.X1_textBox.Location = new System.Drawing.Point(33, 62);
this.X1_textBox.Name = "X1_textBox";
this.X1_textBox.Size = new System.Drawing.Size(69, 25);
this.X1_textBox.TabIndex = 0;
this.X1_textBox.Text = "0";
//
// GenerateTmatrixCode_button
//
this.GenerateTmatrixCode_button.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.GenerateTmatrixCode_button.Location = new System.Drawing.Point(398, 42);
this.GenerateTmatrixCode_button.Name = "GenerateTmatrixCode_button";
this.GenerateTmatrixCode_button.Size = new System.Drawing.Size(201, 37);
this.GenerateTmatrixCode_button.TabIndex = 1;
this.GenerateTmatrixCode_button.Text = "Generate Code";
this.GenerateTmatrixCode_button.UseVisualStyleBackColor = true;
this.GenerateTmatrixCode_button.Click += new System.EventHandler(this.GenerateTmatrixCode_button_Click);
//
// FName_textBox
//
this.FName_textBox.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.FName_textBox.ForeColor = System.Drawing.Color.Navy;
this.FName_textBox.Location = new System.Drawing.Point(18, 302);
this.FName_textBox.Name = "FName_textBox";
this.FName_textBox.Size = new System.Drawing.Size(539, 23);
this.FName_textBox.TabIndex = 12;
this.FName_textBox.Visible = false;
//
// SPID_textBox
//
this.SPID_textBox.ForeColor = System.Drawing.Color.Navy;
this.SPID_textBox.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.SPID_textBox.Location = new System.Drawing.Point(297, 47);
this.SPID_textBox.Name = "SPID_textBox";
this.SPID_textBox.Size = new System.Drawing.Size(74, 25);
this.SPID_textBox.TabIndex = 7;
this.SPID_textBox.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(169, 49);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(104, 20);
this.label5.TabIndex = 6;
this.label5.Text = "Start Page ID :";
//
// Exit_button
//
this.Exit_button.Location = new System.Drawing.Point(632, 306);
this.Exit_button.Name = "Exit_button";
this.Exit_button.Size = new System.Drawing.Size(69, 37);
this.Exit_button.TabIndex = 8;
this.Exit_button.Text = "Exit";
this.Exit_button.UseVisualStyleBackColor = true;
this.Exit_button.Click += new System.EventHandler(this.Exit_button_Click);
//
// panel1
//
this.panel1.Location = new System.Drawing.Point(374, 565);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(38, 22);
this.panel1.TabIndex = 10;
this.panel1.Visible = false;
//
// Tmatrix_Form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(716, 352);
this.Controls.Add(this.panel1);
this.Controls.Add(this.Exit_button);
this.Controls.Add(this.PDF_groupBox);
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("Microsoft YaHei UI", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ForeColor = System.Drawing.Color.Navy;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.Name = "Tmatrix_Form";
this.Text = "NetEase 100 Smart Pen";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Tmatrix_Form_FormClosing);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.PDF_groupBox.ResumeLayout(false);
this.PDF_groupBox.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button SelectTmatrixKey_button;
private System.Windows.Forms.Button SelectPDF_button;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox Expiration_textBox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox PID2_textBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox PID1_textBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox BID_textBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox PDF_groupBox;
private System.Windows.Forms.TextBox SPID_textBox;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button GenerateTmatrixCode_button;
private System.Windows.Forms.TextBox FName_textBox;
private System.Windows.Forms.Button Exit_button;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox X2_textBox;
private System.Windows.Forms.TextBox X1_textBox;
private System.Windows.Forms.Button GeneratePartialCode_button;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox H3_textBox;
private System.Windows.Forms.TextBox H2_textBox;
private System.Windows.Forms.TextBox H1_textBox;
private System.Windows.Forms.TextBox W3_textBox;
private System.Windows.Forms.TextBox W2_textBox;
private System.Windows.Forms.TextBox W1_textBox;
private System.Windows.Forms.TextBox Y3_textBox;
private System.Windows.Forms.TextBox Y2_textBox;
private System.Windows.Forms.TextBox Y1_textBox;
private System.Windows.Forms.TextBox X3_textBox;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox SID_textBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox OID_textBox;
private System.Windows.Forms.Label label14;
}
}

View File

@ -1,301 +0,0 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Acrobat;
using DocumentTools;
using DrawToolsLib;
using AxAcroPDFLib;
using AcroPDFLib;
using iTextSharp.text.pdf;
using TmatrixLibrary;
namespace TmatrixCodeGenerator
{
public partial class Tmatrix_Form : Form
{
StreamReader gsr;
string TMXFileName, PDFFileName, gKeyStr;
TmatrixClass TMC = new TmatrixClass();
public static string gPrintFileName;
string gDirectory = Application.StartupPath;
string gFileName = "";
bool gbInitDone = false;
//string gUserName = "";
//string gPassword = "";
enum TMATRIX_POINT_TYPE
{
TmatrixPointType_2x2 = 0, // 2x2 Point Type
TmatrixPointType_3x3 = 1, // 3x3 Point Type
};
enum TMATRIX_OBJECT_TYPE
{
TMATRIX_OT_ElementCode = 0, // 此类型对象的Index范围是75497472~83886079(十六进制为0x04800000~0x04ffffff)
TMATRIX_OT_PositionCode, // 此类型对象没有Index
};
public Tmatrix_Form()
{
InitializeComponent();
if (TMC.TmatrixInitialize() == false)
{
MessageBox.Show(this, "Code Generator initialize fail !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
else
{
gbInitDone = true;
}
}
private void GenerateCode()
{
GenerateCode_Form dialog = new GenerateCode_Form();
dialog.ShowDialog();
if (GlobalClass.gbGenPageSet == false) return;
if (gbInitDone == false)
{
MessageBox.Show(this, "Code Generator initialize fail !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int SPID = 0;
try
{
SPID = int.Parse(SPID_textBox.Text);
}
catch
{
MessageBox.Show(this, "Please input correct format for start page ID !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
MessageBox.Show(this, "Generating code...........", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Hide();
//int PointType = (int)(TMATRIX_POINT_TYPE.TmatrixPointType_3x3);
//string sGenerateResult = TMC.GenerateTmatrixCode(gKeyStr, PDFFileName, SPID, PointType, GlobalClass.gbGenerateBGWithVImage, GlobalClass.gbGenerateVImage, GlobalClass.gbGenerateBGWithoutVImage, GlobalClass.gbGenerateBGWithImage);
bool[] bPublishImageType = new bool[4];
bPublishImageType[0] = GlobalClass.gbGenerateBGWithVImage;
bPublishImageType[1] = GlobalClass.gbGenerateVImage;
bPublishImageType[2] = GlobalClass.gbGenerateBGWithoutVImage;
bPublishImageType[3] = GlobalClass.gbGenerateBGWithImage;
string sGenerateResult = TMC.GenerateTmatrixCode_OID4(gKeyStr, PDFFileName, SPID, GlobalClass.gPointType, bPublishImageType, GlobalClass.gPointDPI);
if (sGenerateResult.Substring(0, 1) == "1")
{
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else if (sGenerateResult.Substring(0, 1) == "0")
{
gDirectory = Path.GetDirectoryName(PDFFileName);
gFileName = Path.GetFileName(PDFFileName);
/*
gDirectory += "\\";
string WFName = gFileName.Substring(0, gFileName.Length - 4) + "_*.PDF";
string[] files = Directory.GetFiles(@gDirectory, WFName);
int i;
string Pfile;
File_listBox.Items.Clear();
for (i = 0; i < files.Length; i++)
{
Pfile = Path.GetFileName(files[i]);
File_listBox.Items.Add(Pfile);
File_listBox.SelectedIndex = File_listBox.Items.Count - 1;
}
*/
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
return;
}
private void GenerateCode_old()
{
GenerateCode_Form dialog = new GenerateCode_Form();
dialog.ShowDialog();
if (GlobalClass.gbGenPageSet == false) return;
if (gbInitDone == false)
{
MessageBox.Show(this, "Code Generator initialize fail !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int SPID = 0;
try
{
SPID = int.Parse(SPID_textBox.Text);
}
catch
{
MessageBox.Show(this, "Please input correct format for start page ID !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
MessageBox.Show(this, "Generating code...........", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Hide();
int PointType = (int)(TMATRIX_POINT_TYPE.TmatrixPointType_3x3);
string sGenerateResult = TMC.GenerateTmatrixCode(gKeyStr, PDFFileName, SPID, PointType, GlobalClass.gbGenerateBGWithVImage, GlobalClass.gbGenerateVImage, GlobalClass.gbGenerateBGWithoutVImage, GlobalClass.gbGenerateBGWithImage);
if (sGenerateResult.Substring(0, 1) == "1")
{
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else if (sGenerateResult.Substring(0, 1) == "0")
{
gDirectory = Path.GetDirectoryName(PDFFileName);
gFileName = Path.GetFileName(PDFFileName);
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
return;
}
private void GenerateTmatrixCode_button_Click(object sender, EventArgs e)
{
GenerateCode();
}
private void SelectPDF_button_Click(object sender, EventArgs e)
{
OpenFileDialog OpenDlg = new OpenFileDialog();
OpenDlg.FileName = "";
OpenDlg.DefaultExt = "pdf";
OpenDlg.Filter = "PDF Files (*.pdf)|*.pdf";
if (OpenDlg.ShowDialog() == DialogResult.OK) {
PDFFileName = OpenDlg.FileName;
FName_textBox.Text = PDFFileName;
}
}
private void Exit_button_Click(object sender, EventArgs e)
{
Close();
}
private void SelectTmatrixKey_button_Click(object sender, EventArgs e)
{
OpenFileDialog OpenDlg = new OpenFileDialog();
OpenDlg.FileName = "";
OpenDlg.DefaultExt = "tmx";
OpenDlg.Filter = "TMX Files (*.tmx)|*.tmx";
if (OpenDlg.ShowDialog() == DialogResult.OK)
{
BID_textBox.Text = "";
PID1_textBox.Text = "";
PID2_textBox.Text = "";
Expiration_textBox.Text = "";
PDF_groupBox.Enabled = false;
PDFFileName = "";
TMXFileName = OpenDlg.FileName;
//MessageBox.Show(TMXFileName);
gsr = new StreamReader(TMXFileName);
gKeyStr = gsr.ReadLine();
gsr.Close();
string KeyCheckResult = TMC.TmatrixKeyCheck_OID4(gKeyStr);
if (KeyCheckResult.Substring(0, 1) == "1")
{
MessageBox.Show(this, KeyCheckResult.Substring(1, KeyCheckResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else if (KeyCheckResult.Substring(0, 1) == "0")
{
string[] s = gKeyStr.Split(';');
string[] s1 = s[0].Split(',');
SID_textBox.Text = s1[0].Substring(1, 1);
OID_textBox.Text = s1[1].Substring(1, 3);
BID_textBox.Text = s1[2].Substring(1, 4);
PID1_textBox.Text = s1[3].Substring(1, 3);
PID2_textBox.Text = s1[3].Substring(5, 3);
Expiration_textBox.Text = s1[4].Substring(1, s1[4].Length - 1);
PDF_groupBox.Enabled = true;
}
}
}
private void Tmatrix_Form_FormClosing(object sender, FormClosingEventArgs e)
{
TMC.TmatrixUninitialize();
}
private void GeneratePartialCode()
{
GenerateCode_Form dialog = new GenerateCode_Form();
dialog.ShowDialog();
if (GlobalClass.gbGenPageSet == false) return;
if (gbInitDone == false)
{
MessageBox.Show(this, "Code Generator initialize fail !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
int SPID = 0;
try
{
SPID = int.Parse(SPID_textBox.Text);
}
catch
{
MessageBox.Show(this, "Please input correct format for start page ID !", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
MessageBox.Show(this, "Generating code...........", "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Hide();
//int PointType = (int)(TMATRIX_POINT_TYPE.TmatrixPointType_3x3);
//256 is for Total Pages, 10 is for partial area in each page, this is just a sample program, area no can be expanded by yourself.
UInt32[][] Tx = new UInt32[256][];
UInt32[][] Ty = new UInt32[256][];
UInt32[][] Tw = new UInt32[256][];
UInt32[][] Th = new UInt32[256][];
int i;
for (i = 0; i < 256; i++)
{
Tx[i] = new UInt32[10];
Ty[i] = new UInt32[10];
Tw[i] = new UInt32[10];
Th[i] = new UInt32[10];
}
Tx[0][0] = UInt32.Parse(X1_textBox.Text);
Tx[1][0] = UInt32.Parse(X2_textBox.Text);
Tx[2][0] = UInt32.Parse(X3_textBox.Text);
Ty[0][0] = UInt32.Parse(Y1_textBox.Text);
Ty[1][0] = UInt32.Parse(Y2_textBox.Text);
Ty[2][0] = UInt32.Parse(Y3_textBox.Text);
Tw[0][0] = UInt32.Parse(W1_textBox.Text);
Tw[1][0] = UInt32.Parse(W2_textBox.Text);
Tw[2][0] = UInt32.Parse(W3_textBox.Text);
Th[0][0] = UInt32.Parse(H1_textBox.Text);
Th[1][0] = UInt32.Parse(H2_textBox.Text);
Th[2][0] = UInt32.Parse(H3_textBox.Text);
Tw[0][1] = 0;
Tw[1][1] = 0;
Tw[2][1] = 0;
Th[0][1] = 0;
Th[1][1] = 0;
Th[2][1] = 0;
//string sGenerateResult = TMC.GenerateTmatrixCodeByArea(gKeyStr, PDFFileName, SPID, PointType, GlobalClass.gbGenerateBGWithVImage, GlobalClass.gbGenerateVImage, GlobalClass.gbGenerateBGWithoutVImage, GlobalClass.gbGenerateBGWithImage,Tx, Ty, Tw, Th);
string sGenerateResult = TMC.GenerateTmatrixCodeByArea_OID4(gKeyStr, PDFFileName, SPID, GlobalClass.gPointType, GlobalClass.gPointDPI, GlobalClass.gbGenerateBGWithVImage, GlobalClass.gbGenerateVImage, GlobalClass.gbGenerateBGWithoutVImage, GlobalClass.gbGenerateBGWithImage, Tx, Ty, Tw, Th);
if (sGenerateResult.Substring(0, 1) == "1")
{
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else if (sGenerateResult.Substring(0, 1) == "0")
{
gDirectory = Path.GetDirectoryName(PDFFileName);
gFileName = Path.GetFileName(PDFFileName);
this.Show();
MessageBox.Show(this, sGenerateResult.Substring(1, sGenerateResult.Length - 1), "Code Generator", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
return;
}
private void GeneratePartialCode_button_Click(object sender, EventArgs e)
{
GeneratePartialCode();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

Binary file not shown.

View File

@ -1,3 +0,0 @@
[General]
VertionType=TQL
CodeType=OID4

View File

@ -1,3 +0,0 @@
[General]
Product = IW.6.COM-SONIX.STD0
CodeType = OID4.0

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<File Version="1.0">
<ExtensionPoint ID="I_OIDPGHelper" Enable="1">
<Plugin ID="OIDPGHelper" Bundle="OIDPGHelper.dll" Enable="1"/>
</ExtensionPoint>
<ExtensionPoint ID="I_OIDTiffConvertor" Enable="1">
<Plugin ID="OIDTiffConvertor" Bundle="OIDTiffConvertor.dll" Enable="1"/>
</ExtensionPoint>
</File>

View File

@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDTTCCAjWgAwIBAgIJALSlTPHWayS7MA0GCSqGSIb3DQEBCwUAMB4xHDAaBgNV
BAMTE1NPTmlYIENsb3VkIFNlcnZpY2UwHhcNMTUwMTA5MDg1OTAzWhcNMjUwMTA2
MDg1OTAzWjAeMRwwGgYDVQQDExNTT05pWCBDbG91ZCBTZXJ2aWNlMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzZ3v3VyrPlkaUhdHXGuklJ67m9wrb0My
RBLRCo9Z0x7FAKMfyXolSPT4KpdGYTbJOhMhxt3j3DiVCklUjHuoGTMDj7vKqCQ8
eqtTIBz7LUOPAAOdUU/0mIFEu0rdOXDk31qNYGnwqjOiY5HOSSFgFh3jE46YlN/P
6r23QL0IIymOkZfl6GJsT7IJ5lM2P1esezc81dM/PqFi3712Vyuk3p8GJcC2OqPT
D68wKhOgxcJQ2sgPx+uAUNV6WgzKijT/59mmmSbm98srGSECjx+G1oHfUUIqlB2l
t3aAjExNNtUHCXMEcd14ynwZML3b1bm1TB6/k7lNAKctRn0+DiW3SQIDAQABo4GN
MIGKMB0GA1UdDgQWBBQhOz3/VjYsb/6r4KjenczQjRiMCzBOBgNVHSMERzBFgBQh
Oz3/VjYsb/6r4KjenczQjRiMC6EipCAwHjEcMBoGA1UEAxMTU09OaVggQ2xvdWQg
U2VydmljZYIJALSlTPHWayS7MAwGA1UdEwQFMAMBAf8wCwYDVR0PBAQDAgEGMA0G
CSqGSIb3DQEBCwUAA4IBAQDHvbfp+1CSGD6XQJ3ULk+wKOmTr7r7rGT0HOQQOCYp
Fw4mKHmgYUlASdcP5YMbJM+UmOhJKu6uOAhRNt+0S3luf3udhjc56UrMkbdAyS7W
KrYoVb8b+iSym72T9uQ6ADlsq7W+I6O0Eiju8gsBYQL9P2Q6dATz4ZaUW4/1fgpL
pqSF8LnC42n7uwlLuve94renNv/duqBy1StilbNFD6GzPJX+bRxffzmBEE6nAUzD
h2QZyVWBXAkKOmjKClqWmKhkfDsNks60rzvypikQynLhi/Ik4NYs5B/m3XfD964E
ZGYfpFCbcSp/s3wjDa83mC4HFtBHUE1AgcmJVXfdl1t4
-----END CERTIFICATE-----

View File

@ -1 +0,0 @@
243a5a999667fb6be6f4d4f6ec0d3bd8d40a08ba

View File

@ -1,40 +0,0 @@
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.exe.config
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.exe
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.pdb
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\AxInterop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\DocumentTools.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\DrawToolsLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\itextsharp.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\bin\Release\Interop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\Interop.Acrobat.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\Interop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\Interop.AFORMAUTLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.ResolveComReference.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.GenerateCode_Form.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.Properties.Resources.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.Tmatrix_Form.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.GenerateResource.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.CoreCompileInputs.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.CopyComplete
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.exe
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator3\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.pdb
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.exe.config
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.exe
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\TmatrixCodeGenerator.pdb
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\AxInterop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\DocumentTools.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\DrawToolsLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\itextsharp.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\bin\Release\Interop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\Interop.Acrobat.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\Interop.AcroPDFLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\Interop.AFORMAUTLib.dll
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.ResolveComReference.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.GenerateCode_Form.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.Properties.Resources.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.Tmatrix_Form.resources
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.GenerateResource.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.CoreCompileInputs.cache
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixSDK_OID4.csproj.CopyComplete
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.exe
E:\NetEase\轨迹笔\Tmatrix SDK OID4 V2.1.2\TmatrixCodeGenerator\TmatrixCodeGenerator\obj\Release\TmatrixCodeGenerator.pdb

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net40" />
</packages>