Skip to content

Commit fba0812

Browse files
committed
リファクタリング
1 parent 7be4caf commit fba0812

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

RemoteLogViewer.Core/ViewModels/Settings/WorkspaceSettingsPageViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ public WorkspaceSettingsPageViewModel(WorkspaceService workspaceService, ILogger
2828
this.SelectedPath.Value = workspaceService.WorkspacePath ?? string.Empty;
2929
this.SkipPersist.Value = workspaceService.IsPersist;
3030
this._workspaceService = workspaceService;
31-
this.ConfirmCommand.Subscribe(_ => this.OnConfirm());
31+
_ = this.ConfirmCommand.Subscribe(_ => this.OnConfirm());
3232
}
3333

3434
/// <summary>確定処理。</summary>
3535
private void OnConfirm() {
3636
var path = this.SelectedPath.Value.Trim();
3737
if (string.IsNullOrWhiteSpace(path) || !Directory.Exists(path)) {
38-
this.ErrorMessage.Value = "有効なフォルダを選択してください。";
38+
this.ErrorMessage.Value = "Select a folder.";
3939
return;
4040
}
4141
this.ErrorMessage.Value = null;

RemoteLogViewer.WinUI/App.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args) {
4747
var logger = LoggerFactory.CreateLogger<App>();
4848
WinUI3ProviderInitializer.SetDefaultObservableSystem(ex => logger.LogWarning(ex, "Exception"));
4949
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
50+
AppDomain.CurrentDomain.UnhandledException += (s, e) => {
51+
logger.LogError(e.ExceptionObject as Exception, "UnhandledException");
52+
};
5053

5154
var workspaceService = Ioc.Default.GetRequiredService<WorkspaceService>();
5255
if (string.IsNullOrWhiteSpace(workspaceService.WorkspacePath)) {

RemoteLogViewer.WinUI/Views/Info/AboutPage.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
x:Class="RemoteLogViewer.WinUI.Views.Info.AboutPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:local="using:RemoteLogViewer.Views.Info"
65
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
76
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
87
mc:Ignorable="d">

RemoteLogViewer.WinUI/Views/Info/LicensePage.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
x:Class="RemoteLogViewer.WinUI.Views.Info.LicensePage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:local="using:RemoteLogViewer.Views.Info"
65
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
76
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
87
xmlns:vm="using:RemoteLogViewer.Core.ViewModels.Info"

RemoteLogViewer.WinUI/Views/Settings/WorkspaceSettingsPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<TextBox x:Name="PathTextBox" Text="{x:Bind ViewModel.SelectedPath.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="340" IsReadOnly="True" />
1414
<Button Content="Browse..." Margin="8,0,0,0" Click="Browse_Click" />
1515
</StackPanel>
16-
<CheckBox x:Name="SkipCheckBox" IsChecked="{x:Bind ViewModel.SkipPersist.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="次回以降この確認を省略" Margin="0,12,0,0" Grid.Row="2" />
16+
<CheckBox x:Name="SkipCheckBox" IsChecked="{x:Bind ViewModel.SkipPersist.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="Do not show this again." Margin="0,12,0,0" Grid.Row="2" />
1717
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,0,0" Grid.Row="3">
1818
<Button Content="Apply and exit" Click="Ok_Click" />
1919
</StackPanel>

RemoteLogViewer.WinUI/Views/WorkspaceSelectionWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<TextBox x:Name="PathTextBox" Text="{x:Bind ViewModel.SelectedPath.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="340" IsReadOnly="True" />
1414
<Button Content="Browse..." Margin="8,0,0,0" Click="Browse_Click" />
1515
</StackPanel>
16-
<CheckBox x:Name="SkipCheckBox" IsChecked="{x:Bind ViewModel.SkipPersist.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="次回以降この確認を省略" Margin="0,12,0,0" Grid.Row="2" />
16+
<CheckBox x:Name="SkipCheckBox" IsChecked="{x:Bind ViewModel.SkipPersist.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="Do not show this again." Margin="0,12,0,0" Grid.Row="2" />
1717
<Grid Grid.Row="3"/>
1818
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,0,0" Grid.Row="4">
1919
<Button Content="OK" Width="96" Click="Ok_Click" />

0 commit comments

Comments
 (0)