LunarPresentation/TextCmdList.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System.Collections.Generic;

namespace SHomeWorkshop.LunarPresentation
{
    public class TextCmdList
    {
        private List<string> cmdStrings = new List<string>();

        public void AddCmd(string newCmdString)
        {
            cmdStrings.Add(newCmdString);
            this.index = this.cmdStrings.Count;
        }

        private string curCmdString;

        public string CurCmdString
        {
            get { return curCmdString; }
        }

        public bool IsNextEnable
        {
            get
            {
                return (this.index >= 0 && this.index < this.cmdStrings.Count - 1);
            }
        }

        public void Next()
        {
            this.index += 1;
            if (this.index < this.cmdStrings.Count)
            {
                this.curCmdString = this.cmdStrings[index];
            }
            else
            {
                this.curCmdString = null;
            }
        }

        public bool IsPreviewEnable
        {
            get
            {
                return (this.index > 0 && this.index <= this.cmdStrings.Count);
            }
        }

        public void Preview()
        {
            this.index -= 1;
            if (this.index >= 0)
            {
                this.curCmdString = this.cmdStrings[index];
            }
            else
            {
                this.curCmdString = null;
后面还有 16 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。