首页 > 代码库 > Program.cs

Program.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace CS2013
{
  static class Program
  {
    /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      try
      {
        SqlManage.cnn = new SqlConnection(SqlManage.cnnstring);
        SqlManage.cnn.Open();
      }
      catch (Exception ex)
      {
        MessageBox.Show(ex.Message);
        Application.Exit();
        return;
      }

      Application.Run(new frmMain());
    }
  }
}

 

Program.cs