Jelajahi Sumber

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

y.buzueva2002 2 tahun lalu
induk
melakukan
f41af222e4

+ 1 - 0
BuzuevaDemo/App.xaml

@@ -11,6 +11,7 @@
         <Style TargetType="Button">
             <Setter Property="FontFamily" Value="Monotype Corsiva"/>
             <Setter Property="Background" Value="#46B29D"/>
+            <Setter Property="FontSize" Value="20"/>
         </Style>
         <Style TargetType="ComboBox">
             <Setter Property="FontFamily" Value="Monotype Corsiva"/>

+ 1 - 1
BuzuevaDemo/CreateChange.xaml.cs

@@ -31,7 +31,7 @@ namespace BuzuevaDemo
             }
             if (a == 1)
             {
-                PageChange.Navigate(new ChangeData());
+                PageChange.Navigate(new CreateData());
                 ChangePage.swithpages = PageChange;
             }
         }

+ 1 - 1
BuzuevaDemo/MainWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:BuzuevaDemo"
         mc:Ignorable="d"
-        Title="Приятный шелест" Height="450" Width="850" Icon="/Img/Приятный шелест.ico" MinHeight="450" MinWidth="850">
+        Title="Приятный шелест" Height="500" Width="950" Icon="/Img/Приятный шелест.ico" MinHeight="500" MinWidth="950">
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="100"/>

+ 2 - 1
BuzuevaDemo/Pages/Agents.xaml

@@ -10,7 +10,7 @@
     <Page.Resources>
         <DataTemplate x:Key="AllAgent">
             <Border BorderThickness="1" BorderBrush="Black" Width="600">
-                <StackPanel Orientation="Horizontal" MouseLeftButtonDown="PerexodCreate">
+                <StackPanel Orientation="Horizontal" MouseLeftButtonDown="PerexodCreate" Uid="{Binding ID}">
                     <Image Source="{Binding Logo}" Width="80" Height="80"/>
                     <StackPanel Orientation="Vertical">
                         <StackPanel Orientation="Horizontal">
@@ -60,6 +60,7 @@
                 <TextBlock>ОАО</TextBlock>
                 <TextBlock>MKK</TextBlock>
             </ComboBox>
+            <Button Content="Добавить агента" Click="PerexodСhange" Width="150" Margin="10, 5" Height="40" />
         </StackPanel>
         <ListBox  Grid.Row="1" x:Name="AllAgent" ItemTemplate="{StaticResource AllAgent}" />
     </Grid>

+ 5 - 0
BuzuevaDemo/Pages/Agents.xaml.cs

@@ -52,5 +52,10 @@ namespace BuzuevaDemo.Pages
             Agent agent = DataBase.BaseModel.Agent.FirstOrDefault(x => x.ID == id);
             new CreateChange(agent, 0).ShowDialog();
         }
+
+        private void PerexodСhange(object sender, RoutedEventArgs e)
+        { 
+            new CreateChange(null, 1).ShowDialog();
+        }
     }
 }

+ 3 - 3
BuzuevaDemo/Pages/ChangeData.xaml

@@ -9,7 +9,7 @@
       Title="ChangeData">
 
     <Grid>
-        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
+        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200">
             <GroupBox Header="Наименование">
                 <TextBox/>
             </GroupBox>
@@ -24,10 +24,10 @@
             </GroupBox>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                 <GroupBox  Header="ИНН">
-                    <TextBox/>
+                    <TextBox Width="90"/>
                 </GroupBox>
                 <GroupBox  Header="КПП">
-                    <TextBox/>
+                    <TextBox  Width="90"/>
                 </GroupBox>
             </StackPanel>
             <Image Width="100" Height="100"/>

+ 6 - 6
BuzuevaDemo/Pages/CreateData.xaml

@@ -1,4 +1,4 @@
-<Page x:Class="BuzuevaDemo.Pages.CreateZapis"
+<Page x:Class="BuzuevaDemo.Pages.CreateData"
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
@@ -8,7 +8,7 @@
       Title="CreateZapis" Height="450" Width="245">
 
     <Grid>
-        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
+        <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10">
             <GroupBox Header="Наименование">
                 <TextBox/>
             </GroupBox>
@@ -21,12 +21,12 @@
             <GroupBox Header="Адрес">
                 <TextBox/>
             </GroupBox>
-            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
-                <GroupBox  Header="ИНН">
-                    <TextBox/>
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
+                <GroupBox Header="ИНН" >
+                    <TextBox  Width="80"/>
                 </GroupBox>
                 <GroupBox  Header="КПП">
-                    <TextBox/>
+                    <TextBox  Width="80"/>
                 </GroupBox>
             </StackPanel>
             <Image Width="100" Height="100"/>

+ 2 - 2
BuzuevaDemo/Pages/CreateData.xaml.cs

@@ -18,9 +18,9 @@ namespace BuzuevaDemo.Pages
     /// <summary>
     /// Логика взаимодействия для CreateZapis.xaml
     /// </summary>
-    public partial class CreateZapis : Page
+    public partial class CreateData : Page
     {
-        public CreateZapis()
+        public CreateData()
         {
             InitializeComponent();
         }