CodeImp.Gluon.NotesDisplayPanel.RefreshMainItems C# (CSharp) Метод

RefreshMainItems() публичный Метод

public RefreshMainItems ( ) : void
Результат void
        public void RefreshMainItems()
        {
            for(int i = 0; i < NUM_MAIN_ITEM_CONTROLS; i++)
            {
                int realindex = i + scrolloffset;
                if(realindex > (items.Length - 1))
                {
                    // Don't show this control
                    mainitems[i].StopInfoFlash();
                    mainitems[i].Visible = false;
                }
                else
                {
                    // Update caption
                    string text = items[realindex].note;
                    text = text.Replace("\n", "  •  ");
                    text = text.Replace("\r", "");
                    mainitems[i].Text = "•  " + text;

                    // Update selection flash
                    if(selectedindex == realindex)
                        mainitems[i].StartInfoFlash();
                    else
                        mainitems[i].StopInfoFlash();

                    mainitems[i].Visible = true;
                }
            }

            // Flash buttons when scrolling available
            if(scrolloffset > 0)
                mainup.StartInfoFlash();
            else
                mainup.StopInfoFlash();

            if(scrolloffset < (items.Length - NUM_MAIN_ITEM_CONTROLS))
                maindown.StartInfoFlash();
            else
                maindown.StopInfoFlash();
        }