-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainWindow.xaml
166 lines (152 loc) · 8.13 KB
/
MainWindow.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<Window x:Class="Maid.MainWindow"
Name="GameWindow"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Topmost="True"
Visibility ="Visible"
ResizeMode="NoResize"
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:tz="http://schemas.abtsoftware.co.uk/transitionz"
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF"
xmlns:local="clr-namespace:Maid"
mc:Ignorable="d"
ShowInTaskbar="False"
Title="Desktop Maid" Height="200" Width="300" >
<Window.Resources>
<ControlTemplate x:Key="TextBoxBaseControlTemplate" TargetType="{x:Type TextBoxBase}">
<Border Background="{TemplateBinding Background}"
x:Name="Bd" BorderBrush="Black"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="6">
<ScrollViewer x:Name="PART_ContentHost"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" TargetName="Bd"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="Width" Value="Auto">
<Setter Property="MinWidth" Value="0"/>
</Trigger>
<Trigger Property="Height" Value="Auto">
<Setter Property="MinHeight" Value="40"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Canvas Name="Background" Focusable="True" Background="Transparent">
<Rectangle Name="Player" Height="150" Width="150" Canvas.Left="85" Canvas.Top="95" RenderTransformOrigin="0.4,0.4" MouseLeftButtonDown="Player_MouseLeftButtonDown" MouseRightButtonDown="Player_MouseRightButtonDown" MouseLeftButtonUp="Player_MouseLeftButtonUp">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform x:Name="Flip" ScaleY="1" ScaleX="1"/>
<SkewTransform AngleY="0" AngleX="0"/>
<RotateTransform x:Name="Rotate" Angle="0"/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
<Rectangle.Fill>
<ImageBrush ImageSource="images/idle1.png"/>
</Rectangle.Fill>
</Rectangle>
<Grid Name="MenuGrid" Height="100" Width="55" Canvas.Left="55" Canvas.Top="100" Visibility="Hidden"
tz:Transitionz.Visibility="{Binding ElementName=MenuGrid, Path=Visibility}"
tz:Transitionz.Translate="{tz:TranslateParams From='10,0', To='0,0', Duration=200, TransitionOn=Visibility}"
tz:Transitionz.Opacity="{tz:OpacityParams From=0, To=1, Duration=200, TransitionOn=Visibility}">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Ellipse
Grid.Row="0"
Height="40"
Width="40"
Fill="#FFFFF7FE">
</Ellipse>
<Ellipse
Name ="Settings"
Grid.Row="0"
Height="40"
Width="40"
StrokeThickness="3" Stroke="#FFFFCDDE" MouseLeftButtonDown="Settings_MouseLeftButtonDown">
<Ellipse.Fill>
<ImageBrush ImageSource="images/settings.png">
<ImageBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="0.8" ScaleX="0.8"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform/>
</TransformGroup>
</ImageBrush.RelativeTransform>
</ImageBrush>
</Ellipse.Fill>
</Ellipse>
<Ellipse
Grid.Row="1"
Height="40"
Width="40"
Fill="#FFFFF7FE">
</Ellipse>
<Ellipse
Grid.Row="1"
Height="40"
Width="40"
StrokeThickness="3" Stroke="#FFFFCDDE">
<Ellipse.Fill>
<ImageBrush ImageSource="images/bell.png">
<ImageBrush.Transform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform Y="-1.1"/>
</TransformGroup>
</ImageBrush.Transform>
<ImageBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterY="0.5" CenterX="0.5" ScaleY="0.8" ScaleX="0.8"/>
<SkewTransform CenterY="0.5" CenterX="0.5"/>
<RotateTransform CenterY="0.5" CenterX="0.5"/>
<TranslateTransform/>
</TransformGroup>
</ImageBrush.RelativeTransform>
</ImageBrush>
</Ellipse.Fill>
</Ellipse>
</Grid>
<Grid Name="SpeechGrid" Height="200" Width="300" Visibility="Hidden"
tz:Transitionz.Visibility="{Binding ElementName=SpeechGrid, Path=Visibility}"
tz:Transitionz.Translate="{tz:TranslateParams From='0,10', To='0,0', Duration=400, TransitionOn=Visibility}"
tz:Transitionz.Opacity="{tz:OpacityParams From=0, To=1, Duration=200, TransitionOn=Visibility}">
<Rectangle Name="SpeechBoxPointer" Canvas.Left="140" Canvas.Top="66" Visibility="Visible" RenderTransformOrigin="0.5,0.5" Margin="146,83,149,112">
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="-2" ScaleX="-2"/>
<SkewTransform/>
<RotateTransform Angle="45"/>
<TranslateTransform/>
</TransformGroup>
</Rectangle.RenderTransform>
<Rectangle.Fill>
<SolidColorBrush Color="#FFFFF7FE"/>
</Rectangle.Fill>
</Rectangle>
<Grid Height="86" Canvas.Left="52" Width="200" Margin="50,0,50,114">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBox Template="{StaticResource TextBoxBaseControlTemplate}" Grid.Column="1" Name="SpeechBox" Canvas.Left="0" TextWrapping="Wrap" TextAlignment="Center" Text="Good morning!" FontSize = "16"
Canvas.Top="0" TextChanged="TextBox_TextChanged" Visibility="Visible" FontFamily="Fredoka" Background="#FFFFF7FE" BorderThickness="0"
VerticalAlignment="Bottom" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
IsInactiveSelectionHighlightEnabled="True" MaxWidth="200" MaxHeight="90" Padding="7,7,7,10"
AllowDrop="False" IsTabStop="False" RenderTransformOrigin="0.505,0.486" HorizontalScrollBarVisibility="Visible" Margin="0.017,0,2,0" UseLayoutRounding="False"
Focusable="False" HorizontalAlignment="Center" FontWeight="Medium" Foreground="#FF0E0E0E"/>
</Grid>
</Grid>
</Canvas>
</Window>