Skip to content

Commit 9c236de

Browse files
committed
rename function
1 parent 9ee0585 commit 9c236de

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/CodeSnip/MainViewModel.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public partial class MainViewModel : ObservableObject
2626
private readonly SettingsService settingsService = new();
2727
private readonly IFlyoutService _flyoutService;
2828

29+
private readonly NotificationManager notificationManager = new();
30+
2931
private readonly Geometry? _panelOpenIcon;
3032
private readonly Geometry? _panelCloseIcon;
3133

@@ -628,14 +630,13 @@ await DialogService.Instance.ShowMessageAsync("Cannot Save",
628630
PerformSave();
629631
if (!IsNotificationEnabled) return;
630632
// Show notification
631-
NotificationManager notificationManager = new();
632633
var content = new NotificationContent
633634
{
634635
Title = "Message",
635636
Message = $"Snippet '{EditingSnippet.Title}' saved at {DateTime.Now:HH:mm:ss}",
636637
Type = NotificationType.Information
637638
};
638-
await notificationManager.ShowAsync(content, areaName: "NotificationWindowArea", expirationTime: TimeSpan.FromSeconds(3));
639+
await notificationManager.ShowAsync(content, areaName: "NotificationWindowArea", expirationTime: TimeSpan.FromSeconds(2));
639640
}
640641
}
641642

@@ -726,7 +727,7 @@ private void ResetFontSize()
726727
}
727728

728729
[RelayCommand]
729-
private void SearchReplace()
730+
private void OpenSearchReplace()
730731
{
731732
if ((_searchReplacePanel != null && _searchReplacePanel.IsClosed))
732733
{

src/CodeSnip/MainWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<!-- Ctrl + Shift + I : Toggle Inline Block Comment (samo selekcija) -->
8787
<KeyBinding Key="I" Modifiers="Ctrl+Shift"
8888
Command="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=ToggleCommentSelectionCommand}" />
89-
<!--<KeyBinding Key="F" Modifiers="Ctrl" Command="{Binding SearchReplaceCommand}"/>-->
89+
<!--<KeyBinding Key="F" Modifiers="Ctrl" Command="{Binding OpenSearchReplaceCommand}"/>-->
9090
</mah:MetroWindow.InputBindings>
9191
<mah:MetroWindow.LeftWindowCommands>
9292
<mah:WindowCommands/>
@@ -304,7 +304,7 @@
304304
<Path Data="{StaticResource ZoomOutMap}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
305305
Width="20" Height="20" Stretch="Uniform" />
306306
</Button>
307-
<Button Margin="5,0,0,0" ToolTip="Search / Replace" Command="{Binding SearchReplaceCommand}" >
307+
<Button Margin="5,0,0,0" ToolTip="Search / Replace" Command="{Binding OpenSearchReplaceCommand}" >
308308
<Path Data="{StaticResource TextSearch}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
309309
Width="20" Height="20" Stretch="Uniform" />
310310
</Button>

0 commit comments

Comments
 (0)