diff --git a/.gitignore b/.gitignore index 1c0ea7dc..23b65635 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ bld/* # Rider **/.idea/dictionaries **/.idea/misc.xml +**/.idea/riderMarkupCache.xml # User-specific files *.suo diff --git a/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml b/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml index 715a3eea..6ac38f93 100644 --- a/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml +++ b/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml @@ -12,7 +12,7 @@ <option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> <option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> <option name="PROJECT_KIND" value="DotNetCore" /> - <option name="PROJECT_TFM" value="net6.0-windows7.0" /> + <option name="PROJECT_TFM" value="net7.0-windows" /> <method v="2"> <option name="Build" /> </method> diff --git a/global.json b/global.json index 13300bb9..3cb4f962 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.0", + "version": "7.0.0", "rollForward": "latestMinor", "allowPrerelease": false } diff --git a/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj b/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj index 2eac49e5..43ae064d 100644 --- a/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj +++ b/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/lib/TweetLib.Browser/TweetLib.Browser.csproj b/lib/TweetLib.Browser/TweetLib.Browser.csproj index 078d5d76..7dcf44c2 100644 --- a/lib/TweetLib.Browser/TweetLib.Browser.csproj +++ b/lib/TweetLib.Browser/TweetLib.Browser.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/lib/TweetLib.Communication/TweetLib.Communication.csproj b/lib/TweetLib.Communication/TweetLib.Communication.csproj index 1876c9e4..7d55ea68 100644 --- a/lib/TweetLib.Communication/TweetLib.Communication.csproj +++ b/lib/TweetLib.Communication/TweetLib.Communication.csproj @@ -1,9 +1,9 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Platforms>x86</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/lib/TweetLib.Core/TweetLib.Core.csproj b/lib/TweetLib.Core/TweetLib.Core.csproj index f91558d5..084688a1 100644 --- a/lib/TweetLib.Core/TweetLib.Core.csproj +++ b/lib/TweetLib.Core/TweetLib.Core.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/lib/TweetLib.Utils/TweetLib.Utils.csproj b/lib/TweetLib.Utils/TweetLib.Utils.csproj index 078d5d76..7dcf44c2 100644 --- a/lib/TweetLib.Utils/TweetLib.Utils.csproj +++ b/lib/TweetLib.Utils/TweetLib.Utils.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj b/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj index b8ea3ddd..53259db7 100644 --- a/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj +++ b/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Platforms>x86</Platforms> <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> diff --git a/lib/TweetTest.Core/Features/Twitter/TestTwitterUrls.fs b/lib/TweetTest.Core/Features/Twitter/TestTwitterUrls.fs index a79769e4..08af46f0 100644 --- a/lib/TweetTest.Core/Features/Twitter/TestTwitterUrls.fs +++ b/lib/TweetTest.Core/Features/Twitter/TestTwitterUrls.fs @@ -7,7 +7,7 @@ open Xunit module RegexAccount = module IsMatch = - let isMatch = TwitterUrls.RegexAccount.IsMatch + let isMatch: string -> bool = TwitterUrls.RegexAccount.IsMatch [<Fact>] let ``accepts HTTP protocol`` () = diff --git a/lib/TweetTest.Core/TweetTest.Core.fsproj b/lib/TweetTest.Core/TweetTest.Core.fsproj index cec25775..2763755c 100644 --- a/lib/TweetTest.Core/TweetTest.Core.fsproj +++ b/lib/TweetTest.Core/TweetTest.Core.fsproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Platforms>x86</Platforms> <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> diff --git a/lib/TweetTest.Utils/TweetTest.Utils.fsproj b/lib/TweetTest.Utils/TweetTest.Utils.fsproj index f726452c..a09384cc 100644 --- a/lib/TweetTest.Utils/TweetTest.Utils.fsproj +++ b/lib/TweetTest.Utils/TweetTest.Utils.fsproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Platforms>x86</Platforms> <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> diff --git a/linux/TweetDuck/TweetDuck.csproj b/linux/TweetDuck/TweetDuck.csproj index a6da16a9..387ef153 100644 --- a/linux/TweetDuck/TweetDuck.csproj +++ b/linux/TweetDuck/TweetDuck.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <OutputType>WinExe</OutputType> <Nullable>enable</Nullable> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> diff --git a/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj b/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj index c7f0bb7e..eb0aeffb 100644 --- a/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj +++ b/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj @@ -1,10 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x64</Platforms> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/linux/global.json b/linux/global.json index 13300bb9..3cb4f962 100644 --- a/linux/global.json +++ b/linux/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.0", + "version": "7.0.0", "rollForward": "latestMinor", "allowPrerelease": false } diff --git a/windows/TweetDuck.Browser/TweetDuck.Browser.csproj b/windows/TweetDuck.Browser/TweetDuck.Browser.csproj index c5aa6fc4..fde744b6 100644 --- a/windows/TweetDuck.Browser/TweetDuck.Browser.csproj +++ b/windows/TweetDuck.Browser/TweetDuck.Browser.csproj @@ -1,11 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86</Platforms> <RuntimeIdentifier>win7-x86</RuntimeIdentifier> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/windows/TweetDuck.Video/Controls/LabelTooltip.cs b/windows/TweetDuck.Video/Controls/LabelTooltip.cs index 93969961..9cf7e045 100644 --- a/windows/TweetDuck.Video/Controls/LabelTooltip.cs +++ b/windows/TweetDuck.Video/Controls/LabelTooltip.cs @@ -23,7 +23,7 @@ public void AttachTooltip(Control control, bool followCursor, Func<MouseEventArg string? text = tooltipFunc(args); - if (text == null) { + if (text == null || control.Parent == null) { Visible = false; return; } diff --git a/windows/TweetDuck.Video/Controls/SeekBar.cs b/windows/TweetDuck.Video/Controls/SeekBar.cs index c249d113..00373417 100644 --- a/windows/TweetDuck.Video/Controls/SeekBar.cs +++ b/windows/TweetDuck.Video/Controls/SeekBar.cs @@ -28,7 +28,7 @@ protected override void OnPaint(PaintEventArgs e) { brushFore.Color = ForeColor; brushHover.Color = Color.FromArgb(128, ForeColor); brushOverlap.Color = Color.FromArgb(80 + ForeColor.R * 11 / 16, 80 + ForeColor.G * 11 / 16, 80 + ForeColor.B * 11 / 16); - brushBack.Color = Parent.BackColor; + brushBack.Color = Parent?.BackColor ?? Color.Black; } Rectangle rect = new Rectangle(0, 0, Width, Height); diff --git a/windows/TweetDuck.Video/TweetDuck.Video.csproj b/windows/TweetDuck.Video/TweetDuck.Video.csproj index 64bf4eee..2bc6d290 100644 --- a/windows/TweetDuck.Video/TweetDuck.Video.csproj +++ b/windows/TweetDuck.Video/TweetDuck.Video.csproj @@ -1,11 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86</Platforms> <RuntimeIdentifier>win7-x86</RuntimeIdentifier> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/windows/TweetDuck/Controls/ControlExtensions.cs b/windows/TweetDuck/Controls/ControlExtensions.cs index a7b84b17..f1d9fff4 100644 --- a/windows/TweetDuck/Controls/ControlExtensions.cs +++ b/windows/TweetDuck/Controls/ControlExtensions.cs @@ -95,8 +95,8 @@ public static void Restore(this WindowState state, Form form, bool firstTimeFull form.WindowState = state.IsMaximized ? FormWindowState.Maximized : FormWindowState.Normal; } - if ((state.Bounds == Rectangle.Empty && firstTimeFullscreen) || form.IsFullyOutsideView()) { - form.DesktopBounds = Screen.PrimaryScreen.WorkingArea; + if (((state.Bounds == Rectangle.Empty && firstTimeFullscreen) || form.IsFullyOutsideView()) && Screen.PrimaryScreen is {} primaryScreen) { + form.DesktopBounds = primaryScreen.WorkingArea; form.WindowState = FormWindowState.Maximized; state.Save(form); } diff --git a/windows/TweetDuck/Dialogs/FormAbout.cs b/windows/TweetDuck/Dialogs/FormAbout.cs index 56610882..17aad1b1 100644 --- a/windows/TweetDuck/Dialogs/FormAbout.cs +++ b/windows/TweetDuck/Dialogs/FormAbout.cs @@ -28,7 +28,7 @@ public FormAbout() { } private void OnLinkClicked(object? sender, LinkLabelLinkClickedEventArgs e) { - App.SystemHandler.OpenBrowser(e.Link.LinkData as string); + App.SystemHandler.OpenBrowser(e.Link?.LinkData as string); } private void FormAbout_HelpRequested(object? sender, HelpEventArgs hlpevent) { diff --git a/windows/TweetDuck/TweetDuck.csproj b/windows/TweetDuck/TweetDuck.csproj index 494b84f5..49edcdb3 100644 --- a/windows/TweetDuck/TweetDuck.csproj +++ b/windows/TweetDuck/TweetDuck.csproj @@ -1,11 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86</Platforms> <RuntimeIdentifier>win7-x86</RuntimeIdentifier> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj b/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj index 479c0953..82f74475 100644 --- a/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj +++ b/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj @@ -1,11 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86</Platforms> <RuntimeIdentifier>win7-x86</RuntimeIdentifier> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>enable</Nullable> </PropertyGroup> diff --git a/windows/TweetLib.WinForms.Legacy/TweetLib.WinForms.Legacy.csproj b/windows/TweetLib.WinForms.Legacy/TweetLib.WinForms.Legacy.csproj index 9e46988d..a243649a 100644 --- a/windows/TweetLib.WinForms.Legacy/TweetLib.WinForms.Legacy.csproj +++ b/windows/TweetLib.WinForms.Legacy/TweetLib.WinForms.Legacy.csproj @@ -1,11 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> + <TargetFramework>net7.0-windows</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86</Platforms> <RuntimeIdentifier>win7-x86</RuntimeIdentifier> - <LangVersion>10</LangVersion> + <LangVersion>11</LangVersion> <Nullable>disable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup>