diff --git a/ConsoleApp1/ConsoleApp1/Program.cs b/ConsoleApp1/ConsoleApp1/Program.cs
index 3618d35..22a38f0 100644
--- a/ConsoleApp1/ConsoleApp1/Program.cs
+++ b/ConsoleApp1/ConsoleApp1/Program.cs
@@ -38,7 +38,7 @@ namespace ConsoleApp1
"6A12345678123456", "7A12345678123456", "6F12345678123456", "7E12345678123456", "6G12345678123456", // Австралия, Новая Зеландия
// --- РЕДКИЕ / КАЗАХСТАН ---
- "KS112345678123456", "KZC12345678123456", "Z1B12345678123456", "Z5S12345678123456", "X7L12345678123456" // Казахстан, Литва, Renault (РФ)
+ "KS112345678123456", "KZC12345678123456", "Z1B12345678123456", "Z5S12345678123456", "JHMRE485081234567" // Казахстан, Литва, Renault (РФ)
};
@@ -71,7 +71,7 @@ namespace ConsoleApp1
"M041MM45", "H042HH46", "O043OO47", "P044PP48", "C045CC49", "T046TT50", "Y047YY51", "X048XX52",
"A100AA177", "B200BB197", "E300EE199", "M999MP159"
};
- /*
+
int i = 0;
int j = 0;
foreach (string v in testVins)
@@ -87,9 +87,9 @@ namespace ConsoleApp1
}
Console.WriteLine($"Успешно: {i}");
Console.WriteLine($"Не успешно: {j}");
- Console.ReadLine();*/
-
+ Console.ReadLine();
+ /*
int i = 0;
int j = 0;
foreach (string v in testMarks)
@@ -123,7 +123,7 @@ namespace ConsoleApp1
Console.WriteLine($"Успешно: {i}");
Console.WriteLine($"Не успешно: {j}");
- Console.ReadLine();
+ Console.ReadLine();*/
}
}
}
diff --git a/DebugAppWPF/DebugAppWPF.sln b/DebugAppWPF/DebugAppWPF.sln
new file mode 100644
index 0000000..26493de
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35919.96 d17.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebugAppWPF", "DebugAppWPF\DebugAppWPF.csproj", "{7A6BC548-DBAC-4958-9795-D288317DF885}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7A6BC548-DBAC-4958-9795-D288317DF885}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A6BC548-DBAC-4958-9795-D288317DF885}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A6BC548-DBAC-4958-9795-D288317DF885}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A6BC548-DBAC-4958-9795-D288317DF885}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {2ADD1ECC-7EA5-406F-9795-2B97607EC22A}
+ EndGlobalSection
+EndGlobal
diff --git a/DebugAppWPF/DebugAppWPF/App.config b/DebugAppWPF/DebugAppWPF/App.config
new file mode 100644
index 0000000..193aecc
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DebugAppWPF/DebugAppWPF/App.xaml b/DebugAppWPF/DebugAppWPF/App.xaml
new file mode 100644
index 0000000..bbcd79f
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/DebugAppWPF/DebugAppWPF/App.xaml.cs b/DebugAppWPF/DebugAppWPF/App.xaml.cs
new file mode 100644
index 0000000..1b477d6
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/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 DebugAppWPF
+{
+ ///
+ /// Логика взаимодействия для App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/DebugAppWPF/DebugAppWPF/DebugAppWPF.csproj b/DebugAppWPF/DebugAppWPF/DebugAppWPF.csproj
new file mode 100644
index 0000000..200ed12
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/DebugAppWPF.csproj
@@ -0,0 +1,104 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {7A6BC548-DBAC-4958-9795-D288317DF885}
+ WinExe
+ DebugAppWPF
+ DebugAppWPF
+ v4.8
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\REG_MARK_LIB\REG_MARK_LIB\bin\Debug\REG_MARK_LIB.dll
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+ ..\..\VIN-LIB\VIN-LIB\bin\Release\VIN-LIB.dll
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DebugAppWPF/DebugAppWPF/MainWindow.xaml b/DebugAppWPF/DebugAppWPF/MainWindow.xaml
new file mode 100644
index 0000000..226e2b2
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/MainWindow.xaml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DebugAppWPF/DebugAppWPF/MainWindow.xaml.cs b/DebugAppWPF/DebugAppWPF/MainWindow.xaml.cs
new file mode 100644
index 0000000..d217415
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/MainWindow.xaml.cs
@@ -0,0 +1,105 @@
+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 DebugAppWPF
+{
+ ///
+ /// Логика взаимодействия для MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void MainTabs_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (VinLog != null) VinLog.Items.Clear();
+ if (MarkLog != null) MarkLog.Items.Clear();
+ }
+
+ private void BtnCheckVin_Click(object sender, RoutedEventArgs e)
+ {
+ VinLog.Items.Clear();
+ string vin = MainVinInput.Text.Trim();
+ bool result = VIN_LIB.VIN.CheckVIN(vin);
+ VinLog.Items.Add($"Метод: CheckVIN");
+ VinLog.Items.Add($"Результат: {(result ? "Верный" : "Не верный")}");
+ }
+
+ private void BtnGetCountry_Click(object sender, RoutedEventArgs e)
+ {
+ VinLog.Items.Clear();
+ string vin = MainVinInput.Text.Trim();
+ string country = VIN_LIB.VIN.GetVINCountry(vin);
+ VinLog.Items.Add($"Метод: GetVINCountry");
+ VinLog.Items.Add($"Страна: {country}");
+ }
+
+ private void BtnGetYear_Click(object sender, RoutedEventArgs e)
+ {
+ VinLog.Items.Clear();
+ string vin = MainVinInput.Text.Trim();
+ int year = VIN_LIB.VIN.GetTransportYear(vin);
+ VinLog.Items.Add($"Метод: GetTransportYear");
+ VinLog.Items.Add($"Год: {(year == 0 ? "Не определен" : year.ToString())}");
+ }
+ private void BtnCheckMark_Click(object sender, RoutedEventArgs e)
+ {
+ MarkLog.Items.Clear();
+ string mark = MarkInput.Text.Trim();
+ bool result = REG_MARK_LIB.REG_MARK.CheckMark(mark);
+ MarkLog.Items.Add($"Метод: CheckMark");
+ MarkLog.Items.Add($"Знак: {mark}");
+ MarkLog.Items.Add($"Результат: {(result ? "Верный" : "Не верный")}");
+ }
+
+ private void BtnNextMark_Click(object sender, RoutedEventArgs e)
+ {
+ MarkLog.Items.Clear();
+ string currentMark = NextMarkInput.Text.Trim();
+ string nextMark = REG_MARK_LIB.REG_MARK.GetNextMarkAfter(currentMark);
+ MarkLog.Items.Add($"Метод: GetNextMarkAfter");
+ MarkLog.Items.Add($"Текущий: {currentMark}");
+ MarkLog.Items.Add($"Следующий: {nextMark}");
+ }
+
+ private void BtnNextInRange_Click(object sender, RoutedEventArgs e)
+ {
+ MarkLog.Items.Clear();
+ string prev = RangePrev.Text.Trim();
+ string start = RangeStart.Text.Trim();
+ string end = RangeEnd.Text.Trim();
+
+ string result = REG_MARK_LIB.REG_MARK.GetNextMarkAfterInRange(prev, start, end);
+
+ MarkLog.Items.Add($"Метод: GetNextMarkAfterInRange");
+ MarkLog.Items.Add($"Результат: {result}");
+ }
+
+ private void BtnCountCombinations_Click(object sender, RoutedEventArgs e)
+ {
+ MarkLog.Items.Clear();
+ string start = CountStart.Text.Trim();
+ string end = CountEnd.Text.Trim();
+
+ int count = REG_MARK_LIB.REG_MARK.GetCombinationsCountInRange(start, end);
+
+ MarkLog.Items.Add($"Метод: GetCombinationsCountInRange");
+ MarkLog.Items.Add($"Кол-во комбинаций: {count}");
+ }
+ }
+}
diff --git a/DebugAppWPF/DebugAppWPF/Properties/AssemblyInfo.cs b/DebugAppWPF/DebugAppWPF/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3fb7520
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/Properties/AssemblyInfo.cs
@@ -0,0 +1,52 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("DebugAppWPF")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("DebugAppWPF")]
+[assembly: AssemblyCopyright("Copyright © HP Inc. 2026")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM, установите атрибут ComVisible для этого типа в значение true.
+[assembly: ComVisible(false)]
+
+//Чтобы начать создание локализуемых приложений, задайте
+//CultureYouAreCodingWith в файле .csproj
+//в . Например, при использовании английского (США)
+//в своих исходных файлах установите в en-US. Затем отмените преобразование в комментарий
+//атрибута NeutralResourceLanguage ниже. Обновите "en-US" в
+//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
+ //(используется, если ресурс не найден на странице,
+ // или в словарях ресурсов приложения)
+ ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
+ //(используется, если ресурс не найден на странице,
+ // в приложении или в каких-либо словарях ресурсов для конкретной темы)
+)]
+
+
+// Сведения о версии для сборки включают четыре следующих значения:
+//
+// Основной номер версии
+// Дополнительный номер версии
+// Номер сборки
+// Номер редакции
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/DebugAppWPF/DebugAppWPF/Properties/Resources.Designer.cs b/DebugAppWPF/DebugAppWPF/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..00b8715
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// Этот код был создан программным средством.
+// Версия среды выполнения: 4.0.30319.42000
+//
+// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+// код создан повторно.
+//
+//------------------------------------------------------------------------------
+
+namespace DebugAppWPF.Properties
+{
+
+
+ ///
+ /// Класс ресурсов со строгим типом для поиска локализованных строк и пр.
+ ///
+ // Этот класс был автоматически создан при помощи 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()
+ {
+ }
+
+ ///
+ /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
+ ///
+ [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("DebugAppWPF.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;
+ }
+ }
+ }
+}
diff --git a/DebugAppWPF/DebugAppWPF/Properties/Resources.resx b/DebugAppWPF/DebugAppWPF/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/DebugAppWPF/DebugAppWPF/Properties/Settings.Designer.cs b/DebugAppWPF/DebugAppWPF/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..3e2bfb8
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace DebugAppWPF.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;
+ }
+ }
+ }
+}
diff --git a/DebugAppWPF/DebugAppWPF/Properties/Settings.settings b/DebugAppWPF/DebugAppWPF/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/DebugAppWPF/DebugAppWPF/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/REG_MARK_LIB/REG_MARK_LIB/REG_MARK.cs b/REG_MARK_LIB/REG_MARK_LIB/REG_MARK.cs
index 2eb7832..9c37e16 100644
--- a/REG_MARK_LIB/REG_MARK_LIB/REG_MARK.cs
+++ b/REG_MARK_LIB/REG_MARK_LIB/REG_MARK.cs
@@ -115,7 +115,6 @@ namespace REG_MARK_LIB
}
private static long GetMarkIndex(string mark)
{
- // Извлекаем части: A 123 BC 77
char l1 = mark[0];
int num = int.Parse(mark.Substring(1, 3));
char l2 = mark[4];
@@ -126,14 +125,11 @@ namespace REG_MARK_LIB
int i2 = Array.IndexOf(letters, l2);
int i3 = Array.IndexOf(letters, l3);
- // Считаем вес номера внутри региона
- // Порядок множителей (1000, 12) определяет "скорость" вращения символов
long index = num
+ (long)i1 * 1000
+ (long)i3 * 1000 * 12
+ (long)i2 * 1000 * 12 * 12;
- // Добавляем вес региона (в одном регионе 12*12*12*1000 = 1 728 000 номеров)
return index + (long)region * 1728000;
}
@@ -144,7 +140,6 @@ namespace REG_MARK_LIB
long index1 = GetMarkIndex(mark1.ToUpper());
long index2 = GetMarkIndex(mark2.ToUpper());
- // Возвращаем разницу (включая обе границы)
return (int)Math.Abs(index2 - index1) + 1;
}
}