Skip to content

Commit

Permalink
rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-o-Way committed Jul 4, 2024
1 parent eefb6ff commit c631895
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Source/Hurl.BrowserSelector/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected override void OnStartup(StartupEventArgs e)
{
if (Current.MainWindow is { } window)
{
_mainWindow.MaximizeWindow();
_mainWindow.ShowWindow();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Hurl.BrowserSelector/Controls/BrowsersList.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
CornerRadius="5"
Cursor="Hand"
Focusable="True"
MouseLeftButtonUp="BtnArea_MouseLeftButtonUp"
MouseLeftButtonUp="BrowserButton_Click"
Tag="{Binding}"
ToolTip="{Binding Path=Name}">
<Border.Style>
Expand Down
6 changes: 3 additions & 3 deletions Source/Hurl.BrowserSelector/Controls/BrowsersList.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ private void OnPreviewKeyUp(object sender, KeyEventArgs e)
//if (Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) { }
}

private void BtnArea_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
private void BrowserButton_Click(object sender, MouseButtonEventArgs e)
{
var tag = (sender as Border).Tag as Browser;
var tag = ((Border)sender).Tag as Browser;
OpenLink(tag);
MinimizeWindow();
}
Expand All @@ -66,7 +66,7 @@ private void AdditionalBtn_Click(object sender, RoutedEventArgs e)

private void MenuItem_Click(object sender, RoutedEventArgs e)
{
var alt = (sender as MenuItem).Tag as AltLaunchParentConverter.AltLaunchParent;
var alt = ((MenuItem)sender).Tag as AltLaunchParentConverter.AltLaunchParent;
OpenAltLaunch(alt.AltLaunch, alt.Browser);
MinimizeWindow();
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Hurl.BrowserSelector/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Deactivated="Window_Deactivated"
ExtendsContentIntoTitleBar="True"
PreviewKeyUp="Window_KeyEvents"
SizeChanged="UiWindow_SizeChanged"
SizeChanged="Window_SizeChanged"
Topmost="True"
WindowBackdropType="Mica"
WindowStartupLocation="CenterScreen"
Expand Down
8 changes: 4 additions & 4 deletions Source/Hurl.BrowserSelector/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private void MinimizeWindow()
Hide();
}

public void MaximizeWindow()
public void ShowWindow()
{
PositionWindowUnderTheMouse();
WindowState = WindowState.Normal;
Expand All @@ -153,7 +153,7 @@ private void TrayMenuItem_OnClick(object sender, RoutedEventArgs e)
switch (tag)
{
case "open":
MaximizeWindow();
ShowWindow();
break;
case "settings":
Process.Start("explorer", "\"" + Constants.APP_SETTINGS_MAIN + "\"");
Expand All @@ -176,7 +176,7 @@ private void TrayMenuItem_OnClick(object sender, RoutedEventArgs e)
}
}

private void NotifyIcon_LeftClick(object sender, RoutedEventArgs e) => MaximizeWindow();
private void NotifyIcon_LeftClick(object sender, RoutedEventArgs e) => ShowWindow();

private void Window_Deactivated(object sender, EventArgs e)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
forcePreventWindowDeactivationEvent = false;
}

private void UiWindow_SizeChanged(object sender, SizeChangedEventArgs e) => SettingsGlobal.AdjustWindowSize(e);
private void Window_SizeChanged(object sender, SizeChangedEventArgs e) => SettingsGlobal.AdjustWindowSize(e);

async private void Linkpreview_Click(object sender, RoutedEventArgs e)
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Hurl.BrowserSelector/Windows/TimeSelectWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
ItemsSource="{Binding}" />
</wpfui:CardControl>
<Grid Margin="0,10">
<wpfui:Button Padding="40,15" Click="Button_Click_1">
<wpfui:Button Padding="40,15" Click="CancelBtn_Click">
Cancel Current
</wpfui:Button>
<wpfui:Button
Padding="40,15"
HorizontalAlignment="Right"
Click="Button_Click"
Click="SetBtn_Click"
Content="Set" />
</Grid>
</StackPanel>
Expand Down
4 changes: 2 additions & 2 deletions Source/Hurl.BrowserSelector/Windows/TimeSelectWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public TimeSelectWindow(List<Browser> x)
DataContext = x.ConvertAll(y => y.Name);
}

private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
private void SetBtn_Click(object sender, System.Windows.RoutedEventArgs e)
{
var x = TimeBox.Value;
var y = BrowserBox.SelectedIndex;
Expand All @@ -32,7 +32,7 @@ private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
}
}

private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
private void CancelBtn_Click(object sender, System.Windows.RoutedEventArgs e)
{
TimedBrowserSelect.DeleteCurrent();
Close();
Expand Down

0 comments on commit c631895

Please sign in to comment.