📄 sortmeasurefactory.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Threading;
namespace GraphicsSort
{
public class SortMeasureFactory : ArrayList
{
public void Add(SortBase sb, StepComplete stepComplete, SortComplete sortComplete)
{
if (!(sb is ISortable))
return;
base.Add(sb);
if (stepComplete != null)
sb.stepComplete += new StepComplete(stepComplete);
if (sortComplete != null)
sb.sortComplete +=new SortComplete(sortComplete);
}
public void StartMutiThreadSort()
{
for (int i = 0; i < base.Count; i++)
{
ISortable ISort = (ISortable)base[i];
Thread thread = new Thread(new ThreadStart(ISort.Sort));
thread.Start();
}
}
public void Pause()
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -