Commit c147f962 authored by 罗显健's avatar 罗显健

【编号:24022】表开发工具优化:1.右键菜单增加:插入行、复制行、自动列宽、保存状态

2.表格增加行号 ,搜索框增加提示词
parent 65c771d2
...@@ -57,3 +57,4 @@ bin ...@@ -57,3 +57,4 @@ bin
/AppHome/WebKit/caches/default /AppHome/WebKit/caches/default
/AppHome/config/links.xml /AppHome/config/links.xml
/AppHome/config/List`1.json /AppHome/config/List`1.json
/Tools/Tools.csproj.user
...@@ -17,22 +17,25 @@ Set Quoted_Identifier On; ...@@ -17,22 +17,25 @@ Set Quoted_Identifier On;
Go Go
-- ============================================= -- =============================================
-- Author: 给表列增加说明栏信息 -- Author: lxj
-- Create date: lxj -- Create date: 2016-11-29 11:21:02
-- Description: 2016-11-29 11:21:02 -- Description: 给表列增加说明栏信息
-- 调整字段说明内容长度 2025-10-20 11:14:46 lxj
-- ============================================= -- =============================================
Create Proc [dbo].[sp_tools_AddTableClumnDescription] Create Proc [dbo].[sp_tools_AddTableClumnDescription]
( @TableName NVarchar(50), --表名 ( @TableName NVarchar(50) --表名
@ClumnName NVarchar(50), --列名 , @ClumnName NVarchar(50) --列名
@Desctription NVarchar(300) --说明 , @Desctription NVarchar(2000) --说明
) )
As As
Begin Begin
If Not Exists (Select * From::fn_listextendedproperty('MS_Description', 'Schema', 'dbo', 'table', @TableName, 'Column', @ClumnName)) If Not Exists (Select * From::fn_listextendedproperty('MS_Description', 'Schema', 'dbo', 'table', @TableName, 'Column', @ClumnName))
Exec sp_addextendedproperty @name = 'MS_Description', @value = @Desctription, @level0type = 'Schema', @level0name = 'dbo', @level1type = N'Table', @level1name = @TableName, @level2type = N'Column', @level2name = @ClumnName; Exec sp_addextendedproperty @name = 'MS_Description', @value = @Desctription, @level0type = 'Schema', @level0name = 'dbo', @level1type = N'Table', @level1name = @TableName
, @level2type = N'Column', @level2name = @ClumnName;
Else Else
Exec sp_updateextendedproperty @name = 'MS_Description', @value = @Desctription, @level0type = 'Schema', @level0name = 'dbo', @level1type = N'Table', @level1name = @TableName, @level2type = N'Column', @level2name = @ClumnName; Exec sp_updateextendedproperty @name = 'MS_Description', @value = @Desctription, @level0type = 'Schema', @level0name = 'dbo', @level1type = N'Table', @level1name = @TableName
, @level2type = N'Column', @level2name = @ClumnName;
End; End;
Go Go
...@@ -50,8 +53,8 @@ Go ...@@ -50,8 +53,8 @@ Go
-- ============================================= -- =============================================
Create Proc [dbo].[sp_tools_AddTableDescription] Create Proc [dbo].[sp_tools_AddTableDescription]
( @TableName NVarchar(50), -- 表名 ( @TableName NVarchar(50) -- 表名
@Desctription NVarchar(300) -- 说明 , @Desctription NVarchar(300) -- 说明
) )
As As
Begin Begin
......
使用说明: 使用说明:
1、配置说明:可设置默认数据库路径和默认导出路径 1、配置说明:可设置默认数据库路径和默认导出路径
2、操作说明:支持右键増行/删行,以及按键Insert与Delete 2、操作说明:支持右键添加行、删除行、插入行等,以及按键Insert与Delete。单元格内Shift+Enter可实现换行输入。
3、导出文件:以表名命名,相同类型多次导出则覆盖前面文件。默认导出路径为temp,可自定义。 3、导出文件:以表名命名,相同类型多次导出则覆盖前面文件。默认导出路径为temp,可自定义。
4、暂存与恢复:暂存界面录入信息,可通过恢复暂存恢复。按表名暂存,每表每日只暂存一个文件。暂存路径为根目录save文件夹。 4、暂存与恢复:暂存界面录入信息,可通过恢复暂存恢复。按表名暂存,每表每日只暂存一个文件。暂存路径为根目录save文件夹。
5、数据库设置:快速设置数据库链接并记录历史设置。程序启动时读取配置文件的默认数据库链接。 5、数据库设置:快速设置数据库链接并记录历史设置。程序启动时读取配置文件的默认数据库链接。
6、加载表信息:输入表名后:回车、点击工具栏-加载表信息、Alt+F8选择相似,都可以加载相关列信息 6、加载表信息:输入表名后:回车、点击工具栏-加载表信息、Alt+F8选择相似,都可以加载相关列信息
7、注意事项: 7、右侧搜索面板:支持搜素表名、列名或表说明、列说明。双击搜索列表行,自动加载该表信息(左侧)。
8、注意事项:
a.当表首次创建时,通过导出文件->生成SQL,会自动创建并记录描述信息 a.当表首次创建时,通过导出文件->生成SQL,会自动创建并记录描述信息
b.当表已存在时,通过导出文件->生成SQL,仅会更新描述信息 b.当表已存在时,通过导出文件->生成SQL,仅会更新描述信息
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -136,6 +136,11 @@ namespace Tools.MyCommon ...@@ -136,6 +136,11 @@ namespace Tools.MyCommon
/// 表设计器是否搜索描述 /// 表设计器是否搜索描述
/// </summary> /// </summary>
public static string DBTableDevelop_SearchDesc => "DBTableDevelop_SearchDesc"; public static string DBTableDevelop_SearchDesc => "DBTableDevelop_SearchDesc";
/// <summary>
/// 表设计器列宽度前缀
/// </summary>
public static string DBTableDevelop_ColumnWidth => "DBTableDevelop_ColumnWidth";
} }
/// <summary> /// <summary>
/// 导出类型 /// 导出类型
......
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Tools.MyUtils
{
/// <summary>
/// TextBox Placeholder(占位符/提示文本)功能辅助类
/// 为 WinForms 的 TextBox 控件提供占位符功能
/// </summary>
public class TextBoxPlaceholder
{
private readonly TextBox _textBox;
private readonly string _placeholderText;
private readonly Color _placeholderColor;
private readonly Color _normalColor;
private bool _isPlaceholder;
/// <summary>
/// 获取当前是否显示的是占位符文本
/// </summary>
public bool IsPlaceholder => _isPlaceholder;
/// <summary>
/// 获取或设置占位符文本
/// </summary>
public string PlaceholderText => _placeholderText;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="textBox">要添加占位符功能的 TextBox 控件</param>
/// <param name="placeholderText">占位符文本内容</param>
/// <param name="placeholderColor">占位符文本颜色(可选,默认为灰色)</param>
/// <param name="normalColor">正常文本颜色(可选,默认为系统窗口文本颜色)</param>
public TextBoxPlaceholder(TextBox textBox, string placeholderText, Color? placeholderColor = null, Color? normalColor = null)
{
if (textBox == null)
throw new ArgumentNullException(nameof(textBox));
if (string.IsNullOrEmpty(placeholderText))
throw new ArgumentException("占位符文本不能为空", nameof(placeholderText));
_textBox = textBox;
_placeholderText = placeholderText;
_placeholderColor = placeholderColor ?? Color.Gray;
_normalColor = normalColor ?? SystemColors.WindowText;
_isPlaceholder = false;
// 绑定事件
_textBox.Enter += TextBox_Enter;
_textBox.Leave += TextBox_Leave;
// 初始化显示占位符
if (string.IsNullOrEmpty(_textBox.Text))
{
SetPlaceholder();
}
}
/// <summary>
/// 设置占位符显示
/// </summary>
private void SetPlaceholder()
{
if (string.IsNullOrEmpty(_textBox.Text))
{
_textBox.Text = _placeholderText;
_textBox.ForeColor = _placeholderColor;
_isPlaceholder = true;
}
}
/// <summary>
/// 清除占位符显示
/// </summary>
private void ClearPlaceholder()
{
if (_isPlaceholder)
{
_textBox.Text = string.Empty;
_textBox.ForeColor = _normalColor;
_isPlaceholder = false;
}
}
/// <summary>
/// TextBox 获得焦点事件
/// </summary>
private void TextBox_Enter(object sender, EventArgs e)
{
ClearPlaceholder();
}
/// <summary>
/// TextBox 失去焦点事件
/// </summary>
private void TextBox_Leave(object sender, EventArgs e)
{
SetPlaceholder();
}
/// <summary>
/// 获取 TextBox 的实际文本内容(排除占位符)
/// </summary>
/// <returns>实际文本内容,如果是占位符则返回空字符串</returns>
public string GetText()
{
return _isPlaceholder ? string.Empty : _textBox.Text;
}
/// <summary>
/// 设置 TextBox 的文本内容
/// </summary>
/// <param name="text">要设置的文本内容</param>
public void SetText(string text)
{
if (string.IsNullOrEmpty(text))
{
_textBox.Text = string.Empty;
_isPlaceholder = false;
SetPlaceholder();
}
else
{
_textBox.Text = text;
_textBox.ForeColor = _normalColor;
_isPlaceholder = false;
}
}
/// <summary>
/// 清空文本并恢复占位符
/// </summary>
public void Clear()
{
_textBox.Text = string.Empty;
_isPlaceholder = false;
SetPlaceholder();
}
/// <summary>
/// 解除事件绑定(在控件销毁时调用)
/// </summary>
public void Dispose()
{
_textBox.Enter -= TextBox_Enter;
_textBox.Leave -= TextBox_Leave;
}
/// <summary>
/// 静态方法:为 TextBox 添加占位符功能
/// </summary>
/// <param name="textBox">TextBox 控件</param>
/// <param name="placeholderText">占位符文本</param>
/// <param name="placeholderColor">占位符颜色(可选)</param>
/// <param name="normalColor">正常文本颜色(可选)</param>
/// <returns>TextBoxPlaceholder 实例</returns>
public static TextBoxPlaceholder AddPlaceholder(TextBox textBox, string placeholderText,
Color? placeholderColor = null, Color? normalColor = null)
{
return new TextBoxPlaceholder(textBox, placeholderText, placeholderColor, normalColor);
}
}
}
# TextBoxPlaceholder 使用说明
## 简介
`TextBoxPlaceholder` 是一个为 WinForms TextBox 控件提供占位符(Placeholder)功能的辅助类库。
## 功能特点
- ✅ 自动管理占位符文本的显示和隐藏
- ✅ 可自定义占位符颜色和正常文本颜色
- ✅ 提供实际文本内容获取方法(自动排除占位符)
- ✅ 支持编程方式设置文本和清空操作
- ✅ 事件绑定自动管理,无需手动处理
## 基本用法
### 方式一:使用构造函数(推荐)
```csharp
using Tools.MyUtils;
public partial class MyForm : Form
{
private TextBoxPlaceholder _searchPlaceholder;
private void InitUI()
{
// 创建 Placeholder 实例
_searchPlaceholder = new TextBoxPlaceholder(
this.tbSearch,
"请输入搜索内容,回车确认"
);
}
}
```
### 方式二:使用静态方法
```csharp
private TextBoxPlaceholder _namePlaceholder;
private void InitUI()
{
// 使用静态方法创建
_namePlaceholder = TextBoxPlaceholder.AddPlaceholder(
this.tbName,
"请输入姓名"
);
}
```
## 高级用法
### 自定义颜色
```csharp
_searchPlaceholder = new TextBoxPlaceholder(
this.tbSearch,
"请输入搜索内容",
Color.LightGray, // 占位符颜色
Color.Black // 正常文本颜色
);
```
### 获取实际文本内容
```csharp
// ❌ 错误方式:可能获取到占位符文本
string text = this.tbSearch.Text;
// ✅ 正确方式:自动排除占位符
string text = _searchPlaceholder.GetText();
```
### 编程方式设置文本
```csharp
// 设置文本
_searchPlaceholder.SetText("搜索内容");
// 清空文本并恢复占位符
_searchPlaceholder.Clear();
```
### 检查是否为占位符状态
```csharp
if (_searchPlaceholder.IsPlaceholder)
{
// 当前显示的是占位符
}
```
## 完整示例
```csharp
using System;
using System.Windows.Forms;
using Tools.MyUtils;
namespace YourNamespace
{
public partial class SearchForm : Form
{
private TextBoxPlaceholder _searchPlaceholder;
public SearchForm()
{
InitializeComponent();
InitUI();
}
private void InitUI()
{
// 初始化搜索框 Placeholder
_searchPlaceholder = new TextBoxPlaceholder(
this.tbSearch,
"请输入搜索关键字,按回车搜索"
);
// 绑定键盘事件
this.tbSearch.KeyDown += TbSearch_KeyDown;
}
private void TbSearch_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
ExecuteSearch();
}
}
private void ExecuteSearch()
{
// 获取实际搜索内容(自动排除占位符)
string searchText = _searchPlaceholder.GetText().Trim();
if (string.IsNullOrEmpty(searchText))
{
MessageBox.Show("请输入搜索关键字!");
return;
}
// 执行搜索逻辑
PerformSearch(searchText);
}
private void BtnClear_Click(object sender, EventArgs e)
{
// 清空搜索框并恢复占位符
_searchPlaceholder.Clear();
}
}
}
```
## 使用场景
### 1. 搜索框
```csharp
_searchPlaceholder = new TextBoxPlaceholder(tbSearch, "请输入搜索内容,回车确认");
```
### 2. 登录表单
```csharp
_usernamePlaceholder = new TextBoxPlaceholder(tbUsername, "请输入用户名");
_passwordPlaceholder = new TextBoxPlaceholder(tbPassword, "请输入密码");
```
### 3. 筛选输入框
```csharp
_filterPlaceholder = new TextBoxPlaceholder(tbFilter, "输入关键字筛选...");
```
### 4. 配合单选按钮切换
```csharp
private void RadBtn_CheckedChanged(object sender, EventArgs e)
{
// 切换模式时清空并恢复占位符
_searchPlaceholder?.Clear();
// 更新占位符文本(需要时重新创建)
if (radBtnTable.Checked)
{
_searchPlaceholder = new TextBoxPlaceholder(tbSearch, "请输入表名");
}
else
{
_searchPlaceholder = new TextBoxPlaceholder(tbSearch, "请输入列名");
}
}
```
## 注意事项
1. **保持实例引用**:请将 `TextBoxPlaceholder` 实例保存为类成员变量,以便后续操作
2. **获取文本内容**:始终使用 `GetText()` 方法获取实际内容,而不是直接访问 `TextBox.Text`
3. **资源释放**:在窗体关闭时,可选择调用 `Dispose()` 方法解除事件绑定
```csharp
protected override void OnFormClosing(FormClosingEventArgs e)
{
_searchPlaceholder?.Dispose();
base.OnFormClosing(e);
}
```
4. **多个 TextBox**:可以为每个 TextBox 创建独立的 `TextBoxPlaceholder` 实例
```csharp
private TextBoxPlaceholder _placeholder1;
private TextBoxPlaceholder _placeholder2;
private TextBoxPlaceholder _placeholder3;
```
## API 参考
### 构造函数
```csharp
TextBoxPlaceholder(
TextBox textBox, // TextBox 控件
string placeholderText, // 占位符文本
Color? placeholderColor, // 占位符颜色(可选,默认灰色)
Color? normalColor // 正常文本颜色(可选,默认系统文本色)
)
```
### 属性
- `bool IsPlaceholder { get; }` - 当前是否显示占位符
- `string PlaceholderText { get; }` - 获取占位符文本
### 方法
- `string GetText()` - 获取实际文本内容(排除占位符)
- `void SetText(string text)` - 设置文本内容
- `void Clear()` - 清空文本并恢复占位符
- `void Dispose()` - 解除事件绑定
### 静态方法
```csharp
static TextBoxPlaceholder AddPlaceholder(
TextBox textBox,
string placeholderText,
Color? placeholderColor = null,
Color? normalColor = null
)
```
## 更新日志
### v1.0.0 (2025-10-20)
- ✅ 初始版本发布
- ✅ 支持基本的占位符显示/隐藏功能
- ✅ 提供文本内容获取和设置方法
- ✅ 支持自定义颜色配置
...@@ -1039,7 +1039,10 @@ namespace Tools.MyUtils ...@@ -1039,7 +1039,10 @@ namespace Tools.MyUtils
columnInfoList.Add(columninfo); columnInfoList.Add(columninfo);
//创建描述 //创建描述
var Description = r["Description"].ToString(); var Description = r["Description"].ToString();
descriptionList.Add($"EXEC [dbo].[sp_tools_AddTableClumnDescription] '{tableName}','{FieldName}','{Description}'"); if (!string.IsNullOrEmpty(Description)) //忽略列描述为空的行。
{
descriptionList.Add($"EXEC [dbo].[sp_tools_AddTableClumnDescription] '{tableName}','{FieldName}',N'{Description}'");
}
} }
return string.Join(",\r\n", columnInfoList); return string.Join(",\r\n", columnInfoList);
......
...@@ -27,6 +27,7 @@ namespace Tools.MyUtils ...@@ -27,6 +27,7 @@ namespace Tools.MyUtils
private void wMsgBox_Load(object sender, EventArgs e) private void wMsgBox_Load(object sender, EventArgs e)
{ {
this.btnDefault.Click += BtnDefault_Click; this.btnDefault.Click += BtnDefault_Click;
tbMessage.ReadOnly = true;
} }
private void BtnDefault_Click(object sender, EventArgs e) private void BtnDefault_Click(object sender, EventArgs e)
{ {
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
<Compile Include="MyUtils\DrawHelper.cs" /> <Compile Include="MyUtils\DrawHelper.cs" />
<Compile Include="MyUtils\InputtingService.cs" /> <Compile Include="MyUtils\InputtingService.cs" />
<Compile Include="MyUtils\SegPicture.cs" /> <Compile Include="MyUtils\SegPicture.cs" />
<Compile Include="MyUtils\TextBoxPlaceholder.cs" />
<Compile Include="MyUtils\TimeWatch.cs" /> <Compile Include="MyUtils\TimeWatch.cs" />
<Compile Include="UI\Popups\wEditEvaluation.cs"> <Compile Include="UI\Popups\wEditEvaluation.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -515,6 +516,7 @@ ...@@ -515,6 +516,7 @@
<EmbeddedResource Include="wMain.resx"> <EmbeddedResource Include="wMain.resx">
<DependentUpon>wMain.cs</DependentUpon> <DependentUpon>wMain.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="MyUtils\TextBoxPlaceholder使用说明.md" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
namespace Tools.UI namespace Tools.UI
{ {
partial class wDBTableDevelopTools partial class wDBTableDevelopTools
{ {
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.tsmiExportModel = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiExportModel = new System.Windows.Forms.ToolStripMenuItem();
...@@ -48,9 +49,20 @@ ...@@ -48,9 +49,20 @@
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.tsbHelp = new System.Windows.Forms.ToolStripButton(); this.tsbHelp = new System.Windows.Forms.ToolStripButton();
this.dgvData = new System.Windows.Forms.DataGridView(); this.dgvData = new System.Windows.Forms.DataGridView();
this.FieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsNotNull = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.IsPrimaryKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.IsAutoIncrement = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.DefaultValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.tsmiAddRow = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiAddRow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiDelRow = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiDelRow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiInsertRow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiCopyRow = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiAutoSizeColumns = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiSaveColumnWidth = new System.Windows.Forms.ToolStripMenuItem();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
...@@ -65,13 +77,6 @@ ...@@ -65,13 +77,6 @@
this.radBtnTable = new System.Windows.Forms.RadioButton(); this.radBtnTable = new System.Windows.Forms.RadioButton();
this.btnToggle = new System.Windows.Forms.Button(); this.btnToggle = new System.Windows.Forms.Button();
this.radioButton2 = new System.Windows.Forms.RadioButton(); this.radioButton2 = new System.Windows.Forms.RadioButton();
this.FieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsNotNull = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.IsPrimaryKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.IsAutoIncrement = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.DefaultValue = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
...@@ -247,25 +252,110 @@ ...@@ -247,25 +252,110 @@
this.dgvData.Size = new System.Drawing.Size(650, 516); this.dgvData.Size = new System.Drawing.Size(650, 516);
this.dgvData.TabIndex = 1; this.dgvData.TabIndex = 1;
// //
// FieldName
//
this.FieldName.DataPropertyName = "FieldName";
this.FieldName.HeaderText = "字段";
this.FieldName.Name = "FieldName";
//
// Description
//
this.Description.DataPropertyName = "Description";
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.Description.DefaultCellStyle = dataGridViewCellStyle1;
this.Description.HeaderText = "说明";
this.Description.Name = "Description";
this.Description.Width = 150;
//
// ColumnType
//
this.ColumnType.DataPropertyName = "ColumnType";
this.ColumnType.HeaderText = "类型";
this.ColumnType.Name = "ColumnType";
this.ColumnType.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.ColumnType.Width = 150;
//
// IsNotNull
//
this.IsNotNull.DataPropertyName = "IsNotNull";
this.IsNotNull.HeaderText = "非空";
this.IsNotNull.Name = "IsNotNull";
this.IsNotNull.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsNotNull.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsNotNull.Width = 65;
//
// IsPrimaryKey
//
this.IsPrimaryKey.DataPropertyName = "IsPrimaryKey";
this.IsPrimaryKey.HeaderText = "主键";
this.IsPrimaryKey.Name = "IsPrimaryKey";
this.IsPrimaryKey.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsPrimaryKey.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsPrimaryKey.Width = 65;
//
// IsAutoIncrement
//
this.IsAutoIncrement.DataPropertyName = "IsAutoIncrement";
this.IsAutoIncrement.HeaderText = "自增";
this.IsAutoIncrement.Name = "IsAutoIncrement";
this.IsAutoIncrement.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsAutoIncrement.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsAutoIncrement.Width = 65;
//
// DefaultValue
//
this.DefaultValue.DataPropertyName = "DefaultValue";
this.DefaultValue.HeaderText = "默认值";
this.DefaultValue.Name = "DefaultValue";
//
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiAddRow, this.tsmiAddRow,
this.tsmiDelRow}); this.tsmiDelRow,
this.tsmiInsertRow,
new System.Windows.Forms.ToolStripSeparator(),
this.tsmiCopyRow,
this.tsmiAutoSizeColumns,
this.tsmiSaveColumnWidth});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(101, 48); this.contextMenuStrip1.Size = new System.Drawing.Size(125, 142);
// //
// tsmiAddRow // tsmiAddRow
// //
this.tsmiAddRow.Name = "tsmiAddRow"; this.tsmiAddRow.Name = "tsmiAddRow";
this.tsmiAddRow.Size = new System.Drawing.Size(100, 22); this.tsmiAddRow.Size = new System.Drawing.Size(124, 22);
this.tsmiAddRow.Text = "増行"; this.tsmiAddRow.Text = "添加行";
// //
// tsmiDelRow // tsmiDelRow
// //
this.tsmiDelRow.Name = "tsmiDelRow"; this.tsmiDelRow.Name = "tsmiDelRow";
this.tsmiDelRow.Size = new System.Drawing.Size(100, 22); this.tsmiDelRow.Size = new System.Drawing.Size(124, 22);
this.tsmiDelRow.Text = "删行"; this.tsmiDelRow.Text = "删除行";
//
// tsmiInsertRow
//
this.tsmiInsertRow.Name = "tsmiInsertRow";
this.tsmiInsertRow.Size = new System.Drawing.Size(124, 22);
this.tsmiInsertRow.Text = "插入行";
//
// tsmiCopyRow
//
this.tsmiCopyRow.Name = "tsmiCopyRow";
this.tsmiCopyRow.Size = new System.Drawing.Size(124, 22);
this.tsmiCopyRow.Text = "复制整行";
//
// tsmiAutoSizeColumns
//
this.tsmiAutoSizeColumns.Name = "tsmiAutoSizeColumns";
this.tsmiAutoSizeColumns.Size = new System.Drawing.Size(124, 22);
this.tsmiAutoSizeColumns.Text = "自动列宽";
//
// tsmiSaveColumnWidth
//
this.tsmiSaveColumnWidth.Name = "tsmiSaveColumnWidth";
this.tsmiSaveColumnWidth.Size = new System.Drawing.Size(124, 22);
this.tsmiSaveColumnWidth.Text = "保存状态";
// //
// tableLayoutPanel1 // tableLayoutPanel1
// //
...@@ -424,59 +514,6 @@ ...@@ -424,59 +514,6 @@
this.radioButton2.Size = new System.Drawing.Size(104, 24); this.radioButton2.Size = new System.Drawing.Size(104, 24);
this.radioButton2.TabIndex = 0; this.radioButton2.TabIndex = 0;
// //
// FieldName
//
this.FieldName.DataPropertyName = "FieldName";
this.FieldName.HeaderText = "字段";
this.FieldName.Name = "FieldName";
//
// Description
//
this.Description.DataPropertyName = "Description";
this.Description.HeaderText = "说明";
this.Description.Name = "Description";
//
// ColumnType
//
this.ColumnType.DataPropertyName = "ColumnType";
this.ColumnType.HeaderText = "类型";
this.ColumnType.Name = "ColumnType";
this.ColumnType.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.ColumnType.Width = 150;
//
// IsNotNull
//
this.IsNotNull.DataPropertyName = "IsNotNull";
this.IsNotNull.HeaderText = "非空";
this.IsNotNull.Name = "IsNotNull";
this.IsNotNull.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsNotNull.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsNotNull.Width = 65;
//
// IsPrimaryKey
//
this.IsPrimaryKey.DataPropertyName = "IsPrimaryKey";
this.IsPrimaryKey.HeaderText = "主键";
this.IsPrimaryKey.Name = "IsPrimaryKey";
this.IsPrimaryKey.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsPrimaryKey.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsPrimaryKey.Width = 65;
//
// IsAutoIncrement
//
this.IsAutoIncrement.DataPropertyName = "IsAutoIncrement";
this.IsAutoIncrement.HeaderText = "自增";
this.IsAutoIncrement.Name = "IsAutoIncrement";
this.IsAutoIncrement.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.IsAutoIncrement.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.IsAutoIncrement.Width = 65;
//
// DefaultValue
//
this.DefaultValue.DataPropertyName = "DefaultValue";
this.DefaultValue.HeaderText = "默认值";
this.DefaultValue.Name = "DefaultValue";
//
// wDBTableDevelopTools // wDBTableDevelopTools
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
...@@ -523,6 +560,10 @@ ...@@ -523,6 +560,10 @@
private System.Windows.Forms.TextBox tbTableDescription; private System.Windows.Forms.TextBox tbTableDescription;
private System.Windows.Forms.ToolStripMenuItem tsmiExportSql; private System.Windows.Forms.ToolStripMenuItem tsmiExportSql;
private System.Windows.Forms.ToolStripMenuItem tsmiAddRow; private System.Windows.Forms.ToolStripMenuItem tsmiAddRow;
private System.Windows.Forms.ToolStripMenuItem tsmiCopyRow;
private System.Windows.Forms.ToolStripMenuItem tsmiInsertRow;
private System.Windows.Forms.ToolStripMenuItem tsmiAutoSizeColumns;
private System.Windows.Forms.ToolStripMenuItem tsmiSaveColumnWidth;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton tsbHelp; private System.Windows.Forms.ToolStripButton tsbHelp;
private System.Windows.Forms.ToolStripButton tsbDbLink; private System.Windows.Forms.ToolStripButton tsbDbLink;
......
...@@ -46,6 +46,11 @@ namespace Tools.UI ...@@ -46,6 +46,11 @@ namespace Tools.UI
/// </summary> /// </summary>
bool isRightPanelExpanded = true; bool isRightPanelExpanded = true;
/// <summary>
/// 搜索框Placeholder辅助类
/// </summary>
private TextBoxPlaceholder _searchPlaceholder;
public wDBTableDevelopTools() public wDBTableDevelopTools()
{ {
InitializeComponent(); InitializeComponent();
...@@ -129,9 +134,26 @@ namespace Tools.UI ...@@ -129,9 +134,26 @@ namespace Tools.UI
//数据表格初始化 //数据表格初始化
this.InitGridView(this.dgvData, false, false); this.InitGridView(this.dgvData, false, false);
this.dgvData.DataSource = this._ds.Tables[infoTable]; this.dgvData.DataSource = this._ds.Tables[infoTable];
//设置列标题居中
this.dgvData.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
//设置表格支持换行
this.dgvData.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
this.dgvData.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
//设置整行选择模式
this.dgvData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
this.dgvData.MultiSelect = false;
//禁用默认Ctrl+C复制行为,自定义复制单元格
this.dgvData.ClipboardCopyMode = DataGridViewClipboardCopyMode.Disable;
//设置焦点行背景色为浅灰蓝色
this.dgvData.DefaultCellStyle.SelectionBackColor = Color.FromArgb(230, 240, 250);
this.dgvData.DefaultCellStyle.SelectionForeColor = Color.Black;
this.dgvData.KeyUp += DgvData_KeyUp; this.dgvData.KeyUp += DgvData_KeyUp;
this.dgvData.CellValueChanged += DgvData_CellValueChanged; this.dgvData.CellValueChanged += DgvData_CellValueChanged;
this.dgvData.EditingControlShowing += DgvData_EditingControlShowing; this.dgvData.EditingControlShowing += DgvData_EditingControlShowing;
this.dgvData.CellPainting += DgvData_CellPainting;
this.dgvData.KeyDown += DgvData_KeyDown;
this.dgvData.RowPostPaint += DgvData_RowPostPaint;
//工具栏-事件 //工具栏-事件
this.tsmiExportModel.Click += TsmiExportModel_Click; this.tsmiExportModel.Click += TsmiExportModel_Click;
this.tsmiExportSql.Click += TsmiExportSql_Click; this.tsmiExportSql.Click += TsmiExportSql_Click;
...@@ -146,8 +168,14 @@ namespace Tools.UI ...@@ -146,8 +168,14 @@ namespace Tools.UI
//上下文菜单-事件 //上下文菜单-事件
this.tsmiAddRow.Click += TsmiAddRow_Click; this.tsmiAddRow.Click += TsmiAddRow_Click;
this.tsmiDelRow.Click += TsmiDelRow_Click; this.tsmiDelRow.Click += TsmiDelRow_Click;
this.tsmiInsertRow.Click += TsmiInsertRow_Click;
this.tsmiCopyRow.Click += TsmiCopyRow_Click;
this.tsmiAutoSizeColumns.Click += TsmiAutoSizeColumns_Click;
this.tsmiSaveColumnWidth.Click += TsmiSaveColumnWidth_Click;
//文本框-事件 //文本框-事件
this.tbTableName.KeyDown += TbTableName_KeyDown; this.tbTableName.KeyDown += TbTableName_KeyDown;
//搜索框-初始化placeholder功能
_searchPlaceholder = new TextBoxPlaceholder(this.tbSearch, "请输入搜索内容,回车确认");
//搜索结果列表-事件 //搜索结果列表-事件
this.lstResult.DoubleClick += LstResult_DoubleClick; this.lstResult.DoubleClick += LstResult_DoubleClick;
//单选按钮-事件 //单选按钮-事件
...@@ -155,10 +183,10 @@ namespace Tools.UI ...@@ -155,10 +183,10 @@ namespace Tools.UI
this.radBtnColumn.CheckedChanged += RadBtn_CheckedChanged; this.radBtnColumn.CheckedChanged += RadBtn_CheckedChanged;
//折叠按钮-事件 //折叠按钮-事件
this.btnToggle.Click += BtnToggle_Click; this.btnToggle.Click += BtnToggle_Click;
//窗体关闭事件
this.FormClosing += WDBTableDevelopTools_FormClosing;
//恢复右侧面板状态 //恢复右侧面板状态
this.RestoreRightPanelState(); this.RestoreRightPanelState();
//恢复列宽度
this.RestoreColumnWidths();
} }
private void BindBaseInfo() private void BindBaseInfo()
...@@ -171,6 +199,20 @@ namespace Tools.UI ...@@ -171,6 +199,20 @@ namespace Tools.UI
#region 数据表格-事件 #region 数据表格-事件
private void DgvData_KeyDown(object sender, KeyEventArgs e)
{
//Ctrl+C 复制当前单元格内容
if (e.Control && e.KeyCode == Keys.C)
{
if (this.dgvData.CurrentCell != null && this.dgvData.CurrentCell.Value != null)
{
if (!string.IsNullOrEmpty(this.dgvData.CurrentCell.Value.ToString()))//空值复制会报错
Clipboard.SetText(this.dgvData.CurrentCell.Value.ToString());
}
e.Handled = true;
}
}
private void DgvData_KeyUp(object sender, KeyEventArgs e) private void DgvData_KeyUp(object sender, KeyEventArgs e)
{ {
if (e.KeyCode.Equals(Keys.Insert)) if (e.KeyCode.Equals(Keys.Insert))
...@@ -216,6 +258,53 @@ namespace Tools.UI ...@@ -216,6 +258,53 @@ namespace Tools.UI
} }
} }
private void DgvData_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
//绘制默认内容
e.Paint(e.CellBounds, DataGridViewPaintParts.All);
//如果是当前单元格,添加特殊边框
if (this.dgvData.CurrentCell != null &&
e.RowIndex == this.dgvData.CurrentCell.RowIndex &&
e.ColumnIndex == this.dgvData.CurrentCell.ColumnIndex)
{
//绘制选中单元格的边框
using (Pen pen = new Pen(Color.DodgerBlue, 2))
{
Rectangle rect = e.CellBounds;
rect.Width -= 1;
rect.Height -= 1;
e.Graphics.DrawRectangle(pen, rect);
}
}
e.Handled = true;
}
}
/// <summary>
/// 行后绘制事件(绘制行号)
/// </summary>
private void DgvData_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
// 在行头绘制行号
using (SolidBrush b = new SolidBrush(this.dgvData.RowHeadersDefaultCellStyle.ForeColor))
{
// 行号从1开始
string rowNumber = (e.RowIndex + 1).ToString();
// 计算文本大小和位置,使其居中显示
SizeF textSize = e.Graphics.MeasureString(rowNumber, this.dgvData.RowHeadersDefaultCellStyle.Font);
float x = e.RowBounds.Left + (this.dgvData.RowHeadersWidth - textSize.Width) / 2;
float y = e.RowBounds.Top + (e.RowBounds.Height - textSize.Height) / 2;
// 绘制行号
e.Graphics.DrawString(rowNumber, this.dgvData.RowHeadersDefaultCellStyle.Font, b, x, y);
}
}
#endregion #endregion
#region 工具栏-事件 #region 工具栏-事件
...@@ -244,6 +333,12 @@ namespace Tools.UI ...@@ -244,6 +333,12 @@ namespace Tools.UI
return; return;
} }
} }
/// <summary>
/// 导出Sql
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TsmiExportSql_Click(object sender, EventArgs e) private void TsmiExportSql_Click(object sender, EventArgs e)
{ {
if (!this.CheckDetail()) if (!this.CheckDetail())
...@@ -376,7 +471,101 @@ namespace Tools.UI ...@@ -376,7 +471,101 @@ namespace Tools.UI
} }
} }
private void TsmiInsertRow_Click(object sender, EventArgs e)
{
if (this.dgvData.CurrentRow != null)
{
var index = this.dgvData.CurrentRow.Index;
if (index >= 0 && index < this._ds.Tables[infoTable].DefaultView.Count)
{
var drNew = GetInfoNewRow();
this._ds.Tables[infoTable].Rows.InsertAt(drNew, index);
}
}
else
{
//如果没有当前行,则在末尾添加
this.TsmiAddRow_Click(null, null);
}
}
private void TsmiCopyRow_Click(object sender, EventArgs e)
{
if (this.dgvData.CurrentRow != null && this.dgvData.CurrentRow.Index >= 0)
{
var rowIndex = this.dgvData.CurrentRow.Index;
if (rowIndex < this._ds.Tables[infoTable].DefaultView.Count)
{
var sb = new StringBuilder();
var row = this.dgvData.CurrentRow;
//复制所有列的内容,用Tab分隔
for (int i = 0; i < row.Cells.Count; i++)
{
if (i > 0)
sb.Append("\t");
var cellValue = row.Cells[i].Value;
if (cellValue != null)
{
sb.Append(cellValue.ToString());
}
}
if (sb.Length > 0)
{
Clipboard.SetText(sb.ToString());
}
}
}
}
private void TsmiAutoSizeColumns_Click(object sender, EventArgs e)
{
try
{
//使用AllCells模式自动调整所有列宽度
this.dgvData.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
//将AutoSizeMode设置为None,允许用户手动调整
foreach (DataGridViewColumn col in this.dgvData.Columns)
{
col.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
}
}
catch (Exception ex)
{
Utils.Tip($"自动调整列宽失败:{ex.Message}");
}
}
private void TsmiSaveColumnWidth_Click(object sender, EventArgs e)
{
try
{
var dtSetting = Utils.ReadSysConfig();
//保存每一列的宽度
foreach (DataGridViewColumn col in this.dgvData.Columns)
{
if (!string.IsNullOrEmpty(col.Name))
{
var key = $"{ConfigType.DBTableDevelop_ColumnWidth}_{col.Name}";
Utils.SetConfigValue(dtSetting, key, col.Width.ToString());
}
}
Utils.SaveSysConfig(dtSetting);
Utils.Tip("列宽度保存成功!");
}
catch (Exception ex)
{
Utils.Tip($"保存列宽度失败:{ex.Message}");
}
}
#endregion #endregion
#region 文本框-事件 #region 文本框-事件
private void TbTableName_KeyDown(object sender, KeyEventArgs e) private void TbTableName_KeyDown(object sender, KeyEventArgs e)
...@@ -428,8 +617,8 @@ namespace Tools.UI ...@@ -428,8 +617,8 @@ namespace Tools.UI
/// <param name="e"></param> /// <param name="e"></param>
private void RadBtn_CheckedChanged(object sender, EventArgs e) private void RadBtn_CheckedChanged(object sender, EventArgs e)
{ {
//清空搜索框 //清空搜索框并恢复placeholder
this.tbSearch.Text = string.Empty; _searchPlaceholder?.Clear();
//清空结果列表 //清空结果列表
this.lstResult.Items.Clear(); this.lstResult.Items.Clear();
} }
...@@ -490,6 +679,9 @@ namespace Tools.UI ...@@ -490,6 +679,9 @@ namespace Tools.UI
{ {
//切换状态 //切换状态
this.SetRightPanelState(!isRightPanelExpanded); this.SetRightPanelState(!isRightPanelExpanded);
//保存右侧面板状态
this.SaveRightPanelState();
} }
private void tbSearch_KeyDown(object sender, KeyEventArgs e) private void tbSearch_KeyDown(object sender, KeyEventArgs e)
...@@ -502,17 +694,6 @@ namespace Tools.UI ...@@ -502,17 +694,6 @@ namespace Tools.UI
#endregion #endregion
#region 窗体关闭事件
private void WDBTableDevelopTools_FormClosing(object sender, FormClosingEventArgs e)
{
//保存右侧面板状态
this.SaveRightPanelState();
}
#endregion
#region 私有方法 #region 私有方法
/// <summary> /// <summary>
/// 明细检查 /// 明细检查
...@@ -689,7 +870,7 @@ namespace Tools.UI ...@@ -689,7 +870,7 @@ namespace Tools.UI
new TQuery("ColumnDescInfo", $@" new TQuery("ColumnDescInfo", $@"
SELECT SELECT
FieldName = CONVERT(VARCHAR(100), a.name), FieldName = CONVERT(VARCHAR(100), a.name),
[Description] = CONVERT(VARCHAR(200), isnull(d.[value],'')), [Description] = CONVERT(NVARCHAR(2000), isnull(d.[value],'')),
IsNotNull = CASE WHEN a.isnullable=1 THEN 0 ELSE 1 END, IsNotNull = CASE WHEN a.isnullable=1 THEN 0 ELSE 1 END,
DefaultValue = CASE WHEN e.name='datetime' THEN STUFF(STUFF(c.text, LEN(c.text), 1, ''), 1, 1, '') ELSE REPLACE(REPLACE(c.text, '(', ''), ')', '') END, DefaultValue = CASE WHEN e.name='datetime' THEN STUFF(STUFF(c.text, LEN(c.text), 1, ''), 1, 1, '') ELSE REPLACE(REPLACE(c.text, '(', ''), ')', '') END,
ColumnType = CASE WHEN CHARINDEX('varchar',e.name,0) > 0 THEN e.name+'('+CASE WHEN a.length > -1 THEN CAST(a.length AS VARCHAR(10)) ELSE 'max' END +')' ColumnType = CASE WHEN CHARINDEX('varchar',e.name,0) > 0 THEN e.name+'('+CASE WHEN a.length > -1 THEN CAST(a.length AS VARCHAR(10)) ELSE 'max' END +')'
...@@ -913,8 +1094,9 @@ namespace Tools.UI ...@@ -913,8 +1094,9 @@ namespace Tools.UI
return false; return false;
} }
//获取并验证搜索关键字 //获取并验证搜索关键字(使用GetText方法排除placeholder)
searchText = this.tbSearch.Text.Trim(); searchText = _searchPlaceholder?.GetText()?.Trim() ?? string.Empty;
if (string.IsNullOrEmpty(searchText)) if (string.IsNullOrEmpty(searchText))
{ {
Utils.Tip("请输入搜索关键字!"); Utils.Tip("请输入搜索关键字!");
...@@ -1030,5 +1212,42 @@ namespace Tools.UI ...@@ -1030,5 +1212,42 @@ namespace Tools.UI
} }
} }
#endregion #endregion
#region 列宽度管理
/// <summary>
/// 恢复列宽度
/// </summary>
private void RestoreColumnWidths()
{
if (dicConfig == null)
return;
try
{
//恢复每一列的宽度
foreach (DataGridViewColumn col in this.dgvData.Columns)
{
if (!string.IsNullOrEmpty(col.Name))
{
var key = $"{ConfigType.DBTableDevelop_ColumnWidth}_{col.Name}";
if (dicConfig.ContainsKey(key))
{
if (int.TryParse(dicConfig[key], out int width) && width > 0)
{
col.Width = width;
}
}
}
}
}
catch (Exception ex)
{
//静默处理,不影响窗体加载
System.Diagnostics.Debug.WriteLine($"恢复列宽度失败:{ex.Message}");
}
}
#endregion
} }
} }
...@@ -120,27 +120,6 @@ ...@@ -120,27 +120,6 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value> <value>127, 17</value>
</metadata> </metadata>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment