本文整理汇总了C#中IIterator.IsDone方法的典型用法代码示例。如果您正苦于以下问题:C# IIterator.IsDone方法的具体用法?C# IIterator.IsDone怎么用?C# IIterator.IsDone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IIterator
的用法示例。
在下文中一共展示了IIterator.IsDone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintUsers
private static void PrintUsers(IIterator iterate)
{
while (!iterate.IsDone())
{
Console.WriteLine(iterate.Next());
}
}
示例2: printMember
public void printMember(IIterator iterate)
{
iterate.First();
while (!iterate.IsDone())
{
//textBox.AppendText("Friend");
}
}
示例3: PrintUsers
public static void PrintUsers(IIterator iterate)
{
iterate.First();
while (!iterate.IsDone())
{
Console.WriteLine(iterate.Next());
}
}
示例4: CreatePreviewImage
Image CreatePreviewImage(string s)
{
int height = 80;
int width = 530;
int lineLength = 18;
int diameter = 30;
int leftSpan = 3;
int topSpan = 20;
IIterator circleNodeIterator;//用于输出结点链表的指针
IIterator lineNodeIterator;//用于输出连接线链表的指针
LinkCircleNode headNode = null;
LinkLineNode headLineNode = null;
LinkCircleNode previousNode = null;
LinkLineNode previousLineNode = null;
LinkCircleNode currentNode = null;
LinkLineNode currentLineNode = null;
previousNode = headNode = new LinkCircleNode(leftSpan,topSpan,diameter,Color.Red,"H");
previousLineNode = headLineNode = new LinkLineNode(leftSpan + diameter,topSpan + diameter/2,leftSpan + diameter + lineLength,topSpan + diameter/2,lineWidth,Color.Red);
for(int i = 0;i < s.Length;i++)
{
currentNode = new LinkCircleNode(leftSpan + (i + 1) * (lineLength + diameter),topSpan,diameter,Color.DarkTurquoise,s[i].ToString());
currentLineNode = new LinkLineNode(leftSpan + diameter + (i + 1) * (lineLength + diameter),topSpan + diameter/2,leftSpan + diameter + (i + 1) * (lineLength + diameter) + lineLength,topSpan + diameter/2,lineWidth,Color.Red);
previousNode.Next = currentNode;
previousLineNode.Next = currentLineNode;
previousNode = currentNode;
previousLineNode = currentLineNode;
}
if(currentNode != null)
{
currentNode.Next = null;
currentLineNode.Next = null;
}
circleNodeIterator = headNode.CreateIterator();
lineNodeIterator = headLineNode.CreateIterator();
Bitmap bmp = new Bitmap(width,height);
Graphics g = Graphics.FromImage(bmp);
if(circleNodeIterator != null)
{
for(IIterator iterator = circleNodeIterator.First();!circleNodeIterator.IsDone();iterator = circleNodeIterator.Next())
{
iterator.CurrentItem.Draw(g);
}
}
if(lineNodeIterator != null)
{
for(IIterator iterator = lineNodeIterator.First();!lineNodeIterator.IsDone();iterator = lineNodeIterator.Next())
{
iterator.CurrentItem.Draw(g);
}
}
return bmp;
}