-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
102 lines (91 loc) · 5.2 KB
/
MainWindow.xaml
File metadata and controls
102 lines (91 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<Window x:Class="TextAnalyzer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TextAnalyzer"
mc:Ignorable="d"
Title="Text Analyzer" Height="600" Width="900"
WindowStartupLocation="CenterScreen"
Background="#FF2D2D30">
<Window.Resources>
<Style TargetType="TextBox">
<Setter Property="Background" Value="#FF252526"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#FF555555"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="AcceptsReturn" Value="True"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="Label">
<Setter Property="Foreground" Value="#FFAAAAAA"/>
</Style>
<Style TargetType="ListView">
<Setter Property="Background" Value="#FF252526"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#FF555555"/>
</Style>
</Window.Resources>
<DockPanel>
<StatusBar DockPanel.Dock="Bottom" Background="#FF333337" Height="24">
<StatusBarItem HorizontalAlignment="Right">
<TextBlock Text="made by fleim" Foreground="#FFAAAAAA" Margin="0,0,10,0"/>
</StatusBarItem>
</StatusBar>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="InputTextBox" Grid.Column="0" Margin="0,0,10,0" FontSize="14"
TextChanged="InputTextBox_TextChanged"
GotFocus="InputTextBox_GotFocus"
LostFocus="InputTextBox_LostFocus"
VerticalContentAlignment="Top"/>
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="10,0,0,0">
<TextBlock Text="Анализ текста" FontSize="20" FontWeight="Bold" Margin="0,0,0,15"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Слов:" FontWeight="Bold"/>
<TextBlock x:Name="WordsCountLabel" Grid.Row="0" Grid.Column="1" Text="0" />
<Label Grid.Row="1" Grid.Column="0" Content="Символов:" FontWeight="Bold"/>
<TextBlock x:Name="CharsCountLabel" Grid.Row="1" Grid.Column="1" Text="0" />
<Label Grid.Row="2" Grid.Column="0" Content="Предложений:" FontWeight="Bold"/>
<TextBlock x:Name="SentencesCountLabel" Grid.Row="2" Grid.Column="1" Text="0" />
<Label Grid.Row="3" Grid.Column="0" Content="Абзацев:" FontWeight="Bold"/>
<TextBlock x:Name="ParagraphsCountLabel" Grid.Row="3" Grid.Column="1" Text="0" />
<Label Grid.Row="4" Grid.Column="0" Content="Время чтения:" FontWeight="Bold"/>
<TextBlock x:Name="ReadingTimeLabel" Grid.Row="4" Grid.Column="1" Text="~ 0 сек" />
</Grid>
<TextBlock Text="Частота слов (Топ 10)" FontSize="16" FontWeight="Bold" Margin="0,20,0,10"/>
<ListView x:Name="FrequencyListView" Height="200">
<ListView.View>
<GridView>
<GridViewColumn Header="Слово" Width="120" DisplayMemberBinding="{Binding Key}"/>
<GridViewColumn Header="Частота" Width="80" DisplayMemberBinding="{Binding Value}"/>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
</ScrollViewer>
</Grid>
</DockPanel>
</Window>