-
Notifications
You must be signed in to change notification settings - Fork 1
/
Class1.cs
159 lines (138 loc) · 4.82 KB
/
Class1.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
using System;
using System.Collections.Generic;
namespace StandardConfData
{
namespace MyInfo
{
//以下 enumeration 已实现,参考 Record2 项目 Class1.vb 文件直接转制
public enum AppStatus;
public enum FileCategory;
public enum YieldTo;
public enum WorkLanguage;
public enum UsingRule;
public enum TopicSelection;
public enum VoteOpinion;
[Serializable]
public class Conference
{
public WorkLanguage Language { get; set; }
public TopicSelection TopicSel { get; private set; }
public UsingRule MyRule { get; set; }
public int XmlVersion { get; set; }
public string ConferenceTitle { get; set; }
public string Committee { get; set; }
public string[] Topic = new string[1];
public Record.RecordCollection ConferenceRecords = new Record.RecordCollection(); //会议记录类参考 Record2 项目 CodeFile1.vb 文件
public int Session { get; private set; }
public Conference(string title, string committee, string topic, WorkLanguage lang) //新建单议题会议
{
//...
TopicSel = 0;
}
public Conference(string title, string committee, string topic1, string topic2, WorkLanguage lang) //新建双议题会议
{
//...
TopicSel = 2;
}
public string GetTopic
{
get
{
if (TopicSel < 2) return Topic[TopicSel];
return "议题等待决定中";
}
}
}
public class Nation
{
//本Nation类兼容在线系统中的国家类
//以下属性参考class1.vb
private int comp = 1;
public string Name { get; set; }
public List<Delegate> Delegates = new List<Delegate>();
public int Competence
{
get
{
return comp;
}
set
{
comp = value;
}
} //默认值为1
public string PresentationPaper { get; set; }
public bool Attendence { get; set; }
public bool VetoPower { get; set; }
public static Nation Empty = null;
public Nation() { }
public Nation(string name) { }
public Nation(string name, int competence) { }
public Nation(string name, int competence, bool VetoPower) { }
public Nation(string name, List<Delegate> delegates) { }
public Nation(string name, List<Delegate> delegates, int competence) { }
public Nation(string name, List<Delegate> delegates, int competence, bool VetoPower) { }
//以下方法参考class1.vb
public string GetDelegateNames(string delimiter) { }
public string GetCompetence() { }
public override string ToString()
{
return Name;
}
}
public class Delegate
{
//兼容在线系统中的代表类,本API中使用以下数据:
//1. 代表姓名;
//2. 学校;
//3. 年级。
}
public class NationList : List<Nation>
{
public int GetAttendentNumber()
{
int a = 0;
foreach (Nation i in this)
{
if (i.Attendence == true) a++;
}
return a;
}
}
public class SpeakersList
{
public int slTime { get; set; }
public int slCurrent { get; private set; }
public NationList slNations = new NationList();
public List<int> slIsSpoken = new List<int>();
public List<YieldTo> yieldMethod = new List<YieldTo>();
public SpeakersList() //默认120s创建新SpeakersList类
{
slTime = 120;
}
public SpeakersList(int time) //指定发言时长创建新SpeakersList类
{
slTime = time;
}
public int AddNation(Nation nat) //添加国家
{
slNations.Add(nat);
slTotal += 1;
return slTotal;
}
public int SpeakNext() //发言转向下一个国家
{
slCurrent++;
return slCurrent;
}
}
public class File
{
//已全部实现,查看class1.vb
}
public class FileList : List<File>
{
//已全部实现,查看class1.vb
}
}
}