192 lines
14 KiB
XML
192 lines
14 KiB
XML
<Window x:Class="DataBase.MainWindow" x:Name="MWindow"
|
|
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:DataBase"
|
|
mc:Ignorable="d"
|
|
Title="MainWindow" Height="540" Width="960" MinHeight="540" MinWidth="960" ResizeMode="CanResize" WindowStartupLocation="CenterScreen" WindowStyle="None">
|
|
<Grid x:Name="Grid" Background="{StaticResource BG3}">
|
|
<Label x:Name="OutputBox" Width="400" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Margin="0,100,0,0" FontSize="28" Padding="5,5,5,5" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{DynamicResource TextColor}"/>
|
|
<TextBox x:Name="InputBox" Height="50" VerticalAlignment="Center" HorizontalAlignment="Center" Width="400" Margin="0,-100,0,0" FontSize="28" Padding="5,5,5,5" ScrollViewer.CanContentScroll="True" Foreground="{DynamicResource TextColor}" Background="{x:Null}" BorderBrush="{x:Null}" PreviewTextInput="InputBox_PreviewTextInput"/>
|
|
<Rectangle x:Name="Rectangle" Height="35" VerticalAlignment="Top" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="{DynamicResource PanelTopColor}"/>
|
|
<Label Content="Сумма к уплате" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="400" FontSize="24" Padding="0,5,5,5" UseLayoutRounding="True" Background="{x:Null}" Foreground="{DynamicResource TextColor}"/>
|
|
<Label Content="Текущие показания" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="400" FontSize="24" Padding="0,5,5,5" UseLayoutRounding="True" Margin="0,0,0,200" Foreground="{DynamicResource TextColor}" Background="{x:Null}"/>
|
|
<Button x:Name="Calculate" Content="РАССЧИТАТЬ" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,300,0,0" Height="50" Width="200" FontSize="24" BorderBrush="{x:Null}" Background="{DynamicResource BG1}" Padding="0,0,0,4" Foreground="{DynamicResource TextColor}" Click="Calculate_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Button x:Name="Calculate" Background="{DynamicResource BG1}" Content="РАССЧИТАТЬ" FontSize="24" BorderBrush="{x:Null}" Padding="0,0,0,4" Foreground="{DynamicResource TextColor}"/>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Calculate" Property="Background" Value="{DynamicResource BG2}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Calculate" Property="Background" Value="{DynamicResource BG1}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Button x:Name="Exit" Content="" HorizontalAlignment="Right" VerticalAlignment="Top" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,-13,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" Click="Exit_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/Exit_Gray.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Exit.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Exit_Gray.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Button x:Name="Min" Content="" VerticalAlignment="Top" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,-13,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" Click="Min_Click" HorizontalAlignment="Right" Margin="0,0,70,0">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/Min_Gray.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Min.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Min_Gray.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Rectangle x:Name="Stick" Height="4" VerticalAlignment="Center" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="{DynamicResource BG1}" HorizontalAlignment="Center" Width="400" Margin="0,0,0,45"/>
|
|
<Rectangle x:Name="Stick2" Height="4" VerticalAlignment="Center" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="{DynamicResource BG1}" HorizontalAlignment="Center" Width="400" Margin="0,155,0,0"/>
|
|
<Label x:Name="Error" Content="* Ошибка" HorizontalContentAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Width="400" FontSize="24" Padding="0,5,5,0" UseLayoutRounding="True" Background="{x:Null}" Foreground="#fc6d6d" Margin="0,200,0,0"/>
|
|
<Button x:Name="Slide" Content="" VerticalAlignment="Top" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,-13,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" HorizontalAlignment="Left" Click="Slide_Click" Margin="3,0,0,0">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/slideB.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/slideP.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/slideB.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Grid x:Name="BDgrid" Visibility="Hidden">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height ="35"/>
|
|
<RowDefinition Height ="35"/>
|
|
<RowDefinition Height ="35"/>
|
|
<RowDefinition Height ="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Label x:Name="BDerror" Content="Label" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="400" Height="30" FontSize="20" Foreground="{DynamicResource TextColor}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="5,0,5,5"/>
|
|
<TextBox x:Name="CommandTB" Grid.Row="2" Foreground="{DynamicResource TextColor}" VerticalAlignment="Center" Height="35" BorderBrush="{x:Null}" Background="{x:Null}" FontSize="16" VerticalContentAlignment="Center" KeyDown="CommandTB_KeyDown" HorizontalAlignment="Center" Width="775" Margin="0,0,40,0"/>
|
|
<DataGrid x:Name="BD" AutoGenerateColumns="True" Grid.Row="4" Foreground="{DynamicResource TextColor}"
|
|
Background="{DynamicResource GridBackgroundColor2}" d:ItemsSource="{d:SampleData ItemCount=5}" RowBackground ="{DynamicResource GridBackgroundColor2}"
|
|
HorizontalGridLinesBrush="{DynamicResource GridLineColor}" VerticalGridLinesBrush="{DynamicResource GridLineColor}"
|
|
FontSize="18" BorderBrush="{DynamicResource GridLineColor}" BorderThickness="2,1,2,1">
|
|
<DataGrid.Resources>
|
|
<Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}">
|
|
<Setter Property="Background" Value="{DynamicResource GridBackgroundColor2}"/>
|
|
</Style>
|
|
<Style BasedOn="{StaticResource {x:Type DataGridRowHeader}}" TargetType="{x:Type DataGridRowHeader}">
|
|
<Setter Property="Background" Value="{DynamicResource GridBackgroundColor2}"/>
|
|
<Setter Property="Width" Value="0"/>
|
|
</Style>
|
|
</DataGrid.Resources>
|
|
</DataGrid>
|
|
<Rectangle x:Name="Stick3" Height="4" VerticalAlignment="Center" MouseLeftButtonDown="Rectangle_MouseLeftButtonDown" Fill="{DynamicResource BG1}" Grid.Row="2" Width="775" HorizontalAlignment="Center" Margin="0,30,40,0"/>
|
|
<Button x:Name="Enter" Content="" HorizontalAlignment="Right" VerticalAlignment="Center" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,0,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" Grid.Row="2" Click="Enter_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/Enter.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/EnterP.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Enter.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</Grid>
|
|
<Button x:Name="Back" Content="" VerticalAlignment="Top" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,-13,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" HorizontalAlignment="Left" Margin="38,0,0,0" Click="Back_Click">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/Back.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/BackP.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Back.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Button x:Name="Maximize" Content="" VerticalAlignment="Top" Background="{DynamicResource PanelTopColor}" BorderBrush="{DynamicResource PanelTopColor}" Height="35" Width="35" Foreground="{x:Null}" FontSize="48" Padding="0,-13,0,0" FontFamily="Segoe UI Symbol" UseLayoutRounding="True" ScrollViewer.CanContentScroll="True" Click="Maximize_Click" HorizontalAlignment="Right" Margin="0,0,35,0">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Image x:Name="image"
|
|
Stretch="Fill" Source="/Assets/Maximize.png" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/MaximizeP.png" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed"
|
|
Value="true">
|
|
<Setter TargetName="image"
|
|
Property="Source"
|
|
Value="Assets/Maximize.png" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</Grid>
|
|
</Window>
|