📄 imagefilelist.cs
字号:
using System;
using System.Collections;
namespace Pex
{
/// <summary>
/// Contains the list of the files of type image found in the current selected folder.
/// Implemented as a singleton
/// </summary>
public class ImageFileList
{
private ArrayList theList;
private string current;
public static readonly ImageFileList Singleton = new ImageFileList();
protected ImageFileList()
{
//
// TODO: Add constructor logic here
//
theList = new ArrayList();
}
public string Next
{
get
{
int index = theList.IndexOf(current) + 1;
if( index == theList.Count )
{
index = 0;
}
current = (string)theList[index];
return current;
}
}
public string Previous
{
get
{
int index = theList.IndexOf(current) - 1;
if( index == -1 )
{
index = theList.Count - 1;
}
current = (string)theList[index];
return current;
}
}
public string Current
{
get
{
return current;
}
set
{
current = value;
}
}
public void Add(string file)
{
theList.Add(file);
}
public void Clear()
{
theList.Clear();
}
public void RemoveCurrent()
{
theList.Remove(current);
current = "";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -