From 3bf0a177b4d107cd8905548e342e34852e1d0f6a Mon Sep 17 00:00:00 2001 From: Rinkton Date: Thu, 14 Jan 2021 12:43:57 +0300 Subject: [PATCH] Do some TODOs --- Texto-TextQuestEngine/Model/Base.cs | 2 +- Texto-TextQuestEngine/Model/Program.cs | 3 --- Texto-TextQuestEngine/UnitTests/ViewUnit.cs | 4 ++-- Texto-TextQuestEngine/View/Visualizer.cs | 5 ++++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Texto-TextQuestEngine/Model/Base.cs b/Texto-TextQuestEngine/Model/Base.cs index 5584041..a4693b2 100644 --- a/Texto-TextQuestEngine/Model/Base.cs +++ b/Texto-TextQuestEngine/Model/Base.cs @@ -115,7 +115,7 @@ private static string getPathThatLinkedByShortcut(string shortcutPath) } else { - parentFolder = path.Take(parentFolderLength).ToString(); + parentFolder = path.Substring(0, parentFolderLength); } string relativeLink = getRelativePath(link.TargetPath, parentFolder); diff --git a/Texto-TextQuestEngine/Model/Program.cs b/Texto-TextQuestEngine/Model/Program.cs index aaa8dae..6848c43 100644 --- a/Texto-TextQuestEngine/Model/Program.cs +++ b/Texto-TextQuestEngine/Model/Program.cs @@ -6,11 +6,8 @@ namespace Model { - //TODO: Check of line break's validate, because line break may be diffirent, it dependences from editor of text //TODO: Split classes on smaller classes, it are so huge //TODO: Write samples - //TODO: Fix up a bug, when shortcut link on a empty folder (and shortcuts don't work at all) - //TODO: In variants user creator don't can to write "?" class Program { static void Main() diff --git a/Texto-TextQuestEngine/UnitTests/ViewUnit.cs b/Texto-TextQuestEngine/UnitTests/ViewUnit.cs index e62ca46..84cda97 100644 --- a/Texto-TextQuestEngine/UnitTests/ViewUnit.cs +++ b/Texto-TextQuestEngine/UnitTests/ViewUnit.cs @@ -15,9 +15,9 @@ public void GetDescriptionUnit() { string[] expectedDescriptions = new string[] { - "#", + "Description in \"quest\"", null, - "321" + "Description in \"without variants\"" }; string[] actualDescriptions = new string[] diff --git a/Texto-TextQuestEngine/View/Visualizer.cs b/Texto-TextQuestEngine/View/Visualizer.cs index ce828be..da74a05 100644 --- a/Texto-TextQuestEngine/View/Visualizer.cs +++ b/Texto-TextQuestEngine/View/Visualizer.cs @@ -90,7 +90,10 @@ private static void visualizeVariants(string path) for (int i = 1; i < variants.Length+1; i++) { - Console.WriteLine(i + ". " + variants[i - 1]); + //User do not can use "?" symbol in name of folders, then, in this program it stands for "#q" + string handledVariant = variants[i - 1].Replace("#q", "?"); + + Console.WriteLine(i + ". " + handledVariant); } } #endregion