📄 form1.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace BMS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public Form1(List<string> availableFields)
{
InitializeComponent();
foreach (string field in availableFields)
chklst.Items.Add(field, true);
}
private void PrintOtions_Load(object sender, EventArgs e)
{
rdoAllRows.Checked = true;
chkFitToPageWidth.Checked = true;
}
private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private void btnCancel_Click_1(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
public List<string> GetSelectedColumns()
{
List<string> lst = new List<string>();
foreach (object item in chklst.CheckedItems)
lst.Add(item.ToString());
return lst;
}
public string PrintTitle
{
get { return txtTitle.Text; }
}
public bool PrintAllRows
{
get { return rdoAllRows.Checked; }
}
public bool FitToPageWidth
{
get { return chkFitToPageWidth.Checked; }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -