diff --git a/SmartSQL/SmartSQL.Framework/Const/SysConst.cs b/SmartSQL/SmartSQL.Framework/Const/SysConst.cs
index 930047dc910664ee7089fe6e13534c5231e2f354..055649458464012361061b49d49f8199b3d213d3 100644
--- a/SmartSQL/SmartSQL.Framework/Const/SysConst.cs
+++ b/SmartSQL/SmartSQL.Framework/Const/SysConst.cs
@@ -15,5 +15,6 @@ namespace SmartSQL.Framework.Const
public static readonly string Sys_LeftMenuType = "LeftMenuType";
public static readonly string Sys_SelectedConnection = "SelectedConnection";
public static readonly string Sys_SelectedDataBase = "SelectedDataBase";
+ public static readonly string Sys_IsShowSaveWin = "IsShowSaveWin";
}
}
diff --git a/SmartSQL/SmartSQL.Framework/SQLiteHelper.cs b/SmartSQL/SmartSQL.Framework/SQLiteHelper.cs
index 14f17e0652651840ad125ffd8d144fbdbdd1136b..438911142fad14d286fa63b3c356cdcb68611d0e 100644
--- a/SmartSQL/SmartSQL.Framework/SQLiteHelper.cs
+++ b/SmartSQL/SmartSQL.Framework/SQLiteHelper.cs
@@ -60,6 +60,7 @@ namespace SmartSQL.Framework
new SystemSet{Name = SysConst.Sys_IsMultipleTab,Type = 1,Value = "false"},
new SystemSet{Name = SysConst.Sys_IsLikeSearch,Type = 1,Value = "false"},
new SystemSet{Name = SysConst.Sys_IsContainsObjName,Type = 1,Value = "false"},
+ new SystemSet{Name = SysConst.Sys_IsShowSaveWin,Type = 1,Value = "true"},
new SystemSet{Name = SysConst.Sys_LeftMenuType,Type = 2,Value = "1"},
new SystemSet{Name = SysConst.Sys_SelectedConnection,Type = 3,Value = ""},
new SystemSet{Name = SysConst.Sys_SelectedDataBase,Type = 3,Value = ""},
diff --git a/SmartSQL/SmartSQL/UserControl/Main/UcMainColumns.xaml.cs b/SmartSQL/SmartSQL/UserControl/Main/UcMainColumns.xaml.cs
index ed89e3c561e09bf2f3630f46f375a8a44c070de0..10319b88ccb479ef0128c1b2944e2bb4ffde480a 100644
--- a/SmartSQL/SmartSQL/UserControl/Main/UcMainColumns.xaml.cs
+++ b/SmartSQL/SmartSQL/UserControl/Main/UcMainColumns.xaml.cs
@@ -24,6 +24,7 @@ using TextBox = System.Windows.Controls.TextBox;
using MessageBox = HandyControl.Controls.MessageBox;
using DbType = SqlSugar.DbType;
using SmartSQL.DocUtils;
+using SmartSQL.Framework.Const;
namespace SmartSQL.UserControl
{
@@ -316,12 +317,18 @@ namespace SmartSQL.UserControl
return;
}
var selectItem = (Column)e.Row.Item;
- var msgResult = MessageBox.Show($"确认修改{SelectedObject.DisplayName}的备注为{newValue}?", "温馨提示", MessageBoxButton.OKCancel, MessageBoxImage.Question);
- if (msgResult != MessageBoxResult.OK)
+
+ var isShowSaveWin = new SQLiteHelper().GetSysBool(SysConst.Sys_IsShowSaveWin);
+ if (isShowSaveWin)
{
- ((TextBox)e.EditingElement).Text = _cellEditValue;
- return;
+ var msgResult = MessageBox.Show($"确认修改{SelectedObject.DisplayName}的备注为{newValue}?", "温馨提示", MessageBoxButton.OKCancel, MessageBoxImage.Question);
+ if (msgResult != MessageBoxResult.OK)
+ {
+ ((TextBox)e.EditingElement).Text = _cellEditValue;
+ return;
+ }
}
+
var dbConnectionString = SelectedConnection.SelectedDbConnectString(SelectedDataBase.DbName);
try
{
diff --git a/SmartSQL/SmartSQL/Views/SettingWindow.xaml b/SmartSQL/SmartSQL/Views/SettingWindow.xaml
index b9fcd329dcad0975b4e46e732658c17cc7b006c2..b71b5e14f7b42d937fb17679711d35e41426c778 100644
--- a/SmartSQL/SmartSQL/Views/SettingWindow.xaml
+++ b/SmartSQL/SmartSQL/Views/SettingWindow.xaml
@@ -97,6 +97,13 @@
VerticalAlignment="Top"
Content="左侧表、视图菜单包含表备注说明"
IsChecked="True" />
+
diff --git a/SmartSQL/SmartSQL/Views/SettingWindow.xaml.cs b/SmartSQL/SmartSQL/Views/SettingWindow.xaml.cs
index 2d9b746c84b3c2e587fc6fa2d34c3629773e42f4..43b1579288ffb2fd21c80f91a5e09effd98b1caf 100644
--- a/SmartSQL/SmartSQL/Views/SettingWindow.xaml.cs
+++ b/SmartSQL/SmartSQL/Views/SettingWindow.xaml.cs
@@ -41,11 +41,13 @@ namespace SmartSQL.Views
ChkIsLikeSearch.IsChecked = value; break;
case "IsContainsObjName":
ChkIsContainsObjName.IsChecked = value; break;
+ case "IsShowSaveWin":
+ ChkIsShowSaveWin.IsChecked = value; break;
}
});
}
- private readonly List KeyList = new List { SysConst.Sys_IsMultipleTab, SysConst.Sys_IsLikeSearch, SysConst.Sys_IsContainsObjName };
+ private readonly List KeyList = new List { SysConst.Sys_IsMultipleTab, SysConst.Sys_IsLikeSearch, SysConst.Sys_IsContainsObjName,SysConst.Sys_IsShowSaveWin };
///
/// 保存
///
@@ -56,8 +58,11 @@ namespace SmartSQL.Views
var isMultipleTab = ChkIsMultipleTab.IsChecked == true;
var isLikeSearch = ChkIsLikeSearch.IsChecked == true;
var isContainsObjName = ChkIsContainsObjName.IsChecked == true;
+ var isShowSaveWin = ChkIsShowSaveWin.IsChecked == true;
+
var sqLiteHelper = new SQLiteHelper();
var sysSets = sqLiteHelper.db.Table().Where(x => KeyList.Contains(x.Name)).ToList();
+
sysSets.ForEach(x =>
{
if (x.Name == SysConst.Sys_IsMultipleTab)
@@ -72,6 +77,10 @@ namespace SmartSQL.Views
{
x.Value = isContainsObjName.ToString();
}
+ if (x.Name == SysConst.Sys_IsShowSaveWin)
+ {
+ x.Value = isShowSaveWin.ToString();
+ }
});
sqLiteHelper.db.UpdateAll(sysSets);
this.Close();