Prechádzať zdrojové kódy

Конец близок

Бальтазар Лолронов 2 rokov pred
rodič
commit
062d6415a4
4 zmenil súbory, kde vykonal 56 pridanie a 1 odobranie
  1. 10 1
      Pages/Agents.xaml
  2. 7 0
      PracticaDemoexam.csproj
  3. 12 0
      Windows/Redact.xaml
  4. 27 0
      Windows/Redact.xaml.cs

+ 10 - 1
Pages/Agents.xaml

@@ -7,6 +7,15 @@
       mc:Ignorable="d" 
       d:DesignHeight="450" d:DesignWidth="800"
       Title="Agents">
+    <Page.Resources>
+        <Style TargetType="ListBoxItem">
+            <Style.Triggers>
+                <DataTrigger Binding="{Binding Path=Discount}" Value="25%">
+                    <Setter Property="Background" Value="#46B29D"/>
+                </DataTrigger>
+            </Style.Triggers>
+        </Style>
+    </Page.Resources>
 
     <Grid>
         <Grid.ColumnDefinitions>
@@ -47,7 +56,7 @@
                             </StackPanel>
                         </StackPanel>
                         <StackPanel HorizontalAlignment="Right" Margin="400,0,0,0">
-                            <TextBlock Text="{Binding Path=Discount}"/>
+                            <TextBlock x:Name="tblDiscount" Text="{Binding Path=Discount}"/>
                         </StackPanel>
                     </StackPanel>
                 </DataTemplate>

+ 7 - 0
PracticaDemoexam.csproj

@@ -74,6 +74,9 @@
     <Compile Include="Windows\PriorityChanger.xaml.cs">
       <DependentUpon>PriorityChanger.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Windows\Redact.xaml.cs">
+      <DependentUpon>Redact.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -98,6 +101,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Windows\Redact.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Model\Agent.cs">

+ 12 - 0
Windows/Redact.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="PracticaDemoexam.Windows.Redact"
+        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:PracticaDemoexam.Windows"
+        mc:Ignorable="d"
+        Title="Redact" Height="450" Width="800">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Windows/Redact.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace PracticaDemoexam.Windows
+{
+    /// <summary>
+    /// Логика взаимодействия для Redact.xaml
+    /// </summary>
+    public partial class Redact : Window
+    {
+        public Redact()
+        {
+            InitializeComponent();
+        }
+    }
+}