62 lines
1.6 KiB
C#
62 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.Control
|
|
{
|
|
public partial class FrmSettingTableName : BaseForm
|
|
{
|
|
public string TabName;
|
|
|
|
public FrmSettingTableName()
|
|
{
|
|
InitializeComponent();
|
|
InitEvent();
|
|
}
|
|
|
|
public FrmSettingTableName(string name)
|
|
{
|
|
InitializeComponent();
|
|
InitEvent();
|
|
this.labelAutoTextEdit1.EditText = TabName = name;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 初始化窗体按钮事件。
|
|
/// </summary>
|
|
private void InitEvent()
|
|
{
|
|
this.btnOk.Click += btnOk_Click;
|
|
this.btnCancel.Click += btnCancel_Click;
|
|
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
|
this.MaximizeBox = false;
|
|
this.MinimizeBox = false;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击确定时,保存用户输入的工作表名称,并通知调用方用户已确认。
|
|
/// </summary>
|
|
private void btnOk_Click(object sender, EventArgs e)
|
|
{
|
|
this.TabName = this.labelAutoTextEdit1.EditText.Trim();
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击取消时,通知调用方用户已取消。
|
|
/// </summary>
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
|
|
}
|
|
}
|