Renamed SettingsAndHelperFunctions to HelperFunctions

This commit is contained in:
Lukasz Baldyga committed 2020-11-29 08:24:54 +00:00
1 parent b290848034
commit e6722273a5
7 files changed
+18 -18

No files matched your search

@@ -142,7 +142,7 @@
<Compile Include="Windows\TextEditor.Designer.cs">
<DependentUpon>TextEditor.cs</DependentUpon>
</Compile>
<Compile Include="SettingsAndHelperFunctions.cs" />
<Compile Include="HelperFunctions.cs" />
<Compile Include="Windows\Menu.cs">
<SubType>Form</SubType>
</Compile>
@@ -24,7 +24,7 @@ namespace Advanced_Software_Engineering {
/// <summary>
/// This class simply provides settings and some functions that are used across many components.
/// </summary>
public class SettingsAndHelperFunctions {
public class HelperFunctions {
/// <summary>
/// This function removes spaces from the start and the end of the text. This should be unit tested.
@@ -60,7 +60,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
// bools have ==
if (!(type == "bool")) {
//Seperate the assignment from the variables
List<string> assignmentList = SettingsAndHelperFunctions.StripStringArray(assignment.Split("="[0]));
List<string> assignmentList = HelperFunctions.StripStringArray(assignment.Split("="[0]));
name = assignmentList[0];
value = ValueFactory.CreateValue(assignmentList[1], type);
} else {
@@ -61,7 +61,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
}
public static IValue CreateValue(Drawer drawer, string value) {
value = SettingsAndHelperFunctions.Strip(value);
value = HelperFunctions.Strip(value);
if (drawer.CheckVariableExists(value)) return new VariableValue(drawer, value);
else return ValueHelper.ConvertToIValue(value);
}
@@ -14,7 +14,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
/// <param name="text">String to be converted to int</param>
/// <returns>Integer representation of string</returns>
public static int ConvertToInt(string text) {
text = SettingsAndHelperFunctions.Strip(text);
text = HelperFunctions.Strip(text);
return int.Parse(text);
}
@@ -24,7 +24,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
/// <param name="text">String to be converted to double</param>
/// <returns>Double representation of string</returns>
public static double ConvertToDouble(string text) {
text = SettingsAndHelperFunctions.Strip(text);
text = HelperFunctions.Strip(text);
return double.Parse(text);
}
@@ -121,7 +121,7 @@ namespace Advanced_Software_Engineering.Verbs.Value {
}
public static IValue ConvertToIValue(string text) {
text = SettingsAndHelperFunctions.Strip(text);
text = HelperFunctions.Strip(text);
//No assignmnet
if (!text.Contains("=")) {
if (!text.Contains("#")) {
@@ -22,7 +22,7 @@ namespace Advanced_Software_Engineering {
/// <param name="fullCommand">The command as a string</param>
/// <returns>A IVerb that maches the command</returns>
public static IVerb MakeVerb(Drawer drawer, string fullCommand) {
CommandAndParameterParserResult result = SettingsAndHelperFunctions.CommandAndParameterParser(fullCommand);
CommandAndParameterParserResult result = HelperFunctions.CommandAndParameterParser(fullCommand);
string command = result.getCommand();
string[] commandParameters = result.getParameters();