From b08bf64c121ebca6f7e3597076510f2748b0146e Mon Sep 17 00:00:00 2001 From: ryangle Date: Wed, 11 May 2022 18:50:21 +0800 Subject: [PATCH] update to dotnet 6 --- LiteDB.Studio.sln | 14 +- LiteDB.Studio/Forms/MainForm.cs | 2 +- .../Gui/TextAreaClipboardHandler.cs | 1 + LiteDB.Studio/LiteDB.Studio.csproj | 429 +++--------------- LiteDB.Studio/Program.cs | 13 +- LiteDB.Studio/Properties/AssemblyInfo.cs | 8 - LiteDB.Studio/Properties/Settings.Designer.cs | 10 +- LiteDB.Studio/packages.config | 7 - 8 files changed, 80 insertions(+), 404 deletions(-) delete mode 100644 LiteDB.Studio/packages.config diff --git a/LiteDB.Studio.sln b/LiteDB.Studio.sln index 56bc04f..419f459 100644 --- a/LiteDB.Studio.sln +++ b/LiteDB.Studio.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29609.76 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32505.173 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiteDB.Studio", "LiteDB.Studio\LiteDB.Studio.csproj", "{0002E0FF-C91F-4B8B-B29B-2A477E184408}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB.Studio", "LiteDB.Studio\LiteDB.Studio.csproj", "{2ED0BEA8-A4BB-4183-AD47-CCB0A2299EA4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,10 +11,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0002E0FF-C91F-4B8B-B29B-2A477E184408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0002E0FF-C91F-4B8B-B29B-2A477E184408}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0002E0FF-C91F-4B8B-B29B-2A477E184408}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0002E0FF-C91F-4B8B-B29B-2A477E184408}.Release|Any CPU.Build.0 = Release|Any CPU + {2ED0BEA8-A4BB-4183-AD47-CCB0A2299EA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2ED0BEA8-A4BB-4183-AD47-CCB0A2299EA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2ED0BEA8-A4BB-4183-AD47-CCB0A2299EA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2ED0BEA8-A4BB-4183-AD47-CCB0A2299EA4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LiteDB.Studio/Forms/MainForm.cs b/LiteDB.Studio/Forms/MainForm.cs index fd16031..e8b7071 100644 --- a/LiteDB.Studio/Forms/MainForm.cs +++ b/LiteDB.Studio/Forms/MainForm.cs @@ -26,7 +26,7 @@ public partial class MainForm : Form private ConnectionString _connectionString = null; private SqlCodeCompletion _codeCompletion; - public MainForm(string filename) + public MainForm(string? filename) { InitializeComponent(); diff --git a/LiteDB.Studio/ICSharpCode.TextEditor/Gui/TextAreaClipboardHandler.cs b/LiteDB.Studio/ICSharpCode.TextEditor/Gui/TextAreaClipboardHandler.cs index 2cc8a4c..22af3a8 100644 --- a/LiteDB.Studio/ICSharpCode.TextEditor/Gui/TextAreaClipboardHandler.cs +++ b/LiteDB.Studio/ICSharpCode.TextEditor/Gui/TextAreaClipboardHandler.cs @@ -13,6 +13,7 @@ using ICSharpCode.TextEditor.Document; using ICSharpCode.TextEditor.Util; +using Timer = System.Windows.Forms.Timer; namespace ICSharpCode.TextEditor { diff --git a/LiteDB.Studio/LiteDB.Studio.csproj b/LiteDB.Studio/LiteDB.Studio.csproj index 048749c..0f51a0b 100644 --- a/LiteDB.Studio/LiteDB.Studio.csproj +++ b/LiteDB.Studio/LiteDB.Studio.csproj @@ -1,368 +1,63 @@ - - - - - - - Debug - AnyCPU - {0002E0FF-C91F-4B8B-B29B-2A477E184408} - WinExe - LiteDB.Studio - LiteDB.Studio - v4.7.2 - 512 - true - - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - LiteDB.Studio.ico - - - - ..\packages\LiteDB.5.0.11\lib\net45\LiteDB.dll - - - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - Form - - - ConnectionForm.cs - - - Form - - - MainForm.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - UserControl - - - Form - - - Form - - - - - Component - - - ContextMenu.cs - - - - - - - Component - - - - - - Form - - - Component - - - - Component - - - - - - UserControl - - - UserControl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ConnectionForm.cs - - - MainForm.cs - - - ContextMenu.cs - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - Designer - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - + + + + WinExe + net6.0-windows + enable + true + enable + true + LiteDB.Studio + A GUI tool for LiteDB v5 + LiteDB + LiteDB.Studio + MIT + 1.0.2.0 + 1.0.2.0 + LiteDB.Studio.Program + + + + + + + + + + + + + + + + + + + + + + True + True + Settings.settings + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + True + Resources.resx + True + + \ No newline at end of file diff --git a/LiteDB.Studio/Program.cs b/LiteDB.Studio/Program.cs index 96449fa..8486f59 100644 --- a/LiteDB.Studio/Program.cs +++ b/LiteDB.Studio/Program.cs @@ -1,16 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; using ICSharpCode.TextEditor.Util; namespace LiteDB.Studio { - static class Program + internal static class Program { /// - /// The main entry point for the application. + /// The main entry point for the application. /// [STAThread] static void Main(string[] args) @@ -21,10 +16,10 @@ static void Main(string[] args) Application.Run(new MainForm(args.Length == 0 ? null : args[0])); } - private static void OnExit(object sender, EventArgs eventArgs) + private static void OnExit(object? sender, EventArgs eventArgs) { Application.ApplicationExit -= OnExit; AppSettingsManager.PersistData(); } } -} +} \ No newline at end of file diff --git a/LiteDB.Studio/Properties/AssemblyInfo.cs b/LiteDB.Studio/Properties/AssemblyInfo.cs index 081c03d..af6ed2e 100644 --- a/LiteDB.Studio/Properties/AssemblyInfo.cs +++ b/LiteDB.Studio/Properties/AssemblyInfo.cs @@ -2,15 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("LiteDB.Studio")] -[assembly: AssemblyDescription("A GUI tool for LiteDB v5")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("LiteDB")] -[assembly: AssemblyProduct("LiteDB.Studio")] -[assembly: AssemblyCopyright("MIT")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("0002e0ff-c91f-4b8b-b29b-2a477e184408")] -[assembly: AssemblyVersion("1.0.2.0")] -[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/LiteDB.Studio/Properties/Settings.Designer.cs b/LiteDB.Studio/Properties/Settings.Designer.cs index ac82b3d..85b4b82 100644 --- a/LiteDB.Studio/Properties/Settings.Designer.cs +++ b/LiteDB.Studio/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -12,7 +12,7 @@ namespace LiteDB.Studio.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/LiteDB.Studio/packages.config b/LiteDB.Studio/packages.config deleted file mode 100644 index 4d4bd37..0000000 --- a/LiteDB.Studio/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file