-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommon.cs
More file actions
57 lines (48 loc) · 1.7 KB
/
Copy pathCommon.cs
File metadata and controls
57 lines (48 loc) · 1.7 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
namespace GrpcServerConsole
{
public class Common
{
public static ClientCollection clientCollection = new ClientCollection();
public static SQLiteHelper dbHelper;
public static ProgressUpdater progressUpdater;
//public static string currentCommand = "";
public static void ChangeCommand(string newCommand)
{
//if (currentCommand != newCommand)
//{
var collection = clientCollection.GetCollection();
foreach (var item in collection)
{
clientCollection.Update(item.Key, true, newCommand);
}
//}
//currentCommand = newCommand;
}
public class ProgressUpdater
{
public int catCount { get; set; }
public int elemCount { get; set; }
public event Action<int, string> OnCatCounterUpdated;
public event Action<int, string> OnElemCounterUpdated;
//public int catCounter = 1;
//public int elemCounter = 1;
//public string _catName;
//public string _elemName;
public ProgressUpdater()
{
}
public void UpdateCatCounter(int catCounter, string catName)
{
//catCounter = i;
//_catName = catName;
OnCatCounterUpdated?.Invoke(catCounter, catName);
}
public void UpdateElemCounter(int elemCounter, string elemName)
{
//elemCounter = ii;
//_elemName = elemName;
OnElemCounterUpdated?.Invoke(elemCounter, elemName);
}
}
}
}