Exemple #1
0
        public void OpenStack(int index)
        {
            if (stacksVector[index].IsStack)
            {
                stacksVector[index].animateToShowItems(0);
            }

            selectedStack = stacksVector[index];
        }
Exemple #2
0
        void loadControls()
        {
            if (dataSource != null)
            {
                NumberOfStacks = dataSource.Sections.Count;
                float stackViewXPosition = 400;
                for (int i = 0; i < NumberOfStacks; i++)
                {
                    var stack = new IStackView(stackViewXPosition);
                    stack.StackItemCreated += HandleStackItemCreated;

                    stack.StackNumber = i;
                    stack.Chapter     = Chapter;
                    stack.Section     = i;

                    stack.Source = dataSource.Sections[i];


                    stack.StackViewsUpdate    += HandleStackViewsUpdate;
                    stack.StackViewsDidFinish += HandleStackViewsDidFinish;

                    stack.StackItemFullAnimationStarted    += HandleStackItemFullAnimationStarted;
                    stack.StackItemFullAnimationCompleted  += HandleStackItemFullAnimationCompleted;
                    stack.StackItemThumbAnimationStarted   += HandleStackItemThumbAnimationStarted;
                    stack.StackItemThumbAnimationCompleted += HandleStackItemThumbAnimationCompleted;

                    Add(stack);
                    stacksVector.Add(stack);

                    stackViewXPosition += (float)stack.Frame.Width;
                }

                //header
                headerControl.Author          = dataSource.Author;
                headerControl.Title           = dataSource.Title;
                headerControl.DescriptionText = dataSource.Description;
                headerControl.ChapterColor    = dataSource.ChapterColor;

                CGRect tmp = Frame;
                tmp.Width = stackViewXPosition;
                Frame     = tmp;
            }
        }
Exemple #3
0
 void HandleStackItemFullAnimationStarted(object sender, int chapter, int section, int page)
 {
     StackItemFullAnimationStarted(sender, chapter, section, page);
     selectedStack = stacksVector[section];
 }