コード例 #1
0
        /// <summary>
        /// Выбрать первый таблет
        /// </summary>
        public void SwitchFirst()
        {
            if (components.Count != 0)
            {
                currentVisible = components[0];

                currentVisible.Show();
                currentVisible.Visible = true;

                currentVisible.BringToFront();
            }
        }
コード例 #2
0
        /// <summary>
        /// Добавить представление
        /// </summary>
        /// <param name="component">Представление</param>
        public void AttachView(IUisComponent component)
        {
            component.Parent = this;
            component.Dock   = DockStyle.Fill;

            if (component != null)
            {
                component.Hide();
                component.Visible = false;
            }

            components.Add(component);
        }
コード例 #3
0
        /// <summary>
        /// Переключиться на другое представление
        /// </summary>
        /// <param name="component"></param>
        public void SwitchTo(IUisComponent component)
        {
            if (component != currentVisible)
            {
                component.Show();
                component.BringToFront();

                if (currentVisible != null)
                {
                    currentVisible.Hide();
                    currentVisible.Visible = false;
                }

                currentVisible = component;
            }
        }
コード例 #4
0
 public UisComponentsContainer()
 {
     this.Parent    = Parent;
     components     = new List <IUisComponent>();
     currentVisible = null;
 }