|
namespace Csharetest
{
#pragma warning disable CS1106 // 扩展方法必须在非泛型静态类中定义
public partial class Htcreatfrm: Form
#pragma warning restore CS1106 // 扩展方法必须在非泛型静态类中定义
{
public string htbhstr = "---------------";
public string connstring = "";
static public string yhspell = "";
public string cxstring;
public SqlConnection tempConn;
/// <summary>
/// 重载主界面
/// </summary>
public Htcreatfrm()
{
InitializeComponent();
//htxtmainfrm f1 = this.owner;
//this.ControlBox = false;
Gridhtwtxm.RowsDefaultCellStyle.Font = new Font("楷体", 12, FontStyle.Bold);
foreach (Control control in this.Controls)
{
//遍历所有TextBox...
if (control is TextBox)
{
TextBox t = (TextBox)control;
t.Font = new Font("楷体", 12, FontStyle.Bold);
t.Height = 50;
}
}
//this.officeViewer1 = new Spire.OfficeViewer.Forms.OfficeViewer();
//this.SuspendLayout();
////
//// documentViewer1
////
//this.officeViewer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
//this.officeViewer1.Cursor = System.Windows.Forms.Cursors.Arrow;
//this.officeViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
////this.officeViewer1.EnableHandTools = false;
//this.officeViewer1.Location = new System.Drawing.Point(0, 0);
//this.officeViewer1.Name = "documentViewer1";
//this.officeViewer1.Size = new System.Drawing.Size(792, 548);
//this.officeViewer1.TabIndex = 0;
//this.officeViewer1.Text = "documentViewer1";
////this.officeViewer1.ZoomMode = Spire.OfficeViewer.Forms.ZoomMode.Default;
//
}
public Htcreatfrm(string str)
{
InitializeComponent();
Gridhtwtxm.RowsDefaultCellStyle.Font = new Font("楷体", 12, FontStyle.Bold);
foreach (Control control in this.Controls)
{
//遍历所有TextBox...
if (control is TextBox)
{
TextBox t = (TextBox)control;
t.Font = new Font("楷体", 12, FontStyle.Bold);
t.Height = 50;
}
}
}
/// <summary>
/// 获取数据库连接函数
/// </summary>
public static string GetSqlConnctingString()
{
//string connstringnm;
//connstringnm= ConfigurationManager.ConnectionStrings["Sql"].ConnectionString;
return ConfigurationManager.ConnectionStrings["Csharetest.Properties.Settings.htglxtConnectionString"].ConnectionString;
}
/// <summary>
/// 窗口之间参数传递
黄底字位置的“扩展方法必须在非泛型静态类中定义”怎么产生的?只是复制了一个表单加到项目里就这样了。
|
|