Skip to content

Commit

Permalink
delete useless combo box drop down event
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Dec 28, 2023
1 parent 6375890 commit cc753d8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 46 deletions.
16 changes: 2 additions & 14 deletions src/Starward/Pages/GachaLogPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private async Task InputUrlAsync()
// 取消
SecondaryButtonText = Lang.Common_Cancel,
DefaultButton = ContentDialogButton.Primary,
XamlRoot = MainWindow.Current.Content.XamlRoot,
XamlRoot = this.XamlRoot,
};
var result = await dialog.ShowAsync();
if (result == ContentDialogResult.Primary)
Expand Down Expand Up @@ -454,7 +454,7 @@ private async Task DeleteUidAsync()
// 取消
SecondaryButtonText = Lang.Common_Cancel,
DefaultButton = ContentDialogButton.Secondary,
XamlRoot = MainWindow.Current.Content.XamlRoot,
XamlRoot = this.XamlRoot,
};
var result = await dialog.ShowAsync();
if (result == ContentDialogResult.Primary)
Expand Down Expand Up @@ -574,18 +574,6 @@ private async Task ImportGachaLogAsync()



private void ComboBox_Uid_DropDownOpened(object sender, object e)
{
MainWindow.Current.SetDragRectangles();
}



private void ComboBox_Uid_DropDownClosed(object sender, object e)
{
MainPage.Current.UpdateDragRectangles();
}



[RelayCommand]
Expand Down
4 changes: 2 additions & 2 deletions src/Starward/Pages/ImageViewPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ private async Task OpenFileAsync()
[RelayCommand]
private void Close()
{
MainWindow.Current?.CloseOverlayPage();
MainWindow.Current?.AppWindow?.SetPresenter(AppWindowPresenterKind.Overlapped);
MainWindow.Current.CloseOverlayPage();
MainWindow.Current.AppWindow.SetPresenter(AppWindowPresenterKind.Overlapped);
}


Expand Down
17 changes: 0 additions & 17 deletions src/Starward/Pages/SelfQueryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -543,23 +543,6 @@ private async Task DeleteCurrentMonthData()




private void ComboBox_Uid_DropDownOpened(object sender, object e)
{
MainWindow.Current.SetDragRectangles();
}



private void ComboBox_Uid_DropDownClosed(object sender, object e)
{
MainPage.Current.UpdateDragRectangles();
}





private static string TypeToIcon(GenshinQueryType type)
{
return type switch
Expand Down
13 changes: 0 additions & 13 deletions src/Starward/Pages/SettingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,6 @@ private void ComboBox_Language_SelectionChanged(object sender, SelectionChangedE
}



private void ComboBox_Language_DropDownOpened(object sender, object e)
{
MainWindow.Current.SetDragRectangles();
}

private void ComboBox_Language_DropDownClosed(object sender, object e)
{
MainPage.Current.UpdateDragRectangles();
}



#endregion


Expand Down

0 comments on commit cc753d8

Please sign in to comment.