diff --git a/src/Brainf_ckSharp.Shared/ViewModels/Controls/SubPages/AboutSubPageViewModel.cs b/src/Brainf_ckSharp.Shared/ViewModels/Controls/SubPages/AboutSubPageViewModel.cs
index 92d01455..dfde43f3 100644
--- a/src/Brainf_ckSharp.Shared/ViewModels/Controls/SubPages/AboutSubPageViewModel.cs
+++ b/src/Brainf_ckSharp.Shared/ViewModels/Controls/SubPages/AboutSubPageViewModel.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
+using Brainf_ckSharp.Services;
using Brainf_ckSharp.Shared.Constants;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
@@ -20,13 +21,22 @@ public sealed partial class AboutSubPageViewModel : ObservableObject
///
private readonly IGitHubService gitHubService;
+ ///
+ /// The instance currently in use
+ ///
+ private readonly ISystemInformationService systemInformationService;
+
///
/// Creates a new instance
///
/// The instance to use
- public AboutSubPageViewModel(IGitHubService gitHubService)
+ /// The instance to use
+ public AboutSubPageViewModel(
+ IGitHubService gitHubService,
+ ISystemInformationService systemInformationService)
{
this.gitHubService = gitHubService;
+ this.systemInformationService = systemInformationService;
}
///
@@ -39,6 +49,11 @@ public AboutSubPageViewModel(IGitHubService gitHubService)
///
public string GitCommit => ThisAssembly.Git.Commit;
+ ///
+ /// Gets the current app version.
+ ///
+ public string AppVersion => this.systemInformationService.ApplicationVersion;
+
///
/// Gets the name of the current build configuration
///
diff --git a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckEditBox/Brainf_ckEditBox.Template.cs b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckEditBox/Brainf_ckEditBox.Template.cs
index 8fc7645f..7eed32ea 100644
--- a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckEditBox/Brainf_ckEditBox.Template.cs
+++ b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckEditBox/Brainf_ckEditBox.Template.cs
@@ -5,10 +5,10 @@
using Windows.UI.Xaml.Shapes;
using Brainf_ckSharp.Uwp.Themes;
using Brainf_ckSharp.Uwp.Themes.Enums;
-using Microsoft.Graphics.Canvas.UI.Xaml;
using CommunityToolkit.Diagnostics;
-using Microsoft.Toolkit.Uwp.UI;
-using Microsoft.Toolkit.Uwp.UI.Animations;
+using CommunityToolkit.WinUI;
+using CommunityToolkit.WinUI.Animations;
+using Microsoft.Graphics.Canvas.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
#nullable enable
diff --git a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml
index 0416847c..2d5277df 100644
--- a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml
+++ b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml
@@ -1,4 +1,4 @@
-
diff --git a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml.cs b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml.cs
index 2b1d93c0..ee0f01bd 100644
--- a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml.cs
+++ b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckIde/Brainf_ckIde.xaml.cs
@@ -7,7 +7,7 @@
using Brainf_ckSharp.Constants;
using Brainf_ckSharp.Uwp.Controls.Ide.Helpers;
using CommunityToolkit.HighPerformance;
-using Microsoft.Toolkit.Uwp.UI.Animations;
+using CommunityToolkit.WinUI.Animations;
namespace Brainf_ckSharp.Uwp.Controls.Ide;
@@ -33,7 +33,7 @@ public Brainf_ckIde()
private void Brainf_ckIde_Loaded(object sender, RoutedEventArgs e)
{
_ = this.CodeEditBox.ContentScroller!.StartExpressionAnimation(this.LineBlock, Axis.Y, VisualProperty.Offset);
- _ = this.CodeEditBox.ContentScroller.StartExpressionAnimation(this.IdeOverlaysCanvas, Axis.Y, VisualProperty.Offset);
+ _ = this.CodeEditBox.ContentScroller!.StartExpressionAnimation(this.IdeOverlaysCanvas, Axis.Y, VisualProperty.Offset);
this.CodeEditBox.ContentElement!.SizeChanged += Brainf_ckIde_SizeChanged;
diff --git a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckSharp.UWP.Controls.Ide.csproj b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckSharp.UWP.Controls.Ide.csproj
index 5bb5d37c..00c9692e 100644
--- a/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckSharp.UWP.Controls.Ide.csproj
+++ b/src/Brainf_ckSharp.Uwp.Controls.Ide/Brainf_ckSharp.UWP.Controls.Ide.csproj
@@ -163,14 +163,14 @@
+
+ 8.1.240916
+
6.2.14
-
- 7.0.1
-
- 2.5.0
+ 2.8.6
1.27.1
diff --git a/src/Brainf_ckSharp.Uwp/App.xaml b/src/Brainf_ckSharp.Uwp/App.xaml
index 27154f8a..9eb15412 100644
--- a/src/Brainf_ckSharp.Uwp/App.xaml
+++ b/src/Brainf_ckSharp.Uwp/App.xaml
@@ -1,4 +1,4 @@
-
+
+ False
+
diff --git a/src/Brainf_ckSharp.Uwp/App.xaml.cs b/src/Brainf_ckSharp.Uwp/App.xaml.cs
index b554afd2..8bb74dc8 100644
--- a/src/Brainf_ckSharp.Uwp/App.xaml.cs
+++ b/src/Brainf_ckSharp.Uwp/App.xaml.cs
@@ -13,8 +13,8 @@
using Brainf_ckSharp.Shared.Constants;
using Brainf_ckSharp.Shared.ViewModels.Views;
using Brainf_ckSharp.Uwp.Controls.SubPages.Host;
+using CommunityToolkit.WinUI;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Toolkit.Uwp.UI;
#nullable enable
diff --git a/src/Brainf_ckSharp.Uwp/AttachedProperties/Brainf_ckInlineFormatterHelper.StackTrace.cs b/src/Brainf_ckSharp.Uwp/AttachedProperties/Brainf_ckInlineFormatterHelper.StackTrace.cs
index 2061be83..d3cf2636 100644
--- a/src/Brainf_ckSharp.Uwp/AttachedProperties/Brainf_ckInlineFormatterHelper.StackTrace.cs
+++ b/src/Brainf_ckSharp.Uwp/AttachedProperties/Brainf_ckInlineFormatterHelper.StackTrace.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -7,7 +7,7 @@
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Media;
using Brainf_ckSharp.Models;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
#nullable enable
@@ -48,8 +48,8 @@ public static void SetStackTrace(Paragraph element, IReadOnlyList? value
new(Array.Empty(), OnStackTracePropertyChanged));
// Localized resources
- private static readonly string At = "StackTrace/At".GetLocalized();
- private static readonly string Frames = "StackTrace/Frames".GetLocalized();
+ private static readonly string At = "StackTrace/At".GetLocalized()!;
+ private static readonly string Frames = "StackTrace/Frames".GetLocalized()!;
///
/// Updates the UI when changes
@@ -70,6 +70,7 @@ private static void OnStackTracePropertyChanged(DependencyObject d, DependencyPr
}
int i = 0;
+
foreach ((string Item, int Occurrences, int Length) entry in CompressStackTrace(value))
{
if (i++ > 0)
@@ -84,11 +85,14 @@ private static void OnStackTracePropertyChanged(DependencyObject d, DependencyPr
Foreground = new SolidColorBrush(Colors.DimGray),
FontSize = @this.FontSize - 1
});
+
@this.Inlines.Add(new LineBreak());
// Add the formatted call line
Span line = new();
+
SetSource(line, entry.Item);
+
@this.Inlines.Add(line);
}
}
@@ -101,12 +105,14 @@ private static void OnStackTracePropertyChanged(DependencyObject d, DependencyPr
{
int i = 0;
List<(int Length, int Occurrences)> info = [];
+
while (i < frames.Count)
{
for (int step = 1; step < 5 && i + (step * 2) - 1 < frames.Count; step++)
{
// Find a valid sub-pattern of a given length
bool valid = true;
+
for (int j = 0; j < step; j++)
{
if (!frames[i + j].Equals(frames[i + step + j]))
@@ -123,9 +129,11 @@ private static void OnStackTracePropertyChanged(DependencyObject d, DependencyPr
// Check of many times the pattern repeats
int occurrences = 2;
+
for (int j = i + (step * 2); j + step - 1 < frames.Count; j += step)
{
valid = true;
+
for (int k = 0; k < step; k++)
{
if (!frames[i + k].Equals(frames[j + k]))
@@ -155,22 +163,26 @@ private static void OnStackTracePropertyChanged(DependencyObject d, DependencyPr
{
(int Length, int Occurrences) best = info.OrderByDescending(item => item.Length * item.Occurrences).ThenBy(item => item.Length).First();
StringBuilder builder = new();
+
for (int j = 0; j < best.Length; j++)
{
- builder.Append(frames[i + j]);
+ _ = builder.Append(frames[i + j]);
}
string call = builder.ToString();
+
if (call.Contains(':'))
{
// Only aggregate recursive calls
yield return (call, best.Occurrences, best.Length);
+
i += best.Length * best.Occurrences;
}
else
{
// The repeated loops are just user code
yield return (frames[i], 1, 1);
+
i += 1;
}
}
diff --git a/src/Brainf_ckSharp.Uwp/AttachedProperties/IdeResultSectionDescriptionHelper.cs b/src/Brainf_ckSharp.Uwp/AttachedProperties/IdeResultSectionDescriptionHelper.cs
index 389a311b..c8ce000a 100644
--- a/src/Brainf_ckSharp.Uwp/AttachedProperties/IdeResultSectionDescriptionHelper.cs
+++ b/src/Brainf_ckSharp.Uwp/AttachedProperties/IdeResultSectionDescriptionHelper.cs
@@ -1,4 +1,4 @@
-using Windows.UI;
+using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Media;
@@ -9,9 +9,9 @@
using Brainf_ckSharp.Shared.Models.Ide.Views;
using Brainf_ckSharp.Uwp.Converters.Console;
using Brainf_ckSharp.Uwp.Themes;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Toolkit.Uwp;
using CommunityToolkit.Diagnostics;
+using Microsoft.Extensions.DependencyInjection;
+using CommunityToolkit.WinUI;
#nullable enable
@@ -57,12 +57,12 @@ public static void SetSection(Span element, IdeResultWithSectionInfo? value)
new(DependencyProperty.UnsetValue, OnSectionPropertyChanged));
// Localized resources
- private static readonly string AtPosition = "IdeResults/AtPosition".GetLocalized();
- private static readonly string StackFrames = "IdeResults/StackFrames".GetLocalized();
- private static readonly string DefinedFunctions = "IdeResults/DefinedFunctions".GetLocalized();
- private static readonly string Operators = "IdeResults/Operators".GetLocalized();
- private static readonly string MemoryCells = "IdeResults/MemoryCells".GetLocalized();
- private static readonly string OperatorsInTime = "IdeResults/OperatorsInTime".GetLocalized();
+ private static readonly string AtPosition = "IdeResults/AtPosition".GetLocalized()!;
+ private static readonly string StackFrames = "IdeResults/StackFrames".GetLocalized()!;
+ private static readonly string DefinedFunctions = "IdeResults/DefinedFunctions".GetLocalized()!;
+ private static readonly string Operators = "IdeResults/Operators".GetLocalized()!;
+ private static readonly string MemoryCells = "IdeResults/MemoryCells".GetLocalized()!;
+ private static readonly string OperatorsInTime = "IdeResults/OperatorsInTime".GetLocalized()!;
///
/// Updates the UI when changes
diff --git a/src/Brainf_ckSharp.Uwp/AttachedProperties/ListViewBaseHelper.cs b/src/Brainf_ckSharp.Uwp/AttachedProperties/ListViewBaseHelper.cs
index 0ef0e9a1..bb1b1e32 100644
--- a/src/Brainf_ckSharp.Uwp/AttachedProperties/ListViewBaseHelper.cs
+++ b/src/Brainf_ckSharp.Uwp/AttachedProperties/ListViewBaseHelper.cs
@@ -1,10 +1,10 @@
-using System.Collections.Specialized;
+using System.Collections.Specialized;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Microsoft.Toolkit.Uwp.UI;
using CommunityToolkit.Diagnostics;
+using CommunityToolkit.WinUI;
#nullable enable
@@ -64,7 +64,8 @@ private static void OnIsAutoScrollEnabledPropertyChanged(DependencyObject d, Dep
// Remove the old handler, if necessary
if (oldValue is not null)
{
- ControlsMap.Remove(oldValue);
+ _ = ControlsMap.Remove(oldValue);
+
oldValue.CollectionChanged -= INotifyCollectionChanged_CollectionChanged;
}
@@ -72,6 +73,7 @@ private static void OnIsAutoScrollEnabledPropertyChanged(DependencyObject d, Dep
if (newValue is not null)
{
ControlsMap.Add(newValue, @this);
+
newValue.CollectionChanged += INotifyCollectionChanged_CollectionChanged;
}
}
@@ -95,7 +97,9 @@ private static async void INotifyCollectionChanged_CollectionChanged(object send
// Wait for the new item to be displayed, then scroll down
await Task.Delay(250);
+
ScrollViewer scroller = control.FindDescendant()!;
- scroller?.ChangeView(null, scroller.ScrollableHeight, null, false);
+
+ _ = scroller?.ChangeView(null, scroller.ScrollableHeight, null, false);
}
}
diff --git a/src/Brainf_ckSharp.Uwp/Behaviors/LockedPivotBehavior.cs b/src/Brainf_ckSharp.Uwp/Behaviors/LockedPivotBehavior.cs
index 912f42b2..927cee1e 100644
--- a/src/Brainf_ckSharp.Uwp/Behaviors/LockedPivotBehavior.cs
+++ b/src/Brainf_ckSharp.Uwp/Behaviors/LockedPivotBehavior.cs
@@ -1,5 +1,5 @@
-using CommunityToolkit.Diagnostics;
-using Microsoft.Toolkit.Uwp.UI;
+using CommunityToolkit.Diagnostics;
+using CommunityToolkit.WinUI;
using Microsoft.Xaml.Interactivity;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -17,7 +17,7 @@ public sealed class LockedPivotBehavior : Behavior
///
/// The root for the associated .
///
- private ScrollViewer? _scrollViewer;
+ private ScrollViewer? scrollViewer;
///
protected override void OnAttached()
@@ -34,13 +34,13 @@ protected override void OnDetaching()
AssociatedObject.Loaded -= AssociatedObject_Loaded;
- if (this._scrollViewer is not null)
+ if (this.scrollViewer is not null)
{
- this._scrollViewer!.PointerEntered -= Scroller_PointerIn;
- this._scrollViewer.PointerMoved -= Scroller_PointerIn;
- this._scrollViewer.PointerExited -= Scroller_PointerOut;
- this._scrollViewer.PointerReleased -= Scroller_PointerOut;
- this._scrollViewer.PointerCaptureLost -= Scroller_PointerOut;
+ this.scrollViewer!.PointerEntered -= Scroller_PointerIn;
+ this.scrollViewer.PointerMoved -= Scroller_PointerIn;
+ this.scrollViewer.PointerExited -= Scroller_PointerOut;
+ this.scrollViewer.PointerReleased -= Scroller_PointerOut;
+ this.scrollViewer.PointerCaptureLost -= Scroller_PointerOut;
}
}
@@ -54,14 +54,14 @@ private void AssociatedObject_Loaded(object sender, RoutedEventArgs e)
return;
}
- this._scrollViewer = scroller;
+ this.scrollViewer = scroller;
// Add the handlers to disable the swipe gestures
- this._scrollViewer.PointerEntered += Scroller_PointerIn;
- this._scrollViewer.PointerMoved += Scroller_PointerIn;
- this._scrollViewer.PointerExited += Scroller_PointerOut;
- this._scrollViewer.PointerReleased += Scroller_PointerOut;
- this._scrollViewer.PointerCaptureLost += Scroller_PointerOut;
+ this.scrollViewer.PointerEntered += Scroller_PointerIn;
+ this.scrollViewer.PointerMoved += Scroller_PointerIn;
+ this.scrollViewer.PointerExited += Scroller_PointerOut;
+ this.scrollViewer.PointerReleased += Scroller_PointerOut;
+ this.scrollViewer.PointerCaptureLost += Scroller_PointerOut;
}
// Disables the swipe gesture for the keyboard pivot (swiping that pivot causes the app to crash)
diff --git a/src/Brainf_ckSharp.Uwp/Brainf_ckSharp.Uwp.csproj b/src/Brainf_ckSharp.Uwp/Brainf_ckSharp.Uwp.csproj
index cda16010..8db98107 100644
--- a/src/Brainf_ckSharp.Uwp/Brainf_ckSharp.Uwp.csproj
+++ b/src/Brainf_ckSharp.Uwp/Brainf_ckSharp.Uwp.csproj
@@ -381,20 +381,23 @@
0.1.240911-build.1751
+
+ 8.1.240916
+
+
+ 8.1.240916
+
+
+ 8.1.240916
+
8.0.0
6.2.14
-
- 7.0.1
-
-
- 7.1.3
-
- 2.5.0
+ 2.8.6
2.0.1
diff --git a/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/Brainf_ckMemoryCellChunkTemplate.xaml b/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/Brainf_ckMemoryCellChunkTemplate.xaml
index 1a2a8221..bbfbfa2f 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/Brainf_ckMemoryCellChunkTemplate.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/Brainf_ckMemoryCellChunkTemplate.xaml
@@ -1,10 +1,10 @@
-
diff --git a/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/FeaturedLinkTemplate.xaml b/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/FeaturedLinkTemplate.xaml
index d704d2b9..4cc75210 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/FeaturedLinkTemplate.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/DataTemplates/FeaturedLinkTemplate.xaml
@@ -7,8 +7,8 @@
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:media="using:Microsoft.Xaml.Interactions.Media"
- xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
- xmlns:media2="using:Microsoft.Toolkit.Uwp.UI.Media"
+ xmlns:ui="using:CommunityToolkit.WinUI"
+ xmlns:media2="using:CommunityToolkit.WinUI.Media"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
diff --git a/src/Brainf_ckSharp.Uwp/Controls/Host/Header/HeaderPanel.xaml b/src/Brainf_ckSharp.Uwp/Controls/Host/Header/HeaderPanel.xaml
index 2b78c292..de52bc67 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/Host/Header/HeaderPanel.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/Host/Header/HeaderPanel.xaml
@@ -1,10 +1,10 @@
-
diff --git a/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/CompactMemoryViewer.xaml b/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/CompactMemoryViewer.xaml
index 6ee6ec2e..bd862c28 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/CompactMemoryViewer.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/CompactMemoryViewer.xaml
@@ -1,4 +1,4 @@
-
diff --git a/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/Header/StdinHeader.xaml b/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/Header/StdinHeader.xaml
index ffd5070f..ba2be108 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/Header/StdinHeader.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/Host/InputPanel/Header/StdinHeader.xaml
@@ -1,11 +1,11 @@
-
+
+
+
+
+
+
@@ -111,7 +128,8 @@
+ Background="{StaticResource CommandBarBackgroundBrush}"
+ Style="{StaticResource DefaultCommandBarWithDarkOverflowPresenterStyle}">
diff --git a/src/Brainf_ckSharp.Uwp/Controls/Host/Shell.xaml.cs b/src/Brainf_ckSharp.Uwp/Controls/Host/Shell.xaml.cs
index 4418d54a..79dac9fa 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/Host/Shell.xaml.cs
+++ b/src/Brainf_ckSharp.Uwp/Controls/Host/Shell.xaml.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Windows.Input;
using Windows.System;
using Windows.UI.Xaml;
@@ -16,7 +16,6 @@
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using CommunityToolkit.Mvvm.Messaging.Messages;
-using Microsoft.Toolkit.Uwp.Helpers;
#nullable enable
@@ -30,7 +29,7 @@ public sealed partial class Shell : UserControl
///
/// The previous height of the virtual keyboard
///
- private double _previousKeyboardHeight;
+ private double previousKeyboardHeight;
public Shell()
{
@@ -60,7 +59,7 @@ public Shell()
///
private void Shell_OnLoaded(object sender, RoutedEventArgs e)
{
- if (SystemInformation.Instance.LaunchCount == 4)
+ if (App.Current.Services.GetRequiredService().GetAppLaunchCount() == 4)
{
App.Current.SubPageHost.DisplaySubFramePage(new ReviewPromptSubPage());
}
@@ -136,9 +135,9 @@ private void Pivot_OnSelectionChanged(object sender, SelectionChangedEventArgs e
///
private void Border_SizeChanged(object sender, SizeChangedEventArgs e)
{
- if (Math.Abs(this._previousKeyboardHeight - e.NewSize.Height) > 0.01)
+ if (Math.Abs(this.previousKeyboardHeight - e.NewSize.Height) > 0.01)
{
- this._previousKeyboardHeight = e.NewSize.Height;
+ this.previousKeyboardHeight = e.NewSize.Height;
this.ConsolePivotItem.FooterSpacing = e.NewSize.Height;
this.IdePivotItem.FooterSpacing = e.NewSize.Height;
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Host/SubPageHost.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Host/SubPageHost.xaml
index 6f4a338e..fe68778d 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Host/SubPageHost.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Host/SubPageHost.xaml
@@ -1,10 +1,10 @@
-
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/AboutSubPage.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/AboutSubPage.xaml
index 8b935c40..aaa3d9ca 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/AboutSubPage.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/AboutSubPage.xaml
@@ -9,7 +9,6 @@
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:appModel="using:Windows.ApplicationModel"
- xmlns:helpers="using:Microsoft.Toolkit.Uwp.Helpers"
xmlns:dataTemplates="using:Brainf_ckSharp.Uwp.Controls.DataTemplates"
mc:Ignorable="d"
d:DesignHeight="300"
@@ -48,7 +47,7 @@
FontWeight="SemiBold"
FontSize="14"/>
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/ReviewPromptSubPage.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/ReviewPromptSubPage.xaml
index 3dec5a84..f4511b1b 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/ReviewPromptSubPage.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/ReviewPromptSubPage.xaml
@@ -6,8 +6,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:host="using:Brainf_ckSharp.Uwp.Controls.SubPages.Host"
xmlns:attachedProperties="using:Brainf_ckSharp.Uwp.AttachedProperties"
- xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
- xmlns:media="using:Microsoft.Toolkit.Uwp.UI.Media"
+ xmlns:ui="using:CommunityToolkit.WinUI"
+ xmlns:media="using:CommunityToolkit.WinUI.Media"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/Settings/SettingsSubPage.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/Settings/SettingsSubPage.xaml
index 746ba543..f4283540 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/Settings/SettingsSubPage.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/Settings/SettingsSubPage.xaml
@@ -15,7 +15,7 @@
xmlns:dataTemplates="using:Brainf_ckSharp.Uwp.Controls.DataTemplates"
xmlns:converters="using:Brainf_ckSharp.Uwp.Converters"
xmlns:convertersSubPages="using:Brainf_ckSharp.Uwp.Converters.SubPages"
- xmlns:convertersToolkit="using:Microsoft.Toolkit.Uwp.UI.Converters"
+ xmlns:convertersToolkit="using:CommunityToolkit.WinUI.Converters"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:controls="using:Brainf_ckSharp.Uwp.Controls.Windows.UI.Xaml.Controls"
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/UserGuide/Templates/CodeSampleTemplate.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/UserGuide/Templates/CodeSampleTemplate.xaml
index a60ffe10..b499fb5e 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/UserGuide/Templates/CodeSampleTemplate.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Shell/UserGuide/Templates/CodeSampleTemplate.xaml
@@ -5,8 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ide="using:Brainf_ckSharp.Uwp.Controls.Ide"
- xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
- xmlns:media="using:Microsoft.Toolkit.Uwp.UI.Media"
+ xmlns:ui="using:CommunityToolkit.WinUI"
+ xmlns:media="using:CommunityToolkit.WinUI.Media"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
diff --git a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Views/CodeLibrarySubPage.xaml b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Views/CodeLibrarySubPage.xaml
index a0e03de4..68aa8807 100644
--- a/src/Brainf_ckSharp.Uwp/Controls/SubPages/Views/CodeLibrarySubPage.xaml
+++ b/src/Brainf_ckSharp.Uwp/Controls/SubPages/Views/CodeLibrarySubPage.xaml
@@ -1,4 +1,4 @@
-
diff --git a/src/Brainf_ckSharp.Uwp/Converters/Console/ExitCodeConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/Console/ExitCodeConverter.cs
index b0c01fb2..8d960025 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/Console/ExitCodeConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/Console/ExitCodeConverter.cs
@@ -1,8 +1,8 @@
-using System;
+using System;
using System.Diagnostics;
using Brainf_ckSharp.Enums;
using CommunityToolkit.Diagnostics;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters.Console;
@@ -38,7 +38,7 @@ public static string Convert(ExitCode code)
{
if (code.HasFlag(entry))
{
- return $"{nameof(ExitCode)}/{entry}".GetLocalized();
+ return $"{nameof(ExitCode)}/{entry}".GetLocalized()!;
}
}
diff --git a/src/Brainf_ckSharp.Uwp/Converters/Console/SyntaxValidationResultConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/Console/SyntaxValidationResultConverter.cs
index 1a33bcbc..21c78ce8 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/Console/SyntaxValidationResultConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/Console/SyntaxValidationResultConverter.cs
@@ -1,7 +1,7 @@
-using Windows.ApplicationModel.Resources;
+using Windows.ApplicationModel.Resources;
using Brainf_ckSharp.Enums;
using Brainf_ckSharp.Models;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters.Console;
@@ -21,7 +21,7 @@ public static class SyntaxValidationResultConverter
///
/// The "operator" localized text
///
- private static readonly string Operator = "SyntaxValidationResult/Operator".GetLocalized();
+ private static readonly string Operator = "SyntaxValidationResult/Operator".GetLocalized()!;
///
/// Converts a given instance to its representation
diff --git a/src/Brainf_ckSharp.Uwp/Converters/EnumConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/EnumConverter.cs
index 0e85d191..f3100a3d 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/EnumConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/EnumConverter.cs
@@ -1,5 +1,5 @@
-using System;
-using Microsoft.Toolkit.Uwp;
+using System;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters;
@@ -27,7 +27,7 @@ public static string Convert(object value)
/// A localized representation for
public static string Convert(T value) where T : struct, Enum
{
- return $"{typeof(T).Name}/{value}".GetLocalized();
+ return $"{typeof(T).Name}/{value}".GetLocalized()!;
}
///
@@ -50,6 +50,6 @@ public static string Convert(object value, string scope)
/// A localized representation for
public static string Convert(T value, string scope) where T : struct, Enum
{
- return $"{typeof(T).Name}/{value}/{scope}".GetLocalized();
+ return $"{typeof(T).Name}/{value}/{scope}".GetLocalized()!;
}
}
diff --git a/src/Brainf_ckSharp.Uwp/Converters/Ide/CodeSnippetTitleConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/Ide/CodeSnippetTitleConverter.cs
index ec48fbe3..8ed2ee14 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/Ide/CodeSnippetTitleConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/Ide/CodeSnippetTitleConverter.cs
@@ -1,6 +1,6 @@
-using Brainf_ckSharp.Shared.Constants;
+using Brainf_ckSharp.Shared.Constants;
using CommunityToolkit.Diagnostics;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters.Ide;
@@ -18,8 +18,8 @@ public static string Convert(string snippet)
{
return snippet switch
{
- CodeSnippets.ResetCell => "CodeSnippets/ResetCell".GetLocalized(),
- CodeSnippets.DuplicateValue => "CodeSnippets/DuplicateValue".GetLocalized(),
+ CodeSnippets.ResetCell => "CodeSnippets/ResetCell".GetLocalized()!,
+ CodeSnippets.DuplicateValue => "CodeSnippets/DuplicateValue".GetLocalized()!,
CodeSnippets.IfZeroThen => "if (x == 0) { }",
CodeSnippets.IfGreaterThanZeroThenElse => "if (x > 0) { } else { }",
_ => ThrowHelper.ThrowArgumentException(nameof(snippet), "Invalid target code snippet")
diff --git a/src/Brainf_ckSharp.Uwp/Converters/LocalizationConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/LocalizationConverter.cs
index 9f7bcf68..dba6c741 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/LocalizationConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/LocalizationConverter.cs
@@ -1,4 +1,4 @@
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters;
@@ -15,6 +15,6 @@ public static class LocalizationConverter
/// The requested formatted and localized
public static string Convert(string resource, object value)
{
- return string.Format(resource.GetLocalized(), value);
+ return string.Format(resource.GetLocalized()!, value);
}
}
diff --git a/src/Brainf_ckSharp.Uwp/Converters/SubPages/SettingsSectionConverters.cs b/src/Brainf_ckSharp.Uwp/Converters/SubPages/SettingsSectionConverters.cs
index 70d6d9ed..beb7aea4 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/SubPages/SettingsSectionConverters.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/SubPages/SettingsSectionConverters.cs
@@ -1,9 +1,9 @@
-using System;
+using System;
using System.Reflection;
using Brainf_ckSharp.Shared.Enums;
using Brainf_ckSharp.Shared.ViewModels.Controls.SubPages.Settings.Sections.Abstract;
using CommunityToolkit.Mvvm.Collections;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters.SubPages;
@@ -23,6 +23,6 @@ public static string ConvertSectionDescription(IReadOnlyObservableGroup section)
int numberOfProperties = viewModelType.GetProperties(BindingFlags.Instance | BindingFlags.Public).Length;
- return string.Format("Settings/SettingsAvailable".GetLocalized(), numberOfProperties);
+ return string.Format("Settings/SettingsAvailable".GetLocalized()!, numberOfProperties);
}
}
diff --git a/src/Brainf_ckSharp.Uwp/Converters/SubPages/UnicodeIntervalConverter.cs b/src/Brainf_ckSharp.Uwp/Converters/SubPages/UnicodeIntervalConverter.cs
index 7bf342cf..33660281 100644
--- a/src/Brainf_ckSharp.Uwp/Converters/SubPages/UnicodeIntervalConverter.cs
+++ b/src/Brainf_ckSharp.Uwp/Converters/SubPages/UnicodeIntervalConverter.cs
@@ -1,6 +1,6 @@
-using Brainf_ckSharp.Shared.Models;
+using Brainf_ckSharp.Shared.Models;
using CommunityToolkit.Diagnostics;
-using Microsoft.Toolkit.Uwp;
+using CommunityToolkit.WinUI;
namespace Brainf_ckSharp.Uwp.Converters.SubPages;
@@ -10,8 +10,8 @@ namespace Brainf_ckSharp.Uwp.Converters.SubPages;
public static class UnicodeIntervalConverter
{
// Localized resources
- private static readonly string ControlCharacters = "UnicodeInterval/ControlCharacters".GetLocalized();
- private static readonly string NonVisible = "UnicodeInterval/NonVisible".GetLocalized();
+ private static readonly string ControlCharacters = "UnicodeInterval/ControlCharacters".GetLocalized()!;
+ private static readonly string NonVisible = "UnicodeInterval/NonVisible".GetLocalized()!;
///
/// Converts a instance into its description representation
diff --git a/src/Brainf_ckSharp.Uwp/Resources/Dictionaries/Brushes.xaml b/src/Brainf_ckSharp.Uwp/Resources/Dictionaries/Brushes.xaml
index 21e88835..37d6a795 100644
--- a/src/Brainf_ckSharp.Uwp/Resources/Dictionaries/Brushes.xaml
+++ b/src/Brainf_ckSharp.Uwp/Resources/Dictionaries/Brushes.xaml
@@ -1,11 +1,11 @@
-
+ xmlns:media="using:CommunityToolkit.WinUI.Media">
(); break;
case (DataType.UnsignedShort, false): MoveNext(); break;
default: ThrowHelper.ThrowInvalidOperationException("Invalid interpreter session configuration."); break;
- };
+ }
return true;
}
diff --git a/src/GitHub/GitHub.csproj b/src/GitHub/GitHub.csproj
index d5096b8f..6e0942e9 100644
--- a/src/GitHub/GitHub.csproj
+++ b/src/GitHub/GitHub.csproj
@@ -6,7 +6,7 @@
-
+