45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using FluentTerminal.App.ViewModels.Settings;
|
|
using Windows.System;
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Input;
|
|
using Windows.UI.Xaml.Navigation;
|
|
|
|
namespace FluentTerminal.App.Views.SettingsPages
|
|
{
|
|
public sealed partial class TerminalSettings : Page
|
|
{
|
|
public TerminalSettings()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public TerminalPageViewModel ViewModel { get; private set; }
|
|
|
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
|
{
|
|
if (e.Parameter is TerminalPageViewModel viewModel)
|
|
{
|
|
ViewModel = viewModel;
|
|
}
|
|
}
|
|
|
|
private void ScrollBackTextBoxOnKeyDown(object sender, KeyRoutedEventArgs e)
|
|
{
|
|
if (e.Key == VirtualKey.Back)
|
|
{
|
|
e.Handled = false;
|
|
return;
|
|
}
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
if (e.Key.ToString() == string.Format("Number{0}", i))
|
|
{
|
|
e.Handled = false;
|
|
return;
|
|
}
|
|
}
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
} |