Skip to content

Commit

Permalink
Merge pull request #2 from anpho/win32
Browse files Browse the repository at this point in the history
Hide Window;Provide MessageBox Alert
  • Loading branch information
MerrickZ committed Aug 14, 2023
2 parents e3d62e7 + 2c076b1 commit 93738c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions ofd2pdf/ofd2pdf/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Spire.Pdf.Conversion;
using System;
using System.Windows.Forms;

namespace ofd2pdf
{
Expand All @@ -11,6 +12,7 @@ static void Main(string[] args)
{
Console.WriteLine("OFD TO PDF 转换工具");
Console.WriteLine("使用方式: ofd2pdf.exe <ofdfile>");
MessageBox.Show("使用方式: ofd2pdf.exe <ofdfile> ,或者配置为OFD文件打开方式", "OFD TO PDF 转换工具");
}
else
{
Expand All @@ -19,12 +21,14 @@ static void Main(string[] args)
{
Console.WriteLine($"#转换 {ofdfile}");
OfdConverter oc = new OfdConverter(ofdfile);
oc.ToPdf(ofdfile+".pdf");
string newFilename = ofdfile.Replace(".ofd", ".pdf");
oc.ToPdf(newFilename);
Console.WriteLine($"#完成 {ofdfile}");

}
else
{
Console.WriteLine($"{ofdfile} 不是OFD文件");
MessageBox.Show($"{ofdfile} 不是OFD文件", "OFD TO PDF 转换工具");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ofd2pdf/ofd2pdf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
3 changes: 2 additions & 1 deletion ofd2pdf/ofd2pdf/ofd2pdf.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>{63FF36CB-2399-4510-BC4C-3F3E06B68C95}</ProjectGuid>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<RootNamespace>ofd2pdf</RootNamespace>
<AssemblyName>ofd2pdf</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
Expand Down Expand Up @@ -79,6 +79,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down

0 comments on commit 93738c4

Please sign in to comment.