diff --git a/.gitignore b/.gitignore index ca1c7a3..e0dfc29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,85 +1,46 @@ -# ---> VisualStudio -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore +# The following command works for downloading when using Git for Windows: +# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore +# +# Download this file using PowerShell v3 under Windows with the following comand: +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore +# +# or wget: +# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore # User-specific files -*.rsuser *.suo *.user -*.userosscache *.sln.docstates -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - # Build results [Dd]ebug/ -[Dd]ebugPublic/ [Rr]elease/ -[Rr]eleases/ x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ [Bb]in/ [Oo]bj/ -[Ll]og/ -[Ll]ogs/ +# build folder is nowadays used for build scripts and should not be ignored +#build/ -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio *_i.c *_p.c -*_h.h *.ilk *.meta *.obj -*.iobj *.pch *.pdb -*.ipdb *.pgc *.pgd *.rsp @@ -89,41 +50,25 @@ StyleCopReport.xml *.tlh *.tmp *.tmp_proj -*_wpftmp.csproj *.log -*.tlog *.vspscc *.vssscc .builds *.pidb -*.svclog *.scc -# Chutzpah Test files -_Chutzpah* - # Visual C++ cache files ipch/ *.aps *.ncb -*.opendb *.opensdf *.sdf *.cachefile -*.VC.db -*.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ # Guidance Automation Toolkit *.gpState @@ -131,7 +76,6 @@ $tf/ # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper -*.DotSettings.user # TeamCity is a build add-in _TeamCity* @@ -139,30 +83,9 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - # NCrunch -_NCrunch_* +*.ncrunch* .*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ # Installshield output folder [Ee]xpress/ @@ -181,220 +104,124 @@ DocProject/Help/html publish/ # Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj +*.Publish.xml -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ +# Windows Azure Build Output +csx *.build.csdef -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files +# Windows Store app package directory AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ # Others +*.Cache ClientBin/ +[Ss]tyle[Cc]op.* ~$* *~ *.dbmdl -*.dbproj.schemaview -*.jfm +*.[Pp]ublish.xml *.pfx *.publishsettings -orleans.codegen.cs +modulesbin/ +tempbin/ -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ +# EPiServer Site file (VPP) +AppData/ # RIA/Silverlight projects Generated_Code/ -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak + +# vim +*.txt~ +*.swp +*.swo + +# Temp files when opening LibreOffice on ubuntu +.~lock.* + +# svn +.svn + +# CVS - Source Control +**/CVS/ + +# Remainings from resolving conflicts in Source Control +*.orig # SQL Server files -*.mdf -*.ldf -*.ndf +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl -# Microsoft Fakes -FakesAssemblies/ +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml -# GhostDoc plugin setting file -*.GhostDoc.xml +# ========================= +# Windows detritus +# ========================= -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ +# Windows image file caches +Thumbs.db +ehthumbs.db -# Visual Studio 6 build log -*.plg +# Folder config file +Desktop.ini -# Visual Studio 6 workspace options file -*.opt +# Recycle Bin used on file shares +$RECYCLE.BIN/ -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw +# OS generated files # +Icon? -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp +# Mac desktop service store files +.DS_Store -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp +# SASS Compiler cache +.sass-cache -# Visual Studio 6 technical files -*.ncb -*.aps +# Visual Studio 2014 CTP +**/*.sln.ide -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions +# Visual Studio temp something +.vs/ -# Paket dependency manager -.paket/paket.exe -paket-files/ +# dotnet stuff +project.lock.json -# FAKE - F# Make -.fake/ +# VS 2015+ +*.vc.vc.opendb +*.vc.db -# CodeRush personal settings -.cr/personal +# Rider +.idea/ -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc +# Visual Studio Code +.vscode/ -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config +# Output folder used by Webpack or other FE stuff +**/node_modules/* +**/wwwroot/* -# Tabs Studio -*.tss +# SpecFlow specific +*.feature.cs +*.feature.xlsx.* +*.Specs_*.html -# Telerik's JustMock configuration file -*.jmconfig +# UWP Projects +AppPackages/ -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml +##### +# End of core ignore list, below put you custom 'per project' settings (patterns or path) +##### diff --git a/ProjectAntiAircraftGun/Form1.Designer.cs b/ProjectAntiAircraftGun/Form1.Designer.cs deleted file mode 100644 index f0a04d1..0000000 --- a/ProjectAntiAircraftGun/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace ProjectAntiAircraftGun -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/ProjectAntiAircraftGun/Form1.cs b/ProjectAntiAircraftGun/Form1.cs deleted file mode 100644 index c5553d6..0000000 --- a/ProjectAntiAircraftGun/Form1.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ProjectAntiAircraftGun -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/ProjectAntiAircraftGun/Program.cs b/ProjectAntiAircraftGun/Program.cs deleted file mode 100644 index f60dd13..0000000 --- a/ProjectAntiAircraftGun/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace ProjectAntiAircraftGun -{ - internal static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - // To customize application configuration such as set high DPI settings or default font, - // see https://aka.ms/applicationconfiguration. - ApplicationConfiguration.Initialize(); - Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/ProjectAntiAircraftGun/ProjectAntiAircraftGun.csproj b/ProjectAntiAircraftGun/ProjectAntiAircraftGun.csproj deleted file mode 100644 index e1a0735..0000000 --- a/ProjectAntiAircraftGun/ProjectAntiAircraftGun.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - WinExe - net7.0-windows - enable - true - enable - - - \ No newline at end of file diff --git a/ProjectLiner/.vs/ProjectEvaluation/projectliner.metadata.v7.bin b/ProjectLiner/.vs/ProjectEvaluation/projectliner.metadata.v7.bin new file mode 100644 index 0000000..c9c5ab9 Binary files /dev/null and b/ProjectLiner/.vs/ProjectEvaluation/projectliner.metadata.v7.bin differ diff --git a/ProjectLiner/.vs/ProjectEvaluation/projectliner.projects.v7.bin b/ProjectLiner/.vs/ProjectEvaluation/projectliner.projects.v7.bin new file mode 100644 index 0000000..2e61481 Binary files /dev/null and b/ProjectLiner/.vs/ProjectEvaluation/projectliner.projects.v7.bin differ diff --git a/ProjectLiner/.vs/ProjectLiner/DesignTimeBuild/.dtbcache.v2 b/ProjectLiner/.vs/ProjectLiner/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..56012cd Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/DesignTimeBuild/.dtbcache.v2 differ diff --git a/ProjectLiner/.vs/ProjectLiner/FileContentIndex/57eed10a-826f-42f5-9d3c-ac29b4f49149.vsidx b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/57eed10a-826f-42f5-9d3c-ac29b4f49149.vsidx new file mode 100644 index 0000000..77dc500 Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/57eed10a-826f-42f5-9d3c-ac29b4f49149.vsidx differ diff --git a/ProjectLiner/.vs/ProjectLiner/FileContentIndex/5e8e704f-127d-4d12-ab12-19f196e2ff2e.vsidx b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/5e8e704f-127d-4d12-ab12-19f196e2ff2e.vsidx new file mode 100644 index 0000000..9a1f252 Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/5e8e704f-127d-4d12-ab12-19f196e2ff2e.vsidx differ diff --git a/ProjectLiner/.vs/ProjectLiner/FileContentIndex/8398abf5-0c42-41a3-9bdc-664f70068d7e.vsidx b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/8398abf5-0c42-41a3-9bdc-664f70068d7e.vsidx new file mode 100644 index 0000000..a2e122b Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/8398abf5-0c42-41a3-9bdc-664f70068d7e.vsidx differ diff --git a/ProjectLiner/.vs/ProjectLiner/FileContentIndex/a370e9f2-84ae-4b0c-8c8f-0526ba89f656.vsidx b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/a370e9f2-84ae-4b0c-8c8f-0526ba89f656.vsidx new file mode 100644 index 0000000..51c00bb Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/FileContentIndex/a370e9f2-84ae-4b0c-8c8f-0526ba89f656.vsidx differ diff --git a/ProjectLiner/.vs/ProjectLiner/v17/.futdcache.v2 b/ProjectLiner/.vs/ProjectLiner/v17/.futdcache.v2 new file mode 100644 index 0000000..7dd3493 Binary files /dev/null and b/ProjectLiner/.vs/ProjectLiner/v17/.futdcache.v2 differ diff --git a/ProjectLiner/.vs/ProjectLiner/v17/DocumentLayout.json b/ProjectLiner/.vs/ProjectLiner/v17/DocumentLayout.json new file mode 100644 index 0000000..267a5cd --- /dev/null +++ b/ProjectLiner/.vs/ProjectLiner/v17/DocumentLayout.json @@ -0,0 +1,190 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\formliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\formliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\formliner.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\formliner.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\drawnings\\drawningbetterliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\drawnings\\drawningbetterliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\drawnings\\drawningliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\drawnings\\drawningliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\entities\\entitybetterliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\entities\\entitybetterliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\entities\\entityliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\entities\\entityliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\movementstrategy\\movetocorner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\movementstrategy\\movetocorner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\movementstrategy\\movetocenter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\movementstrategy\\movetocenter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\movementstrategy\\moveableliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\movementstrategy\\moveableliner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|c:\\somegitstuff\\isebd-11_khatypov_k.r_fundamental\\projectliner\\projectliner\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{7FB62E78-175F-490A-B5F2-2FF676947033}|ProjectLiner\\ProjectLiner.csproj|solutionrelative:projectliner\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "FormLiner.Designer.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\FormLiner.Designer.cs", + "RelativeDocumentMoniker": "ProjectLiner\\FormLiner.Designer.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\FormLiner.Designer.cs", + "RelativeToolTip": "ProjectLiner\\FormLiner.Designer.cs", + "ViewState": "AQIAACoAAAAAAAAAAAAewDMAAAAhAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-24T06:50:50.101Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "FormLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\FormLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\FormLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\FormLiner.cs", + "RelativeToolTip": "ProjectLiner\\FormLiner.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABMAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-24T06:44:12.266Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "DrawningBetterLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Drawnings\\DrawningBetterLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\Drawnings\\DrawningBetterLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Drawnings\\DrawningBetterLiner.cs", + "RelativeToolTip": "ProjectLiner\\Drawnings\\DrawningBetterLiner.cs", + "ViewState": "AQIAAAMAAAAAAAAAAAAAABAAAAAeAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-24T06:24:10.949Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "EntityBetterLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Entities\\EntityBetterLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\Entities\\EntityBetterLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Entities\\EntityBetterLiner.cs", + "RelativeToolTip": "ProjectLiner\\Entities\\EntityBetterLiner.cs", + "ViewState": "AQIAAA4AAAAAAAAAAAD4vxwAAABBAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-24T06:26:19.536Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "EntityLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Entities\\EntityLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\Entities\\EntityLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Entities\\EntityLiner.cs", + "RelativeToolTip": "ProjectLiner\\Entities\\EntityLiner.cs", + "ViewState": "AQIAAA0AAAAAAAAAAAAQwAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-24T06:25:44.938Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "MoveToCenter.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveToCenter.cs", + "RelativeDocumentMoniker": "ProjectLiner\\MovementStrategy\\MoveToCenter.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveToCenter.cs", + "RelativeToolTip": "ProjectLiner\\MovementStrategy\\MoveToCenter.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABkAAAADAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T15:59:24.952Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "MoveToCorner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveToCorner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\MovementStrategy\\MoveToCorner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveToCorner.cs", + "RelativeToolTip": "ProjectLiner\\MovementStrategy\\MoveToCorner.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABcAAAAXAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T15:58:58.074Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "DrawningLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Drawnings\\DrawningLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\Drawnings\\DrawningLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Drawnings\\DrawningLiner.cs", + "RelativeToolTip": "ProjectLiner\\Drawnings\\DrawningLiner.cs", + "ViewState": "AQIAALwAAAAAAAAAAAASwMcAAAB5AAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T15:54:39.654Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "MoveableLiner.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveableLiner.cs", + "RelativeDocumentMoniker": "ProjectLiner\\MovementStrategy\\MoveableLiner.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\MovementStrategy\\MoveableLiner.cs", + "RelativeToolTip": "ProjectLiner\\MovementStrategy\\MoveableLiner.cs", + "ViewState": "AQIAAA4AAAAAAAAAAAAAwAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T15:54:19.94Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Program.cs", + "DocumentMoniker": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Program.cs", + "RelativeDocumentMoniker": "ProjectLiner\\Program.cs", + "ToolTip": "C:\\SomeGitStuff\\ISEbd-11_Khatypov_K.R_fundamental\\ProjectLiner\\ProjectLiner\\Program.cs", + "RelativeToolTip": "ProjectLiner\\Program.cs", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T15:50:13.098Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/ProjectAntiAircraftGun/ProjectAntiAircraftGun.sln b/ProjectLiner/ProjectLiner.sln similarity index 55% rename from ProjectAntiAircraftGun/ProjectAntiAircraftGun.sln rename to ProjectLiner/ProjectLiner.sln index 71ca527..57ac0bd 100644 --- a/ProjectAntiAircraftGun/ProjectAntiAircraftGun.sln +++ b/ProjectLiner/ProjectLiner.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.6.33815.320 +VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectAntiAircraftGun", "ProjectAntiAircraftGun.csproj", "{0C215558-2860-459F-A04D-5BCE3792F5CC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectLiner", "ProjectLiner\ProjectLiner.csproj", "{7FB62E78-175F-490A-B5F2-2FF676947033}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0C215558-2860-459F-A04D-5BCE3792F5CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C215558-2860-459F-A04D-5BCE3792F5CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C215558-2860-459F-A04D-5BCE3792F5CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C215558-2860-459F-A04D-5BCE3792F5CC}.Release|Any CPU.Build.0 = Release|Any CPU + {7FB62E78-175F-490A-B5F2-2FF676947033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FB62E78-175F-490A-B5F2-2FF676947033}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FB62E78-175F-490A-B5F2-2FF676947033}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FB62E78-175F-490A-B5F2-2FF676947033}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2A46C0F6-1F06-4A83-A51A-7BC26DD276FF} + SolutionGuid = {78BFA3C9-3BCC-4037-9217-9197133D11B5} EndGlobalSection EndGlobal diff --git a/ProjectLiner/ProjectLiner/Drawnings/DirectionType.cs b/ProjectLiner/ProjectLiner/Drawnings/DirectionType.cs new file mode 100644 index 0000000..4cfd804 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Drawnings/DirectionType.cs @@ -0,0 +1,32 @@ +namespace ProjectLiner.Drawnings; + +/// +/// Направление перемещения +/// +public enum DirectionType +{ + /// + /// Неизвестное направление + /// + Unknow = -1, + + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Drawnings/DrawningBetterLiner.cs b/ProjectLiner/ProjectLiner/Drawnings/DrawningBetterLiner.cs new file mode 100644 index 0000000..f611f06 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Drawnings/DrawningBetterLiner.cs @@ -0,0 +1,64 @@ +using ProjectLiner.Entities; + +namespace ProjectLiner.Drawnings; + +/// +/// Класс, отвечающий за прорисовку и перемещение объекта-сущности +/// +public class DrawningBetterLiner : DrawningLiner +{ + /// + /// Конструктор + /// + /// Скорость + /// Вес + /// Основной цвет + /// Дополнительный цвет + public DrawningBetterLiner(int speed, double weight, Color bodyColor, Color additionalColor, bool hasMark, bool hasDecoration) : base(80, 50) + { + EntityLiner = new EntityBetterLiner(speed, weight, bodyColor, additionalColor, hasMark, hasDecoration); + } + + public override void DrawTransport(Graphics g) + { + if (EntityLiner == null || EntityLiner is not EntityBetterLiner betterLiner || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + Brush additionalBrush = new SolidBrush(betterLiner.AdditionalColor); + + base.DrawTransport(g); + + //Марка на борту + if (((EntityBetterLiner)EntityLiner).HasMark) + { + g.FillRectangles(additionalBrush, new Rectangle[] + { + new(_startPosX.Value+15,_startPosY.Value+38,17,3), + new(_startPosX.Value+22,_startPosY.Value+32,3,16) + }); + } + + //Декорации + if (((EntityBetterLiner)EntityLiner).HasDecoratins) + { + g.FillRectangles(additionalBrush, new Rectangle[] + { + new(_startPosX.Value+8,_startPosY.Value+0,10,20), + new(_startPosX.Value+26,_startPosY.Value+0,10,20), + new(_startPosX.Value+44,_startPosY.Value+0,10,20), + new(_startPosX.Value+62,_startPosY.Value+0,10,20), + }); + g.DrawRectangles(pen, new Rectangle[] + { + new(_startPosX.Value+8,_startPosY.Value+0,10,20), + new(_startPosX.Value+26,_startPosY.Value+0,10,20), + new(_startPosX.Value+44,_startPosY.Value+0,10,20), + new(_startPosX.Value+62,_startPosY.Value+0,10,20), + }); + + } + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Drawnings/DrawningLiner.cs b/ProjectLiner/ProjectLiner/Drawnings/DrawningLiner.cs new file mode 100644 index 0000000..a7a0cf1 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Drawnings/DrawningLiner.cs @@ -0,0 +1,239 @@ +using ProjectLiner.Entities; + +namespace ProjectLiner.Drawnings; + +/// +/// Класс, отвечающий за прорисовку и перемещение базового объекта-сущности +/// +public class DrawningLiner +{ + /// + /// Класс-сущность + /// + public EntityLiner? EntityLiner { get; protected set; } + + /// + /// Ширина окна + /// + private int? _pictureWidth; + + /// + /// Высота окна + /// + private int? _pictureHeight; + + /// + /// Левая координата прорисовки автомобиля + /// + protected int? _startPosX; + + /// + /// Верхняя кооридната прорисовки автомобиля + /// + protected int? _startPosY; + + /// + /// Ширина прорисовки автомобиля + /// + private readonly int _drawningLinerWidth = 80; + + /// + /// Высота прорисовки автомобиля + /// + private readonly int _drawningLinerHeight = 50; + + /// + /// Координата X объекта + /// + public int? GetPosX => _startPosX; + + /// + /// Координата Y объекта + /// + public int? GetPosY => _startPosY; + + /// + /// Ширина объекта + /// + public int GetWidth => _drawningLinerWidth; + + /// + /// Высота объекта + /// + public int GetHeight => _drawningLinerHeight; + + /// + /// Пустой конструктор + /// + private DrawningLiner() + { + _pictureWidth = null; + _pictureHeight = null; + _startPosX = null; + _startPosY = null; + } + + /// + /// Конструктор + /// + /// Скорость + /// Вес + /// Основной цвет + public DrawningLiner(int speed, double weight, Color bodyColor) : this() + { + EntityLiner = new EntityLiner(speed, weight, bodyColor); + } + + /// + /// Конструктор для наследников + /// + /// Ширина прорисовки лайнера + /// Высота прорисовки лайнера + protected DrawningLiner(int drawningLinerWidth, int drawningLinerHeight) : this() + { + _drawningLinerWidth = drawningLinerWidth; + _pictureHeight = drawningLinerHeight; + } + + /// + /// Установка границ поля + /// + /// Ширина поля + /// Высота поля + /// true - границы заданы, false - проверка не пройдена, нельзя разместить объект в этих размерах + public bool SetPictureSize(int width, int height) + { + if (_drawningLinerWidth > width || _drawningLinerHeight > height) + return false; + + _pictureWidth = width; + _pictureHeight = height; + if (_startPosX.HasValue && _startPosY.HasValue) + { + if (_pictureWidth - _drawningLinerWidth < _startPosX) + _startPosX = _pictureWidth - _drawningLinerWidth; + if (_pictureHeight - _drawningLinerHeight < _startPosY) + _startPosY = _pictureHeight - _drawningLinerHeight; + } + return true; + } + + /// + /// Установка позиции + /// + /// Координата X + /// Координата Y + public void SetPosition(int x, int y) + { + if (!_pictureHeight.HasValue || !_pictureWidth.HasValue) + { + return; + } + + _startPosX = _pictureWidth - _drawningLinerWidth < x ? _pictureWidth - _drawningLinerWidth : x; + _startPosY = _pictureHeight - _drawningLinerHeight < y ? _pictureHeight - _drawningLinerHeight : y; + + } + + /// + /// Изменение направления перемещения + /// + /// Направление + /// true - перемещене выполнено, false - перемещение невозможно + public bool MoveTransport(DirectionType direction) + { + if (EntityLiner == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return false; + } + + switch (direction) + { + //влево + case DirectionType.Left: + if (_startPosX.Value - EntityLiner.Step > 0) + { + _startPosX -= (int)EntityLiner.Step; + } + return true; + //вверх + case DirectionType.Up: + if (_startPosY.Value - EntityLiner.Step > 0) + { + _startPosY -= (int)EntityLiner.Step; + } + return true; + // вправо + case DirectionType.Right: + if (_startPosX.Value + EntityLiner.Step < _pictureWidth - _drawningLinerWidth) + { + _startPosX += (int)EntityLiner.Step; + } + return true; + //вниз + case DirectionType.Down: + if (_startPosY.Value + EntityLiner.Step < _pictureHeight - _drawningLinerHeight) + { + _startPosY += (int)EntityLiner.Step; + } + return true; + + default: + return false; + } + } + /// + /// Прорисовка объекта + /// + /// + public virtual void DrawTransport(Graphics g) + { + if (EntityLiner == null || !_startPosX.HasValue || !_startPosY.HasValue) + { + return; + } + + Pen pen = new(Color.Black); + + Brush mainBrush = new SolidBrush(EntityLiner.BodyColor); + + Brush negativeMainBrush = new SolidBrush(Color.FromArgb(255-EntityLiner.BodyColor.R, 255 - EntityLiner.BodyColor.G, 255 - EntityLiner.BodyColor.B)); + + g.FillPolygon(mainBrush, new Point[] { + new(_startPosX.Value+0, _startPosY.Value + 30), + new(_startPosX.Value+15,_startPosY.Value+50), + new(_startPosX.Value+65,_startPosY.Value+50), + new(_startPosX.Value+80,_startPosY.Value+30), + new(_startPosX.Value+0,_startPosY.Value+30), + new(_startPosX.Value+0,_startPosY.Value+20), + new(_startPosX.Value+80, _startPosY.Value+20), + new(_startPosX.Value+80, _startPosY.Value+30) + }); + g.DrawLines(pen, new Point[] { + new(_startPosX.Value+0, _startPosY.Value + 30), + new(_startPosX.Value+15,_startPosY.Value+50), + new(_startPosX.Value+65,_startPosY.Value+50), + new(_startPosX.Value+80,_startPosY.Value+30), + new(_startPosX.Value+0,_startPosY.Value+30), + new(_startPosX.Value+0,_startPosY.Value+20), + new(_startPosX.Value+80, _startPosY.Value+20), + new(_startPosX.Value+80, _startPosY.Value+30) + }); + + g.FillRectangles(negativeMainBrush, new Rectangle[]{ + new(_startPosX.Value+5,_startPosY.Value+22,10,6), + new(_startPosX.Value+20,_startPosY.Value+22,10,6), + new(_startPosX.Value+35,_startPosY.Value+22,10,6), + new(_startPosX.Value+50,_startPosY.Value+22,10,6), + new(_startPosX.Value+65,_startPosY.Value+22,10,6), + }); + g.DrawRectangles(pen, new Rectangle[]{ + new(_startPosX.Value+5,_startPosY.Value+22,10,6), + new(_startPosX.Value+20,_startPosY.Value+22,10,6), + new(_startPosX.Value+35,_startPosY.Value+22,10,6), + new(_startPosX.Value+50,_startPosY.Value+22,10,6), + new(_startPosX.Value+65,_startPosY.Value+22,10,6), + }); + + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Entities/EntityBetterLiner.cs b/ProjectLiner/ProjectLiner/Entities/EntityBetterLiner.cs new file mode 100644 index 0000000..c9da407 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Entities/EntityBetterLiner.cs @@ -0,0 +1,38 @@ +namespace ProjectLiner.Entities; + +/// +/// Класс-сущность "Спортивный автомобиль" +/// +public class EntityBetterLiner : EntityLiner +{/// + /// Дополнительный цвет (для опциональных элементов) + /// + public Color AdditionalColor { get; private set; } + + /// + /// Имеет марку на боку + /// + public bool HasMark { get; private set; } + + /// + /// Имеет декорации сверху + /// + public bool HasDecoratins { get; private set; } + + + /// + /// Конструктор сущности + /// + /// Скорость + /// Вес автомобиля + /// Основной цвет + /// Дополнительный цвет + /// Присутствие марки + /// Присутствие декораций + public EntityBetterLiner(int speed, double weight, Color bodyColor, Color additionalColor, bool hasMark, bool hasDecoratins) : base(speed, weight, bodyColor) + { + AdditionalColor = additionalColor; + HasMark = hasMark; + HasDecoratins = hasDecoratins; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Entities/EntityLiner.cs b/ProjectLiner/ProjectLiner/Entities/EntityLiner.cs new file mode 100644 index 0000000..a48d099 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Entities/EntityLiner.cs @@ -0,0 +1,40 @@ +namespace ProjectLiner.Entities; + +/// +/// Класс-сущность "Автомобиль" +/// +public class EntityLiner +{ + /// + /// Скорость + /// + public int Speed { get; private set; } + + /// + /// Вес + /// + public double Weight { get; private set; } + + /// + /// Основной цвет + /// + public Color BodyColor { get; private set; } + + /// + /// Шаг перемещения автомобиля + /// + public double Step => Speed * 100 / Weight; + + /// + /// Конструктор сущности + /// + /// Скорость + /// Вес автомобиля + /// Основной цвет + public EntityLiner(int speed, double weight, Color bodyColor) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/FormLiner.Designer.cs b/ProjectLiner/ProjectLiner/FormLiner.Designer.cs new file mode 100644 index 0000000..fe5ebb3 --- /dev/null +++ b/ProjectLiner/ProjectLiner/FormLiner.Designer.cs @@ -0,0 +1,174 @@ +namespace ProjectLiner +{ + partial class FormLiner + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + pictureBoxLiner = new PictureBox(); + buttonCreateBetterLiner = new Button(); + buttonLeft = new Button(); + buttonUp = new Button(); + buttonDown = new Button(); + buttonRight = new Button(); + buttonCreateLiner = new Button(); + comboBoxStrategy = new ComboBox(); + buttonStrategyStep = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBoxLiner).BeginInit(); + SuspendLayout(); + // + // pictureBoxLiner + // + pictureBoxLiner.Dock = DockStyle.Fill; + pictureBoxLiner.Location = new Point(0, 0); + pictureBoxLiner.Name = "pictureBoxLiner"; + pictureBoxLiner.Size = new Size(923, 597); + pictureBoxLiner.TabIndex = 0; + pictureBoxLiner.TabStop = false; + // + // buttonCreateBetterLiner + // + buttonCreateBetterLiner.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateBetterLiner.Location = new Point(12, 562); + buttonCreateBetterLiner.Name = "buttonCreateBetterLiner"; + buttonCreateBetterLiner.Size = new Size(223, 23); + buttonCreateBetterLiner.TabIndex = 1; + buttonCreateBetterLiner.Text = "Создать крутой лайнер"; + buttonCreateBetterLiner.UseVisualStyleBackColor = true; + buttonCreateBetterLiner.Click += ButtonCreateBetterLiner_Click; + // + // buttonLeft + // + buttonLeft.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonLeft.BackgroundImage = Properties.Resources.arrowLeft; + buttonLeft.BackgroundImageLayout = ImageLayout.Stretch; + buttonLeft.Location = new Point(787, 550); + buttonLeft.Name = "buttonLeft"; + buttonLeft.Size = new Size(35, 35); + buttonLeft.TabIndex = 2; + buttonLeft.UseVisualStyleBackColor = true; + buttonLeft.Click += ButtonMove_Click; + // + // buttonUp + // + buttonUp.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonUp.BackgroundImage = Properties.Resources.arrowUp; + buttonUp.BackgroundImageLayout = ImageLayout.Stretch; + buttonUp.Location = new Point(828, 509); + buttonUp.Name = "buttonUp"; + buttonUp.Size = new Size(35, 35); + buttonUp.TabIndex = 3; + buttonUp.UseVisualStyleBackColor = true; + buttonUp.Click += ButtonMove_Click; + // + // buttonDown + // + buttonDown.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonDown.BackgroundImage = Properties.Resources.arrowDown; + buttonDown.BackgroundImageLayout = ImageLayout.Stretch; + buttonDown.Location = new Point(828, 550); + buttonDown.Name = "buttonDown"; + buttonDown.Size = new Size(35, 35); + buttonDown.TabIndex = 4; + buttonDown.UseVisualStyleBackColor = true; + buttonDown.Click += ButtonMove_Click; + // + // buttonRight + // + buttonRight.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonRight.BackgroundImage = Properties.Resources.arrowRight; + buttonRight.BackgroundImageLayout = ImageLayout.Stretch; + buttonRight.Location = new Point(869, 550); + buttonRight.Name = "buttonRight"; + buttonRight.Size = new Size(35, 35); + buttonRight.TabIndex = 5; + buttonRight.UseVisualStyleBackColor = true; + buttonRight.Click += ButtonMove_Click; + // + // buttonCreateLiner + // + buttonCreateLiner.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; + buttonCreateLiner.Location = new Point(250, 562); + buttonCreateLiner.Name = "buttonCreateLiner"; + buttonCreateLiner.Size = new Size(223, 23); + buttonCreateLiner.TabIndex = 6; + buttonCreateLiner.Text = "Создать лайнер"; + buttonCreateLiner.UseVisualStyleBackColor = true; + buttonCreateLiner.Click += ButtonCreateLiner_Click; + // + // comboBoxStrategy + // + comboBoxStrategy.DropDownStyle = ComboBoxStyle.DropDownList; + comboBoxStrategy.FormattingEnabled = true; + comboBoxStrategy.Items.AddRange(new object[] { "К центру", "К краю" }); + comboBoxStrategy.Location = new Point(790, 12); + comboBoxStrategy.Name = "comboBoxStrategy"; + comboBoxStrategy.Size = new Size(121, 23); + comboBoxStrategy.TabIndex = 7; + // + // buttonStrategyStep + // + buttonStrategyStep.Location = new Point(836, 41); + buttonStrategyStep.Name = "buttonStrategyStep"; + buttonStrategyStep.Size = new Size(75, 23); + buttonStrategyStep.TabIndex = 8; + buttonStrategyStep.Text = "Шаг"; + buttonStrategyStep.UseVisualStyleBackColor = true; + buttonStrategyStep.Click += ButtonStrategyStep_Click; + // + // FormLiner + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(923, 597); + Controls.Add(buttonStrategyStep); + Controls.Add(comboBoxStrategy); + Controls.Add(buttonCreateLiner); + Controls.Add(buttonRight); + Controls.Add(buttonDown); + Controls.Add(buttonUp); + Controls.Add(buttonLeft); + Controls.Add(buttonCreateBetterLiner); + Controls.Add(pictureBoxLiner); + Name = "FormLiner"; + Text = "Лайнер"; + ((System.ComponentModel.ISupportInitialize)pictureBoxLiner).EndInit(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBoxLiner; + private Button buttonCreateBetterLiner; + private Button buttonLeft; + private Button buttonUp; + private Button buttonDown; + private Button buttonRight; + private Button buttonCreateLiner; + private ComboBox comboBoxStrategy; + private Button buttonStrategyStep; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/FormLiner.cs b/ProjectLiner/ProjectLiner/FormLiner.cs new file mode 100644 index 0000000..3bfac7f --- /dev/null +++ b/ProjectLiner/ProjectLiner/FormLiner.cs @@ -0,0 +1,168 @@ +using ProjectLiner.Drawnings; +using ProjectLiner.MovementStrategy; + +namespace ProjectLiner; + +/// +/// Форма работы с объектом "Спортивный автомобиль" +/// +public partial class FormLiner : Form +{ + /// + /// Поле-объект для прорисовки объекта + /// + private DrawningLiner? _drawningLiner; + + /// + /// Стратегия перемещения + /// + private AbstractStrategy? _strategy; + + /// + /// Конструктор формы + /// + public FormLiner() + { + InitializeComponent(); + _strategy = null; + } + + /// + /// Метод прорисовки машины + /// + private void Draw() + { + if (_drawningLiner == null) + { + return; + } + + Bitmap bmp = new(pictureBoxLiner.Width, pictureBoxLiner.Height); + Graphics gr = Graphics.FromImage(bmp); + _drawningLiner.DrawTransport(gr); + pictureBoxLiner.Image = bmp; + } + + /// + /// Создание объекта класса-перемещения + /// + /// Тип создаваемого объекта + private void CreateObject(string type) + { + Random random = new(); + switch (type) + { + case nameof(DrawningLiner): + _drawningLiner = new DrawningLiner(random.Next(100, 300), random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256))); + break; + case nameof(DrawningBetterLiner): + _drawningLiner = new DrawningBetterLiner(random.Next(100, 300), random.Next(1000, 3000), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), + Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2))); + break; + default: + return; + } + + _drawningLiner.SetPictureSize(pictureBoxLiner.Width, pictureBoxLiner.Height); + _drawningLiner.SetPosition(random.Next(10, 100), random.Next(10, 100)); + _strategy = null; + comboBoxStrategy.Enabled = true; + Draw(); + } + + /// + /// Обработка нажатия кнопки "Создать спортивный автомобиль" + /// + /// + /// + private void ButtonCreateBetterLiner_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningBetterLiner)); + + /// + /// Обработка нажатия кнопки "Создать автомобиль" + /// + /// + /// + private void ButtonCreateLiner_Click(object sender, EventArgs e) => CreateObject(nameof(DrawningLiner)); + + /// + /// Перемещение объекта по форме (нажатие кнопок навигации) + /// + /// + /// + private void ButtonMove_Click(object sender, EventArgs e) + { + if (_drawningLiner == null) + { + return; + } + + string name = ((Button)sender)?.Name ?? string.Empty; + bool result = false; + switch (name) + { + case "buttonUp": + result = _drawningLiner.MoveTransport(DirectionType.Up); + break; + case "buttonDown": + result = _drawningLiner.MoveTransport(DirectionType.Down); + break; + case "buttonLeft": + result = _drawningLiner.MoveTransport(DirectionType.Left); + break; + case "buttonRight": + result = _drawningLiner.MoveTransport(DirectionType.Right); + break; + } + + if (result) + { + Draw(); + } + } + + /// + /// Обработка нажатия кнопки "Шаг" + /// + /// + /// + private void ButtonStrategyStep_Click(object sender, EventArgs e) + { + if (_drawningLiner == null) + { + return; + } + + if (comboBoxStrategy.Enabled) + { + _strategy = comboBoxStrategy.SelectedIndex switch + { + 0 => new MoveToCenter(), + 1 => new MoveToCorner(), + _ => null, + }; + if (_strategy == null) + { + return; + } + _strategy.SetData(new MoveableLiner(_drawningLiner), pictureBoxLiner.Width, pictureBoxLiner.Height); + } + + if (_strategy == null) + { + return; + } + + comboBoxStrategy.Enabled = false; + _strategy.MakeStep(); + Draw(); + + if (_strategy.GetStatus() == StrategyStatus.Finish) + { + comboBoxStrategy.Enabled = true; + _strategy = null; + } + } +} \ No newline at end of file diff --git a/ProjectAntiAircraftGun/Form1.resx b/ProjectLiner/ProjectLiner/FormLiner.resx similarity index 93% rename from ProjectAntiAircraftGun/Form1.resx rename to ProjectLiner/ProjectLiner/FormLiner.resx index 1af7de1..af32865 100644 --- a/ProjectAntiAircraftGun/Form1.resx +++ b/ProjectLiner/ProjectLiner/FormLiner.resx @@ -1,17 +1,17 @@  - diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/AbstractStrategy.cs b/ProjectLiner/ProjectLiner/MovementStrategy/AbstractStrategy.cs new file mode 100644 index 0000000..dea4f76 --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/AbstractStrategy.cs @@ -0,0 +1,139 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Класс-стратегия перемещения объекта +/// +public abstract class AbstractStrategy +{ + /// + /// Перемещаемый объект + /// + private IMoveableObject? _moveableObject; + + /// + /// Статус перемещения + /// + private StrategyStatus _state = StrategyStatus.NotInit; + + /// + /// Ширина поля + /// + protected int FieldWidth { get; private set; } + + /// + /// Высота поля + /// + protected int FieldHeight { get; private set; } + + /// + /// Статус перемещения + /// + public StrategyStatus GetStatus() { return _state; } + + /// + /// Установка данных + /// + /// Перемещаемый объект + /// Ширина поля + /// Высота поля + public void SetData(IMoveableObject moveableObject, int width, int height) + { + if (moveableObject == null) + { + _state = StrategyStatus.NotInit; + return; + } + + _state = StrategyStatus.InProgress; + _moveableObject = moveableObject; + FieldWidth = width; + FieldHeight = height; + } + + /// + /// Шаг перемещения + /// + public void MakeStep() + { + if (_state != StrategyStatus.InProgress) + { + return; + } + + if (IsTargetDestinaion()) + { + _state = StrategyStatus.Finish; + return; + } + + MoveToTarget(); + } + + /// + /// Перемещение влево + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveLeft() => MoveTo(MovementDirection.Left); + + /// + /// Перемещение вправо + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveRight() => MoveTo(MovementDirection.Right); + + /// + /// Перемещение вверх + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveUp() => MoveTo(MovementDirection.Up); + + /// + /// Перемещение вниз + /// + /// Результат перемещения (true - удалось переместиться, false - неудача) + protected bool MoveDown() => MoveTo(MovementDirection.Down); + + /// + /// Параметры объекта + /// + protected ObjectParameters? GetObjectParameters => _moveableObject?.GetObjectPosition; + + /// + /// Шаг объекта + /// + /// + protected int? GetStep() + { + if (_state != StrategyStatus.InProgress) + { + return null; + } + return _moveableObject?.GetStep; + } + + /// + /// Перемещение к цели + /// + protected abstract void MoveToTarget(); + + /// + /// Достигнута ли цель + /// + /// + protected abstract bool IsTargetDestinaion(); + + /// + /// Попытка перемещения в требуемом направлении + /// + /// Направление + /// Результат попытки (true - удалось переместиться, false - неудача) + private bool MoveTo(MovementDirection movementDirection) + { + if (_state != StrategyStatus.InProgress) + { + return false; + } + + return _moveableObject?.TryMoveObject(movementDirection) ?? false; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/IMoveableObjectcs.cs b/ProjectLiner/ProjectLiner/MovementStrategy/IMoveableObjectcs.cs new file mode 100644 index 0000000..255eebb --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/IMoveableObjectcs.cs @@ -0,0 +1,24 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Интерфейс для работы с перемещаемым объектом +/// +public interface IMoveableObject +{ + /// + /// Получение координаты объекта + /// + ObjectParameters? GetObjectPosition { get; } + + /// + /// Шаг объекта + /// + int GetStep { get; } + + /// + /// Попытка переместить объект в указанном направлении + /// + /// Направление + /// true - объект перемещен, false - перемещение невозможно + bool TryMoveObject(MovementDirection direction); +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCenter.cs b/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCenter.cs new file mode 100644 index 0000000..92c40cb --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCenter.cs @@ -0,0 +1,54 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Стратегия перемещения объекта в центр экрана +/// +public class MoveToCenter : AbstractStrategy +{ + protected override bool IsTargetDestinaion() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + { + return false; + } + + return objParams.ObjectMiddleHorizontal - GetStep() <= FieldWidth / 2 && objParams.ObjectMiddleHorizontal + GetStep() >= FieldWidth / 2 && + objParams.ObjectMiddleVertical - GetStep() <= FieldHeight / 2 && objParams.ObjectMiddleVertical + GetStep() >= FieldHeight / 2; + } + + protected override void MoveToTarget() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + { + return; + } + + int diffX = objParams.ObjectMiddleHorizontal - FieldWidth / 2; + if (Math.Abs(diffX) > GetStep()) + { + if (diffX > 0) + { + MoveLeft(); + } + else + { + MoveRight(); + } + } + + int diffY = objParams.ObjectMiddleVertical - FieldHeight / 2; + if (Math.Abs(diffY) > GetStep()) + { + if (diffY > 0) + { + MoveUp(); + } + else + { + MoveDown(); + } + } + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCorner.cs b/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCorner.cs new file mode 100644 index 0000000..fbf039a --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/MoveToCorner.cs @@ -0,0 +1,26 @@ +namespace ProjectLiner.MovementStrategy; + +public class MoveToCorner : AbstractStrategy +{ + protected override bool IsTargetDestinaion() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + { + return false; + } + return objParams.LeftBorder - GetStep() <= 0 || objParams.RightBorder + GetStep() >= FieldWidth || objParams.TopBorder - GetStep() <= 0 || objParams.ObjectMiddleVertical + GetStep() >= FieldHeight; + + } + + protected override void MoveToTarget() + { + ObjectParameters? objParams = GetObjectParameters; + if (objParams == null) + return; + if (objParams.RightBorder + GetStep() < FieldWidth) + MoveRight(); + if (objParams.DownBorder + GetStep() < FieldHeight) + MoveDown(); + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/MoveableLiner.cs b/ProjectLiner/ProjectLiner/MovementStrategy/MoveableLiner.cs new file mode 100644 index 0000000..b0f31d8 --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/MoveableLiner.cs @@ -0,0 +1,64 @@ +using ProjectLiner.Drawnings; + +namespace ProjectLiner.MovementStrategy; + +/// +/// Класс-реализация IMoveableObject с использованием DrawningLiner +/// +public class MoveableLiner : IMoveableObject +{ + /// + /// Поле-объект класса DrawningLiner или его наследника + /// + private readonly DrawningLiner? _liner = null; + + /// + /// Конструктор + /// + /// Объект класса DrawningLiner + public MoveableLiner(DrawningLiner liner) + { + _liner = liner; + } + + public ObjectParameters? GetObjectPosition + { + get + { + if (_liner == null || _liner.EntityLiner == null || !_liner.GetPosX.HasValue || !_liner.GetPosY.HasValue) + { + return null; + } + return new ObjectParameters(_liner.GetPosX.Value, _liner.GetPosY.Value, _liner.GetWidth, _liner.GetHeight); + } + } + + public int GetStep => (int)(_liner?.EntityLiner?.Step ?? 0); + + public bool TryMoveObject(MovementDirection direction) + { + if (_liner == null || _liner.EntityLiner == null) + { + return false; + } + + return _liner.MoveTransport(GetDirectionType(direction)); + } + + /// + /// Конвертация из MovementDirection в DirectionType + /// + /// MovementDirection + /// DirectionType + private static DirectionType GetDirectionType(MovementDirection direction) + { + return direction switch + { + MovementDirection.Left => DirectionType.Left, + MovementDirection.Right => DirectionType.Right, + MovementDirection.Up => DirectionType.Up, + MovementDirection.Down => DirectionType.Down, + _ => DirectionType.Unknow, + }; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/MovementDirection.cs b/ProjectLiner/ProjectLiner/MovementStrategy/MovementDirection.cs new file mode 100644 index 0000000..43cc5fc --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/MovementDirection.cs @@ -0,0 +1,27 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Направление перемещения +/// +public enum MovementDirection +{ + /// + /// Вверх + /// + Up = 1, + + /// + /// Вниз + /// + Down = 2, + + /// + /// Влево + /// + Left = 3, + + /// + /// Вправо + /// + Right = 4 +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/ObjectParameters.cs b/ProjectLiner/ProjectLiner/MovementStrategy/ObjectParameters.cs new file mode 100644 index 0000000..62df457 --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/ObjectParameters.cs @@ -0,0 +1,72 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Параметры-координаты объекта +/// +public class ObjectParameters +{ + /// + /// Координата X + /// + private readonly int _x; + + /// + /// Координата Y + /// + private readonly int _y; + + /// + /// Ширина объекта + /// + private readonly int _width; + + /// + /// Высота объекта + /// + private readonly int _height; + + /// + /// Левая граница + /// + public int LeftBorder => _x; + + /// + /// Верхняя граница + /// + public int TopBorder => _y; + + /// + /// Правая граница + /// + public int RightBorder => _x + _width; + + /// + /// Нижняя граница + /// + public int DownBorder => _y + _height; + + /// + /// Середина объекта + /// + public int ObjectMiddleHorizontal => _x + _width / 2; + + /// + /// Середина объекта + /// + public int ObjectMiddleVertical => _y + _height / 2; + + /// + /// Конструктор + /// + /// Координата X + /// Координата Y + /// Ширина объекта + /// Высота объекта + public ObjectParameters(int x, int y, int width, int height) + { + _x = x; + _y = y; + _width = width; + _height = height; + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/MovementStrategy/StrategyStatus.cs b/ProjectLiner/ProjectLiner/MovementStrategy/StrategyStatus.cs new file mode 100644 index 0000000..3c647fe --- /dev/null +++ b/ProjectLiner/ProjectLiner/MovementStrategy/StrategyStatus.cs @@ -0,0 +1,22 @@ +namespace ProjectLiner.MovementStrategy; + +/// +/// Статус выполнения операции перемещения +/// +public enum StrategyStatus +{ + /// + /// Все готово к началу + /// + NotInit, + + /// + /// Выполняется + /// + InProgress, + + /// + /// Завершено + /// + Finish +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Program.cs b/ProjectLiner/ProjectLiner/Program.cs new file mode 100644 index 0000000..20e3493 --- /dev/null +++ b/ProjectLiner/ProjectLiner/Program.cs @@ -0,0 +1,17 @@ +namespace ProjectLiner +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new FormLiner()); + } + } +} \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/ProjectLiner.csproj b/ProjectLiner/ProjectLiner/ProjectLiner.csproj new file mode 100644 index 0000000..244387d --- /dev/null +++ b/ProjectLiner/ProjectLiner/ProjectLiner.csproj @@ -0,0 +1,26 @@ + + + + WinExe + net7.0-windows + enable + true + enable + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Properties/Resources.Designer.cs b/ProjectLiner/ProjectLiner/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2df683e --- /dev/null +++ b/ProjectLiner/ProjectLiner/Properties/Resources.Designer.cs @@ -0,0 +1,103 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace ProjectLiner.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectLiner.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowDown { + get { + object obj = ResourceManager.GetObject("arrowDown", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowLeft { + get { + object obj = ResourceManager.GetObject("arrowLeft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowRight { + get { + object obj = ResourceManager.GetObject("arrowRight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap arrowUp { + get { + object obj = ResourceManager.GetObject("arrowUp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/ProjectLiner/ProjectLiner/Properties/Resources.resx b/ProjectLiner/ProjectLiner/Properties/Resources.resx new file mode 100644 index 0000000..293419e --- /dev/null +++ b/ProjectLiner/ProjectLiner/Properties/Resources.resx @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\arrowDown.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowLeft.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowRight.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\arrowUp.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/ProjectLiner/ProjectLiner/Resources/arrowDown.jpg b/ProjectLiner/ProjectLiner/Resources/arrowDown.jpg new file mode 100644 index 0000000..f21002e Binary files /dev/null and b/ProjectLiner/ProjectLiner/Resources/arrowDown.jpg differ diff --git a/ProjectLiner/ProjectLiner/Resources/arrowLeft.jpg b/ProjectLiner/ProjectLiner/Resources/arrowLeft.jpg new file mode 100644 index 0000000..61b8dae Binary files /dev/null and b/ProjectLiner/ProjectLiner/Resources/arrowLeft.jpg differ diff --git a/ProjectLiner/ProjectLiner/Resources/arrowRight.jpg b/ProjectLiner/ProjectLiner/Resources/arrowRight.jpg new file mode 100644 index 0000000..b440197 Binary files /dev/null and b/ProjectLiner/ProjectLiner/Resources/arrowRight.jpg differ diff --git a/ProjectLiner/ProjectLiner/Resources/arrowUp.jpg b/ProjectLiner/ProjectLiner/Resources/arrowUp.jpg new file mode 100644 index 0000000..e630cea Binary files /dev/null and b/ProjectLiner/ProjectLiner/Resources/arrowUp.jpg differ diff --git a/README.md b/README.md deleted file mode 100644 index cde033b..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# ISEbd-11_Khatypov_K.R_fundamental -