-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExporter.cs
39 lines (34 loc) · 1.04 KB
/
Exporter.cs
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
using System;
using System.IO;
using System.Threading;
namespace Diamond_Chat_Bot
{
class Exporter
{
private Thread thr;
private main main;
public Exporter()
{
main = new main();
thr = new Thread(new ThreadStart(Run));
}
public void Start()
{
thr.IsBackground = true;
thr.Start();
}
public void Run()
{
while (true)
{
string c1 = counter1.Default.Text + counter1.Default.Count.ToString();
File.WriteAllText(path: "counter1.txt", contents: c1);
string c2 = counter2.Default.Text + counter2.Default.Count.ToString();
File.WriteAllText(path: "counter2.txt", contents: c2);
string c3 = counter3.Default.Text + counter3.Default.Count.ToString();
File.WriteAllText(path: "counter3.txt", contents: c3);
Thread.Sleep(500);
}
}
}
}