File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ private void AddLogging(ILoggingBuilder loggingBuilder)
156
156
config . AddRuleForAllLevels ( uiTarget ) ;
157
157
158
158
loggingBuilder . ClearProviders ( ) ;
159
+ loggingBuilder . AddFilter ( "System.Net.Http.HttpClient" , LogLevel . Warning ) ;
159
160
loggingBuilder . SetMinimumLevel ( LogLevel . Information ) ;
160
161
loggingBuilder . AddNLog ( config ) ;
161
162
}
Original file line number Diff line number Diff line change 8
8
d : DesignHeight =" 450"
9
9
d : DesignWidth =" 800"
10
10
mc : Ignorable =" d" >
11
+ <UserControl .Resources>
12
+ <CollectionViewSource x : Key =" FilteredRows"
13
+ Source =" {Binding LoggerProvider.MessageLog}"
14
+ Filter =" CollectionViewSource_Filter" />
15
+ </UserControl .Resources>
11
16
<Border x : Name =" BorderMask2" CornerRadius =" 8" BorderThickness =" 0" Background =" White" >
12
17
<Grid Margin =" -1" >
13
18
<Border x : Name =" BorderMask" CornerRadius =" 8" Background =" White" Margin =" 1" />
19
24
local:AutoScrollBehavior.ScrollOnNewItem=" True"
20
25
BorderBrush =" Transparent"
21
26
BorderThickness =" 0"
22
- ItemsSource =" {Binding LoggerProvider.MessageLog }"
27
+ ItemsSource =" {Binding Source={StaticResource FilteredRows} }"
23
28
ScrollViewer.HorizontalScrollBarVisibility=" Disabled"
24
29
AlternationCount =" 2" >
25
30
<ListBox .Resources>
Original file line number Diff line number Diff line change 1
- using System . Windows ;
2
- using System . Windows . Controls ;
1
+ using System . Windows . Controls ;
2
+ using static Wabbajack . Models . LogStream ;
3
3
4
4
namespace Wabbajack ;
5
5
@@ -8,9 +8,14 @@ namespace Wabbajack;
8
8
/// </summary>
9
9
public partial class LogView : UserControl
10
10
{
11
-
12
11
public LogView ( )
13
12
{
14
13
InitializeComponent ( ) ;
15
14
}
15
+
16
+ private void CollectionViewSource_Filter ( object sender , System . Windows . Data . FilterEventArgs e )
17
+ {
18
+ var row = e . Item as ILogMessage ;
19
+ e . Accepted = row . Level . Ordinal >= 2 ;
20
+ }
16
21
}
Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ public InstallationView()
88
88
switch ( result )
89
89
{
90
90
case InstallResult . DownloadFailed :
91
- /*
92
- this.BindCommand(ViewModel, vm => vm.OpenInstallFolderCommand, v => v.StoppedButton)
93
- .DisposeWith(disposables);
94
- */
95
91
StoppedButton . Command = ViewModel . OpenMissingArchivesCommand ;
96
92
StoppedButton . Icon = Symbol . DocumentGlobe ;
97
93
StoppedButton . Text = "Show Missing Archives" ;
@@ -142,7 +138,7 @@ public InstallationView()
142
138
. Subscribe ( x =>
143
139
{
144
140
InstallationLocationPicker . Watermark = x ;
145
- if ( ViewModel ? . Installer ? . Location != null )
141
+ if ( string . IsNullOrEmpty ( ViewModel ? . Installer ? . Location ? . TargetPath . ToString ( ) ) )
146
142
ViewModel . Installer . Location . TargetPath = ( AbsolutePath ) x ;
147
143
} )
148
144
. DisposeWith ( disposables ) ;
@@ -152,7 +148,7 @@ public InstallationView()
152
148
. Subscribe ( x =>
153
149
{
154
150
DownloadLocationPicker . Watermark = x ;
155
- if ( ViewModel ? . Installer ? . Location != null )
151
+ if ( string . IsNullOrEmpty ( ViewModel ? . Installer ? . Location ? . TargetPath . ToString ( ) ) )
156
152
ViewModel . Installer . DownloadLocation . TargetPath = ( AbsolutePath ) x ;
157
153
} )
158
154
. DisposeWith ( disposables ) ;
You can’t perform that action at this time.
0 commit comments