Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Window;Provide MessageBox Alert #2

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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