Skip to content

Commit 14e57fa

Browse files
committed
wip commit
1 parent 4074963 commit 14e57fa

File tree

5 files changed

+39
-12
lines changed

5 files changed

+39
-12
lines changed

src/WEventViewer/MainWindow.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<DataGrid.RowHeight>50</DataGrid.RowHeight>
3535
</DataGrid>
3636
</ScrollViewer>
37-
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="20">
37+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="20" VerticalAlignment="Bottom">
3838
<Label Content="{Binding LogCount,Mode=OneWay}"/>
3939
<Label Content="{Binding LoadStatus,Mode=OneWay}"/>
4040
</StackPanel>

src/WEventViewer/Model/EventLogRepository.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static LogRecord ToLogRecord(this EventRecord record)
4646
var keywordDisplayNames = GetKeywordsDisplayNames(record);
4747
var levelName = GetLevelDisplayName(record);
4848
var taskDisplayName = GetTaskDisplayName(record);
49+
var x = "hogehoge";
4950
var opcodeDisplayName = GetOpCodeDisplayName(record);
5051
return new LogRecord(record.ActivityId, record.Id, keywords, keywordDisplayNames, record.Level,
5152
levelName, record.LogName, record.MachineName, record.Opcode, opcodeDisplayName, record.ProcessId,

src/WEventViewer/OpenLogWindow.axaml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,35 @@
1414
<Window.Resources>
1515
<vm:PathTypeValueConverter x:Key="PathTypeConverter"/>
1616
</Window.Resources>
17-
<StackPanel HorizontalAlignment="Stretch" Margin="20">
18-
<StackPanel Orientation="Horizontal">
19-
<Label Content="LogName" Margin="10,10,10,10" HorizontalAlignment="Left"/>
20-
<TextBox HorizontalContentAlignment="Stretch" Margin="10,10,10,10" Padding="0,0,0,0" HorizontalAlignment="Right" Text="{Binding LogName, Mode=TwoWay}" MinWidth="200"/>
17+
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20">
18+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
19+
<Label Content="LogName"
20+
Margin="10,10,10,10"
21+
HorizontalAlignment="Left"
22+
VerticalAlignment="Center"
23+
/>
24+
<TextBox HorizontalContentAlignment="Left"
25+
VerticalContentAlignment="Center"
26+
TextAlignment="Left"
27+
Margin="10,10,10,10"
28+
HorizontalAlignment="Right"
29+
Text="{Binding LogName, Mode=TwoWay}"
30+
MinWidth="200" MaxWidth="1000"/>
2131
</StackPanel>
2232
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
23-
<Label Content="PathType" Margin="10,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Center"/>
24-
<TextBox Margin="10,10,10,10" Padding="10,0,10,10" TextAlignment="Center" Text="{Binding Path=PathType, Mode=TwoWay,Converter={StaticResource PathTypeConverter}}"/>
33+
<Label Content="PathType"
34+
Margin="10,10,10,10"
35+
HorizontalAlignment="Left"
36+
VerticalAlignment="Center"/>
37+
<TextBox Margin="10,10,10,10"
38+
HorizontalAlignment="Right"
39+
TextAlignment="Left"
40+
VerticalContentAlignment="Center"
41+
Text="{Binding Path=PathType, Mode=TwoWay,Converter={StaticResource PathTypeConverter}}"/>
2542
</StackPanel>
2643
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
27-
<Button Content="OK" Command="{ Binding OkCommand }"/>
28-
<Button Content="Cancel" Command="{ Binding CancelCommand }"/>
44+
<Button Content="OK" Command="{ Binding OkCommand }" Margin="10" Padding="10"/>
45+
<Button Content="Cancel" Command="{ Binding CancelCommand }" Margin="10" Padding="10"/>
2946
</StackPanel>
3047
</StackPanel>
3148
</Window>

src/WEventViewer/OpenLogWindow.axaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ public OpenLogWindow()
1616
this.Close(msg.isOk);
1717
});
1818
}
19+
20+
private void Binding(object? sender, Avalonia.Controls.SizeChangedEventArgs e)
21+
{
22+
}
1923
}

src/WEventViewer/ViewModel/OpenLogWindowViewModel.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace WEventViewer.ViewModel
1515
{
16-
internal class PathTypeValueConverter : IValueConverter
16+
internal partial class PathTypeValueConverter : IValueConverter
1717
{
1818
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
1919
{
@@ -51,7 +51,7 @@ internal class PathTypeValueConverter : IValueConverter
5151
throw new ArgumentException($"ConvertBack: unsupported type({value?.GetType()})");
5252
}
5353
}
54-
internal class OpenLogWindowViewModel : INotifyPropertyChanged
54+
internal partial class OpenLogWindowViewModel : INotifyPropertyChanged
5555
{
5656
string _LogName = "";
5757
public string LogName { get => _LogName; set
@@ -88,6 +88,11 @@ public OpenLogWindowViewModel()
8888
public ICommand OkCommand { get; private set; }
8989
public ICommand CancelCommand { get; private set; }
9090
public event PropertyChangedEventHandler? PropertyChanged;
91-
91+
[RelayCommand]
92+
public void OnSizeChanged(int WindowWidth)
93+
{
94+
LogNameWidth = WindowWidth;
95+
}
96+
public int LogNameWidth { get; set; }
9297
}
9398
}

0 commit comments

Comments
 (0)