Parcourir la source

Добавьте файлы проекта.

Александр Кайгородов il y a 3 ans
Parent
commit
e1f4b6a641

+ 31 - 0
Praktika3.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29102.190
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Praktika3", "Praktika3\Praktika3.csproj", "{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests8642", "Tests8642\Tests8642.csproj", "{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {557FB4FB-E649-470C-9504-493076B15B88}
+	EndGlobalSection
+EndGlobal

+ 6 - 0
Praktika3/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+    </startup>
+</configuration>

+ 16 - 0
Praktika3/App.xaml

@@ -0,0 +1,16 @@
+<Application x:Class="Praktika3.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:Praktika3"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </Application.Resources>
+</Application>

+ 17 - 0
Praktika3/App.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Praktika3
+{
+    /// <summary>
+    /// Логика взаимодействия для App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

+ 37 - 0
Praktika3/MainWindow.xaml

@@ -0,0 +1,37 @@
+<Window x:Class="Praktika3.MainWindow"
+        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:Praktika3"
+        mc:Ignorable="d"
+        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+        Title="8-6-4-2" Height="600" Width="400">
+    <Grid Background="#F3EAF4">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="131*"/>
+            <ColumnDefinition Width="130*"/>
+            <ColumnDefinition Width="108*"/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Button x:Name="btnClear" Content="C"  Height="56" Width="56" Click="btnClear_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,4,0,0" Grid.Row="1" Grid.Column="2"/>
+        <Button x:Name="btnPlus" Content="+" Height="56" Width="61" Click="btnPlus_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="67,4,0,0" Grid.Row="1"/>
+        <Button x:Name="btnMinus" Content="-"  Height="56" Width="61" Click="btnMinus_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,4,0,0" Grid.Row="1" Grid.Column="1"/>
+        <Button x:Name="btnMult" Content="*"  Height="56" Width="61" Click="btnMult_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="67,4,0,0" Grid.Row="1" Grid.Column="1"/>
+        <Button x:Name="btn8642" Content="Перевести первое число в 8-6-4-2"  Height="40" Width="265" Click="btn8642_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="68,65,0,0" Grid.Row="1" Grid.ColumnSpan="3"/>
+        <Button x:Name="btn8642Back" Content="Перевести первое число обратно"  Height="40" Width="265" Click="btn8642Back_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="67,110,0,0" Grid.Row="1" Grid.ColumnSpan="3"/>
+        <Button x:Name="btn10" Content="Перевести второе число в 10"  Height="40" Width="265" Click="btn10_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="67,155,0,0" Grid.Row="1" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
+        <Button x:Name="btn10Back" Content="Перевести второе число обратно"  Height="40" Width="265" Click="btn10Back_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="68,10,0,0" Grid.Row="2" Grid.ColumnSpan="3"/>
+        <Button x:Name="btnAnswer10" Content="Получить ответ в 10 системе"  Height="40" Width="265" Click="btnAnswer10_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="68,55,0,0" Grid.Row="2" Grid.ColumnSpan="3"/>
+        <Button x:Name="btnAnswer8642" Content="Получить ответ в 8-6-4-2 системе"  Height="40" Width="265" Click="btnAnswer8642_Click" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="67,100,0,0" Grid.Row="2" Grid.ColumnSpan="3"/>
+
+        <TextBox Name ="lblFirst" materialDesign:HintAssist.Hint="Введите число в десятичной системе" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Background="#FFFF" Margin="68,30,50,120" Grid.ColumnSpan="5" Height="40"/>
+        <TextBox Name ="lblSecond" materialDesign:HintAssist.Hint="Введите число в 8-6-4-2" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Background="#FFFF" Margin="68,108,50,42" Grid.ColumnSpan="3" Height="40"/>
+        <TextBox Name ="lblResult" materialDesign:HintAssist.Hint="Результат" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Background="#FFFF" Margin="68,149,50,0" Height="40" VerticalAlignment="Top" Grid.ColumnSpan="3" IsReadOnly="True"/>
+        <TextBox Name="lblAction" materialDesign:HintAssist.Hint="Введите знак операции" Style="{StaticResource MaterialDesignFloatingHintTextBox}" Background="#FFFF" Margin="68,70,50,0" Height="40" VerticalAlignment="Top" Grid.ColumnSpan="3" IsReadOnly="True"/>
+    </Grid>
+</Window>

+ 873 - 0
Praktika3/MainWindow.xaml.cs

@@ -0,0 +1,873 @@
+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 Praktika3
+{
+    /// <summary>
+    /// Логика взаимодействия для MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            InitializeComponent();
+        }
+
+        public void ClearTextBox()
+        {
+            lblFirst.Text = "";
+            lblSecond.Text = "";
+            lblAction.Text = "";
+            lblResult.Text = "";
+        }
+
+        private void btnClear_Click(object sender, RoutedEventArgs e)
+        {
+            ClearTextBox();
+        }
+
+        private void btnPlus_Click(object sender, RoutedEventArgs e)
+        {
+            lblAction.Text = "+";
+        }
+
+        private void btnMinus_Click(object sender, RoutedEventArgs e)
+        {
+            lblAction.Text = "-";
+        }
+
+        private void btnMult_Click(object sender, RoutedEventArgs e)
+        {
+            lblAction.Text = "*";
+        }
+
+        private void btn8642_Click(object sender, RoutedEventArgs e)
+        {
+            String s = Convert.ToString(lblFirst.Text);
+            string[] arr = s.Split('.');
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            if (proverkaSimv4(Convert.ToString(lblFirst.Text)))
+            {
+                b = int.Parse(Convert.ToString(arr[2]));
+                c = int.Parse(Convert.ToString(arr[1]));
+                string chetverich = "";
+                do
+                {
+                    chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                    b /= 4;
+                } while (b > 0);
+                string shesterich = "";
+                do
+                {
+                    shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                    c /= 6;
+                } while (c > 0);
+                dvoich = int.Parse(Convert.ToString(arr[3]));
+                vosmerich = int.Parse(Convert.ToString(arr[0]));
+                lblFirst.Text = string.Concat(Convert.ToString(vosmerich, 8), '.', shesterich, '.', chetverich, '.', Convert.ToString(dvoich, 2));
+            }
+        }
+
+        private void btn8642Back_Click(object sender, RoutedEventArgs e)
+        {
+            String s = Convert.ToString(lblFirst.Text);
+            string[] arr = s.Split('.');
+            if (proverkaSimv8forfirst(Convert.ToString(lblFirst.Text)))
+            {
+
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                lblFirst.Text = String.Concat(res4, '.', res3, '.', res2, '.', res);
+            }
+        }
+
+        private void btn10_Click(object sender, RoutedEventArgs e)
+        {
+            String s = Convert.ToString(lblSecond.Text);
+            string[] arr = s.Split('.');
+            if (proverkaSimv8(Convert.ToString(lblSecond.Text)))
+            {
+
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                lblSecond.Text = String.Concat(res4, '.', res3, '.', res2, '.', res);
+            }
+        }
+
+        private void btn10Back_Click(object sender, RoutedEventArgs e)
+        {
+            String s = Convert.ToString(lblSecond.Text);
+            string[] arr = s.Split('.');
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            if (proverkaSimv4forsecond(Convert.ToString(lblSecond.Text)))
+            {
+                b = int.Parse(Convert.ToString(arr[2]));
+                c = int.Parse(Convert.ToString(arr[1]));
+                string chetverich = "";
+                do
+                {
+                    chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                    b /= 4;
+                } while (b > 0);
+                string shesterich = "";
+                do
+                {
+                    shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                    c /= 6;
+                } while (c > 0);
+                dvoich = int.Parse(Convert.ToString(arr[3]));
+                vosmerich = int.Parse(Convert.ToString(arr[0]));
+                lblSecond.Text = string.Concat(Convert.ToString(vosmerich, 8), '.', shesterich, '.', chetverich, '.', Convert.ToString(dvoich, 2));
+            }
+        }
+
+        private void btnAnswer10_Click(object sender, RoutedEventArgs e)
+        {
+            String s = Convert.ToString(lblSecond.Text);
+            string ss = Convert.ToString(lblFirst.Text);
+            string[] arr = s.Split('.');
+            string[] arr6 = ss.Split('.');
+            string first;
+            string second;
+            string operation = Convert.ToString(lblAction.Text);
+            if (proverkaSimv108(Convert.ToString(lblFirst.Text), Convert.ToString(lblSecond.Text)))
+            {
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                second = string.Concat(res4, res3, res2, res);
+                first = string.Concat(arr6[0], arr6[1], arr6[2], arr6[3]);
+                if (string.IsNullOrEmpty(operation))
+                {
+                    MessageBox.Show("Операция не выбрана");
+                }
+                else
+                {
+                    switch (operation)
+                    {
+                        case "+":
+                            lblResult.Text = Addition(first, second);
+                            break;
+                        case "-":
+                            lblResult.Text = Substraction(first, second);
+                            break;
+                        case "*":
+                            lblResult.Text = Multiplication(first, second);
+                            break;
+                        default:
+                            break;
+                    }
+                }
+            }
+        }
+        private void btnAnswer8642_Click(object sender, RoutedEventArgs e)
+        {
+            //Объявление переменных, массивов
+            String s;
+            string ss;
+            string[] arr;
+            string[] arr6;
+            string answer;
+            String sss;
+            string[] arr7;
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            string operation;
+            if (proverkaSimv108(Convert.ToString(lblFirst.Text), Convert.ToString(lblSecond.Text)))//Проверка на символы
+            {
+                s = Convert.ToString(lblSecond.Text);
+                ss = Convert.ToString(lblFirst.Text);
+                arr = s.Split('.');
+                arr6 = ss.Split('.');
+                operation = Convert.ToString(lblAction.Text);
+
+                //Перевод второго числа в десятичную систему 
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                if (string.IsNullOrEmpty(operation))
+                {
+                    MessageBox.Show("Операция не выбрана");
+                }
+                else
+                {
+                    switch (operation)
+                    {
+                        case "+":
+                            lblResult.Text = string.Concat(res4 + Convert.ToInt32(arr6[0]), '.', res3 + Convert.ToInt32(arr6[1]), '.', res2 + Convert.ToInt32(arr6[2]), '.', res + Convert.ToInt32(arr6[3]));
+                            break;
+                        case "-":
+                            lblResult.Text = string.Concat(res4 - Convert.ToInt32(arr6[0]), '.', res3 - Convert.ToInt32(arr6[1]), '.', res2 - Convert.ToInt32(arr6[2]), '.', res - Convert.ToInt32(arr6[3]));
+                            break;
+                        case "*":
+                            lblResult.Text = string.Concat(res4 * Convert.ToInt32(arr6[0]), '.', res3 * Convert.ToInt32(arr6[1]), '.', res2 * Convert.ToInt32(arr6[2]), '.', res * Convert.ToInt32(arr6[3]));
+                            break;
+
+                    }
+
+                    if (lblResult.Text.Length == 7)
+                    {
+                        sss = lblResult.Text;
+                        arr7 = sss.Split('.');
+                        if (proverkaSimv4(Convert.ToString(sss)))
+                        {
+                            b = int.Parse(Convert.ToString(arr7[2]));
+                            c = int.Parse(Convert.ToString(arr7[1]));
+                            string chetverich = "";
+                            do
+                            {
+                                chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                                b /= 4;
+                            } while (b > 0);
+                            string shesterich = "";
+                            do
+                            {
+                                shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                                c /= 6;
+                            } while (c > 0);
+                            dvoich = int.Parse(Convert.ToString(arr7[3]));
+                            vosmerich = int.Parse(Convert.ToString(arr7[0]));
+                            lblResult.Text = string.Concat(Convert.ToString(vosmerich, 8), shesterich, chetverich, Convert.ToString(dvoich, 2));
+                        }
+                    }
+                    else
+                    {
+                        MessageBox.Show("Число не 4-х значное. Перевод в систему невозможен");
+                    }
+                }
+
+            }
+
+        }
+
+        private bool proverkaSimv4(string lb_str)
+        {
+
+            string proverkasimv = Convert.ToString(lb_str);
+            if (proverkasimv.Contains(".."))
+            {
+                MessageBox.Show("Неверный формат");
+                return false;
+            }
+            else if (string.IsNullOrEmpty(proverkasimv))
+            {
+                MessageBox.Show("Первое число не указано");
+            }
+            for (int i = 0; i < proverkasimv.Length; i++)
+            {
+                if (proverkasimv[i] >= '0' && proverkasimv[i] <= '9' || proverkasimv[i] == '.')
+                {
+                    if (proverkasimv.Length == 7)
+                    {
+                        return true;
+                    }
+                    else if (lb_str.Length > 7 || lb_str.Length < 6)
+                    {
+                        MessageBox.Show("Можно использовать только 4-х значные числа");
+                        return false;
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("Неверный формат");
+                    return false;
+                }
+            }
+            return false;
+
+            //11 13 21 1001
+        }
+        private bool proverkaSimv4forsecond(string lb_str)
+        {
+
+            string proverkasimv = Convert.ToString(lb_str);
+            if (proverkasimv.Contains(".."))
+            {
+                MessageBox.Show("Неверный формат");
+                return false;
+            }
+            else if (string.IsNullOrEmpty(proverkasimv))
+            {
+                MessageBox.Show("Второе число не указано");
+            }
+            for (int i = 0; i < proverkasimv.Length; i++)
+            {
+                if (proverkasimv[i] >= '0' && proverkasimv[i] <= '9' || proverkasimv[i] == '.')
+                {
+                    if (proverkasimv.Length == 7)
+                    {
+                        return true;
+                    }
+                    else if (lb_str.Length > 7 || lb_str.Length < 6)
+                    {
+                        MessageBox.Show("Можно использовать только 4-х значные числа");
+                        return false;
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("Неверный формат");
+                    return false;
+                }
+            }
+            return false;
+        }
+        private bool proverkaSimv8(string lb_str)
+        {
+
+            string proverkasimv = Convert.ToString(lb_str);
+            if (proverkasimv.Contains(".."))
+            {
+                MessageBox.Show("Неверный формат");
+                return false;
+            }
+            else if (string.IsNullOrEmpty(proverkasimv))
+            {
+                MessageBox.Show("Второе число не указано");
+            }
+            for (int i = 0; i < proverkasimv.Length; i++)
+            {
+                if (proverkasimv[i] >= '0' && proverkasimv[i] <= '9' || proverkasimv[i] == '.')
+                {
+                    if (proverkasimv.Length <= 14 && proverkasimv.Length >= 7)
+                    {
+                        return true;
+                    }
+                    else if (lb_str.Length > 14 || lb_str.Length < 8)
+                    {
+                        MessageBox.Show("Можно использовать только 4-х значные числа");
+                        return false;
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("Неверный формат");
+                    return false;
+                }
+            }
+            return false;
+        }
+        private bool proverkaSimv8forfirst(string lb_str)
+        {
+
+            string proverkasimv = Convert.ToString(lb_str);
+            if (proverkasimv.Contains(".."))
+            {
+                MessageBox.Show("Неверный формат");
+                return false;
+            }
+            else if (string.IsNullOrEmpty(proverkasimv))
+            {
+                MessageBox.Show("Первое число не указано");
+            }
+            for (int i = 0; i < proverkasimv.Length; i++)
+            {
+                if (proverkasimv[i] >= '0' && proverkasimv[i] <= '9' || proverkasimv[i] == '.')
+                {
+                    if (proverkasimv.Length <= 14 && proverkasimv.Length >= 7)
+                    {
+                        return true;
+                    }
+                    else if (lb_str.Length > 14 || lb_str.Length < 8)
+                    {
+                        MessageBox.Show("Можно использовать только 4-х значные числа");
+                        return false;
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("Неверный формат");
+                    return false;
+                }
+            }
+            return false;
+        }
+
+        private bool proverkaSimv108(string lb_str, string lb_str2)
+        {
+            string proverkasimv = Convert.ToString(lb_str);
+            string proverkasimv2 = Convert.ToString(lb_str2);
+            if (proverkasimv.Contains("..") && proverkasimv2.Contains(".."))
+            {
+                MessageBox.Show("Неверный формат");
+                return false;
+            }
+            else if (String.IsNullOrEmpty(proverkasimv))
+            {
+                MessageBox.Show("Первое число не указано");
+                return false;
+            }
+            else if (String.IsNullOrEmpty(proverkasimv2))
+            {
+                MessageBox.Show("Второе число не указано");
+                return false;
+            }
+            for (int i = 0; i < proverkasimv.Length; i++)
+            {
+                for (int j = 0; j < proverkasimv2.Length; j++)
+                {
+                    if (proverkasimv[i] >= '0' && proverkasimv[i] <= '9' || proverkasimv[i] == '.' && proverkasimv2[j] >= '0' && proverkasimv2[j] <= '9' || proverkasimv2[j] == '.')
+                    {
+                        if (proverkasimv.Length <= 14 && proverkasimv.Length >= 7 && proverkasimv2.Length <= 14 && proverkasimv2.Length >= 7 || proverkasimv.Length == 7 && proverkasimv2.Length == 7)
+                        {
+                            return true;
+                        }
+                        else if (proverkasimv.Length > 14 || proverkasimv.Length < 6 && proverkasimv2.Length > 14 || proverkasimv2.Length < 6)
+                        {
+                            MessageBox.Show("Можно использовать только 4-х значные числа");
+                            return false;
+                        }
+                    }
+                    else
+                    {
+                        MessageBox.Show("Неверный формат");
+                        return false;
+                    }
+                }
+            }
+            return false;
+        }
+
+
+        public static string Addition(string first, string second)
+        {
+            try
+            {
+                return (Convert.ToInt32(first) + Convert.ToInt32(second)).ToString();
+            }
+            catch
+            {
+                return "";
+            }
+        }
+        public static string Substraction(string first, string second)
+        {
+            try
+            {
+                return (Convert.ToInt32(first) - Convert.ToInt32(second)).ToString();
+            }
+            catch
+            {
+                return "";
+            }
+        }
+        public static string Multiplication(string first, string second)
+        {
+            try
+            {
+                return (Convert.ToInt32(first) * Convert.ToInt32(second)).ToString();
+            }
+            catch
+            {
+                return "";
+            }
+        }
+
+
+        public bool btn8642_ClickTest(string chisloOne)
+        {
+            String s = chisloOne;
+            string[] arr = s.Split('.');
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            if (proverkaSimv4(Convert.ToString(chisloOne)))
+            {
+                b = int.Parse(Convert.ToString(arr[2]));
+                c = int.Parse(Convert.ToString(arr[1]));
+                string chetverich = "";
+                do
+                {
+                    chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                    b /= 4;
+                } while (b > 0);
+                string shesterich = "";
+                do
+                {
+                    shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                    c /= 6;
+                } while (c > 0);
+                dvoich = int.Parse(Convert.ToString(arr[3]));
+                vosmerich = int.Parse(Convert.ToString(arr[0]));
+                return true;
+            }
+            return false;
+        }
+
+        public bool btn8642Back_ClickTest(string chisloOne)
+        {
+            String s = chisloOne;
+            string[] arr = s.Split('.');
+            if (proverkaSimv8forfirst(chisloOne))
+            {
+
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                return true;
+            }
+            return false;
+        }
+
+        public bool btn10_ClickTest(string chisloTwo)
+        {
+            String s = chisloTwo;
+            string[] arr = s.Split('.');
+            if (proverkaSimv8(chisloTwo))
+            {
+
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                return true;
+            }
+            return false;
+        }
+
+        public bool btn10Back_ClickTest(string chisloTwo)
+        {
+            String s = chisloTwo;
+            string[] arr = s.Split('.');
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            if (proverkaSimv4forsecond(chisloTwo))
+            {
+                b = int.Parse(Convert.ToString(arr[2]));
+                c = int.Parse(Convert.ToString(arr[1]));
+                string chetverich = "";
+                do
+                {
+                    chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                    b /= 4;
+                } while (b > 0);
+                string shesterich = "";
+                do
+                {
+                    shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                    c /= 6;
+                } while (c > 0);
+                dvoich = int.Parse(Convert.ToString(arr[3]));
+                vosmerich = int.Parse(Convert.ToString(arr[0]));
+                return true;
+            }
+            return false;
+
+        }
+
+        public bool btnAnswer10_ClickTest(string chisloOne, string chisloTwo, string operations)
+        {
+            String s = chisloTwo;
+            string ss = chisloOne;
+            string[] arr = s.Split('.');
+            string[] arr6 = ss.Split('.');
+            string first;
+            string second;
+            string operation = operations;
+            if (proverkaSimv108(chisloOne, chisloTwo))
+            {
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                second = string.Concat(res4, res3, res2, res);
+                first = string.Concat(arr6[0], arr6[1], arr6[2], arr6[3]);
+                if (string.IsNullOrEmpty(operation))
+                {
+                    MessageBox.Show("Операция не выбрана");
+                }
+                else
+                {
+                    switch (operation)
+                    {
+                        case "+":
+                            lblResult.Text = Addition(first, second);
+                            return true;
+                        case "-":
+                            lblResult.Text = Substraction(first, second);
+                            return true;
+                        case "*":
+                            lblResult.Text = Multiplication(first, second);
+                            return true;
+                        default:
+                            break;
+                    }
+                }
+            }
+            return false;
+        }
+        public bool btnAnswer8642_ClickTest(string chisloOne, string chisloTwo, string operations)
+        {
+            //Объявление переменных, массивов
+            String s;
+            string ss;
+            string[] arr;
+            string[] arr6;
+            string answer;
+            String sss;
+            string[] arr7;
+            int dvoich;
+            int vosmerich;
+            int b;
+            int c;
+            string operation;
+            if (proverkaSimv108(chisloOne, chisloTwo))//Проверка на символы
+            {
+                s = Convert.ToString(chisloTwo);
+                ss = Convert.ToString(chisloOne);
+                arr = s.Split('.');
+                arr6 = ss.Split('.');
+                operation = Convert.ToString(operations);
+
+                //Перевод второго числа в десятичную систему 
+                char[] arr2 = arr[3].ToCharArray();
+                int res = 0;
+                for (int i = 0; i < arr2.Length; i++)
+                {
+                    res += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr2[i])) * Math.Pow(2, arr2.Length - i - 1));
+                }
+                char[] arr3 = arr[2].ToCharArray();
+                int res2 = 0;
+                for (int i = 0; i < arr3.Length; i++)
+                {
+                    res2 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr3[i])) * Math.Pow(4, arr3.Length - i - 1));
+                }
+                char[] arr4 = arr[1].ToCharArray();
+                int res3 = 0;
+                for (int i = 0; i < arr4.Length; i++)
+                {
+                    res3 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr4[i])) * Math.Pow(6, arr4.Length - i - 1));
+                }
+                char[] arr5 = arr[0].ToCharArray();
+                int res4 = 0;
+                for (int i = 0; i < arr5.Length; i++)
+                {
+                    res4 += Convert.ToInt32(Convert.ToInt32(Convert.ToString(arr5[i])) * Math.Pow(8, arr5.Length - i - 1));
+                }
+                if (string.IsNullOrEmpty(operation))
+                {
+                    MessageBox.Show("Операция не выбрана");
+                }
+                else
+                {
+                    switch (operation)
+                    {
+                        case "+":
+                            lblResult.Text = string.Concat(res4 + Convert.ToInt32(arr6[0]), '.', res3 + Convert.ToInt32(arr6[1]), '.', res2 + Convert.ToInt32(arr6[2]), '.', res + Convert.ToInt32(arr6[3]));
+                            break;
+                        case "-":
+                            lblResult.Text = string.Concat(res4 - Convert.ToInt32(arr6[0]), '.', res3 - Convert.ToInt32(arr6[1]), '.', res2 - Convert.ToInt32(arr6[2]), '.', res - Convert.ToInt32(arr6[3]));
+                            break;
+                        case "*":
+                            lblResult.Text = string.Concat(res4 * Convert.ToInt32(arr6[0]), '.', res3 * Convert.ToInt32(arr6[1]), '.', res2 * Convert.ToInt32(arr6[2]), '.', res * Convert.ToInt32(arr6[3]));
+                            break;
+
+                    }
+
+                    if (lblResult.Text.Length == 7)
+                    {
+                        sss = lblResult.Text;
+                        arr7 = sss.Split('.');
+                        if (proverkaSimv4(Convert.ToString(sss)))
+                        {
+                            b = int.Parse(Convert.ToString(arr7[2]));
+                            c = int.Parse(Convert.ToString(arr7[1]));
+                            string chetverich = "";
+                            do
+                            {
+                                chetverich = string.Concat(Convert.ToInt32(b % 4), chetverich);
+                                b /= 4;
+                            } while (b > 0);
+                            string shesterich = "";
+                            do
+                            {
+                                shesterich = string.Concat(Convert.ToInt32(c % 6), shesterich);
+                                c /= 6;
+                            } while (c > 0);
+                            dvoich = int.Parse(Convert.ToString(arr7[3]));
+                            vosmerich = int.Parse(Convert.ToString(arr7[0]));
+                            return true;
+                        }
+                    }
+                    else
+                    {
+                        MessageBox.Show("Число не 4-х значное. Перевод в систему невозможен");
+                        return false;
+                    }
+                }
+
+            }
+            return false;
+        }
+    }
+}

+ 56 - 0
Praktika3/Numbers.cs

@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Praktika3
+{
+    class Numbers
+    {
+        public static string One()
+        {
+            return "1";
+        }
+        public static string Two()
+        {
+            return "2";
+        }
+        public static string Three()
+        {
+            return "3";
+        }
+        public static string Four()
+        {
+            return "4";
+        }
+        public static string Five()
+        {
+            return "5";
+        }
+        public static string Six()
+        {
+            return "6";
+        }
+        public static string Seven()
+        {
+            return "7";
+        }
+        public static string Eight()
+        {
+            return "8";
+        }
+        public static string Nine()
+        {
+            return "9";
+        }
+        public static string Zero()
+        {
+            return "0";
+        }
+        public static string Poin()
+        {
+            return ".";
+        }
+    }
+}

+ 115 - 0
Praktika3/Praktika3.csproj

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{563456AD-E43B-4DC1-8F12-B71D29DCF5E5}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>Praktika3</RootNamespace>
+    <AssemblyName>Praktika3</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="MaterialDesignColors, Version=2.0.4.3, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MaterialDesignColors.2.0.4\lib\net452\MaterialDesignColors.dll</HintPath>
+    </Reference>
+    <Reference Include="MaterialDesignThemes.Wpf, Version=4.3.0.3, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MaterialDesignThemes.4.3.0\lib\net452\MaterialDesignThemes.Wpf.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Numbers.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их.  Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.4.3.0\build\MaterialDesignThemes.targets'))" />
+  </Target>
+</Project>

+ 55 - 0
Praktika3/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("Praktika3")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Praktika3")]
+[assembly: AssemblyCopyright("Copyright ©  2022")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM, установите атрибут ComVisible для этого типа в значение true.
+[assembly: ComVisible(false)]
+
+//Чтобы начать создание локализуемых приложений, задайте
+//<UICulture>CultureYouAreCodingWith</UICulture> в файле .csproj
+//в <PropertyGroup>. Например, при использовании английского (США)
+//в своих исходных файлах установите <UICulture> в en-US.  Затем отмените преобразование в комментарий
+//атрибута NeutralResourceLanguage ниже.  Обновите "en-US" в
+//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
+                                     //(используется, если ресурс не найден на странице,
+                                     // или в словарях ресурсов приложения)
+    ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
+                                              //(используется, если ресурс не найден на странице,
+                                              // в приложении или в каких-либо словарях ресурсов для конкретной темы)
+)]
+
+
+// Сведения о версии для сборки включают четыре следующих значения:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Номер редакции
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию 
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
Praktika3/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код был создан программным средством.
+//     Версия среды выполнения: 4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+//     код создан повторно.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Praktika3.Properties
+{
+
+
+    /// <summary>
+    ///   Класс ресурсов со строгим типом для поиска локализованных строк и пр.
+    /// </summary>
+    // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
+    // класс с помощью таких средств, как ResGen или Visual Studio.
+    // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
+    // с параметром /str или заново постройте свой VS-проект.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Praktika3.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Переопределяет свойство CurrentUICulture текущего потока для всех
+        ///   подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
Praktika3/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
Praktika3/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Praktika3.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
Praktika3/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 5 - 0
Praktika3/packages.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="MaterialDesignColors" version="2.0.4" targetFramework="net472" />
+  <package id="MaterialDesignThemes" version="4.3.0" targetFramework="net472" />
+</packages>

+ 20 - 0
Tests8642/Properties/AssemblyInfo.cs

@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Tests8642")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tests8642")]
+[assembly: AssemblyCopyright("Copyright ©  2022")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("d4392420-6e5a-4ffc-b47d-1e59b5a3977c")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 77 - 0
Tests8642/Tests8642.csproj

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" />
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D4392420-6E5A-4FFC-B47D-1E59B5A3977C}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tests8642</RootNamespace>
+    <AssemblyName>Tests8642</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
+    <IsCodedUITest>False</IsCodedUITest>
+    <TestProjectType>UnitTest</TestProjectType>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="UnitTest1.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Praktika3\Praktika3.csproj">
+      <Project>{563456ad-e43b-4dc1-8f12-b71d29dcf5e5}</Project>
+      <Name>Praktika3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их.  Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props'))" />
+    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets'))" />
+  </Target>
+  <Import Project="..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" />
+</Project>

+ 20 - 0
Tests8642/UnitTest1.cs

@@ -0,0 +1,20 @@
+using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Praktika3;
+
+namespace Tests8642
+{
+    [TestClass]
+    public class UnitTest1
+    {
+        [TestMethod]
+        public void TestMethod1()
+        {
+            var test1 = new MainWindow();
+            Assert.IsTrue(test1.btn8642_ClickTest("8.6.4.2"));
+            Assert.IsTrue(test1.btn8642_ClickTest("9.9.9.9"));
+            Assert.IsFalse(test1.btn8642_ClickTest(""));
+            Assert.IsFalse(test1.btn8642_ClickTest("!.-.a.b"));
+        }
+    }
+}

+ 5 - 0
Tests8642/packages.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net472" />
+  <package id="MSTest.TestFramework" version="1.3.2" targetFramework="net472" />
+</packages>