Bläddra i källkod

Редактирование стиля

Борга Инга 2 år sedan
förälder
incheckning
68bb6f9355
5 ändrade filer med 22 tillägg och 10 borttagningar
  1. 2 2
      Agents/Add.xaml
  2. 6 1
      Agents/Add.xaml.cs
  3. 1 4
      Agents/Pages/PageAgents.xaml
  4. 2 2
      Agents/Update.xaml
  5. 11 1
      Agents/Update.xaml.cs

+ 2 - 2
Agents/Add.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Agents"
         mc:Ignorable="d"
-        Title="Add" Height="450" Width="800">
+        Title="Add" Height="450" Width="800" FontFamily="Monotype Corsiva">
     <Grid>
         <StackPanel Orientation="Vertical">
             <StackPanel Orientation="Horizontal">
@@ -14,7 +14,7 @@
             </StackPanel>
             <StackPanel Orientation="Horizontal">
                 <Label Content="Тип агента" FontFamily="Monotype Corsiva" />
-                <ComboBox Width="150" Height="20" />
+                <ComboBox x:Name="Filtr" Width="150" Height="20" />
             </StackPanel>
             <StackPanel Orientation="Horizontal">
                 <Label Content="Приоритет" FontFamily="Monotype Corsiva" />

+ 6 - 1
Agents/Add.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using Agents.Classes;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -22,6 +23,10 @@ namespace Agents
         public Add()
         {
             InitializeComponent();
+            List<AgentType> agentType = BaseConnect.baseConnect.AgentType.ToList();
+            Filtr.ItemsSource = agentType;
+            Filtr.DisplayMemberPath = "Title";
+            Filtr.SelectedValue = "ID";
         }
 
         private void Button_Click(object sender, RoutedEventArgs e)

+ 1 - 4
Agents/Pages/PageAgents.xaml

@@ -6,7 +6,7 @@
       xmlns:local="clr-namespace:Agents.Pages"
       mc:Ignorable="d" 
       d:DesignHeight="450" d:DesignWidth="800"
-      Title="PageAgents">
+      Title="PageAgents" FontFamily="Monotype Corsiva">
     <Page.Resources>
         <DataTemplate x:Key="AgentsInfo">
             <Border BorderBrush="Black" BorderThickness="1" Margin="5">
@@ -34,9 +34,6 @@
                         <TextBlock Text="10%" HorizontalAlignment="Right" FontSize="30" FontFamily="Monotype Corsiva"/>
                         <Button x:Name="btnUpdate" Content="Редактировать" Grid.Row="2" Width="150" Height="25" Click="btnUpdate_Click" Background="#FF46B29D" Foreground="White" BorderBrush="White" FontFamily="Monotype Corsiva"/>
                     </StackPanel>
-
-
-
                 </StackPanel>
             </Border>
         </DataTemplate>

+ 2 - 2
Agents/Update.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Agents"
         mc:Ignorable="d"
-        Title="Update" Height="450" Width="800">
+        Title="Update" Height="450" Width="800" FontFamily="Monotype Corsiva">
     <Grid>
         <StackPanel Orientation="Vertical">
             <StackPanel Orientation="Horizontal">
@@ -14,7 +14,7 @@
             </StackPanel>
             <StackPanel Orientation="Horizontal">
                 <Label Content="Тип агента" FontFamily="Monotype Corsiva" />
-                <ComboBox Width="150" Height="20" />
+                <ComboBox Width="150" Height="20" x:Name="Filtr" SelectionChanged="Filtr_SelectionChanged"/>
             </StackPanel>
             <StackPanel Orientation="Horizontal">
                 <Label Content="Приоритет" FontFamily="Monotype Corsiva" />

+ 11 - 1
Agents/Update.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using Agents.Classes;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -22,11 +23,20 @@ namespace Agents
         public Update()
         {
             InitializeComponent();
+            List<AgentType> agentType = BaseConnect.baseConnect.AgentType.ToList();
+            Filtr.ItemsSource = agentType;
+            Filtr.DisplayMemberPath = "Title";
+            Filtr.SelectedValue = "ID";
         }
 
         private void Button_Click(object sender, RoutedEventArgs e)
         {
             this.Close();
         }
+
+        private void Filtr_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+
+        }
     }
 }