Alec 3 years ago
parent
commit
bf7d14df0b

+ 1 - 1
WPF01/MainWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:WPF01"
         mc:Ignorable="d"
-        Title="Какая-то программа" Height="400" Width="600" Visibility="Visible" MinWidth="290" MinHeight="500">
+        Title="Какая-то программа" Height="400" Width="600" Visibility="Visible" MinWidth="290" MinHeight="500" Icon="images/service_logo.ico">
 
     <Grid>
         <Grid.Background>

+ 11 - 0
WPF01/WPF01.csproj

@@ -34,6 +34,9 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>images\service_logo.ico</ApplicationIcon>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
       <HintPath>packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
@@ -113,6 +116,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="pages\Page1.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="pages\Registration.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -133,6 +140,9 @@
     <Compile Include="pages\MainPage.xaml.cs">
       <DependentUpon>MainPage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="pages\Page1.xaml.cs">
+      <DependentUpon>Page1.xaml</DependentUpon>
+    </Compile>
     <Compile Include="pages\Registration.xaml.cs">
       <DependentUpon>Registration.xaml</DependentUpon>
     </Compile>
@@ -189,6 +199,7 @@
       <DependentUpon>MyDatabase.edmx</DependentUpon>
       <LastGenOutput>MyDatabase.cs</LastGenOutput>
     </Content>
+    <Resource Include="images\service_logo.ico" />
   </ItemGroup>
   <ItemGroup>
     <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />

BIN
WPF01/images/service_logo.ico


+ 3 - 8
WPF01/pages/Authorization.xaml.cs

@@ -6,13 +6,8 @@ using System.Threading.Tasks;
 using System.Windows;
 using System.Timers;
 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.Navigation;
-using System.Windows.Shapes;
 
 namespace WPF01.pages
 {
@@ -56,9 +51,9 @@ namespace WPF01.pages
             {
                 // Включить кнопку
                 buttonLogin.IsEnabled = true;
-                // Остановить таймер
-                timer.Stop();
-            }));
+				// Остановить таймер
+				timer.Stop();
+			}));
 
             // Вместо записи () => {} можно было бы использовать
             // имя функции.

+ 23 - 0
WPF01/pages/Page1.xaml

@@ -0,0 +1,23 @@
+<Page x:Class="WPF01.pages.Page1"
+      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" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:WPF01.pages"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="Page1">
+
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="1*"/>
+            <RowDefinition Height="1*"/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="1*"/>
+            <ColumnDefinition Width="1*"/>
+            <ColumnDefinition Width="1*"/>
+        </Grid.ColumnDefinitions>
+
+    </Grid>
+</Page>

+ 28 - 0
WPF01/pages/Page1.xaml.cs

@@ -0,0 +1,28 @@
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace WPF01.pages
+{
+	/// <summary>
+	/// Логика взаимодействия для Page1.xaml
+	/// </summary>
+	public partial class Page1 : Page
+	{
+		public Page1()
+		{
+			InitializeComponent();
+		}
+	}
+}

+ 3 - 3
WPF01/pages/Registration.xaml

@@ -11,11 +11,11 @@
     <Grid>
         <StackPanel HorizontalAlignment="Left" Margin="10,10,0,0" Width="180" Height="400" VerticalAlignment="Top">
             <Label Content="Логин" FontFamily="Tahoma"/>
-            <TextBox x:Name="loginTextBox" Height="23"/>
+            <TextBox x:Name="loginTextBox" Height="23" TabIndex="1"/>
             <Label Content="Пароль"/>
-            <PasswordBox x:Name="passwordBox" Height="23"/>
+            <PasswordBox x:Name="passwordBox" Height="23" TabIndex="3"/>
             <Label Content="Фамилия"/>
-            <TextBox x:Name="firstnameTextBox" Height="23"/>
+            <TextBox x:Name="firstnameTextBox" Height="23" TabIndex="2"/>
             <Label Content="Имя"/>
             <TextBox x:Name="lastnameTextBox" Height="23"/>
             <Label Content="Отчество"/>

+ 21 - 0
mylib/Class1.cs

@@ -0,0 +1,21 @@
+using System;
+
+namespace mylib
+{
+	public class MyClass
+	{
+		public string Name;
+		public int Age;
+
+		/// <summary>
+		/// Функция вычисляет сумму двух целых чисел
+		/// </summary>
+		/// <param name="a">первый операнд</param>
+		/// <param name="b">второй операнд</param>
+		/// <returns>возвращает сумму чисел</returns>
+		public static int Sum(int a, int b)
+		{
+			return a + b;
+		}
+	}
+}

+ 7 - 0
mylib/mylib.csproj

@@ -0,0 +1,7 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard1.4</TargetFramework>
+  </PropertyGroup>
+
+</Project>