Exemplo n.º 1
0
        public override void DisplayData()
        {
            StoryProgressTracker?nullableProgress = GetProgressFunc();

            currentProgress = (StoryProgressTracker)nullableProgress;
            PrintableString[] strings = new PrintableString[2];
            strings[0] = new PrintableString("Active", 0);
            strings[1] = new PrintableString("Completed", 1);
            SetDisplayableArrayData <DataItem>(strings, 1);
            ProcessClickStoryStatusButton(strings[0]);
        }
Exemplo n.º 2
0
		public override void ProcessArrayList(ArrayList sentArrayList)
		{
			for (int i = 0; i < sentArrayList.Count; i++)
			{
				if (sentArrayList[i] is StoryProgressTracker)
				{
					StoryProgressTracker progress = (StoryProgressTracker)sentArrayList[i];
					activeStories = progress.activeStories.ToList();
					completedStories = progress.completedStories.ToList();
				}
			}
		}
Exemplo n.º 3
0
        //Compare defined index with current progress to determine if condition is met
        public bool GetIsConditionMet()
        {
            //Get progress from data holder
            StoryProgressTracker?progressTracker = DataHolder.GetData();

            if (progressTracker != null)
            {
                //Cast nullable progress as non-nullable
                StoryProgressTracker tracker = (StoryProgressTracker)progressTracker;
                //Check if condition is met
                if (tracker.GetIsStoryActive(storyIndex))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 4
0
        public int[][] GetItem(bool isActive)
        {
            if (!GetIsExtensionLoaded() || GetDataFunc == null)
            {
                return(null);
            }
            StoryProgressTracker?nullableTracker = GetDataFunc();

            if (nullableTracker == null)
            {
                return(null);
            }
            StoryProgressTracker tracker = (StoryProgressTracker)nullableTracker;

            if (isActive)
            {
                return(tracker.GetActiveStoryIdentifiers());
            }
            return(tracker.GetCompletedStoryIdentifiers());
        }
Exemplo n.º 5
0
		public StoryProgressTracker? GetProgress()
		{
			StoryProgressTracker tempTracker = new StoryProgressTracker(ActiveStories.ToArray(), CompletedStories.ToArray());
			return tempTracker;
		}
Exemplo n.º 6
0
		public override void AddDataToArrayList(ArrayList sentArrayList)
		{
			StoryProgressTracker progress = new StoryProgressTracker(activeStories.ToArray(), completedStories.ToArray());
			sentArrayList.Add(progress);
		}