mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 13:37:08 +00:00
Null-conditional assignments, continued
This commit is contained in:
parent
99c2e672c3
commit
50b00e3827
4 changed files with 5 additions and 16 deletions
|
|
@ -37,10 +37,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
|
|
||||||
private void SearchBox_OnKeyUp(object sender, KeyEventArgs args)
|
private void SearchBox_OnKeyUp(object sender, KeyEventArgs args)
|
||||||
{
|
{
|
||||||
if (DataContext is MainWindowViewModel model)
|
(DataContext as MainWindowViewModel)?.SearchText = (sender as TextBox)?.Text;
|
||||||
{
|
|
||||||
model.SearchText = (sender as TextBox)?.Text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||||
|
|
||||||
private void SearchBox_OnKeyUp(object sender, KeyEventArgs args)
|
private void SearchBox_OnKeyUp(object sender, KeyEventArgs args)
|
||||||
{
|
{
|
||||||
if (DataContext is MainWindowViewModel model)
|
(DataContext as MainWindowViewModel)?.SearchText = (sender as TextBox)?.Text;
|
||||||
{
|
|
||||||
model.SearchText = (sender as TextBox)?.Text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void IdString_OnClick(object sender, RoutedEventArgs e)
|
private async void IdString_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||||
|
|
||||||
if (_changeSlider != -1.0f && _changeSlider != (float)check.Value)
|
if (_changeSlider != -1.0f && _changeSlider != (float)check.Value)
|
||||||
{
|
{
|
||||||
if (DataContext is ControllerInputViewModel viewModel)
|
var viewModel = (DataContext as ControllerInputViewModel);
|
||||||
{
|
viewModel?.ParentModel.IsModified = true;
|
||||||
viewModel.ParentModel.IsModified = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
_changeSlider = (float)check.Value;
|
_changeSlider = (float)check.Value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||||
|
|
||||||
if (arg.NavigationMode == NavigationMode.Back)
|
if (arg.NavigationMode == NavigationMode.Back)
|
||||||
{
|
{
|
||||||
if (_parent.Parent != null)
|
((ContentDialog)_parent.Parent)?.Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
|
||||||
{
|
|
||||||
((ContentDialog)_parent.Parent).Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DataContext = ViewModel;
|
DataContext = ViewModel;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue