File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 10
10
UseLayoutRounding =" True"
11
11
WindowStartupLocation =" CenterScreen"
12
12
TitleTextAlignment =" Center"
13
- Title =" MemPlus - Application Logs" Height =" 300" Width =" 300" >
13
+ Title =" MemPlus - Application Logs" Height =" 300" Width =" 300" Icon = " /MemPlus;component/Resources/ram.png " >
14
14
<Grid >
15
15
<Grid .RowDefinitions>
16
16
<RowDefinition ></RowDefinition >
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Diagnostics ;
3
2
using System . Linq ;
4
- using System . Windows ;
5
3
using System . Windows . Controls ;
6
4
using System . Windows . Controls . Primitives ;
7
5
using MemPlus . Classes ;
@@ -66,8 +64,7 @@ private void LogAddedEvent(Log log)
66
64
67
65
if ( _autoScroll )
68
66
{
69
- LsvLogs . SelectedIndex = LsvLogs . Items . Count - 1 ;
70
- LsvLogs . ScrollIntoView ( LsvLogs . SelectedItem ) ;
67
+ LsvLogs . ScrollIntoView ( LsvLogs . Items [ LsvLogs . Items . Count - 1 ] ) ;
71
68
}
72
69
} ) ;
73
70
}
@@ -81,9 +78,9 @@ private void ChangeVisualStyle()
81
78
82
79
private void LsvLogs_OnScroll ( object sender , ScrollEventArgs e )
83
80
{
84
- ScrollBar sb = e . OriginalSource as ScrollBar ;
81
+ if ( ! ( e . OriginalSource is ScrollBar sb ) ) return ;
85
82
86
- if ( sb != null && sb . Orientation == Orientation . Horizontal )
83
+ if ( sb . Orientation == Orientation . Horizontal )
87
84
return ;
88
85
_autoScroll = Math . Abs ( sb . Value - sb . Maximum ) < 1 ;
89
86
}
You can’t perform that action at this time.
0 commit comments