-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUpdate.cs
More file actions
42 lines (37 loc) · 1.19 KB
/
Update.cs
File metadata and controls
42 lines (37 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using QuickTools;
namespace Program
{
class Update
{
public void FileUpdate(string file)
{
Get.Clear();
// getting data from the current document
Console.WriteLine("Note Content");
using(StreamReader reader = new StreamReader(file))
{
string line = reader.ReadLine();
while(line!=null){
Console.WriteLine(line);
line = reader.ReadLine();
}
}
Do.Yellow("Copy The Previus notes if you would like to keep the Previus Text");
Do.Yellow("Remember the notes above are going to Be overrided");
Do.Input();
using(StreamWriter writer = new StreamWriter(file))
{
writer.WriteLine(Do.Text);
}
Do.Good("Updated Successfully!!!");
Do.WaitTime(100);
// this is supposed to direct you back to the options
var goTo = new Options();
goTo.Option();
}
}
}