本文整理汇总了C#中List.MoveNext方法的典型用法代码示例。如果您正苦于以下问题:C# List.MoveNext方法的具体用法?C# List.MoveNext怎么用?C# List.MoveNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类List
的用法示例。
在下文中一共展示了List.MoveNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Print
public virtual void Print(Stack<Printer> printers, List<KeyValuePair<string, int>>.Enumerator occurenceStepper)
{
occurenceStepper.MoveNext();
Console.WriteLine(occurenceStepper.Current.Key + " => " + occurenceStepper.Current.Value);
printers.Pop().Print(printers, occurenceStepper);
}
示例2: Awake
// Use this for initialization
public override void Awake()
{
base.Awake();
TimeScaleList.Add(Game.GameTimeScale);
NextTimeScale = TimeScaleList.GetEnumerator();
NextTimeScale.MoveNext();
}
示例3: Add
public AnimatedTexture Add(Texture tex, double time)
{
Textures.Add(new Tuple<Texture, double>(tex, time));
CurrentTexture = Textures.GetEnumerator();
CurrentTexture.MoveNext();
TotalTime += time;
return this;
}
示例4: Reset
//------------------------------------------------------------------
public override void Reset()
{
AddNewActions ();
enumerator = Actions.GetEnumerator ();
enumerator.MoveNext ();
Actions.ForEach (action => action.Reset());
}
示例5: OnEventFunc
public override void OnEventFunc(EventData data)
{
Game.GameTimeScale = NextTimeScale.Current;
if (!NextTimeScale.MoveNext())
{
NextTimeScale = TimeScaleList.GetEnumerator();
NextTimeScale.MoveNext();
}
}
示例6: Awake
// Use this for initialization
public override void Awake()
{
base.Awake();
Renderer = GetComponent<SpriteRenderer>();
SpriteList.Add(Renderer.sprite);
NextSprite = SpriteList.GetEnumerator();
NextSprite.MoveNext();
this.DelayedDispatch = true;
}
示例7: ScriptCompilers
static ScriptCompilers()
{
using (List<System.Type>.Enumerator enumerator = new List<System.Type>() { typeof (CSharpLanguage), typeof (BooLanguage), typeof (UnityScriptLanguage) }.GetEnumerator())
{
while (enumerator.MoveNext())
{
System.Type current = enumerator.Current;
ScriptCompilers._supportedLanguages.Add((SupportedLanguage) Activator.CreateInstance(current));
}
}
}
示例8: StatusBarPage
public StatusBarPage()
{
InitializeComponent();
UpdateControlsForCurrentPane();
_imagesCollection.AddRange(
new Image[]
{
Resources.RecordMacro,
Resources.reject_small,
Resources.research_small,
Resources.resetpicture_small,
Resources.reviewingpane_small,
Resources.reviewingpanevertical_small,
Resources.rotateleft_small,
Resources.setlanguage_small,
Resources.themes_small,
Resources.tight_small,
Resources.translationscreentip_small,
Resources.wordoptions_small
}
);
_imagesEnumerator = _imagesCollection.GetEnumerator();
_imagesEnumerator.MoveNext();
_highlightTimer = new Timer();
_highlightTimer.Interval = 300;
_highlightTimer.Tick += HighlightTimer_Tick;
_progressBarTimer = new Timer();
_progressBarTimer.Interval = 40;
_progressBarTimer.Tick += ProgressBarTimer_Tick;
_progressBarTimer.Start();
CurrentPaneComboBox.SelectedIndexChanged += CurrentPaneComboBox_SelectedIndexChanged;
AddButtonSplitButton.Command = AddButtonCommand;
AddButtonButton.Command = AddButtonCommand;
AddButtonWithTextButton.Command = AddButtonWithTextCommand;
AddToggleButtonSplitButton.Command = AddToggleButtonCommand;
AddToggleButtonButton.Command = AddToggleButtonCommand;
AddToggleButtonWithTextButton.Command = AddToggleButtonWithTextCommand;
AddSliderButton.Command = AddSliderCommand;
AddButtonCommand.Executed += AddButtonCommand_Executed;
AddButtonWithTextCommand.Executed += AddButtonWithTextCommand_Executed;
AddToggleButtonCommand.Executed += AddToggleButtonCommand_Executed;
AddToggleButtonWithTextCommand.Executed += AddToggleButtonWithTextCommand_Executed;
AddSliderCommand.Executed += AddSliderCommand_Executed;
}
示例9: LoggableEntity_CreatesPropertiesForModifiedEntity
public void LoggableEntity_CreatesPropertiesForModifiedEntity()
{
String title = model.Title;
entry.State = EntityState.Modified;
entry.CurrentValues["Title"] = "Role";
entry.OriginalValues["Title"] = "Role";
IEnumerator<LoggableProperty> expected = new List<LoggableProperty> { new LoggableProperty(entry.Property("Title"), title) }.GetEnumerator();
IEnumerator<LoggableProperty> actual = new LoggableEntity(entry).Properties.GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.IsModified, actual.Current.IsModified);
Assert.Equal(expected.Current.ToString(), actual.Current.ToString());
}
}
示例10: VRPNAnalogRecording
//VRPNAnalogRecording Constructor
public VRPNAnalogRecording(string nName, float nTime, VRPNAnalog.AnalogReports nData)
{
name = nName;
reportTime = nTime;
data = nData;
e = data.list.GetEnumerator();
while (e.MoveNext())
{
VRPNAnalog.AnalogReportNew report = e.Current;
channels = report.num_channel;
lastTime = report.msg_time.tv_sec + (report.msg_time.tv_usec / 1000000f);
}
e = data.list.GetEnumerator();
}
示例11: OnEventFunc
public override void OnEventFunc(EventData data)
{
Renderer.sprite = NextSprite.Current;
if(!NextSprite.MoveNext())
{
NextSprite = SpriteList.GetEnumerator();
NextSprite.MoveNext();
}
if(DispatchOnFinish)
{
Dispatch = true;
}
else
{
DispatchEvent();
}
}
示例12: textBox_KeyDown
private void textBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Tab)
{
TextBox textBox = (TextBox)sender;
string text = textBox.Text;
int caretIndex = textBox.CaretIndex;
if (_enumerator.Current == null)
{
string possibleNick = Utilities.TextUtil.GetWordFromBack(text, caretIndex);
_before = text.Substring(0, textBox.CaretIndex - possibleNick.Length);
_after = text.Substring(textBox.CaretIndex, text.Length - textBox.CaretIndex);
_possibleNicks = GetPossibleNicks(possibleNick);
_enumerator = _possibleNicks.GetEnumerator();
}
if (!_enumerator.MoveNext())
{
_enumerator = _possibleNicks.GetEnumerator();
_enumerator.MoveNext();
}
if (_enumerator.Current != null)
{
string delimiter = (_before == String.Empty) ? ": " : " ";
textBox.Text = string.Format("{0}{1}{2}{3}", _before, _enumerator.Current, delimiter, _after);
textBox.CaretIndex = _before.Length + _enumerator.Current.Length + delimiter.Length;
}
e.Handled = true;
}
else
{
_enumerator = new List<string>.Enumerator();
}
}
示例13: LoggableEntity_CreatesPropertiesForAttachedEntity
public void LoggableEntity_CreatesPropertiesForAttachedEntity()
{
context.Dispose();
String title = model.Title;
context = new TestingContext();
context.Set<Role>().Attach(model);
entry = context.Entry<BaseModel>(model);
entry.OriginalValues["Title"] = "Role";
entry.CurrentValues["Title"] = "Role";
entry.State = EntityState.Modified;
IEnumerator<LoggableProperty> expected = new List<LoggableProperty> { new LoggableProperty(entry.Property("Title"), title) }.GetEnumerator();
IEnumerator<LoggableProperty> actual = new LoggableEntity(entry).Properties.GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.IsModified, actual.Current.IsModified);
Assert.Equal(expected.Current.ToString(), actual.Current.ToString());
}
}
示例14: SkipToNext
protected static Token? SkipToNext(ref List<Token>.Enumerator enumerator)
{
Token? token;
do {
if (!enumerator.MoveNext())
return null;
token = enumerator.Current;
switch (token.Value.Type) {
// regardless where we are, skip over whitespace, etc.
case TokenType.WhiteSpace:
case TokenType.LineComment:
case TokenType.MultilineComment:
continue;
}
break;
} while (true);
return token;
}
示例15: VRPNTrackerRecording
//VRPNTrackerRecording Constructor
public VRPNTrackerRecording(string nName, float nTime, VRPNTracker.TrackerReports nData)
{
name = nName;
reportTime = nTime;
data = nData;
e = data.list.GetEnumerator();
while (e.MoveNext())
{
VRPNTracker.TrackerReportNew report = e.Current;
int test;
if (!sensors.TryGetValue(report.sensor, out test))
{
sensors.Add(report.sensor, report.sensor);
}
lastTime = report.msg_time.tv_sec + (report.msg_time.tv_usec / 1000000f);
}
e = data.list.GetEnumerator();
}