Quellcode durchsuchen

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

Sho___nada vor 3 Jahren
Ursprung
Commit
3789874bd5

+ 31 - 0
Clicker.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31402.337
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clicker", "Clicker\Clicker.csproj", "{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestForClicker", "TestForClicker\TestForClicker.csproj", "{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {A35FAC54-F3DE-410D-8726-9A640020CE8C}
+	EndGlobalSection
+EndGlobal

+ 6 - 0
Clicker/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>

+ 9 - 0
Clicker/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="Clicker.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:Clicker"
+             StartupUri="MainWindow.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 17 - 0
Clicker/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 Clicker
+{
+    /// <summary>
+    /// Логика взаимодействия для App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+    }
+}

+ 101 - 0
Clicker/Clicker.csproj

@@ -0,0 +1,101 @@
+<?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>{DF3F0E25-7C8A-4A0A-9D43-DB1D92798E51}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>Clicker</RootNamespace>
+    <AssemblyName>Clicker</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>
+  </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="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="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="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="NewFolder1\PerfectCookie.png" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 30 - 0
Clicker/MainWindow.xaml

@@ -0,0 +1,30 @@
+<Window x:Class="Clicker.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:Clicker"
+        mc:Ignorable="d"
+        Title="MainWindow" Height="450" Width="800" WindowStyle="None" ResizeMode="NoResize">
+    <Grid>
+        <TabControl HorizontalAlignment="Left" Height="450" Margin="0,0,0,0" VerticalAlignment="Top" Width="800">
+            <TabItem Header="Clicker">
+                <Grid Background="#FFE5E5E5">
+                    
+                    <Label Name="Points" Content="Points: "  HorizontalAlignment="Left" Margin="50,50,0,0" VerticalAlignment="Top" FontSize="30"/>
+                    <Label Name="PointsForClick" Content="Points for click: " HorizontalAlignment="Left" Margin="50,100,0,0" VerticalAlignment="Top" FontSize="30"/>
+                    <Button Name="Button1" Click="ClickToButton1" Content=" " HorizontalAlignment="Left" Margin="50,300,0,0" VerticalAlignment="Top" Width="150" Height="50"/>
+                    <Button Name="Button2" Click="ClickToButton2" Content=" " HorizontalAlignment="Left" Margin="230,300,0,0" VerticalAlignment="Top" Width="150" Height="50"/>
+                    <Button Name="Button3" Click="ClickToButton3" Content=" " HorizontalAlignment="Left" Margin="410,300,0,0" VerticalAlignment="Top" Width="150" Height="50"/>
+                    <Button Name="Button4" Click="ClickToButton4" Content=" " HorizontalAlignment="Left" Margin="590,300,0,0" VerticalAlignment="Top" Width="150" Height="50"/>
+                    <Image HorizontalAlignment="Center" Margin="0,-50,0,0" Height="200" VerticalAlignment="Center" Width="200" Source="NewFolder1/PerfectCookie.png" MouseDown="Image_MouseDown"/>
+                    <Button Name="Exit" Click="ClickToExit" FontSize="30" Content="Выход" HorizontalAlignment="Right" Margin="0,50,50,0" VerticalAlignment="Top" Width="150" Height="50"/>
+                </Grid>
+            </TabItem>
+            <TabItem Header="Shop">
+                <Grid Background="#FFE5E5E5"/>
+            </TabItem>
+        </TabControl>
+
+    </Grid>
+</Window>

+ 162 - 0
Clicker/MainWindow.xaml.cs

@@ -0,0 +1,162 @@
+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 Clicker
+{
+    /// <summary>
+    /// Логика взаимодействия для MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        int point = 0;
+        static int click = 1;
+        double sol_b1 = 10 + 10 * (30 + click * 0.2);
+        double sol_b2 = 20 + 20 * (60 + (click * 0.4));
+        double sol_b3 = 30 + 30 * (90 + (click * 0.6));
+        double sol_b4 = 40 + 40 * (120 + click * 0.8);
+
+        public MainWindow()
+        {
+            InitializeComponent();
+        }
+        public void Update()
+        {
+            Points.Content = "Points: " + point; // Вывод Points в первый label
+            PointsForClick.Content = "Points for click: " + click; // Вывод Points per click во второй label
+            Button1.Content = sol_b1.ToString(); //
+            Button2.Content = sol_b2.ToString(); // Вывод цены Upgrade для Points per click на кнопке 
+            Button3.Content = sol_b3.ToString();
+            Button4.Content = sol_b4.ToString();
+        }
+        public int Image_MouseDownTest(int point, int click)
+        {
+            return point += click;
+        }
+        private void Image_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            point = Image_MouseDownTest(point, click);
+            Update();
+        }
+        //кнопка 1
+        public int PointMinus_1(int point, double sol_b1)
+        {
+            return point -= Convert.ToInt32(Math.Round(sol_b1));
+        }
+        public int ClckPlus_1(int click)
+        {
+            return click += 3;
+        }
+        public bool IsOk(int point, double sol_b1)
+        {
+            if (point >= sol_b1)
+            {
+                return true;
+            }
+            return false;
+        }
+        private void ClickToButton1(object sender, RoutedEventArgs e)
+        {
+            if (IsOk(point, sol_b1))
+            {
+                point = PointMinus_1(point, sol_b1);
+                click = ClckPlus_1(click);
+                Update();
+            }
+        }
+        //кнопка 2
+        public int PointMinus_2(int point, double sol_b2)
+        {
+            return point -= Convert.ToInt32(Math.Round(sol_b2));
+        }
+        public int ClckPlus_2(int click)
+        {
+            return click += 5;
+        }
+        public bool IsOk2(int point, double sol_b2)
+        {
+            if (point >= sol_b2)
+            {
+                return true;
+            }
+            return false;
+        }
+        private void ClickToButton2(object sender, RoutedEventArgs e)
+        {
+            if (IsOk2(point, sol_b2))
+            {
+                point = PointMinus_2(point, sol_b2);
+                click = ClckPlus_2(click);
+                Update();
+            }
+        }
+        //кнопка 3
+        public int PointMinus_3(int point, double sol_b3)
+        {
+            return point -= Convert.ToInt32(Math.Round(sol_b3));
+        }
+        public int ClckPlus_3(int click)
+        {
+            return click += 7;
+        }
+        public bool IsOk3(int point, double sol_b3)
+        {
+            if (point >= sol_b3)
+            {
+                return true;
+            }
+            return false;
+        }
+        private void ClickToButton3(object sender, RoutedEventArgs e)
+        {
+            if (IsOk3(point, sol_b3))
+            {
+                point = PointMinus_3(point, sol_b3);
+                click = ClckPlus_3(click);
+                Update();
+            }
+        }
+        //кнопка 4
+        public int PointMinus_4(int point, double sol_b4)
+        {
+            return point -= Convert.ToInt32(Math.Round(sol_b4));
+        }
+        public int ClckPlus_4(int click)
+        {
+            return click += 10;
+        }
+        public bool IsOk4(int point, double sol_b4)
+        {
+            if (point >= sol_b4)
+            {
+                return true;
+            }
+            return false;
+        }
+        private void ClickToButton4(object sender, RoutedEventArgs e)
+        {
+            if (IsOk4(point, sol_b4))
+            {
+                point = PointMinus_4(point, sol_b4);
+                click = ClckPlus_4(click);
+                Update();
+            }
+        }
+
+        private void ClickToExit(object sender, RoutedEventArgs e)
+        {
+            Application.Current.Shutdown();
+        }
+    }
+}

BIN
Clicker/NewFolder1/PerfectCookie.png


+ 55 - 0
Clicker/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("Clicker")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Clicker")]
+[assembly: AssemblyCopyright("Copyright ©  2021")]
+[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")]

+ 70 - 0
Clicker/Properties/Resources.Designer.cs

@@ -0,0 +1,70 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код был создан программным средством.
+//     Версия среды выполнения: 4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+//     код создан повторно.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace Clicker.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("Clicker.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
Clicker/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>

+ 29 - 0
Clicker/Properties/Settings.Designer.cs

@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+// <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 Clicker.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
Clicker/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>

+ 20 - 0
TestForClicker/Properties/AssemblyInfo.cs

@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("TestForClicker")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TestForClicker")]
+[assembly: AssemblyCopyright("Copyright ©  2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("8a4824d1-d09f-41d8-8065-64ff56ffe8c4")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 77 - 0
TestForClicker/TestForClicker.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.2.1.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.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>{8A4824D1-D09F-41D8-8065-64FF56FFE8C4}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>TestForClicker</RootNamespace>
+    <AssemblyName>TestForClicker</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.2.1.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.2.1.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="..\Clicker\Clicker.csproj">
+      <Project>{df3f0e25-7c8a-4a0a-9d43-db1d92798e51}</Project>
+      <Name>Clicker</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.2.1.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props'))" />
+    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets'))" />
+  </Target>
+  <Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" />
+</Project>

+ 180 - 0
TestForClicker/UnitTest1.cs

@@ -0,0 +1,180 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Clicker;
+
+namespace TestForClicker
+{
+    [TestClass]
+    public class UnitTest1
+    {
+        [TestMethod]
+        public void TestMethod1()
+        {
+            //1 point
+            int point = 1;
+            int click = 1;
+            int expected = 2;
+
+            MainWindow window = new MainWindow();
+            int actual = window.Image_MouseDownTest(point, click);
+
+            Assert.AreEqual(expected, actual);
+
+            //3 point
+            point = 1;
+            click = 3;
+            expected = 4;
+
+            actual = window.Image_MouseDownTest(point, click);
+
+            Assert.AreEqual(expected, actual);
+
+            //5 point
+            point = 1;
+            click = 5;
+            expected = 6;
+
+            actual = window.Image_MouseDownTest(point, click);
+
+            Assert.AreEqual(expected, actual);
+
+            //7 point
+            point = 1;
+            click = 7;
+            expected = 8;
+
+            actual = window.Image_MouseDownTest(point, click);
+
+            Assert.AreEqual(expected, actual);
+
+            //10 point
+            point = 1;
+            click = 10;
+            expected = 11;
+
+            actual = window.Image_MouseDownTest(point, click);
+
+            Assert.AreEqual(expected, actual);
+        }
+        [TestMethod]
+        public void TestMethod2()
+        {
+            MainWindow window = new MainWindow();
+            //IsOk - true
+            int point = 313;
+            double sol_b1 = 312;
+            Assert.IsTrue(window.IsOk(point, sol_b1));
+            //IsOk - false
+            point = 213;
+            sol_b1 = 312;
+            Assert.IsFalse(window.IsOk(point, sol_b1));
+
+            //pointMinus
+            point = 312;
+            sol_b1 = 312;
+            int expected = 0;
+
+            int actual = window.PointMinus_1(point, sol_b1);
+
+            Assert.AreEqual(expected, actual);
+
+            //clickPlus
+            int click = 312;
+            expected = 315;
+
+            actual = window.ClckPlus_1(click);
+
+            Assert.AreEqual(expected, actual);
+        }
+        [TestMethod]
+        public void TestMethod3()
+        {
+            MainWindow window = new MainWindow();
+            //IsOk2 - true
+            int point = 1228;
+            double sol_b2 = 1228;
+            Assert.IsTrue(window.IsOk2(point, sol_b2));
+            //IsOk2 - false
+            point = 1128;
+            sol_b2 = 1228;
+            Assert.IsFalse(window.IsOk2(point, sol_b2));
+
+            //pointMinus2
+            point = 1228;
+            sol_b2 = 1228;
+            int expected = 0;
+
+            int actual = window.PointMinus_2(point, sol_b2);
+
+            Assert.AreEqual(expected, actual);
+
+            //clickPlus2
+            int click = 1228;
+            expected = 1233;
+
+            actual = window.ClckPlus_2(click);
+
+            Assert.AreEqual(expected, actual);
+        }
+        [TestMethod]
+        public void TestMethod4()
+        {
+            MainWindow window = new MainWindow();
+            //IsOk3 - true
+            int point = 2748;
+            double sol_b3 = 2748;
+            Assert.IsTrue(window.IsOk3(point, sol_b3));
+            //IsOk3 - false
+            point = 2648;
+            sol_b3 = 2748;
+            Assert.IsFalse(window.IsOk3(point, sol_b3));
+
+            //pointMinus3
+            point = 2748;
+            sol_b3 = 2748;
+            int expected = 0;
+
+            int actual = window.PointMinus_3(point, sol_b3);
+
+            Assert.AreEqual(expected, actual);
+
+            //clickPlus3
+            int click = 2748;
+            expected = 2755;
+
+            actual = window.ClckPlus_3(click);
+
+            Assert.AreEqual(expected, actual);
+        }
+        [TestMethod]
+        public void TestMethod5()
+        {
+            MainWindow window = new MainWindow();
+            //IsOk4 - true
+            int point = 4872;
+            double sol_b4 = 4872;
+            Assert.IsTrue(window.IsOk4(point, sol_b4));
+            //IsOk4 - false
+            point = 4772;
+            sol_b4 = 4872;
+            Assert.IsFalse(window.IsOk4(point, sol_b4));
+
+            //pointMinus4
+            point = 4872;
+            sol_b4 = 4872;
+            int expected = 0;
+
+            int actual = window.PointMinus_4(point, sol_b4);
+
+            Assert.AreEqual(expected, actual);
+
+            //clickPlus4
+            int click = 4872;
+            expected = 4882;
+
+            actual = window.ClckPlus_4(click);
+
+            Assert.AreEqual(expected, actual);
+        }
+    }
+}

+ 5 - 0
TestForClicker/packages.config

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