public void ConvertToTextComment() { while (Comment.StartsWith("_")) { Comment = Comment.Substring(1); } _lineContent = LineContents.TextComment; UpdateAllProperties(); }
public FileItem(Statistic statistic, string comment) { Comment = comment; if (statistic != null) { this.statistic = statistic; _lineContent = LineContents.Statistic; } else if (comment.StartsWith("_")) { _lineContent = LineContents.InvalidStatisticLine; } else { _lineContent = LineContents.TextComment; } }
public static bool SaveFile(string fileName) { string fullPath = directory + fileName + fileExtension; string str = "{}"; if (LineWorld.main.lines.Count > 0) { LineContents lc = new LineContents(); lc.lines = LineWorld.main.lines; str = JsonUtility.ToJson(lc); } currentFilename = fileName; File.WriteAllText(fullPath, str); MessageToast.Show("Save successful"); return(true); }