⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program.cs

📁 用C#實現能產生PDF格式文件的源碼
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using PdfSharp.Pdf;
using PdfSharp.Pdf.IO;

namespace PdfSharp.Explorer
{
  /// <summary>
  /// Entry class of PDFshpar Explorer.
  /// </summary>
  public class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main(string[] args) 
    {
      ExplorerProcess process = new ExplorerProcess();
      if (args.Length < 2)
      {
        if (args.Length == 1)
        {
          try
          {
            process.OpenDocument(args[0]);
          }
          catch (Exception ex)
          {
            MessageBox.Show(ex.Message, VersionInfo.Title);
            return;
          }
        }
        Application.Run(new MainForm(process));
      }
      else
      {
        switch (args[1])
        {
          case "/format":
            process.FormatDocument(args[0]);
            break;

          default:
            MessageBox.Show("Invalid command: '" + args[0] + "'.", VersionInfo.Title);
            break;
        }
      }
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -