Skip to content

Commit 5f3331a

Browse files
committed
注释英文化
1 parent c67a5e6 commit 5f3331a

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

TimeControl/AppControl/App.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class App
1111
internal int tempTime = 0;
1212

1313
/// <summary>
14-
/// 返回进程的简要概述
14+
/// Returns a simple description of the app
1515
/// </summary>
16-
/// <returns>进程的简要概述</returns>
16+
/// <returns>description</returns>
1717
public override string ToString()
1818
{
1919
return appInformation.name + " 已使用:" + TimeConvert.DescribeTime(appInformation.time);
@@ -24,7 +24,7 @@ public App(string name, int time, int restInterval)
2424
appInformation.time = time;
2525
appInformation.name = name;
2626
appInformation.restInterval = restInterval;
27-
appInformation.timeLimit = 1;//设为1表示无限制
27+
appInformation.timeLimit = 1;//Set to 1 if unlimited
2828
}
2929

3030
public App(AppInformation appInformation)
@@ -33,7 +33,7 @@ public App(AppInformation appInformation)
3333
}
3434

3535
/// <summary>
36-
/// 运行一次(一秒),并保存
36+
/// Add 1 second to the app's time and check rest.
3737
/// </summary>
3838
public virtual void Run()
3939
{
@@ -53,7 +53,7 @@ internal void CheckRest()
5353
}
5454

5555
/// <summary>
56-
/// 重设时间
56+
/// Rest app's time.
5757
/// </summary>
5858
public void Reset()
5959
{

TimeControl/AppControl/AppController.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public AppController(ListBox listBox, Timer timer)
3232
}
3333

3434
/// <summary>
35-
/// 刷新列表显示
35+
/// Refresh the display of the list on the form.
3636
/// </summary>
3737
public void Refresh()
3838
{
@@ -52,9 +52,9 @@ public void Refresh()
5252
}
5353

5454
/// <summary>
55-
/// 根据名称添加进程
55+
/// Add process by name.
5656
/// </summary>
57-
/// <param name="name">要添加的进程名称</param>
57+
/// <param name="name">The name of the process</param>
5858
public void AddByName(string name, int restInterval)
5959
{
6060
processMonitorTimer.Stop();
@@ -64,10 +64,10 @@ public void AddByName(string name, int restInterval)
6464
}
6565

6666
/// <summary>
67-
/// 根据名称添加时间受限的进程
67+
/// Add a limited process by name.
6868
/// </summary>
69-
/// <param name="name">进程名称</param>
70-
/// <param name="timeLimit">限制时长(秒)</param>
69+
/// <param name="name">The name of the process</param>
70+
/// <param name="timeLimit">The time limit of the process</param>
7171
public void AddByName(string name, int timeLimit, int restInterval)
7272
{
7373
processMonitorTimer.Stop();
@@ -77,7 +77,7 @@ public void AddByName(string name, int timeLimit, int restInterval)
7777
}
7878

7979
/// <summary>
80-
/// 跟踪所有进程,增加一秒
80+
/// Track all the processes and add 1 second to each running process.
8181
/// </summary>
8282
public void Run()
8383
{
@@ -98,7 +98,7 @@ public void Run()
9898
}
9999

100100
/// <summary>
101-
/// 移除所列表所选的进程
101+
/// Remove the process selected in the listbox
102102
/// </summary>
103103
public void Remove()
104104
{
@@ -112,7 +112,7 @@ public void Remove()
112112
}
113113

114114
/// <summary>
115-
/// 删除所有监控
115+
/// Delete all the monitors.
116116
/// </summary>
117117
public void RemoveAll()
118118
{
@@ -123,7 +123,7 @@ public void RemoveAll()
123123
}
124124

125125
/// <summary>
126-
/// 重设全部累计时间
126+
/// Reset all the apps' time.
127127
/// </summary>
128128
public void Reset()
129129
{

TimeControl/AppControl/LimitedApp.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public LimitedApp(AppInformation appInformation) : base(appInformation)
1717
{ }
1818

1919
/// <summary>
20-
/// 运行一次(一秒),并根据情况显示警告或关闭进程,然后保存到文件
20+
/// Add 1 second, show warning window if necessary and check rest.
2121
/// </summary>
2222
public override void Run()
2323
{
@@ -35,16 +35,16 @@ public override void Run()
3535
}
3636

3737
/// <summary>
38-
/// 返回时间受限进程的简要概述
38+
/// Return a simple description of the limited app.
3939
/// </summary>
40-
/// <returns>时间受限进程的简要概述</returns>
40+
/// <returns>The description</returns>
4141
public override string ToString()
4242
{
4343
return base.ToString() + " 进程时间限制为:" + TimeConvert.DescribeTime(appInformation.timeLimit);
4444
}
4545

4646
/// <summary>
47-
/// 禁用掉该程序
47+
/// Set the app's time to limited time. This will also kill the process.
4848
/// </summary>
4949
public void Ban()
5050
{

TimeControl/Windows/ControlPanel.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ namespace TimeControl.Windows
1313
{
1414
public partial class ControlPanel : Form
1515
{
16-
private bool hide = false;//指示启动后是否需要隐藏
17-
private bool isClosable = false;//指示当前是否可以关闭
18-
private string unlockPasswordHash = "";//密码哈希值,用作比对
19-
private AppController appController;//列表、计时控制器
20-
private TimeData timeData;//数据
21-
private bool isLoaded;//指示加载是否已经完成
16+
private bool hide = false;
17+
private bool isClosable = false;
18+
private string unlockPasswordHash = "";//The hash of the password
19+
private AppController appController;//Controller for list and apps.
20+
private TimeData timeData;//The data of current aim.
21+
private bool isLoaded;//Show the state of initialization.
2222

2323
public ControlPanel(bool hide)
2424
{
@@ -28,17 +28,17 @@ public ControlPanel(bool hide)
2828
versionLabel.Text = $"版本:{Assembly.GetExecutingAssembly().GetName().Version}";
2929
InitializeSettings();
3030
this.hide = hide;
31-
//数据记录
31+
//Data recording
3232
InitializeData();
33-
//屏保
33+
//Lock
3434
IniticalizeFocus();
35-
//深度专注
35+
//DeepFocus
3636
InitializeDeepFocus();
37-
//程序计时
37+
//Process monitor
3838
StartMonitor();
39-
//自动关机
39+
//Auto shutdown
4040
CheckShutdown();
41-
//密码
41+
//Password
4242
InitializePassword();
4343
}
4444

@@ -231,26 +231,26 @@ private void FileSaveTimer_Tick(object sender, EventArgs e)
231231
processMonitorTimer.Start();
232232
}
233233

234-
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)//添加链接
234+
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
235235
{
236236
Process.Start("explorer.exe", "https://icons8.com/icon/19614/icon");
237237
}
238238

239-
private void ClearButton_Click(object sender, EventArgs e)//移除所有的已添加窗口
239+
private void ClearButton_Click(object sender, EventArgs e)
240240
{
241241
if (PasswordCheck())
242242
{
243243
appController.RemoveAll();
244244
}
245245
}
246246

247-
private void AppAddButton_Click(object sender, EventArgs e)//添加进程
247+
private void AppAddButton_Click(object sender, EventArgs e)
248248
{
249249
TimeInput timeInput = new(appController);//打开进程限时控制窗口
250250
timeInput.ShowDialog();
251251
}
252252

253-
private void RemoveButton_Click(object sender, EventArgs e)//移除窗口
253+
private void RemoveButton_Click(object sender, EventArgs e)
254254
{
255255
//检测密码设置
256256
if (PasswordCheck())
@@ -259,7 +259,7 @@ private void RemoveButton_Click(object sender, EventArgs e)//移除窗口
259259
}
260260
}
261261

262-
private void RefreshButton_Click(object sender, EventArgs e)//重新获取所有软件所用时间
262+
private void RefreshButton_Click(object sender, EventArgs e)
263263
{
264264
appController.Refresh();
265265
}

0 commit comments

Comments
 (0)