Skip to content

Commit

Permalink
using Console App build setting
Browse files Browse the repository at this point in the history
  • Loading branch information
neil3d committed Dec 15, 2017
1 parent 0d7a876 commit b2dd566
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
24 changes: 11 additions & 13 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,30 @@ static void Main(string[] args) {
}
else {
//-- COMMAND LINE MODE ----------------------------------------------------------
System.DateTime startTime = System.DateTime.Now;


//-- 分析命令行参数
var options = new Options();
var parser = new CommandLine.Parser(with => with.HelpWriter = Console.Error);

if (parser.ParseArgumentsStrict(args, options, () => Environment.Exit(-1))) {
//-- 执行导出操作
try {
DateTime startTime = DateTime.Now;
Run(options);
//-- 程序计时
DateTime endTime = DateTime.Now;
TimeSpan dur = endTime - startTime;
Console.WriteLine(
string.Format("[{0}]:\tConversion complete in [{1}ms].",
Path.GetFileName(options.ExcelPath),
dur.TotalMilliseconds)
);
}
catch (Exception exp) {
Console.WriteLine("Error: " + exp.Message);
}
}

//-- 程序计时
System.DateTime endTime = System.DateTime.Now;
System.TimeSpan dur = endTime - startTime;
Console.WriteLine(
string.Format("[{0}]:\tConversion complete in [{1}ms].",
Path.GetFileName(options.ExcelPath),
dur.TotalMilliseconds)
);
Console.WriteLine("excel2json created by yanling, https://neil3d.github.io");
}
}// end of else
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("excel2json")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("http://blog.csdn.net/neil3d")]
[assembly: AssemblyCompany("https://neil3d.github.io")]
[assembly: AssemblyProduct("excel2json")]
[assembly: AssemblyCopyright("Copyright © Neil Fang 2014")]
[assembly: AssemblyCopyright("https://neil3d.github.io")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
2 changes: 1 addition & 1 deletion excel2json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3F3729F4-9C16-40FB-956D-BE6C18C1A418}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>excel2json</RootNamespace>
<AssemblyName>excel2json</AssemblyName>
Expand Down

0 comments on commit b2dd566

Please sign in to comment.