mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 04:37:02 +00:00
Null-conditional assignments, continued
This commit is contained in:
parent
e349ef72fb
commit
e287c9fc85
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)
|
||||
{
|
||||
if (DataContext is MainWindowViewModel model)
|
||||
{
|
||||
model.SearchText = (sender as TextBox)?.Text;
|
||||
}
|
||||
(DataContext as MainWindowViewModel)?.SearchText = (sender as TextBox)?.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
|
||||
private void SearchBox_OnKeyUp(object sender, KeyEventArgs args)
|
||||
{
|
||||
if (DataContext is MainWindowViewModel model)
|
||||
{
|
||||
model.SearchText = (sender as TextBox)?.Text;
|
||||
}
|
||||
(DataContext as MainWindowViewModel)?.SearchText = (sender as TextBox)?.Text;
|
||||
}
|
||||
|
||||
private async void IdString_OnClick(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -68,10 +68,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||
|
||||
if (_changeSlider != -1.0f && _changeSlider != (float)check.Value)
|
||||
{
|
||||
if (DataContext is ControllerInputViewModel viewModel)
|
||||
{
|
||||
viewModel.ParentModel.IsModified = true;
|
||||
}
|
||||
var viewModel = (DataContext as ControllerInputViewModel);
|
||||
viewModel?.ParentModel.IsModified = true;
|
||||
|
||||
_changeSlider = (float)check.Value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,10 +42,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue