当前位置: 首页>>代码示例>>C#>>正文


C# List.MoveNext方法代码示例

本文整理汇总了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);
        }
开发者ID:software-engineering-amsterdam,项目名称:poly-ql,代码行数:7,代码来源:Printer.cs

示例2: Awake

    // Use this for initialization
    public override void Awake()
    {
        base.Awake();
        TimeScaleList.Add(Game.GameTimeScale);

        NextTimeScale = TimeScaleList.GetEnumerator();
        NextTimeScale.MoveNext();
    }
开发者ID:Filiecs,项目名称:U-EAT,代码行数:9,代码来源:CycleTimeScaleOnEvent.cs

示例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;
 }
开发者ID:kuviman,项目名称:csVPE,代码行数:8,代码来源:AnimatedTexture.cs

示例4: Reset

        //------------------------------------------------------------------
        public override void Reset()
        {
            AddNewActions ();

            enumerator = Actions.GetEnumerator ();
            enumerator.MoveNext ();

            Actions.ForEach (action => action.Reset());
        }
开发者ID:CompleteBrains,项目名称:Escape,代码行数:10,代码来源:Loop.cs

示例5: OnEventFunc

 public override void OnEventFunc(EventData data)
 {
     Game.GameTimeScale = NextTimeScale.Current;
     if (!NextTimeScale.MoveNext())
     {
         NextTimeScale = TimeScaleList.GetEnumerator();
         NextTimeScale.MoveNext();
     }
 }
开发者ID:Filiecs,项目名称:U-EAT,代码行数:9,代码来源:CycleTimeScaleOnEvent.cs

示例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;
 }
开发者ID:Filiecs,项目名称:U-EAT,代码行数:10,代码来源:CycleSpriteOnEvent.cs

示例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));
     }
   }
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:11,代码来源:ScriptCompilers.cs

示例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;
        }
开发者ID:WeDoCrm,项目名称:misc,代码行数:52,代码来源:StatusBarPage.cs

示例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());
            }
        }
开发者ID:NonFactors,项目名称:MVC5.Template,代码行数:16,代码来源:LoggableEntityTests.cs

示例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();
    }
开发者ID:Calvino85,项目名称:VRPN-Tool,代码行数:17,代码来源:VRPNAnalogRecording.cs

示例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();
        }
    }
开发者ID:Filiecs,项目名称:U-EAT,代码行数:18,代码来源:CycleSpriteOnEvent.cs

示例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();
            }
        }
开发者ID:erpframework,项目名称:xeus-messenger2,代码行数:41,代码来源:MucNicknames.cs

示例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());
            }
        }
开发者ID:NonFactors,项目名称:MVC5.Template,代码行数:21,代码来源:LoggableEntityTests.cs

示例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;
        }
开发者ID:coapp-deprecated,项目名称:_toolkit_deprecated,代码行数:21,代码来源:PropertySheetParser.cs

示例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();
    }
开发者ID:Calvino85,项目名称:VRPN-Tool,代码行数:22,代码来源:VRPNTrackerRecording.cs


注:本文中的List.MoveNext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。