Skip to content

Commit caa9611

Browse files
inital for pc switch
1 parent 9ad0453 commit caa9611

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

create/create_new.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ private void createNewPage(object sender, EventArgs e)
6161

6262
string extention = editor.GetExtID(type);
6363
ScienceBookLIB.page.page.CreatePage(name, type, path);
64-
65-
string doc_name = editor.GetContent($"{path}\\{name}{extention}");
66-
editor.OpenTextEditorForCurrent(name, doc_name);
64+
string doc_name = $"{path}\\{name}{extention}";
65+
var cont = File.ReadAllText(doc_name);
66+
editor.OpenTextEditorForCurrent(name,);
6767

6868

6969

lib/editor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class editor
1111
public static string GetContent(string path)
1212
{
1313
string path_name = path;
14-
System.Collections.Generic.IEnumerable<String> lines = File.ReadLines(path);
15-
int count = lines.Count();
16-
string count_str = $"{count}";
17-
return count_str;
18-
14+
var myFile = File.Create(path);
15+
myFile.Close();
16+
string joint = File.ReadAllText(path);
17+
18+
return joint;
1919
}
2020
public static void OpenTextEditorForCurrent(string doc_name, string content)
2121
{

0 commit comments

Comments
 (0)