<commit_before>﻿<Window x:Class="DiskGazer.Views.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:views="clr-namespace:DiskGazer.Views"
		xmlns:controls="clr-namespace:DiskGazer.Views.Controls"
		xmlns:converters="clr-namespace:DiskGazer.Views.Converters"
		x:Name="MainWindowRoot"
		Title="{Binding Source={x:Static views:ProductInfo.NameVersionShort}, Mode=OneWay}"
		FontFamily="Verdana" FontSize="11"
		Width="600" Height="460"
		Icon="/DiskGazer;component/Resources/Gazer.ico">
	<Window.Resources>
		<ResourceDictionary>
			<!-- Converters -->
			<converters:DoubleScaleConverter x:Key="DoubleScaleConverterKey"/>
			<converters:TripleDigitConverter x:Key="TripleDigitConverterKey"/>
			<converters:ReadMethodToBooleanConverter x:Key="ReadMethodToBooleanConverterKey"/>

			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="Styles/Icons.xaml"/>
				<ResourceDictionary Source="Styles/Gazer.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>

	<Window.CommandBindings>
		<CommandBinding Command="ApplicationCommands.Open"
						Executed="OpenExecuted"
						CanExecute="CanOpenExecute"/>
		<CommandBinding Command="ApplicationCommands.Close"
						Executed="CloseExecuted"
						CanExecute="CanCloseExecute"/>
	</Window.CommandBindings>

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<!-- Height of lower row may be set to star. -->
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<Grid x:Name="GridDashboard">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>

			<!-- Top menu -->
			<Menu Grid.Row="0"
				  x:Name="MenuTop"
				  FontFamily="{Binding FontFamily, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
				  Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
				  Height="21" HorizontalAlignment="Left" VerticalAlignment="Top"
				  Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}">
				<!-- File -->
				<MenuItem x:Name="MenuItemFile"
						  Height="21"
						  Header="_File"
						  SubmenuOpened="MenuItemFile_SubmenuOpened" SubmenuClosed="MenuItemFile_SubmenuClosed">
					<MenuItem Header="Save screenshot to file"
							  Command="{Binding SaveScreenshotFileCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource CameraIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<MenuItem Header="Save log to file"
							  Command="{Binding SaveLogFileCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource SaveIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<MenuItem Header="Send log to clipboard"
							  Command="{Binding SendLogClipboardCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource CopyIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<Separator/>

					<!-- Rescan disks -->
					<MenuItem Header="Rescan disks"
							  Command="{Binding RescanCommand}"
							  IsEnabled="{Binding Op.IsReady, Mode=OneWay}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource RefreshIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<Separator/>

					<!-- Options -->
					<MenuItem Header="Options">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource SettingsIcon}"/>
						</MenuItem.Icon>

						<!-- Read method -->
						<StackPanel>
							<RadioButton
								Margin="2,4,0,3" Padding="0"
								Content="Read by native method"
								IsChecked="{Binding SettingsCurrent.Method, Mode=TwoWay,
								Converter={StaticResource ReadMethodToBooleanConverterKey}, ConverterParameter=Native}"
								IsEnabled="{Binding Op.IsReady, Mode=OneWay}"/>
							<RadioButton
								Margin="2,3,0,4" Padding="0"
								Content="Read by P/Invoke method"
								IsChecked="{Binding SettingsCurrent.Method, Mode=TwoWay,
								Converter={StaticResource ReadMethodToBooleanConverterKey}, ConverterParameter=P_Invoke}"
								IsEnabled="{Binding Op.IsReady, Mode=OneWay}"/>
						</StackPanel>
						<Separator/>

						<!-- Area fineness -->
						<Grid Margin="0,2,0,2">
							<TextBlock
								Margin="0,4,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
								Text="Fineness of area/location"/>
							<ComboBox
								x:Name="ComboBoxAreaFineness"
								Width="56" Margin="156,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
								FontSize="11"
								ItemsSource="{Binding MenuAreaFineness, Mode=OneTime}"
								SelectedItem="{Binding AreaFineness, Mode=TwoWay, Converter={StaticResource TripleDigitConverterKey}, ConverterParameter=2}"/>
						</Grid>
						<Separator/>

						<MenuItem Header="Remove outliers from data"
								  IsCheckable="True"
								  IsChecked="{Binding SettingsCurrent.RemovesOutlier, Mode=TwoWay}"/>
						<MenuItem Header="Slide chart line to current location"
								  IsCheckable="True"
								  IsChecked="{Binding SlidesLine, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<MenuItem Header="Save screenshot and log automatically"
								  IsCheckable="True"
								  IsChecked="{Binding SettingsCurrent.SavesScreenshotLog, Mode=TwoWay}"/>
						<Separator/>

						<MenuItem x:Name="MenuItemOpen"
								  Header="Open monitor window"
								  Command="ApplicationCommands.Open"/>
						<MenuItem Header="Indicate window/chart size"
								  IsCheckable="True"
								  IsChecked="{Binding IndicatesSize, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</MenuItem>
					<Separator/>

					<!-- Exit -->
					<MenuItem Header="Exit"
							  Command="ApplicationCommands.Close"/>
				</MenuItem>

				<!-- Chart -->
				<MenuItem Height="21"
						  Header="_Chart">
					<Grid Margin="0,2,0,2">
						<!-- Chart max -->
						<CheckBox
							Margin="0,3,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
							Content="Fix maximum"
							IsChecked="{Binding IsChartMaxFixed, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<TextBox
							Width="40" Height="18" Margin="106,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
							VerticalContentAlignment="Center" TextAlignment="Center" IsReadOnly="True" FontSize="11"
							Text="{Binding Value, ElementName=SliderChartMax, Mode=OneWay}"/>
						<Slider
							x:Name="SliderChartMax"
							Width="80" Margin="158,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
							Minimum="50" Maximum="1000" SmallChange="50" LargeChange="100"
							Value="{Binding ChartMax, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</Grid>
					<Grid Margin="0,2,0,2">
						<!-- Chart min -->
						<CheckBox
							Margin="0,3,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
							Content="Fix minimum"
							IsChecked="{Binding IsChartMinFixed, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<TextBox
							Width="40" Height="18" Margin="106,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
							VerticalContentAlignment="Center" TextAlignment="Center" IsReadOnly="True" FontSize="11"
							Text="{Binding Value, ElementName=SliderChartMin, Mode=OneWay}"/>
						<Slider
							x:Name="SliderChartMin"
							Width="80" Margin="154,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
							Minimum="0" Maximum="950" SmallChange="50" LargeChange="100"
							Value="{Binding ChartMin, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</Grid>
					<Separator/>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>

						<!-- Color bar -->
						<TextBlock Margin="0,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"<commit_msg>Change slider for chart to slider plus<commit_after>﻿<Window x:Class="DiskGazer.Views.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:views="clr-namespace:DiskGazer.Views"
		xmlns:controls="clr-namespace:DiskGazer.Views.Controls"
		xmlns:converters="clr-namespace:DiskGazer.Views.Converters"
		x:Name="MainWindowRoot"
		Title="{Binding Source={x:Static views:ProductInfo.NameVersionShort}, Mode=OneWay}"
		FontFamily="Verdana" FontSize="11"
		Width="600" Height="460"
		Icon="/DiskGazer;component/Resources/Gazer.ico">
	<Window.Resources>
		<ResourceDictionary>
			<!-- Converters -->
			<converters:DoubleScaleConverter x:Key="DoubleScaleConverterKey"/>
			<converters:TripleDigitConverter x:Key="TripleDigitConverterKey"/>
			<converters:ReadMethodToBooleanConverter x:Key="ReadMethodToBooleanConverterKey"/>

			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="Styles/Icons.xaml"/>
				<ResourceDictionary Source="Styles/Gazer.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>

	<Window.CommandBindings>
		<CommandBinding Command="ApplicationCommands.Open"
						Executed="OpenExecuted"
						CanExecute="CanOpenExecute"/>
		<CommandBinding Command="ApplicationCommands.Close"
						Executed="CloseExecuted"
						CanExecute="CanCloseExecute"/>
	</Window.CommandBindings>

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<!-- Height of lower row may be set to star. -->
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<Grid x:Name="GridDashboard">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>

			<!-- Top menu -->
			<Menu Grid.Row="0"
				  x:Name="MenuTop"
				  FontFamily="{Binding FontFamily, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
				  Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
				  Height="21" HorizontalAlignment="Left" VerticalAlignment="Top"
				  Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}">
				<!-- File -->
				<MenuItem x:Name="MenuItemFile"
						  Height="21"
						  Header="_File"
						  SubmenuOpened="MenuItemFile_SubmenuOpened" SubmenuClosed="MenuItemFile_SubmenuClosed">
					<MenuItem Header="Save screenshot to file"
							  Command="{Binding SaveScreenshotFileCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource CameraIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<MenuItem Header="Save log to file"
							  Command="{Binding SaveLogFileCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource SaveIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<MenuItem Header="Send log to clipboard"
							  Command="{Binding SendLogClipboardCommand}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource CopyIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<Separator/>

					<!-- Rescan disks -->
					<MenuItem Header="Rescan disks"
							  Command="{Binding RescanCommand}"
							  IsEnabled="{Binding Op.IsReady, Mode=OneWay}">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource RefreshIcon}"/>
						</MenuItem.Icon>
					</MenuItem>
					<Separator/>

					<!-- Options -->
					<MenuItem Header="Options">
						<MenuItem.Icon>
							<Viewbox Child="{StaticResource SettingsIcon}"/>
						</MenuItem.Icon>

						<!-- Read method -->
						<StackPanel>
							<RadioButton
								Margin="2,4,0,3" Padding="0"
								Content="Read by native method"
								IsChecked="{Binding SettingsCurrent.Method, Mode=TwoWay,
								Converter={StaticResource ReadMethodToBooleanConverterKey}, ConverterParameter=Native}"
								IsEnabled="{Binding Op.IsReady, Mode=OneWay}"/>
							<RadioButton
								Margin="2,3,0,4" Padding="0"
								Content="Read by P/Invoke method"
								IsChecked="{Binding SettingsCurrent.Method, Mode=TwoWay,
								Converter={StaticResource ReadMethodToBooleanConverterKey}, ConverterParameter=P_Invoke}"
								IsEnabled="{Binding Op.IsReady, Mode=OneWay}"/>
						</StackPanel>
						<Separator/>

						<!-- Area fineness -->
						<Grid Margin="0,2,0,2">
							<TextBlock
								Margin="0,4,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"
								Text="Fineness of area/location"/>
							<ComboBox
								x:Name="ComboBoxAreaFineness"
								Width="56" Margin="156,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
								FontSize="11"
								ItemsSource="{Binding MenuAreaFineness, Mode=OneTime}"
								SelectedItem="{Binding AreaFineness, Mode=TwoWay, Converter={StaticResource TripleDigitConverterKey}, ConverterParameter=2}"/>
						</Grid>
						<Separator/>

						<MenuItem Header="Remove outliers from data"
								  IsCheckable="True"
								  IsChecked="{Binding SettingsCurrent.RemovesOutlier, Mode=TwoWay}"/>
						<MenuItem Header="Slide chart line to current location"
								  IsCheckable="True"
								  IsChecked="{Binding SlidesLine, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<MenuItem Header="Save screenshot and log automatically"
								  IsCheckable="True"
								  IsChecked="{Binding SettingsCurrent.SavesScreenshotLog, Mode=TwoWay}"/>
						<Separator/>

						<MenuItem x:Name="MenuItemOpen"
								  Header="Open monitor window"
								  Command="ApplicationCommands.Open"/>
						<MenuItem Header="Indicate window/chart size"
								  IsCheckable="True"
								  IsChecked="{Binding IndicatesSize, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</MenuItem>
					<Separator/>

					<!-- Exit -->
					<MenuItem Header="Exit"
							  Command="ApplicationCommands.Close"/>
				</MenuItem>

				<!-- Chart -->
				<MenuItem Height="21"
						  Header="_Chart">
					<Grid Margin="0,2,0,2">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>

						<!-- Chart max -->
						<CheckBox
							x:Name="CheckBoxChartMax"
							MinWidth="{Binding ActualWidth, ElementName=CheckBoxChartMin}"
							VerticalAlignment="Center"
							Content="Fix chart max level"
							IsChecked="{Binding IsChartMaxFixed, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<TextBox
							Grid.Column="1" Grid.Row="0"
							Width="50" Height="18" Margin="5,3,0,0" VerticalAlignment="Center"
							VerticalContentAlignment="Center" TextAlignment="Center" IsReadOnly="True" FontSize="11"
							Text="{Binding Value, ElementName=SliderChartMax, Mode=OneWay}"/>
						<Slider
							Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
							x:Name="SliderChartMax"
							Style="{StaticResource SliderPlusStyle}"
							Height="18" Margin="20,5,0,3"
							SmallChange="50" LargeChange="100"
							IsSnapToTickEnabled="True"
							TickFrequency="50"
							Minimum="50" Maximum="10000"
							Value="{Binding ChartMax, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</Grid>
					<Grid Margin="0,2,0,2">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>

						<!-- Chart min -->
						<CheckBox
							x:Name="CheckBoxChartMin"
							MinWidth="{Binding ActualWidth, ElementName=CheckBoxChartMax}"
							VerticalAlignment="Center"
							Content="Fix chart min level"
							IsChecked="{Binding IsChartMinFixed, ElementName=MainWindowRoot, Mode=TwoWay}"/>
						<TextBox
							Grid.Column="1" Grid.Row="0"
							Width="50" Height="18" Margin="5,3,0,0" VerticalAlignment="Center"
							VerticalContentAlignment="Center" TextAlignment="Center" IsReadOnly="True" FontSize="11"
							Text="{Binding Value, ElementName=SliderChartMin, Mode=OneWay}"/>
						<Slider
							Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
							x:Name="SliderChartMin"
							Style="{StaticResource SliderPlusStyle}"
							Height="18" Margin="20,5,0,3"
							SmallChange="50" LargeChange="100"
							IsSnapToTickEnabled="True"
							TickFrequency="50"
							Minimum="0" Maximum="9950"
							Value="{Binding ChartMin, ElementName=MainWindowRoot, Mode=TwoWay}"/>
					</Grid>
					<Separator/>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>

						<!-- Color bar -->
						<TextBlock Margin="0,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Top"
{'fraction_non_alphanumeric': 0.14113659747019305, 'fraction_numerical': 0.016098771409550326, 'mean_word_length': 3.5912753542650737, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 0, '>': 227, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2349958', 'n_tokens_mistral': 6865, 'n_tokens_neox': 4705, 'n_words': 819}