├── Platonus Tester ├── HashSource │ ├── hash_0.txt │ ├── hash_50.txt │ ├── hash_60.txt │ ├── hash_75.txt │ ├── hash_90.txt │ ├── test.txt │ └── hash_100.txt ├── Media │ ├── icon.ico │ ├── icon.png │ └── logo.png ├── bin │ └── Release │ │ ├── DocX.dll │ │ ├── Platest.dll │ │ ├── ResultComments.dll │ │ ├── Platonus Tester.exe │ │ ├── Platonus Tester.vshost.exe │ │ ├── Platonus Tester.exe.config │ │ ├── Platonus Tester.vshost.exe.config │ │ ├── settings.xml │ │ ├── Platonus Tester.vshost.exe.manifest │ │ └── Platonus Tester.XML ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.config ├── App.xaml.cs ├── Platonus Tester.csproj.DotSettings ├── App.xaml ├── Helper │ ├── Settings.cs │ ├── Const.cs │ └── UInterfaceHelper.cs ├── ErrorWindow.xaml ├── ErrorWindow.xaml.cs ├── ResultWindow.xaml ├── Controller │ └── SettingsController.cs ├── SettingsForm.xaml ├── ResultWindow.xaml.cs ├── SettingsForm.xaml.cs ├── Platonus Tester.csproj ├── MainWindow.xaml └── MainWindow.xaml.cs ├── Platest ├── packages.config ├── Interfaces │ ├── ISourceLoadListener.cs │ ├── IQuestionProvider.cs │ └── IQuestionManager.cs ├── Models │ ├── CurrentDispatcherFile.cs │ ├── TestQuestion.cs │ ├── AnsweredQuestion.cs │ ├── Question.cs │ └── SourceFile.cs ├── Properties │ └── AssemblyInfo.cs ├── Controllers │ ├── QuestionManager.cs │ └── SourceController.cs ├── Helpers │ ├── Extensions.cs │ └── QuestionProcessor.cs └── Platest.csproj ├── PlatestTest ├── test.txt ├── PlatestTest.csproj └── QuestionProcessorTest.cs ├── source.md ├── ResultComments ├── Helpers │ └── CommentProvider.cs ├── Properties │ └── AssemblyInfo.cs ├── ResultComments.csproj └── Models │ ├── Comment.cs │ └── Swear.cs ├── notice.md ├── Platonus Tester.sln ├── .gitattributes ├── readme.md ├── .gitignore └── license.md /Platonus Tester/HashSource/hash_0.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/hash_50.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/hash_60.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/hash_75.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/hash_90.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/test.txt: -------------------------------------------------------------------------------- 1 | success -------------------------------------------------------------------------------- /Platonus Tester/Media/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/Media/icon.ico -------------------------------------------------------------------------------- /Platonus Tester/Media/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/Media/icon.png -------------------------------------------------------------------------------- /Platonus Tester/Media/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/Media/logo.png -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/DocX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/bin/Release/DocX.dll -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platest.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/bin/Release/Platest.dll -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/ResultComments.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/bin/Release/ResultComments.dll -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platonus Tester.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/bin/Release/Platonus Tester.exe -------------------------------------------------------------------------------- /Platest/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Platonus Tester/HashSource/hash_100.txt: -------------------------------------------------------------------------------- 1 | Мистер YesIKnowItAll, а не свалить бы тебе за бугор?# 2 | Ну окей, в этот раз ты взял высший балл. Лимит удачи исчерпан# 3 | -------------------------------------------------------------------------------- /PlatestTest/test.txt: -------------------------------------------------------------------------------- 1 | Question 1Variant 1 2 | Variant 2 3 | Variant 3 4 | Variant 4 5 | Variant 5 6 | Question 2 -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platonus Tester.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maximgorbatyuk/Platonus-Tester/HEAD/Platonus Tester/bin/Release/Platonus Tester.vshost.exe -------------------------------------------------------------------------------- /Platest/Interfaces/ISourceLoadListener.cs: -------------------------------------------------------------------------------- 1 | using Platest.Models; 2 | 3 | namespace Platest.Interfaces 4 | { 5 | public interface ISourceLoadListener 6 | { 7 | void OnSourceLoaded(object currentDispatcher); 8 | } 9 | } -------------------------------------------------------------------------------- /Platonus Tester/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Platonus Tester/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Platest/Models/CurrentDispatcherFile.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Threading; 2 | 3 | namespace Platest.Models 4 | { 5 | public class CurrentDispatcherFile 6 | { 7 | public Dispatcher Dispatcher { get; set; } 8 | public SourceFile SourceFile { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platonus Tester.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platonus Tester.vshost.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Platest/Models/TestQuestion.cs: -------------------------------------------------------------------------------- 1 | namespace Platest.Models 2 | { 3 | /// 4 | /// тестовый (незаданный) вопрос. Добавляется только поле Верный ответ 5 | /// 6 | public class TestQuestion : Question 7 | { 8 | public string CorrectAnswer { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Platest/Interfaces/IQuestionProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Platest.Models; 3 | 4 | namespace Platest.Interfaces 5 | { 6 | public interface IQuestionProvider 7 | { 8 | List GetQuestionList(SourceFile file); 9 | 10 | IEnumerable GetErrors(); 11 | } 12 | } -------------------------------------------------------------------------------- /source.md: -------------------------------------------------------------------------------- 1 | http://stackoverflow.com/questions/16063520/how-do-you-create-an-asynchronous-method-in-c 2 | http://stackoverflow.com/questions/1126915/how-do-i-split-a-string-by-a-multi-character-delimiter-in-c 3 | http://stackoverflow.com/questions/6090913/make-an-installation-program-for-c-sharp-applications-and-include-net-framework 4 | http://stackoverflow.com/questions/20309158/c-sharp-checking-internet-connection -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | true 5 | true 6 | false 7 | 25 8 | -------------------------------------------------------------------------------- /Platonus Tester/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Platonus_Tester 10 | { 11 | /// 12 | /// Логика взаимодействия для App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Platonus Tester/Platonus Tester.csproj.DotSettings: -------------------------------------------------------------------------------- 1 | 2 | Yes -------------------------------------------------------------------------------- /Platest/Interfaces/IQuestionManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Platest.Models; 3 | 4 | namespace Platest.Interfaces 5 | { 6 | public interface IQuestionManager 7 | { 8 | void SetSourceList(SourceFile file); 9 | 10 | void Shuffle(); 11 | 12 | TestQuestion GetNext(); 13 | 14 | int GetCount(); 15 | 16 | int GetFirstListCount(); 17 | 18 | void SetQuestionLimit(int limit); 19 | 20 | int GetCurrentPosition(); 21 | 22 | IEnumerable GetErrors(); 23 | } 24 | } -------------------------------------------------------------------------------- /Platest/Models/AnsweredQuestion.cs: -------------------------------------------------------------------------------- 1 | namespace Platest.Models 2 | { 3 | /// 4 | /// Отвеченный вопрос, где добавляемые поля - отмеченный, верный и флаг корректности (лол) 5 | /// 6 | public class AnsweredQuestion : Question 7 | { 8 | public string ChosenAnswer; 9 | public string CorrectAnswer; 10 | public bool IsItCorrect; 11 | 12 | public override string ToString() 13 | { 14 | var result = $"{AskQuestion}"; 15 | return result; 16 | } 17 | } 18 | 19 | 20 | } -------------------------------------------------------------------------------- /Platonus Tester/bin/Release/Platonus Tester.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Platest/Models/Question.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Drawing; 3 | 4 | namespace Platest.Models 5 | { 6 | /// 7 | /// Класс-предок для отвеченного вопроса и незаданного 8 | /// 9 | public class Question 10 | { 11 | /// 12 | /// Вопрос 13 | /// 14 | public string AskQuestion { get; set; } 15 | /// 16 | /// Изображение. Может быть NULL 17 | /// 18 | public Image Picture { get; set; } 19 | /// 20 | /// Массив вариантов ответа 21 | /// 22 | public List AnswerList { get; set; } 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /ResultComments/Helpers/CommentProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using ResultComments.Models; 5 | 6 | namespace ResultComments.Helpers 7 | { 8 | /// 9 | /// Обработчик скачанного текста с репозитория в массив строк 10 | /// 11 | public abstract class CommentProvider 12 | { 13 | 14 | public static List GetHashList(string text) 15 | { 16 | var result = new List(0); 17 | var splitSeparators = new[] { "#\n" }; 18 | var list = text.Split(splitSeparators, StringSplitOptions.RemoveEmptyEntries); 19 | result.AddRange(list); 20 | return result; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Platest/Models/SourceFile.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Platest.Models 4 | { 5 | /// 6 | /// Класс-обертка для исходного файла 7 | /// 8 | public class SourceFile 9 | { 10 | /// 11 | /// текст документа. Включая таблицы и теги картинок 12 | /// 13 | public string SourceText { get; } 14 | /// 15 | /// Массив картинок в формате библиотеки Novacode 16 | /// 17 | public List Images { get; } 18 | /// 19 | /// Имя документа в файл-системе для отобрадения в UI компонентах 20 | /// 21 | public string FileName { get; } 22 | 23 | public SourceFile(string text, List images, string filename) 24 | { 25 | SourceText = text; 26 | Images = images; 27 | FileName = filename; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Platonus Tester/App.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 13 | 14 | 18 | 19 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Platonus Tester/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Этот код создан программой. 4 | // Исполняемая версия:4.0.30319.42000 5 | // 6 | // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае 7 | // повторной генерации кода. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Platonus_Tester.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PlatestTest/PlatestTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | d37e2a3e-8545-3a39-9f4f-31827c9124ab 12 | 2 13 | 4 14 | tlbimp 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ..\Platonus Tester\bin\Release\DocX.dll 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /notice.md: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | == Example NOTICE file for use with the Apache License, Version 2.0, == 3 | == in this case for the Apache httpd-2.0 distribution. == 4 | ========================================================================= 5 | 6 | Apache HTTP Server 7 | Copyright 1999-2006 The Apache Software Foundation 8 | 9 | This product includes software developed at 10 | The Apache Software Foundation (http://www.apache.org/). 11 | 12 | Portions of this software were developed at the National Center 13 | for Supercomputing Applications (NCSA) at the University of 14 | Illinois at Urbana-Champaign. 15 | 16 | This software contains code derived from the RSA Data Security 17 | Inc. MD5 Message-Digest Algorithm, including various 18 | modifications by Spyglass Inc., Carnegie Mellon University, and 19 | Bell Communications Research, Inc (Bellcore). 20 | 21 | Regular expression support is provided by the PCRE library package, 22 | which is open source software, written by Philip Hazel, and copyright 23 | by the University of Cambridge, England. The original software is 24 | available from 25 | ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 26 | -------------------------------------------------------------------------------- /Platonus Tester/Helper/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace Platonus_Tester.Helper 2 | { 3 | /// 4 | /// настройки программы, записывающиеся в XML формате 5 | /// 6 | public class Settings 7 | { 8 | /// 9 | /// Установить лимит вопросов (25 обычно), как на тестировании 10 | /// 11 | public bool EnableLimit { get; set; } 12 | /// 13 | /// Показать ругательные комментарии 14 | /// 15 | public bool ShowSwearing { get; set; } 16 | /// 17 | /// Загружать ли комментарии с репозитория 18 | /// 19 | public bool DownloadSwears { get; set; } 20 | /// 21 | /// Будет добавлена в будущем поддержка двух цветовых схем. 22 | /// 23 | public bool LightColorScheme { get; set; } 24 | /// 25 | /// Количество лимита 26 | /// 27 | public int QuestionLimitCount { get; set; } 28 | 29 | public Settings() 30 | { 31 | EnableLimit = false; 32 | ShowSwearing = false; 33 | DownloadSwears = false; 34 | LightColorScheme = true; 35 | QuestionLimitCount = 25; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Platonus Tester/ErrorWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |