-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow1.xaml
96 lines (84 loc) · 6.56 KB
/
Window1.xaml
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
<Window x:Class="Protonox.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Loaded="Window_Loaded" Closed="Window_Closed" SizeChanged="HandleOnResize"
Title="OCR Translator" Height="250" Width="350" AllowsTransparency="True" WindowStyle="None" ResizeMode="CanMinimize" WindowState="Maximized" Topmost="True">
<Window.Background>
<SolidColorBrush Opacity="0.05" Color="Black"/>
</Window.Background>
<Window.Resources>
<Style x:Key="ComboBoxTest2" TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton Grid.Column="2" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" >
<ToggleButton.Template>
<ControlTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="5" Background="RED" BorderBrush="White" BorderThickness="1" />
<Border Grid.Column="0" CornerRadius="5,0,0,5" Margin="1" Background="RED" BorderBrush="White" BorderThickness="0,0,1,0" />
<Path x:Name="Arrow" Grid.Column="1" Fill="White" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Background" Value="#AA0000" />
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="true">
<Setter TargetName="Border" Property="Background" Value="#AA0000" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<ContentPresenter Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3" />
<TextBox x:Name="PART_EditableTextBox" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}"/>
<Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder" Background="RED" />
<ScrollViewer SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="75*"/>
<RowDefinition Height="88*"/>
<RowDefinition Height="87*"/>
</Grid.RowDefinitions>
<Label Name="outputText" Grid.Row="0" Content="Toggle Overlay Shift+Alt+Space" ClipToBounds="False"
HorizontalAlignment="Center" VerticalAlignment="Bottom"
HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom"
Foreground="WHITE" Background="#AA000000"
FontWeight="Bold" FontSize="20" FontFamily="Segoe UI Semilight Italic"></Label>
<Canvas Name="CanvasMain" Background="Transparent" MouseDown="HandleMouseDown_canvas1" MouseMove="HandleMouseMove_canvas1" MouseUp="HandleMouseUp_canvas1" Grid.RowSpan="3">
<Border Name="SelectionBorder" BorderBrush="Red" BorderThickness="1" Canvas.Left="50" Canvas.Top="100" Width="350" Height="80" />
</Canvas>
<WrapPanel Grid.Row="0" Width="305" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="5 5 5 5">
<Button Width="45" Height="45" Foreground="WHITE" Background="Red" Content="TTS" FontWeight="Bold" FontSize="25" Click="HandleOnClick_ButtonTTS" Name="TTSButton"></Button>
<ComboBox Width="125" Height="45" Foreground="WHITE" Background="Red" FontWeight="Bold" FontSize="25" Name="VoiceDropdown" Style="{StaticResource ComboBoxTest2}"></ComboBox>
<Button Width="45" Height="45" Foreground="WHITE" Background="Red" Content="Init" FontWeight="Bold" FontSize="25" Click="HandleOnClick_ButtonInit" Name="InitButton"></Button>
<Button Width="45" Height="45" Foreground="WHITE" Background="Red" Content="_" FontWeight="Bold" FontSize="25" Click="HandleOnClick_ButtonToggle"></Button>
<Button Width="45" Height="45" Foreground="WHITE" Background="Red" Content="X" FontWeight="Bold" FontSize="25" Click="HandleOnClick_ButtonExit"></Button>
<Label Foreground="White" Content="Volume " />
<Slider Width="225" Margin="0 5 0 0" Value="50" Minimum="0" Maximum="100" Name="VolumeSlider" />
<Label Foreground="White" Content="Stability " />
<Slider Width="225" Margin="0 5 0 0" Value="75" Minimum="0" Maximum="100" Name="StabilitySlider" />
<Label Foreground="White" Content="Similarity" />
<Slider Width="225" Margin="0 5 0 0" Value="75" Minimum="0" Maximum="100" Name="SimilaritySlider" />
</WrapPanel>
</Grid>
</Window>